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;
}
}