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

com.clarifai.grpc.api.Rank Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/clarifai/api/resources.proto

package com.clarifai.grpc.api;

/**
 * 
 * Rank
 * 
* * Protobuf type {@code clarifai.api.Rank} */ public final class Rank extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.Rank) RankOrBuilder { private static final long serialVersionUID = 0L; // Use Rank.newBuilder() to construct. private Rank(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Rank() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Rank(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Rank( 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 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_Rank_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Rank_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Rank.class, com.clarifai.grpc.api.Rank.Builder.class); } 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
   * 
* * 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_; /** *
   * RANK by annotation information.
   * ########## Supported fields ##########
   *  - data.concepts[].id
   *  - data.concepts[].name
   *  - data.concepts[].value
   *  - data.embeddings[].num_dimensions
   *  - data.embeddings[].vector[]
   *  - data.image.base64[]
   *  - data.image.url
   *  - data.text.raw
   *  - input_id
   *  - model_version_id
   * 
* * .clarifai.api.Annotation annotation = 4; * @return Whether the annotation field is set. */ @java.lang.Override public boolean hasAnnotation() { return annotation_ != null; } /** *
   * RANK by annotation information.
   * ########## Supported fields ##########
   *  - data.concepts[].id
   *  - data.concepts[].name
   *  - data.concepts[].value
   *  - data.embeddings[].num_dimensions
   *  - data.embeddings[].vector[]
   *  - data.image.base64[]
   *  - data.image.url
   *  - data.text.raw
   *  - input_id
   *  - model_version_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_; } /** *
   * RANK by annotation information.
   * ########## Supported fields ##########
   *  - data.concepts[].id
   *  - data.concepts[].name
   *  - data.concepts[].value
   *  - data.embeddings[].num_dimensions
   *  - data.embeddings[].vector[]
   *  - data.image.base64[]
   *  - data.image.url
   *  - data.text.raw
   *  - input_id
   *  - model_version_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 (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 (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.Rank)) { return super.equals(obj); } com.clarifai.grpc.api.Rank other = (com.clarifai.grpc.api.Rank) obj; 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(); 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.Rank parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Rank 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.Rank parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Rank 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.Rank parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Rank parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Rank parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Rank 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.Rank parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Rank 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.Rank parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Rank 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.Rank 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; } /** *
   * Rank
   * 
* * Protobuf type {@code clarifai.api.Rank} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.Rank) com.clarifai.grpc.api.RankOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Rank_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Rank_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Rank.class, com.clarifai.grpc.api.Rank.Builder.class); } // Construct using com.clarifai.grpc.api.Rank.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(); 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_Rank_descriptor; } @java.lang.Override public com.clarifai.grpc.api.Rank getDefaultInstanceForType() { return com.clarifai.grpc.api.Rank.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.Rank build() { com.clarifai.grpc.api.Rank result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.Rank buildPartial() { com.clarifai.grpc.api.Rank result = new com.clarifai.grpc.api.Rank(this); 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.Rank) { return mergeFrom((com.clarifai.grpc.api.Rank)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.Rank other) { if (other == com.clarifai.grpc.api.Rank.getDefaultInstance()) return this; 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.Rank parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.Rank) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private boolean negate_ ; /** *
     * If True then this will flip the meaning of this part of the
     * query. This allow for queries such as !dog
     * 
* * 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
     * 
* * 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
     * 
* * 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_; /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_id
     * 
* * .clarifai.api.Annotation annotation = 4; * @return Whether the annotation field is set. */ public boolean hasAnnotation() { return annotationBuilder_ != null || annotation_ != null; } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_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(); } } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_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; } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_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; } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_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; } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_id
     * 
* * .clarifai.api.Annotation annotation = 4; */ public Builder clearAnnotation() { if (annotationBuilder_ == null) { annotation_ = null; onChanged(); } else { annotation_ = null; annotationBuilder_ = null; } return this; } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_id
     * 
* * .clarifai.api.Annotation annotation = 4; */ public com.clarifai.grpc.api.Annotation.Builder getAnnotationBuilder() { onChanged(); return getAnnotationFieldBuilder().getBuilder(); } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_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_; } } /** *
     * RANK by annotation information.
     * ########## Supported fields ##########
     *  - data.concepts[].id
     *  - data.concepts[].name
     *  - data.concepts[].value
     *  - data.embeddings[].num_dimensions
     *  - data.embeddings[].vector[]
     *  - data.image.base64[]
     *  - data.image.url
     *  - data.text.raw
     *  - input_id
     *  - model_version_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.Rank) } // @@protoc_insertion_point(class_scope:clarifai.api.Rank) private static final com.clarifai.grpc.api.Rank DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.Rank(); } public static com.clarifai.grpc.api.Rank getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Rank parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Rank(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.Rank getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy