All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarifai.grpc.api.Query 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 search query used in /searches, model training requests, bulk data exports, etc.
 * 
* * Protobuf type {@code clarifai.api.Query} */ public final class Query extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.Query) QueryOrBuilder { private static final long serialVersionUID = 0L; // Use Query.newBuilder() to construct. private Query(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Query() { ands_ = java.util.Collections.emptyList(); language_ = ""; filters_ = java.util.Collections.emptyList(); ranks_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Query(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Query( 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: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { ands_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } ands_.add( input.readMessage(com.clarifai.grpc.api.And.parser(), extensionRegistry)); break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); language_ = s; break; } case 26: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { filters_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } filters_.add( input.readMessage(com.clarifai.grpc.api.Filter.parser(), extensionRegistry)); break; } case 34: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { ranks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } ranks_.add( input.readMessage(com.clarifai.grpc.api.Rank.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)) { ands_ = java.util.Collections.unmodifiableList(ands_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { filters_ = java.util.Collections.unmodifiableList(filters_); } if (((mutable_bitField0_ & 0x00000004) != 0)) { ranks_ = java.util.Collections.unmodifiableList(ranks_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Query_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Query_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Query.class, com.clarifai.grpc.api.Query.Builder.class); } public static final int ANDS_FIELD_NUMBER = 1; private java.util.List ands_; /** *
   * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
   * results which are returned to the user as Hit messages.
   * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
   * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
   * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getAndsList() { return ands_; } /** *
   * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
   * results which are returned to the user as Hit messages.
   * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
   * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
   * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getAndsOrBuilderList() { return ands_; } /** *
   * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
   * results which are returned to the user as Hit messages.
   * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
   * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
   * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public int getAndsCount() { return ands_.size(); } /** *
   * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
   * results which are returned to the user as Hit messages.
   * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
   * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
   * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public com.clarifai.grpc.api.And getAnds(int index) { return ands_.get(index); } /** *
   * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
   * results which are returned to the user as Hit messages.
   * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
   * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
   * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public com.clarifai.grpc.api.AndOrBuilder getAndsOrBuilder( int index) { return ands_.get(index); } public static final int LANGUAGE_FIELD_NUMBER = 2; private volatile java.lang.Object language_; /** *
   * This allows the query to override any default language the app was setup in when doing Concept
   * based searches. This currently only affects public Models Output searches when those public
   * Models have translations for their Concepts.
   * 
* * string language = 2; * @return The language. */ @java.lang.Override public java.lang.String getLanguage() { java.lang.Object ref = language_; 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(); language_ = s; return s; } } /** *
   * This allows the query to override any default language the app was setup in when doing Concept
   * based searches. This currently only affects public Models Output searches when those public
   * Models have translations for their Concepts.
   * 
* * string language = 2; * @return The bytes for language. */ @java.lang.Override public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FILTERS_FIELD_NUMBER = 3; private java.util.List filters_; /** *
   * filters in this query
   * e.q. only fetch annotations that have certain metadata
   * 
* * repeated .clarifai.api.Filter filters = 3; */ @java.lang.Override public java.util.List getFiltersList() { return filters_; } /** *
   * filters in this query
   * e.q. only fetch annotations that have certain metadata
   * 
* * repeated .clarifai.api.Filter filters = 3; */ @java.lang.Override public java.util.List getFiltersOrBuilderList() { return filters_; } /** *
   * filters in this query
   * e.q. only fetch annotations that have certain metadata
   * 
* * repeated .clarifai.api.Filter filters = 3; */ @java.lang.Override public int getFiltersCount() { return filters_.size(); } /** *
   * filters in this query
   * e.q. only fetch annotations that have certain metadata
   * 
* * repeated .clarifai.api.Filter filters = 3; */ @java.lang.Override public com.clarifai.grpc.api.Filter getFilters(int index) { return filters_.get(index); } /** *
   * filters in this query
   * e.q. only fetch annotations that have certain metadata
   * 
* * repeated .clarifai.api.Filter filters = 3; */ @java.lang.Override public com.clarifai.grpc.api.FilterOrBuilder getFiltersOrBuilder( int index) { return filters_.get(index); } public static final int RANKS_FIELD_NUMBER = 4; private java.util.List ranks_; /** *
   * rankings in this query
   * e.g. visual search by a url
   * 
* * repeated .clarifai.api.Rank ranks = 4; */ @java.lang.Override public java.util.List getRanksList() { return ranks_; } /** *
   * rankings in this query
   * e.g. visual search by a url
   * 
* * repeated .clarifai.api.Rank ranks = 4; */ @java.lang.Override public java.util.List getRanksOrBuilderList() { return ranks_; } /** *
   * rankings in this query
   * e.g. visual search by a url
   * 
* * repeated .clarifai.api.Rank ranks = 4; */ @java.lang.Override public int getRanksCount() { return ranks_.size(); } /** *
   * rankings in this query
   * e.g. visual search by a url
   * 
* * repeated .clarifai.api.Rank ranks = 4; */ @java.lang.Override public com.clarifai.grpc.api.Rank getRanks(int index) { return ranks_.get(index); } /** *
   * rankings in this query
   * e.g. visual search by a url
   * 
* * repeated .clarifai.api.Rank ranks = 4; */ @java.lang.Override public com.clarifai.grpc.api.RankOrBuilder getRanksOrBuilder( int index) { return ranks_.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 { for (int i = 0; i < ands_.size(); i++) { output.writeMessage(1, ands_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(language_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, language_); } for (int i = 0; i < filters_.size(); i++) { output.writeMessage(3, filters_.get(i)); } for (int i = 0; i < ranks_.size(); i++) { output.writeMessage(4, ranks_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < ands_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, ands_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(language_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, language_); } for (int i = 0; i < filters_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, filters_.get(i)); } for (int i = 0; i < ranks_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, ranks_.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.Query)) { return super.equals(obj); } com.clarifai.grpc.api.Query other = (com.clarifai.grpc.api.Query) obj; if (!getAndsList() .equals(other.getAndsList())) return false; if (!getLanguage() .equals(other.getLanguage())) return false; if (!getFiltersList() .equals(other.getFiltersList())) return false; if (!getRanksList() .equals(other.getRanksList())) 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 (getAndsCount() > 0) { hash = (37 * hash) + ANDS_FIELD_NUMBER; hash = (53 * hash) + getAndsList().hashCode(); } hash = (37 * hash) + LANGUAGE_FIELD_NUMBER; hash = (53 * hash) + getLanguage().hashCode(); if (getFiltersCount() > 0) { hash = (37 * hash) + FILTERS_FIELD_NUMBER; hash = (53 * hash) + getFiltersList().hashCode(); } if (getRanksCount() > 0) { hash = (37 * hash) + RANKS_FIELD_NUMBER; hash = (53 * hash) + getRanksList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.Query parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Query 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.Query parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Query 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.Query parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Query parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Query parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Query 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.Query parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Query 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.Query parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Query 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.Query 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 search query used in /searches, model training requests, bulk data exports, etc.
   * 
* * Protobuf type {@code clarifai.api.Query} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.Query) com.clarifai.grpc.api.QueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Query_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Query_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Query.class, com.clarifai.grpc.api.Query.Builder.class); } // Construct using com.clarifai.grpc.api.Query.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getAndsFieldBuilder(); getFiltersFieldBuilder(); getRanksFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (andsBuilder_ == null) { ands_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { andsBuilder_.clear(); } language_ = ""; if (filtersBuilder_ == null) { filters_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { filtersBuilder_.clear(); } if (ranksBuilder_ == null) { ranks_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { ranksBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Query_descriptor; } @java.lang.Override public com.clarifai.grpc.api.Query getDefaultInstanceForType() { return com.clarifai.grpc.api.Query.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.Query build() { com.clarifai.grpc.api.Query result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.Query buildPartial() { com.clarifai.grpc.api.Query result = new com.clarifai.grpc.api.Query(this); int from_bitField0_ = bitField0_; if (andsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { ands_ = java.util.Collections.unmodifiableList(ands_); bitField0_ = (bitField0_ & ~0x00000001); } result.ands_ = ands_; } else { result.ands_ = andsBuilder_.build(); } result.language_ = language_; if (filtersBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { filters_ = java.util.Collections.unmodifiableList(filters_); bitField0_ = (bitField0_ & ~0x00000002); } result.filters_ = filters_; } else { result.filters_ = filtersBuilder_.build(); } if (ranksBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { ranks_ = java.util.Collections.unmodifiableList(ranks_); bitField0_ = (bitField0_ & ~0x00000004); } result.ranks_ = ranks_; } else { result.ranks_ = ranksBuilder_.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.Query) { return mergeFrom((com.clarifai.grpc.api.Query)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.Query other) { if (other == com.clarifai.grpc.api.Query.getDefaultInstance()) return this; if (andsBuilder_ == null) { if (!other.ands_.isEmpty()) { if (ands_.isEmpty()) { ands_ = other.ands_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAndsIsMutable(); ands_.addAll(other.ands_); } onChanged(); } } else { if (!other.ands_.isEmpty()) { if (andsBuilder_.isEmpty()) { andsBuilder_.dispose(); andsBuilder_ = null; ands_ = other.ands_; bitField0_ = (bitField0_ & ~0x00000001); andsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAndsFieldBuilder() : null; } else { andsBuilder_.addAllMessages(other.ands_); } } } if (!other.getLanguage().isEmpty()) { language_ = other.language_; onChanged(); } if (filtersBuilder_ == null) { if (!other.filters_.isEmpty()) { if (filters_.isEmpty()) { filters_ = other.filters_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureFiltersIsMutable(); filters_.addAll(other.filters_); } onChanged(); } } else { if (!other.filters_.isEmpty()) { if (filtersBuilder_.isEmpty()) { filtersBuilder_.dispose(); filtersBuilder_ = null; filters_ = other.filters_; bitField0_ = (bitField0_ & ~0x00000002); filtersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFiltersFieldBuilder() : null; } else { filtersBuilder_.addAllMessages(other.filters_); } } } if (ranksBuilder_ == null) { if (!other.ranks_.isEmpty()) { if (ranks_.isEmpty()) { ranks_ = other.ranks_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureRanksIsMutable(); ranks_.addAll(other.ranks_); } onChanged(); } } else { if (!other.ranks_.isEmpty()) { if (ranksBuilder_.isEmpty()) { ranksBuilder_.dispose(); ranksBuilder_ = null; ranks_ = other.ranks_; bitField0_ = (bitField0_ & ~0x00000004); ranksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRanksFieldBuilder() : null; } else { ranksBuilder_.addAllMessages(other.ranks_); } } } 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.Query parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.Query) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List ands_ = java.util.Collections.emptyList(); private void ensureAndsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { ands_ = new java.util.ArrayList(ands_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.And, com.clarifai.grpc.api.And.Builder, com.clarifai.grpc.api.AndOrBuilder> andsBuilder_; /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getAndsList() { if (andsBuilder_ == null) { return java.util.Collections.unmodifiableList(ands_); } else { return andsBuilder_.getMessageList(); } } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public int getAndsCount() { if (andsBuilder_ == null) { return ands_.size(); } else { return andsBuilder_.getCount(); } } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.And getAnds(int index) { if (andsBuilder_ == null) { return ands_.get(index); } else { return andsBuilder_.getMessage(index); } } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder setAnds( int index, com.clarifai.grpc.api.And value) { if (andsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAndsIsMutable(); ands_.set(index, value); onChanged(); } else { andsBuilder_.setMessage(index, value); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder setAnds( int index, com.clarifai.grpc.api.And.Builder builderForValue) { if (andsBuilder_ == null) { ensureAndsIsMutable(); ands_.set(index, builderForValue.build()); onChanged(); } else { andsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder addAnds(com.clarifai.grpc.api.And value) { if (andsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAndsIsMutable(); ands_.add(value); onChanged(); } else { andsBuilder_.addMessage(value); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder addAnds( int index, com.clarifai.grpc.api.And value) { if (andsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAndsIsMutable(); ands_.add(index, value); onChanged(); } else { andsBuilder_.addMessage(index, value); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder addAnds( com.clarifai.grpc.api.And.Builder builderForValue) { if (andsBuilder_ == null) { ensureAndsIsMutable(); ands_.add(builderForValue.build()); onChanged(); } else { andsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder addAnds( int index, com.clarifai.grpc.api.And.Builder builderForValue) { if (andsBuilder_ == null) { ensureAndsIsMutable(); ands_.add(index, builderForValue.build()); onChanged(); } else { andsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder addAllAnds( java.lang.Iterable values) { if (andsBuilder_ == null) { ensureAndsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, ands_); onChanged(); } else { andsBuilder_.addAllMessages(values); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder clearAnds() { if (andsBuilder_ == null) { ands_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { andsBuilder_.clear(); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public Builder removeAnds(int index) { if (andsBuilder_ == null) { ensureAndsIsMutable(); ands_.remove(index); onChanged(); } else { andsBuilder_.remove(index); } return this; } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.And.Builder getAndsBuilder( int index) { return getAndsFieldBuilder().getBuilder(index); } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.AndOrBuilder getAndsOrBuilder( int index) { if (andsBuilder_ == null) { return ands_.get(index); } else { return andsBuilder_.getMessageOrBuilder(index); } } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getAndsOrBuilderList() { if (andsBuilder_ != null) { return andsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(ands_); } } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.And.Builder addAndsBuilder() { return getAndsFieldBuilder().addBuilder( com.clarifai.grpc.api.And.getDefaultInstance()); } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.And.Builder addAndsBuilder( int index) { return getAndsFieldBuilder().addBuilder( index, com.clarifai.grpc.api.And.getDefaultInstance()); } /** *
     * The query syntax is simply a list of And operatiosn that will be ANDed together to fetch
     * results which are returned to the user as Hit messages.
     * Deprecated: Only used by the deprecated PostSearches endpoint. Use filters
     * and ranks instead with PostInputsSearches or PostAnnotationsSearches.
     * 
