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

com.clarifai.grpc.api.Point 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;

/**
 * 
 * Point
 * 
* * Protobuf type {@code clarifai.api.Point} */ public final class Point extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.Point) PointOrBuilder { private static final long serialVersionUID = 0L; // Use Point.newBuilder() to construct. private Point(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Point() { visibility_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Point(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Point( 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 13: { row_ = input.readFloat(); break; } case 21: { col_ = input.readFloat(); break; } case 29: { z_ = input.readFloat(); break; } case 32: { int rawValue = input.readEnum(); visibility_ = rawValue; 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_Point_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Point_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Point.class, com.clarifai.grpc.api.Point.Builder.class); } /** *
   * Whether this point is visible or occluded
   * 
* * Protobuf enum {@code clarifai.api.Point.Visibility} */ public enum Visibility implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Visibility of the point is not set
     * 
* * NOT_SET = 0; */ NOT_SET(0), /** *
     * Point is visible
     * 
* * VISIBLE = 1; */ VISIBLE(1), /** *
     * Point is occluded
     * 
* * NOT_VISIBLE = 2; */ NOT_VISIBLE(2), /** *
     * Point is not in the image
     * 
* * NOT_PRESENT = 3; */ NOT_PRESENT(3), UNRECOGNIZED(-1), ; /** *
     * Visibility of the point is not set
     * 
* * NOT_SET = 0; */ public static final int NOT_SET_VALUE = 0; /** *
     * Point is visible
     * 
* * VISIBLE = 1; */ public static final int VISIBLE_VALUE = 1; /** *
     * Point is occluded
     * 
* * NOT_VISIBLE = 2; */ public static final int NOT_VISIBLE_VALUE = 2; /** *
     * Point is not in the image
     * 
* * NOT_PRESENT = 3; */ public static final int NOT_PRESENT_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Visibility valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Visibility forNumber(int value) { switch (value) { case 0: return NOT_SET; case 1: return VISIBLE; case 2: return NOT_VISIBLE; case 3: return NOT_PRESENT; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Visibility> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Visibility findValueByNumber(int number) { return Visibility.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.clarifai.grpc.api.Point.getDescriptor().getEnumTypes().get(0); } private static final Visibility[] VALUES = values(); public static Visibility valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Visibility(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:clarifai.api.Point.Visibility) } public static final int ROW_FIELD_NUMBER = 1; private float row_; /** *
   * The row location of the point. This has a [0.0-1.0] range with 0.0 being top row and 1.0
   * being the bottom row.
   * 
* * float row = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The row. */ @java.lang.Override public float getRow() { return row_; } public static final int COL_FIELD_NUMBER = 2; private float col_; /** *
   * The column location of the point. This has a [0.0-1.0] range with 0.0 being left col and 1.0
   * being the right col.
   * 
* * float col = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The col. */ @java.lang.Override public float getCol() { return col_; } public static final int Z_FIELD_NUMBER = 3; private float z_; /** *
   * Depth if applicable for the point.
   * 
* * float z = 3; * @return The z. */ @java.lang.Override public float getZ() { return z_; } public static final int VISIBILITY_FIELD_NUMBER = 4; private int visibility_; /** * .clarifai.api.Point.Visibility visibility = 4; * @return The enum numeric value on the wire for visibility. */ @java.lang.Override public int getVisibilityValue() { return visibility_; } /** * .clarifai.api.Point.Visibility visibility = 4; * @return The visibility. */ @java.lang.Override public com.clarifai.grpc.api.Point.Visibility getVisibility() { @SuppressWarnings("deprecation") com.clarifai.grpc.api.Point.Visibility result = com.clarifai.grpc.api.Point.Visibility.valueOf(visibility_); return result == null ? com.clarifai.grpc.api.Point.Visibility.UNRECOGNIZED : result; } 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 (java.lang.Float.floatToRawIntBits(row_) != 0) { output.writeFloat(1, row_); } if (java.lang.Float.floatToRawIntBits(col_) != 0) { output.writeFloat(2, col_); } if (java.lang.Float.floatToRawIntBits(z_) != 0) { output.writeFloat(3, z_); } if (visibility_ != com.clarifai.grpc.api.Point.Visibility.NOT_SET.getNumber()) { output.writeEnum(4, visibility_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (java.lang.Float.floatToRawIntBits(row_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(1, row_); } if (java.lang.Float.floatToRawIntBits(col_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(2, col_); } if (java.lang.Float.floatToRawIntBits(z_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(3, z_); } if (visibility_ != com.clarifai.grpc.api.Point.Visibility.NOT_SET.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, visibility_); } 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.Point)) { return super.equals(obj); } com.clarifai.grpc.api.Point other = (com.clarifai.grpc.api.Point) obj; if (java.lang.Float.floatToIntBits(getRow()) != java.lang.Float.floatToIntBits( other.getRow())) return false; if (java.lang.Float.floatToIntBits(getCol()) != java.lang.Float.floatToIntBits( other.getCol())) return false; if (java.lang.Float.floatToIntBits(getZ()) != java.lang.Float.floatToIntBits( other.getZ())) return false; if (visibility_ != other.visibility_) 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) + ROW_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getRow()); hash = (37 * hash) + COL_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getCol()); hash = (37 * hash) + Z_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getZ()); hash = (37 * hash) + VISIBILITY_FIELD_NUMBER; hash = (53 * hash) + visibility_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.Point parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Point 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.Point parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Point 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.Point parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Point parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Point parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Point 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.Point parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Point 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.Point parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Point 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.Point 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; } /** *
   * Point
   * 
* * Protobuf type {@code clarifai.api.Point} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.Point) com.clarifai.grpc.api.PointOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Point_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Point_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Point.class, com.clarifai.grpc.api.Point.Builder.class); } // Construct using com.clarifai.grpc.api.Point.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(); row_ = 0F; col_ = 0F; z_ = 0F; visibility_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Point_descriptor; } @java.lang.Override public com.clarifai.grpc.api.Point getDefaultInstanceForType() { return com.clarifai.grpc.api.Point.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.Point build() { com.clarifai.grpc.api.Point result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.Point buildPartial() { com.clarifai.grpc.api.Point result = new com.clarifai.grpc.api.Point(this); result.row_ = row_; result.col_ = col_; result.z_ = z_; result.visibility_ = visibility_; 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.Point) { return mergeFrom((com.clarifai.grpc.api.Point)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.Point other) { if (other == com.clarifai.grpc.api.Point.getDefaultInstance()) return this; if (other.getRow() != 0F) { setRow(other.getRow()); } if (other.getCol() != 0F) { setCol(other.getCol()); } if (other.getZ() != 0F) { setZ(other.getZ()); } if (other.visibility_ != 0) { setVisibilityValue(other.getVisibilityValue()); } 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.Point parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.Point) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private float row_ ; /** *
     * The row location of the point. This has a [0.0-1.0] range with 0.0 being top row and 1.0
     * being the bottom row.
     * 
* * float row = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The row. */ @java.lang.Override public float getRow() { return row_; } /** *
     * The row location of the point. This has a [0.0-1.0] range with 0.0 being top row and 1.0
     * being the bottom row.
     * 
* * float row = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The row to set. * @return This builder for chaining. */ public Builder setRow(float value) { row_ = value; onChanged(); return this; } /** *
     * The row location of the point. This has a [0.0-1.0] range with 0.0 being top row and 1.0
     * being the bottom row.
     * 
* * float row = 1 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearRow() { row_ = 0F; onChanged(); return this; } private float col_ ; /** *
     * The column location of the point. This has a [0.0-1.0] range with 0.0 being left col and 1.0
     * being the right col.
     * 
* * float col = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return The col. */ @java.lang.Override public float getCol() { return col_; } /** *
     * The column location of the point. This has a [0.0-1.0] range with 0.0 being left col and 1.0
     * being the right col.
     * 
* * float col = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @param value The col to set. * @return This builder for chaining. */ public Builder setCol(float value) { col_ = value; onChanged(); return this; } /** *
     * The column location of the point. This has a [0.0-1.0] range with 0.0 being left col and 1.0
     * being the right col.
     * 
* * float col = 2 [(.clarifai.api.utils.cl_show_if_empty) = true]; * @return This builder for chaining. */ public Builder clearCol() { col_ = 0F; onChanged(); return this; } private float z_ ; /** *
     * Depth if applicable for the point.
     * 
* * float z = 3; * @return The z. */ @java.lang.Override public float getZ() { return z_; } /** *
     * Depth if applicable for the point.
     * 
* * float z = 3; * @param value The z to set. * @return This builder for chaining. */ public Builder setZ(float value) { z_ = value; onChanged(); return this; } /** *
     * Depth if applicable for the point.
     * 
* * float z = 3; * @return This builder for chaining. */ public Builder clearZ() { z_ = 0F; onChanged(); return this; } private int visibility_ = 0; /** * .clarifai.api.Point.Visibility visibility = 4; * @return The enum numeric value on the wire for visibility. */ @java.lang.Override public int getVisibilityValue() { return visibility_; } /** * .clarifai.api.Point.Visibility visibility = 4; * @param value The enum numeric value on the wire for visibility to set. * @return This builder for chaining. */ public Builder setVisibilityValue(int value) { visibility_ = value; onChanged(); return this; } /** * .clarifai.api.Point.Visibility visibility = 4; * @return The visibility. */ @java.lang.Override public com.clarifai.grpc.api.Point.Visibility getVisibility() { @SuppressWarnings("deprecation") com.clarifai.grpc.api.Point.Visibility result = com.clarifai.grpc.api.Point.Visibility.valueOf(visibility_); return result == null ? com.clarifai.grpc.api.Point.Visibility.UNRECOGNIZED : result; } /** * .clarifai.api.Point.Visibility visibility = 4; * @param value The visibility to set. * @return This builder for chaining. */ public Builder setVisibility(com.clarifai.grpc.api.Point.Visibility value) { if (value == null) { throw new NullPointerException(); } visibility_ = value.getNumber(); onChanged(); return this; } /** * .clarifai.api.Point.Visibility visibility = 4; * @return This builder for chaining. */ public Builder clearVisibility() { visibility_ = 0; onChanged(); return this; } @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.Point) } // @@protoc_insertion_point(class_scope:clarifai.api.Point) private static final com.clarifai.grpc.api.Point DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.Point(); } public static com.clarifai.grpc.api.Point getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Point parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Point(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.Point getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy