Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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
*