com.clarifai.grpc.api.MultiSearchResponse Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/service.proto
package com.clarifai.grpc.api;
/**
*
* MultiSearchResponse
*
*
* Protobuf type {@code clarifai.api.MultiSearchResponse}
*/
public final class MultiSearchResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.MultiSearchResponse)
MultiSearchResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use MultiSearchResponse.newBuilder() to construct.
private MultiSearchResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MultiSearchResponse() {
id_ = "";
hits_ = java.util.Collections.emptyList();
searches_ = java.util.Collections.emptyList();
hitCounts_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MultiSearchResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MultiSearchResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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.status.Status.Builder subBuilder = null;
if (status_ != null) {
subBuilder = status_.toBuilder();
}
status_ = input.readMessage(com.clarifai.grpc.api.status.Status.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
hits_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
hits_.add(
input.readMessage(com.clarifai.grpc.api.Hit.parser(), extensionRegistry));
break;
}
case 34: {
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 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
searches_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
searches_.add(
input.readMessage(com.clarifai.grpc.api.Search.parser(), extensionRegistry));
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
hitCounts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
hitCounts_.add(
input.readMessage(com.clarifai.grpc.api.HitCount.parser(), extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
hits_ = java.util.Collections.unmodifiableList(hits_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
searches_ = java.util.Collections.unmodifiableList(searches_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
hitCounts_ = java.util.Collections.unmodifiableList(hitCounts_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_MultiSearchResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_MultiSearchResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.MultiSearchResponse.class, com.clarifai.grpc.api.MultiSearchResponse.Builder.class);
}
public static final int STATUS_FIELD_NUMBER = 1;
private com.clarifai.grpc.api.status.Status status_;
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
* @return The status.
*/
@java.lang.Override
public com.clarifai.grpc.api.status.Status getStatus() {
return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
@java.lang.Override
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
public static final int ID_FIELD_NUMBER = 2;
private volatile java.lang.Object id_;
/**
*
* A unique id which uniquely identifies a search
*
*
* 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;
}
}
/**
*
* A unique id which uniquely identifies a search
*
*
* 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 HITS_FIELD_NUMBER = 3;
private java.util.List hits_;
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
@java.lang.Override
public java.util.List getHitsList() {
return hits_;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.HitOrBuilder>
getHitsOrBuilderList() {
return hits_;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
@java.lang.Override
public int getHitsCount() {
return hits_.size();
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
@java.lang.Override
public com.clarifai.grpc.api.Hit getHits(int index) {
return hits_.get(index);
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
@java.lang.Override
public com.clarifai.grpc.api.HitOrBuilder getHitsOrBuilder(
int index) {
return hits_.get(index);
}
public static final int QUERY_FIELD_NUMBER = 4;
private com.clarifai.grpc.api.Query query_;
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
* @return Whether the query field is set.
*/
@java.lang.Override
public boolean hasQuery() {
return query_ != null;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
* @return The query.
*/
@java.lang.Override
public com.clarifai.grpc.api.Query getQuery() {
return query_ == null ? com.clarifai.grpc.api.Query.getDefaultInstance() : query_;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
@java.lang.Override
public com.clarifai.grpc.api.QueryOrBuilder getQueryOrBuilder() {
return getQuery();
}
public static final int SEARCHES_FIELD_NUMBER = 5;
private java.util.List searches_;
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
@java.lang.Override
public java.util.List getSearchesList() {
return searches_;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.SearchOrBuilder>
getSearchesOrBuilderList() {
return searches_;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
@java.lang.Override
public int getSearchesCount() {
return searches_.size();
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.Search getSearches(int index) {
return searches_.get(index);
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.SearchOrBuilder getSearchesOrBuilder(
int index) {
return searches_.get(index);
}
public static final int HIT_COUNTS_FIELD_NUMBER = 6;
private java.util.List hitCounts_;
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
@java.lang.Override
public java.util.List getHitCountsList() {
return hitCounts_;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.HitCountOrBuilder>
getHitCountsOrBuilderList() {
return hitCounts_;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
@java.lang.Override
public int getHitCountsCount() {
return hitCounts_.size();
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.HitCount getHitCounts(int index) {
return hitCounts_.get(index);
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.HitCountOrBuilder getHitCountsOrBuilder(
int index) {
return hitCounts_.get(index);
}
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 (status_ != null) {
output.writeMessage(1, getStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
}
for (int i = 0; i < hits_.size(); i++) {
output.writeMessage(3, hits_.get(i));
}
if (query_ != null) {
output.writeMessage(4, getQuery());
}
for (int i = 0; i < searches_.size(); i++) {
output.writeMessage(5, searches_.get(i));
}
for (int i = 0; i < hitCounts_.size(); i++) {
output.writeMessage(6, hitCounts_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
}
for (int i = 0; i < hits_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, hits_.get(i));
}
if (query_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getQuery());
}
for (int i = 0; i < searches_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, searches_.get(i));
}
for (int i = 0; i < hitCounts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, hitCounts_.get(i));
}
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.MultiSearchResponse)) {
return super.equals(obj);
}
com.clarifai.grpc.api.MultiSearchResponse other = (com.clarifai.grpc.api.MultiSearchResponse) obj;
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus()
.equals(other.getStatus())) return false;
}
if (!getId()
.equals(other.getId())) return false;
if (!getHitsList()
.equals(other.getHitsList())) return false;
if (hasQuery() != other.hasQuery()) return false;
if (hasQuery()) {
if (!getQuery()
.equals(other.getQuery())) return false;
}
if (!getSearchesList()
.equals(other.getSearchesList())) return false;
if (!getHitCountsList()
.equals(other.getHitCountsList())) 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 (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (getHitsCount() > 0) {
hash = (37 * hash) + HITS_FIELD_NUMBER;
hash = (53 * hash) + getHitsList().hashCode();
}
if (hasQuery()) {
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
}
if (getSearchesCount() > 0) {
hash = (37 * hash) + SEARCHES_FIELD_NUMBER;
hash = (53 * hash) + getSearchesList().hashCode();
}
if (getHitCountsCount() > 0) {
hash = (37 * hash) + HIT_COUNTS_FIELD_NUMBER;
hash = (53 * hash) + getHitCountsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.MultiSearchResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.MultiSearchResponse 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.MultiSearchResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.MultiSearchResponse 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.MultiSearchResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.MultiSearchResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.MultiSearchResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.MultiSearchResponse 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.MultiSearchResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.MultiSearchResponse 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.MultiSearchResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.MultiSearchResponse 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.MultiSearchResponse 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;
}
/**
*
* MultiSearchResponse
*
*
* Protobuf type {@code clarifai.api.MultiSearchResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.MultiSearchResponse)
com.clarifai.grpc.api.MultiSearchResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_MultiSearchResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_MultiSearchResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.MultiSearchResponse.class, com.clarifai.grpc.api.MultiSearchResponse.Builder.class);
}
// Construct using com.clarifai.grpc.api.MultiSearchResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getHitsFieldBuilder();
getSearchesFieldBuilder();
getHitCountsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (statusBuilder_ == null) {
status_ = null;
} else {
status_ = null;
statusBuilder_ = null;
}
id_ = "";
if (hitsBuilder_ == null) {
hits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
hitsBuilder_.clear();
}
if (queryBuilder_ == null) {
query_ = null;
} else {
query_ = null;
queryBuilder_ = null;
}
if (searchesBuilder_ == null) {
searches_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
searchesBuilder_.clear();
}
if (hitCountsBuilder_ == null) {
hitCounts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
hitCountsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_MultiSearchResponse_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.MultiSearchResponse getDefaultInstanceForType() {
return com.clarifai.grpc.api.MultiSearchResponse.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.MultiSearchResponse build() {
com.clarifai.grpc.api.MultiSearchResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.MultiSearchResponse buildPartial() {
com.clarifai.grpc.api.MultiSearchResponse result = new com.clarifai.grpc.api.MultiSearchResponse(this);
int from_bitField0_ = bitField0_;
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
result.id_ = id_;
if (hitsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
hits_ = java.util.Collections.unmodifiableList(hits_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.hits_ = hits_;
} else {
result.hits_ = hitsBuilder_.build();
}
if (queryBuilder_ == null) {
result.query_ = query_;
} else {
result.query_ = queryBuilder_.build();
}
if (searchesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
searches_ = java.util.Collections.unmodifiableList(searches_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.searches_ = searches_;
} else {
result.searches_ = searchesBuilder_.build();
}
if (hitCountsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
hitCounts_ = java.util.Collections.unmodifiableList(hitCounts_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.hitCounts_ = hitCounts_;
} else {
result.hitCounts_ = hitCountsBuilder_.build();
}
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.MultiSearchResponse) {
return mergeFrom((com.clarifai.grpc.api.MultiSearchResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.MultiSearchResponse other) {
if (other == com.clarifai.grpc.api.MultiSearchResponse.getDefaultInstance()) return this;
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (hitsBuilder_ == null) {
if (!other.hits_.isEmpty()) {
if (hits_.isEmpty()) {
hits_ = other.hits_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureHitsIsMutable();
hits_.addAll(other.hits_);
}
onChanged();
}
} else {
if (!other.hits_.isEmpty()) {
if (hitsBuilder_.isEmpty()) {
hitsBuilder_.dispose();
hitsBuilder_ = null;
hits_ = other.hits_;
bitField0_ = (bitField0_ & ~0x00000001);
hitsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHitsFieldBuilder() : null;
} else {
hitsBuilder_.addAllMessages(other.hits_);
}
}
}
if (other.hasQuery()) {
mergeQuery(other.getQuery());
}
if (searchesBuilder_ == null) {
if (!other.searches_.isEmpty()) {
if (searches_.isEmpty()) {
searches_ = other.searches_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSearchesIsMutable();
searches_.addAll(other.searches_);
}
onChanged();
}
} else {
if (!other.searches_.isEmpty()) {
if (searchesBuilder_.isEmpty()) {
searchesBuilder_.dispose();
searchesBuilder_ = null;
searches_ = other.searches_;
bitField0_ = (bitField0_ & ~0x00000002);
searchesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSearchesFieldBuilder() : null;
} else {
searchesBuilder_.addAllMessages(other.searches_);
}
}
}
if (hitCountsBuilder_ == null) {
if (!other.hitCounts_.isEmpty()) {
if (hitCounts_.isEmpty()) {
hitCounts_ = other.hitCounts_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureHitCountsIsMutable();
hitCounts_.addAll(other.hitCounts_);
}
onChanged();
}
} else {
if (!other.hitCounts_.isEmpty()) {
if (hitCountsBuilder_.isEmpty()) {
hitCountsBuilder_.dispose();
hitCountsBuilder_ = null;
hitCounts_ = other.hitCounts_;
bitField0_ = (bitField0_ & ~0x00000004);
hitCountsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHitCountsFieldBuilder() : null;
} else {
hitCountsBuilder_.addAllMessages(other.hitCounts_);
}
}
}
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.MultiSearchResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.MultiSearchResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.clarifai.grpc.api.status.Status status_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder> statusBuilder_;
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return statusBuilder_ != null || status_ != null;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
* @return The status.
*/
public com.clarifai.grpc.api.status.Status getStatus() {
if (statusBuilder_ == null) {
return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
public Builder setStatus(com.clarifai.grpc.api.status.Status value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
return this;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
public Builder setStatus(
com.clarifai.grpc.api.status.Status.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
public Builder mergeStatus(com.clarifai.grpc.api.status.Status value) {
if (statusBuilder_ == null) {
if (status_ != null) {
status_ =
com.clarifai.grpc.api.status.Status.newBuilder(status_).mergeFrom(value).buildPartial();
} else {
status_ = value;
}
onChanged();
} else {
statusBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
status_ = null;
statusBuilder_ = null;
}
return this;
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null ?
com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
}
}
/**
*
* Status of whether the search was successful.
*
*
* .clarifai.api.status.Status status = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>(
getStatus(),
getParentForChildren(),
isClean());
status_ = null;
}
return statusBuilder_;
}
private java.lang.Object id_ = "";
/**
*
* A unique id which uniquely identifies a search
*
*
* 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;
}
}
/**
*
* A unique id which uniquely identifies a search
*
*
* 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;
}
}
/**
*
* A unique id which uniquely identifies a search
*
*
* 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;
}
/**
*
* A unique id which uniquely identifies a search
*
*
* string id = 2;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* A unique id which uniquely identifies a search
*
*
* 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.util.List hits_ =
java.util.Collections.emptyList();
private void ensureHitsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
hits_ = new java.util.ArrayList(hits_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Hit, com.clarifai.grpc.api.Hit.Builder, com.clarifai.grpc.api.HitOrBuilder> hitsBuilder_;
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public java.util.List getHitsList() {
if (hitsBuilder_ == null) {
return java.util.Collections.unmodifiableList(hits_);
} else {
return hitsBuilder_.getMessageList();
}
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public int getHitsCount() {
if (hitsBuilder_ == null) {
return hits_.size();
} else {
return hitsBuilder_.getCount();
}
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public com.clarifai.grpc.api.Hit getHits(int index) {
if (hitsBuilder_ == null) {
return hits_.get(index);
} else {
return hitsBuilder_.getMessage(index);
}
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder setHits(
int index, com.clarifai.grpc.api.Hit value) {
if (hitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitsIsMutable();
hits_.set(index, value);
onChanged();
} else {
hitsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder setHits(
int index, com.clarifai.grpc.api.Hit.Builder builderForValue) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.set(index, builderForValue.build());
onChanged();
} else {
hitsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder addHits(com.clarifai.grpc.api.Hit value) {
if (hitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitsIsMutable();
hits_.add(value);
onChanged();
} else {
hitsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder addHits(
int index, com.clarifai.grpc.api.Hit value) {
if (hitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitsIsMutable();
hits_.add(index, value);
onChanged();
} else {
hitsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder addHits(
com.clarifai.grpc.api.Hit.Builder builderForValue) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.add(builderForValue.build());
onChanged();
} else {
hitsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder addHits(
int index, com.clarifai.grpc.api.Hit.Builder builderForValue) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.add(index, builderForValue.build());
onChanged();
} else {
hitsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder addAllHits(
java.lang.Iterable extends com.clarifai.grpc.api.Hit> values) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hits_);
onChanged();
} else {
hitsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder clearHits() {
if (hitsBuilder_ == null) {
hits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
hitsBuilder_.clear();
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public Builder removeHits(int index) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.remove(index);
onChanged();
} else {
hitsBuilder_.remove(index);
}
return this;
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public com.clarifai.grpc.api.Hit.Builder getHitsBuilder(
int index) {
return getHitsFieldBuilder().getBuilder(index);
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public com.clarifai.grpc.api.HitOrBuilder getHitsOrBuilder(
int index) {
if (hitsBuilder_ == null) {
return hits_.get(index); } else {
return hitsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public java.util.List extends com.clarifai.grpc.api.HitOrBuilder>
getHitsOrBuilderList() {
if (hitsBuilder_ != null) {
return hitsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(hits_);
}
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public com.clarifai.grpc.api.Hit.Builder addHitsBuilder() {
return getHitsFieldBuilder().addBuilder(
com.clarifai.grpc.api.Hit.getDefaultInstance());
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public com.clarifai.grpc.api.Hit.Builder addHitsBuilder(
int index) {
return getHitsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.Hit.getDefaultInstance());
}
/**
*
* The list of search result Hits.
*
*
* repeated .clarifai.api.Hit hits = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
*/
public java.util.List
getHitsBuilderList() {
return getHitsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Hit, com.clarifai.grpc.api.Hit.Builder, com.clarifai.grpc.api.HitOrBuilder>
getHitsFieldBuilder() {
if (hitsBuilder_ == null) {
hitsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Hit, com.clarifai.grpc.api.Hit.Builder, com.clarifai.grpc.api.HitOrBuilder>(
hits_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
hits_ = null;
}
return hitsBuilder_;
}
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_;
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
* @return Whether the query field is set.
*/
public boolean hasQuery() {
return queryBuilder_ != null || query_ != null;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
* @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();
}
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
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;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
public Builder setQuery(
com.clarifai.grpc.api.Query.Builder builderForValue) {
if (queryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
queryBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
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;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
public Builder clearQuery() {
if (queryBuilder_ == null) {
query_ = null;
onChanged();
} else {
query_ = null;
queryBuilder_ = null;
}
return this;
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
public com.clarifai.grpc.api.Query.Builder getQueryBuilder() {
onChanged();
return getQueryFieldBuilder().getBuilder();
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
public com.clarifai.grpc.api.QueryOrBuilder getQueryOrBuilder() {
if (queryBuilder_ != null) {
return queryBuilder_.getMessageOrBuilder();
} else {
return query_ == null ?
com.clarifai.grpc.api.Query.getDefaultInstance() : query_;
}
}
/**
*
* The original query provided in the request.
*
*
* .clarifai.api.Query query = 4;
*/
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.util.List searches_ =
java.util.Collections.emptyList();
private void ensureSearchesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
searches_ = new java.util.ArrayList(searches_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Search, com.clarifai.grpc.api.Search.Builder, com.clarifai.grpc.api.SearchOrBuilder> searchesBuilder_;
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public java.util.List getSearchesList() {
if (searchesBuilder_ == null) {
return java.util.Collections.unmodifiableList(searches_);
} else {
return searchesBuilder_.getMessageList();
}
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public int getSearchesCount() {
if (searchesBuilder_ == null) {
return searches_.size();
} else {
return searchesBuilder_.getCount();
}
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public com.clarifai.grpc.api.Search getSearches(int index) {
if (searchesBuilder_ == null) {
return searches_.get(index);
} else {
return searchesBuilder_.getMessage(index);
}
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder setSearches(
int index, com.clarifai.grpc.api.Search value) {
if (searchesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSearchesIsMutable();
searches_.set(index, value);
onChanged();
} else {
searchesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder setSearches(
int index, com.clarifai.grpc.api.Search.Builder builderForValue) {
if (searchesBuilder_ == null) {
ensureSearchesIsMutable();
searches_.set(index, builderForValue.build());
onChanged();
} else {
searchesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder addSearches(com.clarifai.grpc.api.Search value) {
if (searchesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSearchesIsMutable();
searches_.add(value);
onChanged();
} else {
searchesBuilder_.addMessage(value);
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder addSearches(
int index, com.clarifai.grpc.api.Search value) {
if (searchesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSearchesIsMutable();
searches_.add(index, value);
onChanged();
} else {
searchesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder addSearches(
com.clarifai.grpc.api.Search.Builder builderForValue) {
if (searchesBuilder_ == null) {
ensureSearchesIsMutable();
searches_.add(builderForValue.build());
onChanged();
} else {
searchesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder addSearches(
int index, com.clarifai.grpc.api.Search.Builder builderForValue) {
if (searchesBuilder_ == null) {
ensureSearchesIsMutable();
searches_.add(index, builderForValue.build());
onChanged();
} else {
searchesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder addAllSearches(
java.lang.Iterable extends com.clarifai.grpc.api.Search> values) {
if (searchesBuilder_ == null) {
ensureSearchesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, searches_);
onChanged();
} else {
searchesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder clearSearches() {
if (searchesBuilder_ == null) {
searches_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
searchesBuilder_.clear();
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public Builder removeSearches(int index) {
if (searchesBuilder_ == null) {
ensureSearchesIsMutable();
searches_.remove(index);
onChanged();
} else {
searchesBuilder_.remove(index);
}
return this;
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public com.clarifai.grpc.api.Search.Builder getSearchesBuilder(
int index) {
return getSearchesFieldBuilder().getBuilder(index);
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public com.clarifai.grpc.api.SearchOrBuilder getSearchesOrBuilder(
int index) {
if (searchesBuilder_ == null) {
return searches_.get(index); } else {
return searchesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public java.util.List extends com.clarifai.grpc.api.SearchOrBuilder>
getSearchesOrBuilderList() {
if (searchesBuilder_ != null) {
return searchesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(searches_);
}
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public com.clarifai.grpc.api.Search.Builder addSearchesBuilder() {
return getSearchesFieldBuilder().addBuilder(
com.clarifai.grpc.api.Search.getDefaultInstance());
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public com.clarifai.grpc.api.Search.Builder addSearchesBuilder(
int index) {
return getSearchesFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.Search.getDefaultInstance());
}
/**
*
* The original Searches provided in the request.
*
*
* repeated .clarifai.api.Search searches = 5;
*/
public java.util.List
getSearchesBuilderList() {
return getSearchesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Search, com.clarifai.grpc.api.Search.Builder, com.clarifai.grpc.api.SearchOrBuilder>
getSearchesFieldBuilder() {
if (searchesBuilder_ == null) {
searchesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Search, com.clarifai.grpc.api.Search.Builder, com.clarifai.grpc.api.SearchOrBuilder>(
searches_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
searches_ = null;
}
return searchesBuilder_;
}
private java.util.List hitCounts_ =
java.util.Collections.emptyList();
private void ensureHitCountsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
hitCounts_ = new java.util.ArrayList(hitCounts_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.HitCount, com.clarifai.grpc.api.HitCount.Builder, com.clarifai.grpc.api.HitCountOrBuilder> hitCountsBuilder_;
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public java.util.List getHitCountsList() {
if (hitCountsBuilder_ == null) {
return java.util.Collections.unmodifiableList(hitCounts_);
} else {
return hitCountsBuilder_.getMessageList();
}
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public int getHitCountsCount() {
if (hitCountsBuilder_ == null) {
return hitCounts_.size();
} else {
return hitCountsBuilder_.getCount();
}
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public com.clarifai.grpc.api.HitCount getHitCounts(int index) {
if (hitCountsBuilder_ == null) {
return hitCounts_.get(index);
} else {
return hitCountsBuilder_.getMessage(index);
}
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder setHitCounts(
int index, com.clarifai.grpc.api.HitCount value) {
if (hitCountsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitCountsIsMutable();
hitCounts_.set(index, value);
onChanged();
} else {
hitCountsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder setHitCounts(
int index, com.clarifai.grpc.api.HitCount.Builder builderForValue) {
if (hitCountsBuilder_ == null) {
ensureHitCountsIsMutable();
hitCounts_.set(index, builderForValue.build());
onChanged();
} else {
hitCountsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder addHitCounts(com.clarifai.grpc.api.HitCount value) {
if (hitCountsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitCountsIsMutable();
hitCounts_.add(value);
onChanged();
} else {
hitCountsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder addHitCounts(
int index, com.clarifai.grpc.api.HitCount value) {
if (hitCountsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitCountsIsMutable();
hitCounts_.add(index, value);
onChanged();
} else {
hitCountsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder addHitCounts(
com.clarifai.grpc.api.HitCount.Builder builderForValue) {
if (hitCountsBuilder_ == null) {
ensureHitCountsIsMutable();
hitCounts_.add(builderForValue.build());
onChanged();
} else {
hitCountsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder addHitCounts(
int index, com.clarifai.grpc.api.HitCount.Builder builderForValue) {
if (hitCountsBuilder_ == null) {
ensureHitCountsIsMutable();
hitCounts_.add(index, builderForValue.build());
onChanged();
} else {
hitCountsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder addAllHitCounts(
java.lang.Iterable extends com.clarifai.grpc.api.HitCount> values) {
if (hitCountsBuilder_ == null) {
ensureHitCountsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hitCounts_);
onChanged();
} else {
hitCountsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder clearHitCounts() {
if (hitCountsBuilder_ == null) {
hitCounts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
hitCountsBuilder_.clear();
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public Builder removeHitCounts(int index) {
if (hitCountsBuilder_ == null) {
ensureHitCountsIsMutable();
hitCounts_.remove(index);
onChanged();
} else {
hitCountsBuilder_.remove(index);
}
return this;
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public com.clarifai.grpc.api.HitCount.Builder getHitCountsBuilder(
int index) {
return getHitCountsFieldBuilder().getBuilder(index);
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public com.clarifai.grpc.api.HitCountOrBuilder getHitCountsOrBuilder(
int index) {
if (hitCountsBuilder_ == null) {
return hitCounts_.get(index); } else {
return hitCountsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public java.util.List extends com.clarifai.grpc.api.HitCountOrBuilder>
getHitCountsOrBuilderList() {
if (hitCountsBuilder_ != null) {
return hitCountsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(hitCounts_);
}
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public com.clarifai.grpc.api.HitCount.Builder addHitCountsBuilder() {
return getHitCountsFieldBuilder().addBuilder(
com.clarifai.grpc.api.HitCount.getDefaultInstance());
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public com.clarifai.grpc.api.HitCount.Builder addHitCountsBuilder(
int index) {
return getHitCountsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.HitCount.getDefaultInstance());
}
/**
*
* The counts of hits for each search, in the same order as searches.
* Only returned if the request set only_count.
*
*
* repeated .clarifai.api.HitCount hit_counts = 6;
*/
public java.util.List
getHitCountsBuilderList() {
return getHitCountsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.HitCount, com.clarifai.grpc.api.HitCount.Builder, com.clarifai.grpc.api.HitCountOrBuilder>
getHitCountsFieldBuilder() {
if (hitCountsBuilder_ == null) {
hitCountsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.HitCount, com.clarifai.grpc.api.HitCount.Builder, com.clarifai.grpc.api.HitCountOrBuilder>(
hitCounts_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
hitCounts_ = null;
}
return hitCountsBuilder_;
}
@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.MultiSearchResponse)
}
// @@protoc_insertion_point(class_scope:clarifai.api.MultiSearchResponse)
private static final com.clarifai.grpc.api.MultiSearchResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.MultiSearchResponse();
}
public static com.clarifai.grpc.api.MultiSearchResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MultiSearchResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MultiSearchResponse(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.MultiSearchResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}