* * repeated .clarifai.api.And ands = 1 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getAndsBuilderList() { return getAndsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.And, com.clarifai.grpc.api.And.Builder, com.clarifai.grpc.api.AndOrBuilder> getAndsFieldBuilder() { if (andsBuilder_ == null) { andsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.And, com.clarifai.grpc.api.And.Builder, com.clarifai.grpc.api.AndOrBuilder>( ands_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); ands_ = null; } return andsBuilder_; } private java.lang.Object language_ = ""; /** *
     * This allows the query to override any default language the app was setup in when doing Concept
     * based searches. This currently only affects public Models Output searches when those public
     * Models have translations for their Concepts.
     * 
* * string language = 2; * @return The language. */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); language_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * This allows the query to override any default language the app was setup in when doing Concept
     * based searches. This currently only affects public Models Output searches when those public
     * Models have translations for their Concepts.
     * 
* * string language = 2; * @return The bytes for language. */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * This allows the query to override any default language the app was setup in when doing Concept
     * based searches. This currently only affects public Models Output searches when those public
     * Models have translations for their Concepts.
     * 
* * string language = 2; * @param value The language to set. * @return This builder for chaining. */ public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } language_ = value; onChanged(); return this; } /** *
     * This allows the query to override any default language the app was setup in when doing Concept
     * based searches. This currently only affects public Models Output searches when those public
     * Models have translations for their Concepts.
     * 
* * string language = 2; * @return This builder for chaining. */ public Builder clearLanguage() { language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** *
     * This allows the query to override any default language the app was setup in when doing Concept
     * based searches. This currently only affects public Models Output searches when those public
     * Models have translations for their Concepts.
     * 
* * string language = 2; * @param value The bytes for language to set. * @return This builder for chaining. */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); language_ = value; onChanged(); return this; } private java.util.List filters_ = java.util.Collections.emptyList(); private void ensureFiltersIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { filters_ = new java.util.ArrayList(filters_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Filter, com.clarifai.grpc.api.Filter.Builder, com.clarifai.grpc.api.FilterOrBuilder> filtersBuilder_; /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public java.util.List getFiltersList() { if (filtersBuilder_ == null) { return java.util.Collections.unmodifiableList(filters_); } else { return filtersBuilder_.getMessageList(); } } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public int getFiltersCount() { if (filtersBuilder_ == null) { return filters_.size(); } else { return filtersBuilder_.getCount(); } } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public com.clarifai.grpc.api.Filter getFilters(int index) { if (filtersBuilder_ == null) { return filters_.get(index); } else { return filtersBuilder_.getMessage(index); } } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder setFilters( int index, com.clarifai.grpc.api.Filter value) { if (filtersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFiltersIsMutable(); filters_.set(index, value); onChanged(); } else { filtersBuilder_.setMessage(index, value); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder setFilters( int index, com.clarifai.grpc.api.Filter.Builder builderForValue) { if (filtersBuilder_ == null) { ensureFiltersIsMutable(); filters_.set(index, builderForValue.build()); onChanged(); } else { filtersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder addFilters(com.clarifai.grpc.api.Filter value) { if (filtersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFiltersIsMutable(); filters_.add(value); onChanged(); } else { filtersBuilder_.addMessage(value); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder addFilters( int index, com.clarifai.grpc.api.Filter value) { if (filtersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFiltersIsMutable(); filters_.add(index, value); onChanged(); } else { filtersBuilder_.addMessage(index, value); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder addFilters( com.clarifai.grpc.api.Filter.Builder builderForValue) { if (filtersBuilder_ == null) { ensureFiltersIsMutable(); filters_.add(builderForValue.build()); onChanged(); } else { filtersBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder addFilters( int index, com.clarifai.grpc.api.Filter.Builder builderForValue) { if (filtersBuilder_ == null) { ensureFiltersIsMutable(); filters_.add(index, builderForValue.build()); onChanged(); } else { filtersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder addAllFilters( java.lang.Iterable values) { if (filtersBuilder_ == null) { ensureFiltersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, filters_); onChanged(); } else { filtersBuilder_.addAllMessages(values); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder clearFilters() { if (filtersBuilder_ == null) { filters_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { filtersBuilder_.clear(); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public Builder removeFilters(int index) { if (filtersBuilder_ == null) { ensureFiltersIsMutable(); filters_.remove(index); onChanged(); } else { filtersBuilder_.remove(index); } return this; } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public com.clarifai.grpc.api.Filter.Builder getFiltersBuilder( int index) { return getFiltersFieldBuilder().getBuilder(index); } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public com.clarifai.grpc.api.FilterOrBuilder getFiltersOrBuilder( int index) { if (filtersBuilder_ == null) { return filters_.get(index); } else { return filtersBuilder_.getMessageOrBuilder(index); } } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public java.util.List getFiltersOrBuilderList() { if (filtersBuilder_ != null) { return filtersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(filters_); } } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public com.clarifai.grpc.api.Filter.Builder addFiltersBuilder() { return getFiltersFieldBuilder().addBuilder( com.clarifai.grpc.api.Filter.getDefaultInstance()); } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public com.clarifai.grpc.api.Filter.Builder addFiltersBuilder( int index) { return getFiltersFieldBuilder().addBuilder( index, com.clarifai.grpc.api.Filter.getDefaultInstance()); } /** *
     * filters in this query
     * e.q. only fetch annotations that have certain metadata
     * 
* * repeated .clarifai.api.Filter filters = 3; */ public java.util.List getFiltersBuilderList() { return getFiltersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Filter, com.clarifai.grpc.api.Filter.Builder, com.clarifai.grpc.api.FilterOrBuilder> getFiltersFieldBuilder() { if (filtersBuilder_ == null) { filtersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Filter, com.clarifai.grpc.api.Filter.Builder, com.clarifai.grpc.api.FilterOrBuilder>( filters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); filters_ = null; } return filtersBuilder_; } private java.util.List ranks_ = java.util.Collections.emptyList(); private void ensureRanksIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { ranks_ = new java.util.ArrayList(ranks_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Rank, com.clarifai.grpc.api.Rank.Builder, com.clarifai.grpc.api.RankOrBuilder> ranksBuilder_; /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public java.util.List getRanksList() { if (ranksBuilder_ == null) { return java.util.Collections.unmodifiableList(ranks_); } else { return ranksBuilder_.getMessageList(); } } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public int getRanksCount() { if (ranksBuilder_ == null) { return ranks_.size(); } else { return ranksBuilder_.getCount(); } } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public com.clarifai.grpc.api.Rank getRanks(int index) { if (ranksBuilder_ == null) { return ranks_.get(index); } else { return ranksBuilder_.getMessage(index); } } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder setRanks( int index, com.clarifai.grpc.api.Rank value) { if (ranksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRanksIsMutable(); ranks_.set(index, value); onChanged(); } else { ranksBuilder_.setMessage(index, value); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder setRanks( int index, com.clarifai.grpc.api.Rank.Builder builderForValue) { if (ranksBuilder_ == null) { ensureRanksIsMutable(); ranks_.set(index, builderForValue.build()); onChanged(); } else { ranksBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder addRanks(com.clarifai.grpc.api.Rank value) { if (ranksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRanksIsMutable(); ranks_.add(value); onChanged(); } else { ranksBuilder_.addMessage(value); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder addRanks( int index, com.clarifai.grpc.api.Rank value) { if (ranksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRanksIsMutable(); ranks_.add(index, value); onChanged(); } else { ranksBuilder_.addMessage(index, value); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder addRanks( com.clarifai.grpc.api.Rank.Builder builderForValue) { if (ranksBuilder_ == null) { ensureRanksIsMutable(); ranks_.add(builderForValue.build()); onChanged(); } else { ranksBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder addRanks( int index, com.clarifai.grpc.api.Rank.Builder builderForValue) { if (ranksBuilder_ == null) { ensureRanksIsMutable(); ranks_.add(index, builderForValue.build()); onChanged(); } else { ranksBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder addAllRanks( java.lang.Iterable values) { if (ranksBuilder_ == null) { ensureRanksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, ranks_); onChanged(); } else { ranksBuilder_.addAllMessages(values); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder clearRanks() { if (ranksBuilder_ == null) { ranks_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { ranksBuilder_.clear(); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public Builder removeRanks(int index) { if (ranksBuilder_ == null) { ensureRanksIsMutable(); ranks_.remove(index); onChanged(); } else { ranksBuilder_.remove(index); } return this; } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public com.clarifai.grpc.api.Rank.Builder getRanksBuilder( int index) { return getRanksFieldBuilder().getBuilder(index); } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public com.clarifai.grpc.api.RankOrBuilder getRanksOrBuilder( int index) { if (ranksBuilder_ == null) { return ranks_.get(index); } else { return ranksBuilder_.getMessageOrBuilder(index); } } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public java.util.List getRanksOrBuilderList() { if (ranksBuilder_ != null) { return ranksBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(ranks_); } } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public com.clarifai.grpc.api.Rank.Builder addRanksBuilder() { return getRanksFieldBuilder().addBuilder( com.clarifai.grpc.api.Rank.getDefaultInstance()); } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public com.clarifai.grpc.api.Rank.Builder addRanksBuilder( int index) { return getRanksFieldBuilder().addBuilder( index, com.clarifai.grpc.api.Rank.getDefaultInstance()); } /** *
     * rankings in this query
     * e.g. visual search by a url
     * 
* * repeated .clarifai.api.Rank ranks = 4; */ public java.util.List getRanksBuilderList() { return getRanksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Rank, com.clarifai.grpc.api.Rank.Builder, com.clarifai.grpc.api.RankOrBuilder> getRanksFieldBuilder() { if (ranksBuilder_ == null) { ranksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Rank, com.clarifai.grpc.api.Rank.Builder, com.clarifai.grpc.api.RankOrBuilder>( ranks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); ranks_ = null; } return ranksBuilder_; } @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.Query) } // @@protoc_insertion_point(class_scope:clarifai.api.Query) private static final com.clarifai.grpc.api.Query DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.Query(); } public static com.clarifai.grpc.api.Query getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Query parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Query(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.Query getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy