com.clarifai.grpc.api.Search Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* This is the new Search object used in saved searches.
*
*
* Protobuf type {@code clarifai.api.Search}
*/
public final class Search extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.Search)
SearchOrBuilder {
private static final long serialVersionUID = 0L;
// Use Search.newBuilder() to construct.
private Search(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Search() {
id_ = "";
applicationId_ = "";
name_ = "";
gitHash_ = "";
algorithm_ = "";
metric_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Search();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Search(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.clarifai.grpc.api.Query.Builder subBuilder = null;
if (query_ != null) {
subBuilder = query_.toBuilder();
}
query_ = input.readMessage(com.clarifai.grpc.api.Query.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(query_);
query_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
applicationId_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 42: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (asOf_ != null) {
subBuilder = asOf_.toBuilder();
}
asOf_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(asOf_);
asOf_ = subBuilder.buildPartial();
}
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
gitHash_ = s;
break;
}
case 58: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 66: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (modifiedAt_ != null) {
subBuilder = modifiedAt_.toBuilder();
}
modifiedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modifiedAt_);
modifiedAt_ = subBuilder.buildPartial();
}
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
algorithm_ = s;
break;
}
case 80: {
save_ = input.readBool();
break;
}
case 93: {
minValue_ = input.readFloat();
break;
}
case 98: {
com.clarifai.grpc.api.Visibility.Builder subBuilder = null;
if (visibility_ != null) {
subBuilder = visibility_.toBuilder();
}
visibility_ = input.readMessage(com.clarifai.grpc.api.Visibility.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(visibility_);
visibility_ = subBuilder.buildPartial();
}
break;
}
case 104: {
int rawValue = input.readEnum();
metric_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Search_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Search_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Search.class, com.clarifai.grpc.api.Search.Builder.class);
}
/**
*
* Metric used for search. Can be EUCLIDEAN_DISTANCE (default) or COSINE_DISTANCE.
* Currently only brute force search supports non-eudlicean metrics.
*
*
* Protobuf enum {@code clarifai.api.Search.Metric}
*/
public enum Metric
implements com.google.protobuf.ProtocolMessageEnum {
/**
* METRIC_NOT_SET = 0;
*/
METRIC_NOT_SET(0),
/**
* EUCLIDEAN_DISTANCE = 1;
*/
EUCLIDEAN_DISTANCE(1),
/**
* COSINE_DISTANCE = 2;
*/
COSINE_DISTANCE(2),
UNRECOGNIZED(-1),
;
/**
* METRIC_NOT_SET = 0;
*/
public static final int METRIC_NOT_SET_VALUE = 0;
/**
* EUCLIDEAN_DISTANCE = 1;
*/
public static final int EUCLIDEAN_DISTANCE_VALUE = 1;
/**
* COSINE_DISTANCE = 2;
*/
public static final int COSINE_DISTANCE_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Metric valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Metric forNumber(int value) {
switch (value) {
case 0: return METRIC_NOT_SET;
case 1: return EUCLIDEAN_DISTANCE;
case 2: return COSINE_DISTANCE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Metric> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Metric findValueByNumber(int number) {
return Metric.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.clarifai.grpc.api.Search.getDescriptor().getEnumTypes().get(0);
}
private static final Metric[] VALUES = values();
public static Metric valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Metric(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:clarifai.api.Search.Metric)
}
public static final int QUERY_FIELD_NUMBER = 1;
private com.clarifai.grpc.api.Query query_;
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
* @return Whether the query field is set.
*/
@java.lang.Override
public boolean hasQuery() {
return query_ != null;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
* @return The query.
*/
@java.lang.Override
public com.clarifai.grpc.api.Query getQuery() {
return query_ == null ? com.clarifai.grpc.api.Query.getDefaultInstance() : query_;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
@java.lang.Override
public com.clarifai.grpc.api.QueryOrBuilder getQueryOrBuilder() {
return getQuery();
}
public static final int ID_FIELD_NUMBER = 2;
private volatile java.lang.Object id_;
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int APPLICATION_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object applicationId_;
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @return The applicationId.
*/
@java.lang.Override
public java.lang.String getApplicationId() {
java.lang.Object ref = applicationId_;
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();
applicationId_ = s;
return s;
}
}
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @return The bytes for applicationId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getApplicationIdBytes() {
java.lang.Object ref = applicationId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object name_;
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AS_OF_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp asOf_;
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
* @return Whether the asOf field is set.
*/
@java.lang.Override
public boolean hasAsOf() {
return asOf_ != null;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
* @return The asOf.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getAsOf() {
return asOf_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : asOf_;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getAsOfOrBuilder() {
return getAsOf();
}
public static final int GIT_HASH_FIELD_NUMBER = 6;
private volatile java.lang.Object gitHash_;
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @return The gitHash.
*/
@java.lang.Override
public java.lang.String getGitHash() {
java.lang.Object ref = gitHash_;
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();
gitHash_ = s;
return s;
}
}
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @return The bytes for gitHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getGitHashBytes() {
java.lang.Object ref = gitHash_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gitHash_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 7;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODIFIED_AT_FIELD_NUMBER = 8;
private com.google.protobuf.Timestamp modifiedAt_;
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
* @return Whether the modifiedAt field is set.
*/
@java.lang.Override
public boolean hasModifiedAt() {
return modifiedAt_ != null;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
* @return The modifiedAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getModifiedAt() {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
return getModifiedAt();
}
public static final int ALGORITHM_FIELD_NUMBER = 9;
private volatile java.lang.Object algorithm_;
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @return The algorithm.
*/
@java.lang.Override
public java.lang.String getAlgorithm() {
java.lang.Object ref = algorithm_;
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();
algorithm_ = s;
return s;
}
}
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @return The bytes for algorithm.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAlgorithmBytes() {
java.lang.Object ref = algorithm_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
algorithm_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SAVE_FIELD_NUMBER = 10;
private boolean save_;
/**
*
* If true, save this search, and exit without executing the search.
* If false execute the query
*
*
* bool save = 10;
* @return The save.
*/
@java.lang.Override
public boolean getSave() {
return save_;
}
public static final int MIN_VALUE_FIELD_NUMBER = 11;
private float minValue_;
/**
*
* Minimum value of confidence threshold score in result.
* Defaults to 0.0 which means we won't do any thresholding as all probabilities will
* likely be > 0.0.
*
*
* float min_value = 11;
* @return The minValue.
*/
@java.lang.Override
public float getMinValue() {
return minValue_;
}
public static final int VISIBILITY_FIELD_NUMBER = 12;
private com.clarifai.grpc.api.Visibility visibility_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
* @return Whether the visibility field is set.
*/
@java.lang.Override
public boolean hasVisibility() {
return visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
* @return The visibility.
*/
@java.lang.Override
public com.clarifai.grpc.api.Visibility getVisibility() {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
@java.lang.Override
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
return getVisibility();
}
public static final int METRIC_FIELD_NUMBER = 13;
private int metric_;
/**
* .clarifai.api.Search.Metric metric = 13;
* @return The enum numeric value on the wire for metric.
*/
@java.lang.Override public int getMetricValue() {
return metric_;
}
/**
* .clarifai.api.Search.Metric metric = 13;
* @return The metric.
*/
@java.lang.Override public com.clarifai.grpc.api.Search.Metric getMetric() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.Search.Metric result = com.clarifai.grpc.api.Search.Metric.valueOf(metric_);
return result == null ? com.clarifai.grpc.api.Search.Metric.UNRECOGNIZED : result;
}
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 (query_ != null) {
output.writeMessage(1, getQuery());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
}
if (asOf_ != null) {
output.writeMessage(5, getAsOf());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gitHash_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, gitHash_);
}
if (createdAt_ != null) {
output.writeMessage(7, getCreatedAt());
}
if (modifiedAt_ != null) {
output.writeMessage(8, getModifiedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, algorithm_);
}
if (save_ != false) {
output.writeBool(10, save_);
}
if (java.lang.Float.floatToRawIntBits(minValue_) != 0) {
output.writeFloat(11, minValue_);
}
if (visibility_ != null) {
output.writeMessage(12, getVisibility());
}
if (metric_ != com.clarifai.grpc.api.Search.Metric.METRIC_NOT_SET.getNumber()) {
output.writeEnum(13, metric_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (query_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getQuery());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
}
if (asOf_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getAsOf());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gitHash_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, gitHash_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getCreatedAt());
}
if (modifiedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getModifiedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, algorithm_);
}
if (save_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, save_);
}
if (java.lang.Float.floatToRawIntBits(minValue_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(11, minValue_);
}
if (visibility_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getVisibility());
}
if (metric_ != com.clarifai.grpc.api.Search.Metric.METRIC_NOT_SET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(13, metric_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.clarifai.grpc.api.Search)) {
return super.equals(obj);
}
com.clarifai.grpc.api.Search other = (com.clarifai.grpc.api.Search) obj;
if (hasQuery() != other.hasQuery()) return false;
if (hasQuery()) {
if (!getQuery()
.equals(other.getQuery())) return false;
}
if (!getId()
.equals(other.getId())) return false;
if (!getApplicationId()
.equals(other.getApplicationId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (hasAsOf() != other.hasAsOf()) return false;
if (hasAsOf()) {
if (!getAsOf()
.equals(other.getAsOf())) return false;
}
if (!getGitHash()
.equals(other.getGitHash())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (hasModifiedAt() != other.hasModifiedAt()) return false;
if (hasModifiedAt()) {
if (!getModifiedAt()
.equals(other.getModifiedAt())) return false;
}
if (!getAlgorithm()
.equals(other.getAlgorithm())) return false;
if (getSave()
!= other.getSave()) return false;
if (java.lang.Float.floatToIntBits(getMinValue())
!= java.lang.Float.floatToIntBits(
other.getMinValue())) return false;
if (hasVisibility() != other.hasVisibility()) return false;
if (hasVisibility()) {
if (!getVisibility()
.equals(other.getVisibility())) return false;
}
if (metric_ != other.metric_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasQuery()) {
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + APPLICATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getApplicationId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasAsOf()) {
hash = (37 * hash) + AS_OF_FIELD_NUMBER;
hash = (53 * hash) + getAsOf().hashCode();
}
hash = (37 * hash) + GIT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getGitHash().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
if (hasModifiedAt()) {
hash = (37 * hash) + MODIFIED_AT_FIELD_NUMBER;
hash = (53 * hash) + getModifiedAt().hashCode();
}
hash = (37 * hash) + ALGORITHM_FIELD_NUMBER;
hash = (53 * hash) + getAlgorithm().hashCode();
hash = (37 * hash) + SAVE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSave());
hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getMinValue());
if (hasVisibility()) {
hash = (37 * hash) + VISIBILITY_FIELD_NUMBER;
hash = (53 * hash) + getVisibility().hashCode();
}
hash = (37 * hash) + METRIC_FIELD_NUMBER;
hash = (53 * hash) + metric_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.Search parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Search parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Search parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Search parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Search parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Search parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Search parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Search 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 com.clarifai.grpc.api.Search parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Search 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 com.clarifai.grpc.api.Search parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Search 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(com.clarifai.grpc.api.Search 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;
}
/**
*
* This is the new Search object used in saved searches.
*
*
* Protobuf type {@code clarifai.api.Search}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.Search)
com.clarifai.grpc.api.SearchOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Search_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Search_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Search.class, com.clarifai.grpc.api.Search.Builder.class);
}
// Construct using com.clarifai.grpc.api.Search.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (queryBuilder_ == null) {
query_ = null;
} else {
query_ = null;
queryBuilder_ = null;
}
id_ = "";
applicationId_ = "";
name_ = "";
if (asOfBuilder_ == null) {
asOf_ = null;
} else {
asOf_ = null;
asOfBuilder_ = null;
}
gitHash_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
algorithm_ = "";
save_ = false;
minValue_ = 0F;
if (visibilityBuilder_ == null) {
visibility_ = null;
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
metric_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Search_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.Search getDefaultInstanceForType() {
return com.clarifai.grpc.api.Search.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.Search build() {
com.clarifai.grpc.api.Search result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.Search buildPartial() {
com.clarifai.grpc.api.Search result = new com.clarifai.grpc.api.Search(this);
if (queryBuilder_ == null) {
result.query_ = query_;
} else {
result.query_ = queryBuilder_.build();
}
result.id_ = id_;
result.applicationId_ = applicationId_;
result.name_ = name_;
if (asOfBuilder_ == null) {
result.asOf_ = asOf_;
} else {
result.asOf_ = asOfBuilder_.build();
}
result.gitHash_ = gitHash_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modifiedAtBuilder_ == null) {
result.modifiedAt_ = modifiedAt_;
} else {
result.modifiedAt_ = modifiedAtBuilder_.build();
}
result.algorithm_ = algorithm_;
result.save_ = save_;
result.minValue_ = minValue_;
if (visibilityBuilder_ == null) {
result.visibility_ = visibility_;
} else {
result.visibility_ = visibilityBuilder_.build();
}
result.metric_ = metric_;
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 com.clarifai.grpc.api.Search) {
return mergeFrom((com.clarifai.grpc.api.Search)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.Search other) {
if (other == com.clarifai.grpc.api.Search.getDefaultInstance()) return this;
if (other.hasQuery()) {
mergeQuery(other.getQuery());
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getApplicationId().isEmpty()) {
applicationId_ = other.applicationId_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasAsOf()) {
mergeAsOf(other.getAsOf());
}
if (!other.getGitHash().isEmpty()) {
gitHash_ = other.gitHash_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModifiedAt()) {
mergeModifiedAt(other.getModifiedAt());
}
if (!other.getAlgorithm().isEmpty()) {
algorithm_ = other.algorithm_;
onChanged();
}
if (other.getSave() != false) {
setSave(other.getSave());
}
if (other.getMinValue() != 0F) {
setMinValue(other.getMinValue());
}
if (other.hasVisibility()) {
mergeVisibility(other.getVisibility());
}
if (other.metric_ != 0) {
setMetricValue(other.getMetricValue());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.clarifai.grpc.api.Search parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.Search) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.clarifai.grpc.api.Query query_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Query, com.clarifai.grpc.api.Query.Builder, com.clarifai.grpc.api.QueryOrBuilder> queryBuilder_;
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
* @return Whether the query field is set.
*/
public boolean hasQuery() {
return queryBuilder_ != null || query_ != null;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
* @return The query.
*/
public com.clarifai.grpc.api.Query getQuery() {
if (queryBuilder_ == null) {
return query_ == null ? com.clarifai.grpc.api.Query.getDefaultInstance() : query_;
} else {
return queryBuilder_.getMessage();
}
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
public Builder setQuery(com.clarifai.grpc.api.Query value) {
if (queryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
queryBuilder_.setMessage(value);
}
return this;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
public Builder setQuery(
com.clarifai.grpc.api.Query.Builder builderForValue) {
if (queryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
queryBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
public Builder mergeQuery(com.clarifai.grpc.api.Query value) {
if (queryBuilder_ == null) {
if (query_ != null) {
query_ =
com.clarifai.grpc.api.Query.newBuilder(query_).mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
queryBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
public Builder clearQuery() {
if (queryBuilder_ == null) {
query_ = null;
onChanged();
} else {
query_ = null;
queryBuilder_ = null;
}
return this;
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
public com.clarifai.grpc.api.Query.Builder getQueryBuilder() {
onChanged();
return getQueryFieldBuilder().getBuilder();
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
public com.clarifai.grpc.api.QueryOrBuilder getQueryOrBuilder() {
if (queryBuilder_ != null) {
return queryBuilder_.getMessageOrBuilder();
} else {
return query_ == null ?
com.clarifai.grpc.api.Query.getDefaultInstance() : query_;
}
}
/**
*
* Search query.
*
*
* .clarifai.api.Query query = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Query, com.clarifai.grpc.api.Query.Builder, com.clarifai.grpc.api.QueryOrBuilder>
getQueryFieldBuilder() {
if (queryBuilder_ == null) {
queryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Query, com.clarifai.grpc.api.Query.Builder, com.clarifai.grpc.api.QueryOrBuilder>(
getQuery(),
getParentForChildren(),
isClean());
query_ = null;
}
return queryBuilder_;
}
private java.lang.Object id_ = "";
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* Customer facing, external ID for search to be saved. Provided by the user, e.g. "saved-search-1.
* It is unique per application.
*
*
* string id = 2;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object applicationId_ = "";
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @return The applicationId.
*/
public java.lang.String getApplicationId() {
java.lang.Object ref = applicationId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
applicationId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @return The bytes for applicationId.
*/
public com.google.protobuf.ByteString
getApplicationIdBytes() {
java.lang.Object ref = applicationId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @param value The applicationId to set.
* @return This builder for chaining.
*/
public Builder setApplicationId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
applicationId_ = value;
onChanged();
return this;
}
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @return This builder for chaining.
*/
public Builder clearApplicationId() {
applicationId_ = getDefaultInstance().getApplicationId();
onChanged();
return this;
}
/**
*
* Application that owns this saved search.
*
*
* string application_id = 3;
* @param value The bytes for applicationId to set.
* @return This builder for chaining.
*/
public Builder setApplicationIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
applicationId_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Human readable display name of the saved search.
*
*
* string name = 4;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp asOf_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> asOfBuilder_;
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
* @return Whether the asOf field is set.
*/
public boolean hasAsOf() {
return asOfBuilder_ != null || asOf_ != null;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
* @return The asOf.
*/
public com.google.protobuf.Timestamp getAsOf() {
if (asOfBuilder_ == null) {
return asOf_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : asOf_;
} else {
return asOfBuilder_.getMessage();
}
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
public Builder setAsOf(com.google.protobuf.Timestamp value) {
if (asOfBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
asOf_ = value;
onChanged();
} else {
asOfBuilder_.setMessage(value);
}
return this;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
public Builder setAsOf(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (asOfBuilder_ == null) {
asOf_ = builderForValue.build();
onChanged();
} else {
asOfBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
public Builder mergeAsOf(com.google.protobuf.Timestamp value) {
if (asOfBuilder_ == null) {
if (asOf_ != null) {
asOf_ =
com.google.protobuf.Timestamp.newBuilder(asOf_).mergeFrom(value).buildPartial();
} else {
asOf_ = value;
}
onChanged();
} else {
asOfBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
public Builder clearAsOf() {
if (asOfBuilder_ == null) {
asOf_ = null;
onChanged();
} else {
asOf_ = null;
asOfBuilder_ = null;
}
return this;
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
public com.google.protobuf.Timestamp.Builder getAsOfBuilder() {
onChanged();
return getAsOfFieldBuilder().getBuilder();
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
public com.google.protobuf.TimestampOrBuilder getAsOfOrBuilder() {
if (asOfBuilder_ != null) {
return asOfBuilder_.getMessageOrBuilder();
} else {
return asOf_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : asOf_;
}
}
/**
*
* "As of" timestamp, indicating a time in the past as of which we want to
* retrieve the annotations satisfying the query.
*
*
* .google.protobuf.Timestamp as_of = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getAsOfFieldBuilder() {
if (asOfBuilder_ == null) {
asOfBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getAsOf(),
getParentForChildren(),
isClean());
asOf_ = null;
}
return asOfBuilder_;
}
private java.lang.Object gitHash_ = "";
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @return The gitHash.
*/
public java.lang.String getGitHash() {
java.lang.Object ref = gitHash_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gitHash_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @return The bytes for gitHash.
*/
public com.google.protobuf.ByteString
getGitHashBytes() {
java.lang.Object ref = gitHash_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gitHash_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @param value The gitHash to set.
* @return This builder for chaining.
*/
public Builder setGitHash(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gitHash_ = value;
onChanged();
return this;
}
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @return This builder for chaining.
*/
public Builder clearGitHash() {
gitHash_ = getDefaultInstance().getGitHash();
onChanged();
return this;
}
/**
*
* Git hash of the code that ran the filter.
*
*
* string git_hash = 6;
* @param value The bytes for gitHash to set.
* @return This builder for chaining.
*/
public Builder setGitHashBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gitHash_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the saved search was created.
*
*
* .google.protobuf.Timestamp created_at = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private com.google.protobuf.Timestamp modifiedAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> modifiedAtBuilder_;
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAtBuilder_ != null || modifiedAt_ != null;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
* @return The modifiedAt.
*/
public com.google.protobuf.Timestamp getModifiedAt() {
if (modifiedAtBuilder_ == null) {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
} else {
return modifiedAtBuilder_.getMessage();
}
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
public Builder setModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modifiedAt_ = value;
onChanged();
} else {
modifiedAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
public Builder setModifiedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = builderForValue.build();
onChanged();
} else {
modifiedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
public Builder mergeModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (modifiedAt_ != null) {
modifiedAt_ =
com.google.protobuf.Timestamp.newBuilder(modifiedAt_).mergeFrom(value).buildPartial();
} else {
modifiedAt_ = value;
}
onChanged();
} else {
modifiedAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
public Builder clearModifiedAt() {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
onChanged();
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() {
onChanged();
return getModifiedAtFieldBuilder().getBuilder();
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
if (modifiedAtBuilder_ != null) {
return modifiedAtBuilder_.getMessageOrBuilder();
} else {
return modifiedAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
}
/**
*
* When the saved search was updated.
*
*
* .google.protobuf.Timestamp modified_at = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getModifiedAtFieldBuilder() {
if (modifiedAtBuilder_ == null) {
modifiedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getModifiedAt(),
getParentForChildren(),
isClean());
modifiedAt_ = null;
}
return modifiedAtBuilder_;
}
private java.lang.Object algorithm_ = "";
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @return The algorithm.
*/
public java.lang.String getAlgorithm() {
java.lang.Object ref = algorithm_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
algorithm_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @return The bytes for algorithm.
*/
public com.google.protobuf.ByteString
getAlgorithmBytes() {
java.lang.Object ref = algorithm_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
algorithm_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @param value The algorithm to set.
* @return This builder for chaining.
*/
public Builder setAlgorithm(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
algorithm_ = value;
onChanged();
return this;
}
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @return This builder for chaining.
*/
public Builder clearAlgorithm() {
algorithm_ = getDefaultInstance().getAlgorithm();
onChanged();
return this;
}
/**
*
* The search algorithm to be used.
* Options are are 'nearest_neighbor', 'brute_force', and 'avg_concept_brute_force'
* The last two perform a brute force search visual search instead of a more scalable distributed
* nearest neighbor search and should be used by advanced users only.
* If not specified we default to nearest neighbor
*
*
* string algorithm = 9;
* @param value The bytes for algorithm to set.
* @return This builder for chaining.
*/
public Builder setAlgorithmBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
algorithm_ = value;
onChanged();
return this;
}
private boolean save_ ;
/**
*
* If true, save this search, and exit without executing the search.
* If false execute the query
*
*
* bool save = 10;
* @return The save.
*/
@java.lang.Override
public boolean getSave() {
return save_;
}
/**
*
* If true, save this search, and exit without executing the search.
* If false execute the query
*
*
* bool save = 10;
* @param value The save to set.
* @return This builder for chaining.
*/
public Builder setSave(boolean value) {
save_ = value;
onChanged();
return this;
}
/**
*
* If true, save this search, and exit without executing the search.
* If false execute the query
*
*
* bool save = 10;
* @return This builder for chaining.
*/
public Builder clearSave() {
save_ = false;
onChanged();
return this;
}
private float minValue_ ;
/**
*
* Minimum value of confidence threshold score in result.
* Defaults to 0.0 which means we won't do any thresholding as all probabilities will
* likely be > 0.0.
*
*
* float min_value = 11;
* @return The minValue.
*/
@java.lang.Override
public float getMinValue() {
return minValue_;
}
/**
*
* Minimum value of confidence threshold score in result.
* Defaults to 0.0 which means we won't do any thresholding as all probabilities will
* likely be > 0.0.
*
*
* float min_value = 11;
* @param value The minValue to set.
* @return This builder for chaining.
*/
public Builder setMinValue(float value) {
minValue_ = value;
onChanged();
return this;
}
/**
*
* Minimum value of confidence threshold score in result.
* Defaults to 0.0 which means we won't do any thresholding as all probabilities will
* likely be > 0.0.
*
*
* float min_value = 11;
* @return This builder for chaining.
*/
public Builder clearMinValue() {
minValue_ = 0F;
onChanged();
return this;
}
private com.clarifai.grpc.api.Visibility visibility_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder> visibilityBuilder_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
* @return Whether the visibility field is set.
*/
public boolean hasVisibility() {
return visibilityBuilder_ != null || visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
* @return The visibility.
*/
public com.clarifai.grpc.api.Visibility getVisibility() {
if (visibilityBuilder_ == null) {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
} else {
return visibilityBuilder_.getMessage();
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
public Builder setVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
visibility_ = value;
onChanged();
} else {
visibilityBuilder_.setMessage(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
public Builder setVisibility(
com.clarifai.grpc.api.Visibility.Builder builderForValue) {
if (visibilityBuilder_ == null) {
visibility_ = builderForValue.build();
onChanged();
} else {
visibilityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
public Builder mergeVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (visibility_ != null) {
visibility_ =
com.clarifai.grpc.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial();
} else {
visibility_ = value;
}
onChanged();
} else {
visibilityBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
public Builder clearVisibility() {
if (visibilityBuilder_ == null) {
visibility_ = null;
onChanged();
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
public com.clarifai.grpc.api.Visibility.Builder getVisibilityBuilder() {
onChanged();
return getVisibilityFieldBuilder().getBuilder();
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
if (visibilityBuilder_ != null) {
return visibilityBuilder_.getMessageOrBuilder();
} else {
return visibility_ == null ?
com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>
getVisibilityFieldBuilder() {
if (visibilityBuilder_ == null) {
visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>(
getVisibility(),
getParentForChildren(),
isClean());
visibility_ = null;
}
return visibilityBuilder_;
}
private int metric_ = 0;
/**
* .clarifai.api.Search.Metric metric = 13;
* @return The enum numeric value on the wire for metric.
*/
@java.lang.Override public int getMetricValue() {
return metric_;
}
/**
* .clarifai.api.Search.Metric metric = 13;
* @param value The enum numeric value on the wire for metric to set.
* @return This builder for chaining.
*/
public Builder setMetricValue(int value) {
metric_ = value;
onChanged();
return this;
}
/**
* .clarifai.api.Search.Metric metric = 13;
* @return The metric.
*/
@java.lang.Override
public com.clarifai.grpc.api.Search.Metric getMetric() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.Search.Metric result = com.clarifai.grpc.api.Search.Metric.valueOf(metric_);
return result == null ? com.clarifai.grpc.api.Search.Metric.UNRECOGNIZED : result;
}
/**
* .clarifai.api.Search.Metric metric = 13;
* @param value The metric to set.
* @return This builder for chaining.
*/
public Builder setMetric(com.clarifai.grpc.api.Search.Metric value) {
if (value == null) {
throw new NullPointerException();
}
metric_ = value.getNumber();
onChanged();
return this;
}
/**
* .clarifai.api.Search.Metric metric = 13;
* @return This builder for chaining.
*/
public Builder clearMetric() {
metric_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.Search)
}
// @@protoc_insertion_point(class_scope:clarifai.api.Search)
private static final com.clarifai.grpc.api.Search DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.Search();
}
public static com.clarifai.grpc.api.Search getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Search parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Search(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.clarifai.grpc.api.Search getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}