grpc.control_client._SimilarityMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-protos-jvm Show documentation
Show all versions of client-protos-jvm Show documentation
Kotlin protobuf protocols for the JVM that define the Momento gRPC wire format
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: controlclient.proto
package grpc.control_client;
/**
* Protobuf type {@code control_client._SimilarityMetric}
*/
public final class _SimilarityMetric extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:control_client._SimilarityMetric)
_SimilarityMetricOrBuilder {
private static final long serialVersionUID = 0L;
// Use _SimilarityMetric.newBuilder() to construct.
private _SimilarityMetric(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _SimilarityMetric() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _SimilarityMetric();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric.class, grpc.control_client._SimilarityMetric.Builder.class);
}
public interface _EuclideanSimilarityOrBuilder extends
// @@protoc_insertion_point(interface_extends:control_client._SimilarityMetric._EuclideanSimilarity)
com.google.protobuf.MessageOrBuilder {
}
/**
* Protobuf type {@code control_client._SimilarityMetric._EuclideanSimilarity}
*/
public static final class _EuclideanSimilarity extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:control_client._SimilarityMetric._EuclideanSimilarity)
_EuclideanSimilarityOrBuilder {
private static final long serialVersionUID = 0L;
// Use _EuclideanSimilarity.newBuilder() to construct.
private _EuclideanSimilarity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _EuclideanSimilarity() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _EuclideanSimilarity();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__EuclideanSimilarity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__EuclideanSimilarity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric._EuclideanSimilarity.class, grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder.class);
}
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 {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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._SimilarityMetric._EuclideanSimilarity)) {
return super.equals(obj);
}
grpc.control_client._SimilarityMetric._EuclideanSimilarity other = (grpc.control_client._SimilarityMetric._EuclideanSimilarity) obj;
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 = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity 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._SimilarityMetric._EuclideanSimilarity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity 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._SimilarityMetric._EuclideanSimilarity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity 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._SimilarityMetric._EuclideanSimilarity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity 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._SimilarityMetric._EuclideanSimilarity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity 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._SimilarityMetric._EuclideanSimilarity 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;
}
/**
* Protobuf type {@code control_client._SimilarityMetric._EuclideanSimilarity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:control_client._SimilarityMetric._EuclideanSimilarity)
grpc.control_client._SimilarityMetric._EuclideanSimilarityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__EuclideanSimilarity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__EuclideanSimilarity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric._EuclideanSimilarity.class, grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder.class);
}
// Construct using grpc.control_client._SimilarityMetric._EuclideanSimilarity.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__EuclideanSimilarity_descriptor;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarity getDefaultInstanceForType() {
return grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarity build() {
grpc.control_client._SimilarityMetric._EuclideanSimilarity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarity buildPartial() {
grpc.control_client._SimilarityMetric._EuclideanSimilarity result = new grpc.control_client._SimilarityMetric._EuclideanSimilarity(this);
onBuilt();
return result;
}
@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._SimilarityMetric._EuclideanSimilarity) {
return mergeFrom((grpc.control_client._SimilarityMetric._EuclideanSimilarity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.control_client._SimilarityMetric._EuclideanSimilarity other) {
if (other == grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance()) return this;
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;
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;
}
@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:control_client._SimilarityMetric._EuclideanSimilarity)
}
// @@protoc_insertion_point(class_scope:control_client._SimilarityMetric._EuclideanSimilarity)
private static final grpc.control_client._SimilarityMetric._EuclideanSimilarity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.control_client._SimilarityMetric._EuclideanSimilarity();
}
public static grpc.control_client._SimilarityMetric._EuclideanSimilarity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_EuclideanSimilarity>
PARSER = new com.google.protobuf.AbstractParser<_EuclideanSimilarity>() {
@java.lang.Override
public _EuclideanSimilarity 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<_EuclideanSimilarity> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_EuclideanSimilarity> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface _InnerProductOrBuilder extends
// @@protoc_insertion_point(interface_extends:control_client._SimilarityMetric._InnerProduct)
com.google.protobuf.MessageOrBuilder {
}
/**
* Protobuf type {@code control_client._SimilarityMetric._InnerProduct}
*/
public static final class _InnerProduct extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:control_client._SimilarityMetric._InnerProduct)
_InnerProductOrBuilder {
private static final long serialVersionUID = 0L;
// Use _InnerProduct.newBuilder() to construct.
private _InnerProduct(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _InnerProduct() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _InnerProduct();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__InnerProduct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__InnerProduct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric._InnerProduct.class, grpc.control_client._SimilarityMetric._InnerProduct.Builder.class);
}
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 {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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._SimilarityMetric._InnerProduct)) {
return super.equals(obj);
}
grpc.control_client._SimilarityMetric._InnerProduct other = (grpc.control_client._SimilarityMetric._InnerProduct) obj;
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 = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.control_client._SimilarityMetric._InnerProduct parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._InnerProduct 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._SimilarityMetric._InnerProduct parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._InnerProduct 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._SimilarityMetric._InnerProduct parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._InnerProduct parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.control_client._SimilarityMetric._InnerProduct parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._InnerProduct 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._SimilarityMetric._InnerProduct parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._InnerProduct 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._SimilarityMetric._InnerProduct parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._InnerProduct 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._SimilarityMetric._InnerProduct 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;
}
/**
* Protobuf type {@code control_client._SimilarityMetric._InnerProduct}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:control_client._SimilarityMetric._InnerProduct)
grpc.control_client._SimilarityMetric._InnerProductOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__InnerProduct_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__InnerProduct_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric._InnerProduct.class, grpc.control_client._SimilarityMetric._InnerProduct.Builder.class);
}
// Construct using grpc.control_client._SimilarityMetric._InnerProduct.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__InnerProduct_descriptor;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProduct getDefaultInstanceForType() {
return grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProduct build() {
grpc.control_client._SimilarityMetric._InnerProduct result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProduct buildPartial() {
grpc.control_client._SimilarityMetric._InnerProduct result = new grpc.control_client._SimilarityMetric._InnerProduct(this);
onBuilt();
return result;
}
@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._SimilarityMetric._InnerProduct) {
return mergeFrom((grpc.control_client._SimilarityMetric._InnerProduct)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.control_client._SimilarityMetric._InnerProduct other) {
if (other == grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance()) return this;
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;
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;
}
@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:control_client._SimilarityMetric._InnerProduct)
}
// @@protoc_insertion_point(class_scope:control_client._SimilarityMetric._InnerProduct)
private static final grpc.control_client._SimilarityMetric._InnerProduct DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.control_client._SimilarityMetric._InnerProduct();
}
public static grpc.control_client._SimilarityMetric._InnerProduct getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_InnerProduct>
PARSER = new com.google.protobuf.AbstractParser<_InnerProduct>() {
@java.lang.Override
public _InnerProduct 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<_InnerProduct> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_InnerProduct> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProduct getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface _CosineSimilarityOrBuilder extends
// @@protoc_insertion_point(interface_extends:control_client._SimilarityMetric._CosineSimilarity)
com.google.protobuf.MessageOrBuilder {
}
/**
* Protobuf type {@code control_client._SimilarityMetric._CosineSimilarity}
*/
public static final class _CosineSimilarity extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:control_client._SimilarityMetric._CosineSimilarity)
_CosineSimilarityOrBuilder {
private static final long serialVersionUID = 0L;
// Use _CosineSimilarity.newBuilder() to construct.
private _CosineSimilarity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _CosineSimilarity() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _CosineSimilarity();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__CosineSimilarity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__CosineSimilarity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric._CosineSimilarity.class, grpc.control_client._SimilarityMetric._CosineSimilarity.Builder.class);
}
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 {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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._SimilarityMetric._CosineSimilarity)) {
return super.equals(obj);
}
grpc.control_client._SimilarityMetric._CosineSimilarity other = (grpc.control_client._SimilarityMetric._CosineSimilarity) obj;
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 = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity 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._SimilarityMetric._CosineSimilarity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity 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._SimilarityMetric._CosineSimilarity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity 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._SimilarityMetric._CosineSimilarity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity 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._SimilarityMetric._CosineSimilarity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity 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._SimilarityMetric._CosineSimilarity 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;
}
/**
* Protobuf type {@code control_client._SimilarityMetric._CosineSimilarity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:control_client._SimilarityMetric._CosineSimilarity)
grpc.control_client._SimilarityMetric._CosineSimilarityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__CosineSimilarity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__CosineSimilarity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric._CosineSimilarity.class, grpc.control_client._SimilarityMetric._CosineSimilarity.Builder.class);
}
// Construct using grpc.control_client._SimilarityMetric._CosineSimilarity.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric__CosineSimilarity_descriptor;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarity getDefaultInstanceForType() {
return grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarity build() {
grpc.control_client._SimilarityMetric._CosineSimilarity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarity buildPartial() {
grpc.control_client._SimilarityMetric._CosineSimilarity result = new grpc.control_client._SimilarityMetric._CosineSimilarity(this);
onBuilt();
return result;
}
@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._SimilarityMetric._CosineSimilarity) {
return mergeFrom((grpc.control_client._SimilarityMetric._CosineSimilarity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.control_client._SimilarityMetric._CosineSimilarity other) {
if (other == grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance()) return this;
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;
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;
}
@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:control_client._SimilarityMetric._CosineSimilarity)
}
// @@protoc_insertion_point(class_scope:control_client._SimilarityMetric._CosineSimilarity)
private static final grpc.control_client._SimilarityMetric._CosineSimilarity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.control_client._SimilarityMetric._CosineSimilarity();
}
public static grpc.control_client._SimilarityMetric._CosineSimilarity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_CosineSimilarity>
PARSER = new com.google.protobuf.AbstractParser<_CosineSimilarity>() {
@java.lang.Override
public _CosineSimilarity 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<_CosineSimilarity> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_CosineSimilarity> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int similarityMetricCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object similarityMetric_;
public enum SimilarityMetricCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
EUCLIDEAN_SIMILARITY(1),
INNER_PRODUCT(2),
COSINE_SIMILARITY(3),
SIMILARITYMETRIC_NOT_SET(0);
private final int value;
private SimilarityMetricCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SimilarityMetricCase valueOf(int value) {
return forNumber(value);
}
public static SimilarityMetricCase forNumber(int value) {
switch (value) {
case 1: return EUCLIDEAN_SIMILARITY;
case 2: return INNER_PRODUCT;
case 3: return COSINE_SIMILARITY;
case 0: return SIMILARITYMETRIC_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SimilarityMetricCase
getSimilarityMetricCase() {
return SimilarityMetricCase.forNumber(
similarityMetricCase_);
}
public static final int EUCLIDEAN_SIMILARITY_FIELD_NUMBER = 1;
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
* @return Whether the euclideanSimilarity field is set.
*/
@java.lang.Override
public boolean hasEuclideanSimilarity() {
return similarityMetricCase_ == 1;
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
* @return The euclideanSimilarity.
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarity getEuclideanSimilarity() {
if (similarityMetricCase_ == 1) {
return (grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarityOrBuilder getEuclideanSimilarityOrBuilder() {
if (similarityMetricCase_ == 1) {
return (grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
}
public static final int INNER_PRODUCT_FIELD_NUMBER = 2;
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
* @return Whether the innerProduct field is set.
*/
@java.lang.Override
public boolean hasInnerProduct() {
return similarityMetricCase_ == 2;
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
* @return The innerProduct.
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProduct getInnerProduct() {
if (similarityMetricCase_ == 2) {
return (grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProductOrBuilder getInnerProductOrBuilder() {
if (similarityMetricCase_ == 2) {
return (grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
}
public static final int COSINE_SIMILARITY_FIELD_NUMBER = 3;
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
* @return Whether the cosineSimilarity field is set.
*/
@java.lang.Override
public boolean hasCosineSimilarity() {
return similarityMetricCase_ == 3;
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
* @return The cosineSimilarity.
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarity getCosineSimilarity() {
if (similarityMetricCase_ == 3) {
return (grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarityOrBuilder getCosineSimilarityOrBuilder() {
if (similarityMetricCase_ == 3) {
return (grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
}
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 (similarityMetricCase_ == 1) {
output.writeMessage(1, (grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_);
}
if (similarityMetricCase_ == 2) {
output.writeMessage(2, (grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_);
}
if (similarityMetricCase_ == 3) {
output.writeMessage(3, (grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (similarityMetricCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_);
}
if (similarityMetricCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_);
}
if (similarityMetricCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_);
}
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._SimilarityMetric)) {
return super.equals(obj);
}
grpc.control_client._SimilarityMetric other = (grpc.control_client._SimilarityMetric) obj;
if (!getSimilarityMetricCase().equals(other.getSimilarityMetricCase())) return false;
switch (similarityMetricCase_) {
case 1:
if (!getEuclideanSimilarity()
.equals(other.getEuclideanSimilarity())) return false;
break;
case 2:
if (!getInnerProduct()
.equals(other.getInnerProduct())) return false;
break;
case 3:
if (!getCosineSimilarity()
.equals(other.getCosineSimilarity())) return false;
break;
case 0:
default:
}
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();
switch (similarityMetricCase_) {
case 1:
hash = (37 * hash) + EUCLIDEAN_SIMILARITY_FIELD_NUMBER;
hash = (53 * hash) + getEuclideanSimilarity().hashCode();
break;
case 2:
hash = (37 * hash) + INNER_PRODUCT_FIELD_NUMBER;
hash = (53 * hash) + getInnerProduct().hashCode();
break;
case 3:
hash = (37 * hash) + COSINE_SIMILARITY_FIELD_NUMBER;
hash = (53 * hash) + getCosineSimilarity().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.control_client._SimilarityMetric parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric 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._SimilarityMetric parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric 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._SimilarityMetric parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.control_client._SimilarityMetric parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.control_client._SimilarityMetric parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric 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._SimilarityMetric parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric 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._SimilarityMetric parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.control_client._SimilarityMetric 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._SimilarityMetric 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;
}
/**
* Protobuf type {@code control_client._SimilarityMetric}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:control_client._SimilarityMetric)
grpc.control_client._SimilarityMetricOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._SimilarityMetric.class, grpc.control_client._SimilarityMetric.Builder.class);
}
// Construct using grpc.control_client._SimilarityMetric.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (euclideanSimilarityBuilder_ != null) {
euclideanSimilarityBuilder_.clear();
}
if (innerProductBuilder_ != null) {
innerProductBuilder_.clear();
}
if (cosineSimilarityBuilder_ != null) {
cosineSimilarityBuilder_.clear();
}
similarityMetricCase_ = 0;
similarityMetric_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.control_client.Controlclient.internal_static_control_client__SimilarityMetric_descriptor;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric getDefaultInstanceForType() {
return grpc.control_client._SimilarityMetric.getDefaultInstance();
}
@java.lang.Override
public grpc.control_client._SimilarityMetric build() {
grpc.control_client._SimilarityMetric result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric buildPartial() {
grpc.control_client._SimilarityMetric result = new grpc.control_client._SimilarityMetric(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(grpc.control_client._SimilarityMetric result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(grpc.control_client._SimilarityMetric result) {
result.similarityMetricCase_ = similarityMetricCase_;
result.similarityMetric_ = this.similarityMetric_;
if (similarityMetricCase_ == 1 &&
euclideanSimilarityBuilder_ != null) {
result.similarityMetric_ = euclideanSimilarityBuilder_.build();
}
if (similarityMetricCase_ == 2 &&
innerProductBuilder_ != null) {
result.similarityMetric_ = innerProductBuilder_.build();
}
if (similarityMetricCase_ == 3 &&
cosineSimilarityBuilder_ != null) {
result.similarityMetric_ = cosineSimilarityBuilder_.build();
}
}
@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._SimilarityMetric) {
return mergeFrom((grpc.control_client._SimilarityMetric)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.control_client._SimilarityMetric other) {
if (other == grpc.control_client._SimilarityMetric.getDefaultInstance()) return this;
switch (other.getSimilarityMetricCase()) {
case EUCLIDEAN_SIMILARITY: {
mergeEuclideanSimilarity(other.getEuclideanSimilarity());
break;
}
case INNER_PRODUCT: {
mergeInnerProduct(other.getInnerProduct());
break;
}
case COSINE_SIMILARITY: {
mergeCosineSimilarity(other.getCosineSimilarity());
break;
}
case SIMILARITYMETRIC_NOT_SET: {
break;
}
}
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: {
input.readMessage(
getEuclideanSimilarityFieldBuilder().getBuilder(),
extensionRegistry);
similarityMetricCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getInnerProductFieldBuilder().getBuilder(),
extensionRegistry);
similarityMetricCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getCosineSimilarityFieldBuilder().getBuilder(),
extensionRegistry);
similarityMetricCase_ = 3;
break;
} // case 26
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 similarityMetricCase_ = 0;
private java.lang.Object similarityMetric_;
public SimilarityMetricCase
getSimilarityMetricCase() {
return SimilarityMetricCase.forNumber(
similarityMetricCase_);
}
public Builder clearSimilarityMetric() {
similarityMetricCase_ = 0;
similarityMetric_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._EuclideanSimilarity, grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder, grpc.control_client._SimilarityMetric._EuclideanSimilarityOrBuilder> euclideanSimilarityBuilder_;
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
* @return Whether the euclideanSimilarity field is set.
*/
@java.lang.Override
public boolean hasEuclideanSimilarity() {
return similarityMetricCase_ == 1;
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
* @return The euclideanSimilarity.
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarity getEuclideanSimilarity() {
if (euclideanSimilarityBuilder_ == null) {
if (similarityMetricCase_ == 1) {
return (grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
} else {
if (similarityMetricCase_ == 1) {
return euclideanSimilarityBuilder_.getMessage();
}
return grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
}
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
public Builder setEuclideanSimilarity(grpc.control_client._SimilarityMetric._EuclideanSimilarity value) {
if (euclideanSimilarityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
similarityMetric_ = value;
onChanged();
} else {
euclideanSimilarityBuilder_.setMessage(value);
}
similarityMetricCase_ = 1;
return this;
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
public Builder setEuclideanSimilarity(
grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder builderForValue) {
if (euclideanSimilarityBuilder_ == null) {
similarityMetric_ = builderForValue.build();
onChanged();
} else {
euclideanSimilarityBuilder_.setMessage(builderForValue.build());
}
similarityMetricCase_ = 1;
return this;
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
public Builder mergeEuclideanSimilarity(grpc.control_client._SimilarityMetric._EuclideanSimilarity value) {
if (euclideanSimilarityBuilder_ == null) {
if (similarityMetricCase_ == 1 &&
similarityMetric_ != grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance()) {
similarityMetric_ = grpc.control_client._SimilarityMetric._EuclideanSimilarity.newBuilder((grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_)
.mergeFrom(value).buildPartial();
} else {
similarityMetric_ = value;
}
onChanged();
} else {
if (similarityMetricCase_ == 1) {
euclideanSimilarityBuilder_.mergeFrom(value);
} else {
euclideanSimilarityBuilder_.setMessage(value);
}
}
similarityMetricCase_ = 1;
return this;
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
public Builder clearEuclideanSimilarity() {
if (euclideanSimilarityBuilder_ == null) {
if (similarityMetricCase_ == 1) {
similarityMetricCase_ = 0;
similarityMetric_ = null;
onChanged();
}
} else {
if (similarityMetricCase_ == 1) {
similarityMetricCase_ = 0;
similarityMetric_ = null;
}
euclideanSimilarityBuilder_.clear();
}
return this;
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
public grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder getEuclideanSimilarityBuilder() {
return getEuclideanSimilarityFieldBuilder().getBuilder();
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._EuclideanSimilarityOrBuilder getEuclideanSimilarityOrBuilder() {
if ((similarityMetricCase_ == 1) && (euclideanSimilarityBuilder_ != null)) {
return euclideanSimilarityBuilder_.getMessageOrBuilder();
} else {
if (similarityMetricCase_ == 1) {
return (grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
}
}
/**
* .control_client._SimilarityMetric._EuclideanSimilarity euclidean_similarity = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._EuclideanSimilarity, grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder, grpc.control_client._SimilarityMetric._EuclideanSimilarityOrBuilder>
getEuclideanSimilarityFieldBuilder() {
if (euclideanSimilarityBuilder_ == null) {
if (!(similarityMetricCase_ == 1)) {
similarityMetric_ = grpc.control_client._SimilarityMetric._EuclideanSimilarity.getDefaultInstance();
}
euclideanSimilarityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._EuclideanSimilarity, grpc.control_client._SimilarityMetric._EuclideanSimilarity.Builder, grpc.control_client._SimilarityMetric._EuclideanSimilarityOrBuilder>(
(grpc.control_client._SimilarityMetric._EuclideanSimilarity) similarityMetric_,
getParentForChildren(),
isClean());
similarityMetric_ = null;
}
similarityMetricCase_ = 1;
onChanged();
return euclideanSimilarityBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._InnerProduct, grpc.control_client._SimilarityMetric._InnerProduct.Builder, grpc.control_client._SimilarityMetric._InnerProductOrBuilder> innerProductBuilder_;
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
* @return Whether the innerProduct field is set.
*/
@java.lang.Override
public boolean hasInnerProduct() {
return similarityMetricCase_ == 2;
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
* @return The innerProduct.
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProduct getInnerProduct() {
if (innerProductBuilder_ == null) {
if (similarityMetricCase_ == 2) {
return (grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
} else {
if (similarityMetricCase_ == 2) {
return innerProductBuilder_.getMessage();
}
return grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
}
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
public Builder setInnerProduct(grpc.control_client._SimilarityMetric._InnerProduct value) {
if (innerProductBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
similarityMetric_ = value;
onChanged();
} else {
innerProductBuilder_.setMessage(value);
}
similarityMetricCase_ = 2;
return this;
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
public Builder setInnerProduct(
grpc.control_client._SimilarityMetric._InnerProduct.Builder builderForValue) {
if (innerProductBuilder_ == null) {
similarityMetric_ = builderForValue.build();
onChanged();
} else {
innerProductBuilder_.setMessage(builderForValue.build());
}
similarityMetricCase_ = 2;
return this;
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
public Builder mergeInnerProduct(grpc.control_client._SimilarityMetric._InnerProduct value) {
if (innerProductBuilder_ == null) {
if (similarityMetricCase_ == 2 &&
similarityMetric_ != grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance()) {
similarityMetric_ = grpc.control_client._SimilarityMetric._InnerProduct.newBuilder((grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_)
.mergeFrom(value).buildPartial();
} else {
similarityMetric_ = value;
}
onChanged();
} else {
if (similarityMetricCase_ == 2) {
innerProductBuilder_.mergeFrom(value);
} else {
innerProductBuilder_.setMessage(value);
}
}
similarityMetricCase_ = 2;
return this;
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
public Builder clearInnerProduct() {
if (innerProductBuilder_ == null) {
if (similarityMetricCase_ == 2) {
similarityMetricCase_ = 0;
similarityMetric_ = null;
onChanged();
}
} else {
if (similarityMetricCase_ == 2) {
similarityMetricCase_ = 0;
similarityMetric_ = null;
}
innerProductBuilder_.clear();
}
return this;
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
public grpc.control_client._SimilarityMetric._InnerProduct.Builder getInnerProductBuilder() {
return getInnerProductFieldBuilder().getBuilder();
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._InnerProductOrBuilder getInnerProductOrBuilder() {
if ((similarityMetricCase_ == 2) && (innerProductBuilder_ != null)) {
return innerProductBuilder_.getMessageOrBuilder();
} else {
if (similarityMetricCase_ == 2) {
return (grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
}
}
/**
* .control_client._SimilarityMetric._InnerProduct inner_product = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._InnerProduct, grpc.control_client._SimilarityMetric._InnerProduct.Builder, grpc.control_client._SimilarityMetric._InnerProductOrBuilder>
getInnerProductFieldBuilder() {
if (innerProductBuilder_ == null) {
if (!(similarityMetricCase_ == 2)) {
similarityMetric_ = grpc.control_client._SimilarityMetric._InnerProduct.getDefaultInstance();
}
innerProductBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._InnerProduct, grpc.control_client._SimilarityMetric._InnerProduct.Builder, grpc.control_client._SimilarityMetric._InnerProductOrBuilder>(
(grpc.control_client._SimilarityMetric._InnerProduct) similarityMetric_,
getParentForChildren(),
isClean());
similarityMetric_ = null;
}
similarityMetricCase_ = 2;
onChanged();
return innerProductBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._CosineSimilarity, grpc.control_client._SimilarityMetric._CosineSimilarity.Builder, grpc.control_client._SimilarityMetric._CosineSimilarityOrBuilder> cosineSimilarityBuilder_;
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
* @return Whether the cosineSimilarity field is set.
*/
@java.lang.Override
public boolean hasCosineSimilarity() {
return similarityMetricCase_ == 3;
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
* @return The cosineSimilarity.
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarity getCosineSimilarity() {
if (cosineSimilarityBuilder_ == null) {
if (similarityMetricCase_ == 3) {
return (grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
} else {
if (similarityMetricCase_ == 3) {
return cosineSimilarityBuilder_.getMessage();
}
return grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
}
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
public Builder setCosineSimilarity(grpc.control_client._SimilarityMetric._CosineSimilarity value) {
if (cosineSimilarityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
similarityMetric_ = value;
onChanged();
} else {
cosineSimilarityBuilder_.setMessage(value);
}
similarityMetricCase_ = 3;
return this;
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
public Builder setCosineSimilarity(
grpc.control_client._SimilarityMetric._CosineSimilarity.Builder builderForValue) {
if (cosineSimilarityBuilder_ == null) {
similarityMetric_ = builderForValue.build();
onChanged();
} else {
cosineSimilarityBuilder_.setMessage(builderForValue.build());
}
similarityMetricCase_ = 3;
return this;
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
public Builder mergeCosineSimilarity(grpc.control_client._SimilarityMetric._CosineSimilarity value) {
if (cosineSimilarityBuilder_ == null) {
if (similarityMetricCase_ == 3 &&
similarityMetric_ != grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance()) {
similarityMetric_ = grpc.control_client._SimilarityMetric._CosineSimilarity.newBuilder((grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_)
.mergeFrom(value).buildPartial();
} else {
similarityMetric_ = value;
}
onChanged();
} else {
if (similarityMetricCase_ == 3) {
cosineSimilarityBuilder_.mergeFrom(value);
} else {
cosineSimilarityBuilder_.setMessage(value);
}
}
similarityMetricCase_ = 3;
return this;
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
public Builder clearCosineSimilarity() {
if (cosineSimilarityBuilder_ == null) {
if (similarityMetricCase_ == 3) {
similarityMetricCase_ = 0;
similarityMetric_ = null;
onChanged();
}
} else {
if (similarityMetricCase_ == 3) {
similarityMetricCase_ = 0;
similarityMetric_ = null;
}
cosineSimilarityBuilder_.clear();
}
return this;
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
public grpc.control_client._SimilarityMetric._CosineSimilarity.Builder getCosineSimilarityBuilder() {
return getCosineSimilarityFieldBuilder().getBuilder();
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
@java.lang.Override
public grpc.control_client._SimilarityMetric._CosineSimilarityOrBuilder getCosineSimilarityOrBuilder() {
if ((similarityMetricCase_ == 3) && (cosineSimilarityBuilder_ != null)) {
return cosineSimilarityBuilder_.getMessageOrBuilder();
} else {
if (similarityMetricCase_ == 3) {
return (grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_;
}
return grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
}
}
/**
* .control_client._SimilarityMetric._CosineSimilarity cosine_similarity = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._CosineSimilarity, grpc.control_client._SimilarityMetric._CosineSimilarity.Builder, grpc.control_client._SimilarityMetric._CosineSimilarityOrBuilder>
getCosineSimilarityFieldBuilder() {
if (cosineSimilarityBuilder_ == null) {
if (!(similarityMetricCase_ == 3)) {
similarityMetric_ = grpc.control_client._SimilarityMetric._CosineSimilarity.getDefaultInstance();
}
cosineSimilarityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.control_client._SimilarityMetric._CosineSimilarity, grpc.control_client._SimilarityMetric._CosineSimilarity.Builder, grpc.control_client._SimilarityMetric._CosineSimilarityOrBuilder>(
(grpc.control_client._SimilarityMetric._CosineSimilarity) similarityMetric_,
getParentForChildren(),
isClean());
similarityMetric_ = null;
}
similarityMetricCase_ = 3;
onChanged();
return cosineSimilarityBuilder_;
}
@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:control_client._SimilarityMetric)
}
// @@protoc_insertion_point(class_scope:control_client._SimilarityMetric)
private static final grpc.control_client._SimilarityMetric DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.control_client._SimilarityMetric();
}
public static grpc.control_client._SimilarityMetric getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_SimilarityMetric>
PARSER = new com.google.protobuf.AbstractParser<_SimilarityMetric>() {
@java.lang.Override
public _SimilarityMetric 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<_SimilarityMetric> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_SimilarityMetric> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.control_client._SimilarityMetric getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}