
com.clarifai.grpc.api.And Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* This is the common building block of a query which is a sequence of And messages ANDed together.
* Note that some fields are used too RANK results (affect the scores) and some are used to FILTER
* results (unordered subset of your app's contents). In general, FILTER operations are more
* efficient queries at scale and when combined with RANK operations can speed up search performance
* as you effectively operate on a smaller sub-set of your entire app.
*
*
* Protobuf type {@code clarifai.api.And}
*/
public final class And extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.And)
AndOrBuilder {
private static final long serialVersionUID = 0L;
// Use And.newBuilder() to construct.
private And(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private And() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new And();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private And(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.clarifai.grpc.api.Input.Builder subBuilder = null;
if (input_ != null) {
subBuilder = input_.toBuilder();
}
input_ = input.readMessage(com.clarifai.grpc.api.Input.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(input_);
input_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.clarifai.grpc.api.Output.Builder subBuilder = null;
if (output_ != null) {
subBuilder = output_.toBuilder();
}
output_ = input.readMessage(com.clarifai.grpc.api.Output.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(output_);
output_ = subBuilder.buildPartial();
}
break;
}
case 24: {
negate_ = input.readBool();
break;
}
case 34: {
com.clarifai.grpc.api.Annotation.Builder subBuilder = null;
if (annotation_ != null) {
subBuilder = annotation_.toBuilder();
}
annotation_ = input.readMessage(com.clarifai.grpc.api.Annotation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(annotation_);
annotation_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_And_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_And_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.And.class, com.clarifai.grpc.api.And.Builder.class);
}
public static final int INPUT_FIELD_NUMBER = 1;
private com.clarifai.grpc.api.Input input_;
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
* @return Whether the input field is set.
*/
@java.lang.Override
public boolean hasInput() {
return input_ != null;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
* @return The input.
*/
@java.lang.Override
public com.clarifai.grpc.api.Input getInput() {
return input_ == null ? com.clarifai.grpc.api.Input.getDefaultInstance() : input_;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
@java.lang.Override
public com.clarifai.grpc.api.InputOrBuilder getInputOrBuilder() {
return getInput();
}
public static final int OUTPUT_FIELD_NUMBER = 2;
private com.clarifai.grpc.api.Output output_;
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
* @return Whether the output field is set.
*/
@java.lang.Override
public boolean hasOutput() {
return output_ != null;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
* @return The output.
*/
@java.lang.Override
public com.clarifai.grpc.api.Output getOutput() {
return output_ == null ? com.clarifai.grpc.api.Output.getDefaultInstance() : output_;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.OutputOrBuilder getOutputOrBuilder() {
return getOutput();
}
public static final int NEGATE_FIELD_NUMBER = 3;
private boolean negate_;
/**
*
* If True then this will flip the meaning of this part of the
* query. This allow for queries such as dog AND ! metadata=={"blah":"value"}
*
*
* bool negate = 3;
* @return The negate.
*/
@java.lang.Override
public boolean getNegate() {
return negate_;
}
public static final int ANNOTATION_FIELD_NUMBER = 4;
private com.clarifai.grpc.api.Annotation annotation_;
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
* @return Whether the annotation field is set.
*/
@java.lang.Override
public boolean hasAnnotation() {
return annotation_ != null;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
* @return The annotation.
*/
@java.lang.Override
public com.clarifai.grpc.api.Annotation getAnnotation() {
return annotation_ == null ? com.clarifai.grpc.api.Annotation.getDefaultInstance() : annotation_;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
@java.lang.Override
public com.clarifai.grpc.api.AnnotationOrBuilder getAnnotationOrBuilder() {
return getAnnotation();
}
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 (input_ != null) {
output.writeMessage(1, getInput());
}
if (output_ != null) {
output.writeMessage(2, getOutput());
}
if (negate_ != false) {
output.writeBool(3, negate_);
}
if (annotation_ != null) {
output.writeMessage(4, getAnnotation());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (input_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getInput());
}
if (output_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getOutput());
}
if (negate_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, negate_);
}
if (annotation_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getAnnotation());
}
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.And)) {
return super.equals(obj);
}
com.clarifai.grpc.api.And other = (com.clarifai.grpc.api.And) obj;
if (hasInput() != other.hasInput()) return false;
if (hasInput()) {
if (!getInput()
.equals(other.getInput())) return false;
}
if (hasOutput() != other.hasOutput()) return false;
if (hasOutput()) {
if (!getOutput()
.equals(other.getOutput())) return false;
}
if (getNegate()
!= other.getNegate()) return false;
if (hasAnnotation() != other.hasAnnotation()) return false;
if (hasAnnotation()) {
if (!getAnnotation()
.equals(other.getAnnotation())) 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 (hasInput()) {
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInput().hashCode();
}
if (hasOutput()) {
hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
hash = (53 * hash) + getOutput().hashCode();
}
hash = (37 * hash) + NEGATE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNegate());
if (hasAnnotation()) {
hash = (37 * hash) + ANNOTATION_FIELD_NUMBER;
hash = (53 * hash) + getAnnotation().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.And parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.And 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.And parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.And 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.And parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.And parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.And parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.And 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.And parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.And 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.And parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.And 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.And 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 common building block of a query which is a sequence of And messages ANDed together.
* Note that some fields are used too RANK results (affect the scores) and some are used to FILTER
* results (unordered subset of your app's contents). In general, FILTER operations are more
* efficient queries at scale and when combined with RANK operations can speed up search performance
* as you effectively operate on a smaller sub-set of your entire app.
*
*
* Protobuf type {@code clarifai.api.And}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.And)
com.clarifai.grpc.api.AndOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_And_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_And_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.And.class, com.clarifai.grpc.api.And.Builder.class);
}
// Construct using com.clarifai.grpc.api.And.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (inputBuilder_ == null) {
input_ = null;
} else {
input_ = null;
inputBuilder_ = null;
}
if (outputBuilder_ == null) {
output_ = null;
} else {
output_ = null;
outputBuilder_ = null;
}
negate_ = false;
if (annotationBuilder_ == null) {
annotation_ = null;
} else {
annotation_ = null;
annotationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_And_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.And getDefaultInstanceForType() {
return com.clarifai.grpc.api.And.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.And build() {
com.clarifai.grpc.api.And result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.And buildPartial() {
com.clarifai.grpc.api.And result = new com.clarifai.grpc.api.And(this);
if (inputBuilder_ == null) {
result.input_ = input_;
} else {
result.input_ = inputBuilder_.build();
}
if (outputBuilder_ == null) {
result.output_ = output_;
} else {
result.output_ = outputBuilder_.build();
}
result.negate_ = negate_;
if (annotationBuilder_ == null) {
result.annotation_ = annotation_;
} else {
result.annotation_ = annotationBuilder_.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.And) {
return mergeFrom((com.clarifai.grpc.api.And)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.And other) {
if (other == com.clarifai.grpc.api.And.getDefaultInstance()) return this;
if (other.hasInput()) {
mergeInput(other.getInput());
}
if (other.hasOutput()) {
mergeOutput(other.getOutput());
}
if (other.getNegate() != false) {
setNegate(other.getNegate());
}
if (other.hasAnnotation()) {
mergeAnnotation(other.getAnnotation());
}
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.And parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.And) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.clarifai.grpc.api.Input input_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder> inputBuilder_;
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
* @return Whether the input field is set.
*/
public boolean hasInput() {
return inputBuilder_ != null || input_ != null;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
* @return The input.
*/
public com.clarifai.grpc.api.Input getInput() {
if (inputBuilder_ == null) {
return input_ == null ? com.clarifai.grpc.api.Input.getDefaultInstance() : input_;
} else {
return inputBuilder_.getMessage();
}
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
public Builder setInput(com.clarifai.grpc.api.Input value) {
if (inputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
inputBuilder_.setMessage(value);
}
return this;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
public Builder setInput(
com.clarifai.grpc.api.Input.Builder builderForValue) {
if (inputBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
inputBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
public Builder mergeInput(com.clarifai.grpc.api.Input value) {
if (inputBuilder_ == null) {
if (input_ != null) {
input_ =
com.clarifai.grpc.api.Input.newBuilder(input_).mergeFrom(value).buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
inputBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
public Builder clearInput() {
if (inputBuilder_ == null) {
input_ = null;
onChanged();
} else {
input_ = null;
inputBuilder_ = null;
}
return this;
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
public com.clarifai.grpc.api.Input.Builder getInputBuilder() {
onChanged();
return getInputFieldBuilder().getBuilder();
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
public com.clarifai.grpc.api.InputOrBuilder getInputOrBuilder() {
if (inputBuilder_ != null) {
return inputBuilder_.getMessageOrBuilder();
} else {
return input_ == null ?
com.clarifai.grpc.api.Input.getDefaultInstance() : input_;
}
}
/**
*
* FILTER by input.data... information.
* This can include human provided concepts, geo location info, metadata, etc.
* This is effectively searching over only the trusted annotation attached to an input in your
* app. To search by more specific annotation fields use the Annotation object here.
* ########## Supported fields ##########
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - dataset_ids[] - filter by dataset IDs
* - id - filter by input ID
* - status.code - filter by input status
*
*
* .clarifai.api.Input input = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder>
getInputFieldBuilder() {
if (inputBuilder_ == null) {
inputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder>(
getInput(),
getParentForChildren(),
isClean());
input_ = null;
}
return inputBuilder_;
}
private com.clarifai.grpc.api.Output output_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Output, com.clarifai.grpc.api.Output.Builder, com.clarifai.grpc.api.OutputOrBuilder> outputBuilder_;
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
* @return Whether the output field is set.
*/
public boolean hasOutput() {
return outputBuilder_ != null || output_ != null;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
* @return The output.
*/
public com.clarifai.grpc.api.Output getOutput() {
if (outputBuilder_ == null) {
return output_ == null ? com.clarifai.grpc.api.Output.getDefaultInstance() : output_;
} else {
return outputBuilder_.getMessage();
}
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
public Builder setOutput(com.clarifai.grpc.api.Output value) {
if (outputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
output_ = value;
onChanged();
} else {
outputBuilder_.setMessage(value);
}
return this;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
public Builder setOutput(
com.clarifai.grpc.api.Output.Builder builderForValue) {
if (outputBuilder_ == null) {
output_ = builderForValue.build();
onChanged();
} else {
outputBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
public Builder mergeOutput(com.clarifai.grpc.api.Output value) {
if (outputBuilder_ == null) {
if (output_ != null) {
output_ =
com.clarifai.grpc.api.Output.newBuilder(output_).mergeFrom(value).buildPartial();
} else {
output_ = value;
}
onChanged();
} else {
outputBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
public Builder clearOutput() {
if (outputBuilder_ == null) {
output_ = null;
onChanged();
} else {
output_ = null;
outputBuilder_ = null;
}
return this;
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
public com.clarifai.grpc.api.Output.Builder getOutputBuilder() {
onChanged();
return getOutputFieldBuilder().getBuilder();
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
public com.clarifai.grpc.api.OutputOrBuilder getOutputOrBuilder() {
if (outputBuilder_ != null) {
return outputBuilder_.getMessageOrBuilder();
} else {
return output_ == null ?
com.clarifai.grpc.api.Output.getDefaultInstance() : output_;
}
}
/**
*
* RANK based predicted outputs from models such as custom trained models, pre-trained models,
* etc. This is also where you enter the image url for a visual search because what we're asking
* the system to do is find output embedding most visually similar to the provided input (that
* input being in And.output.input.data.image.url for example). This will return the Hits
* sorted by visual similarity (1.0 being very similar or exact match and 0.0 being very
* dissimlar). For a search by Output concept, this means we're asking the system to rank
* the Hits by confidence of our model's predicted Outputs. So for example if the model
* predicts an image is 0.95 likely there is a "dog" present, that should related directly
* to the score returned if you search for Output concept "dog" in your query. This provides
* a natural ranking to search results based on confidence of predictions from the models and
* is used when ANDing multiple of these types of RANK by Output queries together as well.
* ########## Supported fields ##########
* - data.clusters[].id
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - input.data.image - empty image is required when searching by input ID
* - input.data.image.base64[]
* - input.data.image.url
* - input.id
*
*
* .clarifai.api.Output output = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Output, com.clarifai.grpc.api.Output.Builder, com.clarifai.grpc.api.OutputOrBuilder>
getOutputFieldBuilder() {
if (outputBuilder_ == null) {
outputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Output, com.clarifai.grpc.api.Output.Builder, com.clarifai.grpc.api.OutputOrBuilder>(
getOutput(),
getParentForChildren(),
isClean());
output_ = null;
}
return outputBuilder_;
}
private boolean negate_ ;
/**
*
* If True then this will flip the meaning of this part of the
* query. This allow for queries such as dog AND ! metadata=={"blah":"value"}
*
*
* bool negate = 3;
* @return The negate.
*/
@java.lang.Override
public boolean getNegate() {
return negate_;
}
/**
*
* If True then this will flip the meaning of this part of the
* query. This allow for queries such as dog AND ! metadata=={"blah":"value"}
*
*
* bool negate = 3;
* @param value The negate to set.
* @return This builder for chaining.
*/
public Builder setNegate(boolean value) {
negate_ = value;
onChanged();
return this;
}
/**
*
* If True then this will flip the meaning of this part of the
* query. This allow for queries such as dog AND ! metadata=={"blah":"value"}
*
*
* bool negate = 3;
* @return This builder for chaining.
*/
public Builder clearNegate() {
negate_ = false;
onChanged();
return this;
}
private com.clarifai.grpc.api.Annotation annotation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Annotation, com.clarifai.grpc.api.Annotation.Builder, com.clarifai.grpc.api.AnnotationOrBuilder> annotationBuilder_;
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
* @return Whether the annotation field is set.
*/
public boolean hasAnnotation() {
return annotationBuilder_ != null || annotation_ != null;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
* @return The annotation.
*/
public com.clarifai.grpc.api.Annotation getAnnotation() {
if (annotationBuilder_ == null) {
return annotation_ == null ? com.clarifai.grpc.api.Annotation.getDefaultInstance() : annotation_;
} else {
return annotationBuilder_.getMessage();
}
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
public Builder setAnnotation(com.clarifai.grpc.api.Annotation value) {
if (annotationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
annotation_ = value;
onChanged();
} else {
annotationBuilder_.setMessage(value);
}
return this;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
public Builder setAnnotation(
com.clarifai.grpc.api.Annotation.Builder builderForValue) {
if (annotationBuilder_ == null) {
annotation_ = builderForValue.build();
onChanged();
} else {
annotationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
public Builder mergeAnnotation(com.clarifai.grpc.api.Annotation value) {
if (annotationBuilder_ == null) {
if (annotation_ != null) {
annotation_ =
com.clarifai.grpc.api.Annotation.newBuilder(annotation_).mergeFrom(value).buildPartial();
} else {
annotation_ = value;
}
onChanged();
} else {
annotationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
public Builder clearAnnotation() {
if (annotationBuilder_ == null) {
annotation_ = null;
onChanged();
} else {
annotation_ = null;
annotationBuilder_ = null;
}
return this;
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
public com.clarifai.grpc.api.Annotation.Builder getAnnotationBuilder() {
onChanged();
return getAnnotationFieldBuilder().getBuilder();
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
public com.clarifai.grpc.api.AnnotationOrBuilder getAnnotationOrBuilder() {
if (annotationBuilder_ != null) {
return annotationBuilder_.getMessageOrBuilder();
} else {
return annotation_ == null ?
com.clarifai.grpc.api.Annotation.getDefaultInstance() : annotation_;
}
}
/**
*
* FILTER by annotation information. This is more flexible than just filtering by
* Input information because in the general case each input can have several annotations.
* Some example use cases for filtering by annotations:
* 1) find all the inputs annotated "dog" by worker_id = "XYZ"
* 2) find all the annotations associated with embed_model_version_id = "123"
* 3) find all the annotations that are trusted, etc.
* Since all the annotations under the hood are joined to the embedding model's annotation
* using worker_id's of other models like cluster models or concept models should be
* combinable with queries like visual search (a query with Output filled in).
* ########## Supported fields ##########
* - annotation_info - allows searching by empty annotation info
* note that searching by empty annotation info will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty annotation info.
* - annotation_info.fields - filter by annotation info
* - data.concepts[].id
* - data.concepts[].name
* - data.concepts[].value
* - data.geo.geo_box[].geo_point.latitude
* - data.geo.geo_box[].geo_point.longitude
* - data.geo.geo_limit.type
* - data.geo.geo_limit.value
* - data.geo.geo_point.latitude
* - data.geo.geo_point.longitude
* - data.image.url
* - data.metadata - allow search with empty metadata
* note that searching by empty metadata will actually not influence the search results.
* however, in order to be user-friendly, we are still supporting searching by empty metadata.
* - data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
* - input_id
* - input_level
* - model_version_id
* - status.code
* - task_id
* - trusted
* - user_id
*
*
* .clarifai.api.Annotation annotation = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Annotation, com.clarifai.grpc.api.Annotation.Builder, com.clarifai.grpc.api.AnnotationOrBuilder>
getAnnotationFieldBuilder() {
if (annotationBuilder_ == null) {
annotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Annotation, com.clarifai.grpc.api.Annotation.Builder, com.clarifai.grpc.api.AnnotationOrBuilder>(
getAnnotation(),
getParentForChildren(),
isClean());
annotation_ = null;
}
return annotationBuilder_;
}
@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.And)
}
// @@protoc_insertion_point(class_scope:clarifai.api.And)
private static final com.clarifai.grpc.api.And DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.And();
}
public static com.clarifai.grpc.api.And getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public And parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new And(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.And getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy