// Generated by the protocol buffer compiler. DO NOT EDIT! // source: VisionField.proto package messages; /** * Protobuf type {@code messages.VisualLine} */ public final class VisualLine extends com.google.protobuf.GeneratedMessage implements VisualLineOrBuilder { // Use VisualLine.newBuilder() to construct. private VisualLine(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private VisualLine(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final VisualLine defaultInstance; public static VisualLine getDefaultInstance() { return defaultInstance; } public VisualLine getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private VisualLine( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { messages.VisualDetection.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = visualDetection_.toBuilder(); } visualDetection_ = input.readMessage(messages.VisualDetection.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(visualDetection_); visualDetection_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } case 16: { bitField0_ |= 0x00000002; startX_ = input.readInt32(); break; } case 24: { bitField0_ |= 0x00000004; startY_ = input.readInt32(); break; } case 32: { bitField0_ |= 0x00000020; endX_ = input.readInt32(); break; } case 40: { bitField0_ |= 0x00000040; endY_ = input.readInt32(); break; } case 53: { bitField0_ |= 0x00000200; angle_ = input.readFloat(); break; } case 61: { bitField0_ |= 0x00000400; avgWidth_ = input.readFloat(); break; } case 69: { bitField0_ |= 0x00000800; length_ = input.readFloat(); break; } case 77: { bitField0_ |= 0x00001000; slope_ = input.readFloat(); break; } case 85: { bitField0_ |= 0x00002000; yInt_ = input.readFloat(); break; } case 88: { int rawValue = input.readEnum(); messages.VisualLine.line_id value = messages.VisualLine.line_id.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(11, rawValue); } else { if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) { possibilities_ = new java.util.ArrayList<messages.VisualLine.line_id>(); mutable_bitField0_ |= 0x00004000; } possibilities_.add(value); } break; } case 90: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); messages.VisualLine.line_id value = messages.VisualLine.line_id.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(11, rawValue); } else { if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) { possibilities_ = new java.util.ArrayList<messages.VisualLine.line_id>(); mutable_bitField0_ |= 0x00004000; } possibilities_.add(value); } } input.popLimit(oldLimit); break; } case 101: { bitField0_ |= 0x00000008; startDist_ = input.readFloat(); break; } case 109: { bitField0_ |= 0x00000010; startBearing_ = input.readFloat(); break; } case 117: { bitField0_ |= 0x00000080; endDist_ = input.readFloat(); break; } case 125: { bitField0_ |= 0x00000100; endBearing_ = input.readFloat(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00004000) == 0x00004000)) { possibilities_ = java.util.Collections.unmodifiableList(possibilities_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return messages._File_VisionField.internal_static_messages_VisualLine_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return messages._File_VisionField.internal_static_messages_VisualLine_fieldAccessorTable .ensureFieldAccessorsInitialized( messages.VisualLine.class, messages.VisualLine.Builder.class); } public static com.google.protobuf.Parser<VisualLine> PARSER = new com.google.protobuf.AbstractParser<VisualLine>() { public VisualLine parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new VisualLine(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<VisualLine> getParserForType() { return PARSER; } /** * Protobuf enum {@code messages.VisualLine.line_id} */ public enum line_id implements com.google.protobuf.ProtocolMessageEnum { /** * <code>UNKNOWN_LINE = 50;</code> * * <pre> * Ambiguous lines * </pre> */ UNKNOWN_LINE(0, 50), /** * <code>SIDE_OR_ENDLINE = 51;</code> */ SIDE_OR_ENDLINE(1, 51), /** * <code>SIDELINE_LINE = 52;</code> */ SIDELINE_LINE(2, 52), /** * <code>ENDLINE_LINE = 53;</code> */ ENDLINE_LINE(3, 53), /** * <code>GOALBOX_LINE = 54;</code> */ GOALBOX_LINE(4, 54), /** * <code>GOALBOX_SIDE_LINE = 55;</code> * * <pre> * 55 * </pre> */ GOALBOX_SIDE_LINE(5, 55), /** * <code>GOALBOX_TOP_LINE = 56;</code> */ GOALBOX_TOP_LINE(6, 56), /** * <code>BLUE_GOAL_ENDLINE = 57;</code> * * <pre> * Endlines * </pre> */ BLUE_GOAL_ENDLINE(7, 57), /** * <code>YELLOW_GOAL_ENDLINE = 58;</code> */ YELLOW_GOAL_ENDLINE(8, 58), /** * <code>TOP_SIDELINE = 59;</code> */ TOP_SIDELINE(9, 59), /** * <code>BOTTOM_SIDELINE = 60;</code> */ BOTTOM_SIDELINE(10, 60), /** * <code>MIDLINE = 61;</code> */ MIDLINE(11, 61), /** * <code>BLUE_GOALBOX_TOP_LINE = 62;</code> * * <pre> * GOALBOX LINES: * Named as if you were the goalie (so the "top of the box" is the TOP_LINE) * </pre> */ BLUE_GOALBOX_TOP_LINE(12, 62), /** * <code>BLUE_GOALBOX_LEFT_LINE = 63;</code> */ BLUE_GOALBOX_LEFT_LINE(13, 63), /** * <code>BLUE_GOALBOX_RIGHT_LINE = 64;</code> */ BLUE_GOALBOX_RIGHT_LINE(14, 64), /** * <code>YELLOW_GOALBOX_TOP_LINE = 65;</code> */ YELLOW_GOALBOX_TOP_LINE(15, 65), /** * <code>YELLOW_GOALBOX_LEFT_LINE = 66;</code> */ YELLOW_GOALBOX_LEFT_LINE(16, 66), /** * <code>YELLOW_GOALBOX_RIGHT_LINE = 67;</code> */ YELLOW_GOALBOX_RIGHT_LINE(17, 67), ; /** * <code>UNKNOWN_LINE = 50;</code> * * <pre> * Ambiguous lines * </pre> */ public static final int UNKNOWN_LINE_VALUE = 50; /** * <code>SIDE_OR_ENDLINE = 51;</code> */ public static final int SIDE_OR_ENDLINE_VALUE = 51; /** * <code>SIDELINE_LINE = 52;</code> */ public static final int SIDELINE_LINE_VALUE = 52; /** * <code>ENDLINE_LINE = 53;</code> */ public static final int ENDLINE_LINE_VALUE = 53; /** * <code>GOALBOX_LINE = 54;</code> */ public static final int GOALBOX_LINE_VALUE = 54; /** * <code>GOALBOX_SIDE_LINE = 55;</code> * * <pre> * 55 * </pre> */ public static final int GOALBOX_SIDE_LINE_VALUE = 55; /** * <code>GOALBOX_TOP_LINE = 56;</code> */ public static final int GOALBOX_TOP_LINE_VALUE = 56; /** * <code>BLUE_GOAL_ENDLINE = 57;</code> * * <pre> * Endlines * </pre> */ public static final int BLUE_GOAL_ENDLINE_VALUE = 57; /** * <code>YELLOW_GOAL_ENDLINE = 58;</code> */ public static final int YELLOW_GOAL_ENDLINE_VALUE = 58; /** * <code>TOP_SIDELINE = 59;</code> */ public static final int TOP_SIDELINE_VALUE = 59; /** * <code>BOTTOM_SIDELINE = 60;</code> */ public static final int BOTTOM_SIDELINE_VALUE = 60; /** * <code>MIDLINE = 61;</code> */ public static final int MIDLINE_VALUE = 61; /** * <code>BLUE_GOALBOX_TOP_LINE = 62;</code> * * <pre> * GOALBOX LINES: * Named as if you were the goalie (so the "top of the box" is the TOP_LINE) * </pre> */ public static final int BLUE_GOALBOX_TOP_LINE_VALUE = 62; /** * <code>BLUE_GOALBOX_LEFT_LINE = 63;</code> */ public static final int BLUE_GOALBOX_LEFT_LINE_VALUE = 63; /** * <code>BLUE_GOALBOX_RIGHT_LINE = 64;</code> */ public static final int BLUE_GOALBOX_RIGHT_LINE_VALUE = 64; /** * <code>YELLOW_GOALBOX_TOP_LINE = 65;</code> */ public static final int YELLOW_GOALBOX_TOP_LINE_VALUE = 65; /** * <code>YELLOW_GOALBOX_LEFT_LINE = 66;</code> */ public static final int YELLOW_GOALBOX_LEFT_LINE_VALUE = 66; /** * <code>YELLOW_GOALBOX_RIGHT_LINE = 67;</code> */ public static final int YELLOW_GOALBOX_RIGHT_LINE_VALUE = 67; public final int getNumber() { return value; } public static line_id valueOf(int value) { switch (value) { case 50: return UNKNOWN_LINE; case 51: return SIDE_OR_ENDLINE; case 52: return SIDELINE_LINE; case 53: return ENDLINE_LINE; case 54: return GOALBOX_LINE; case 55: return GOALBOX_SIDE_LINE; case 56: return GOALBOX_TOP_LINE; case 57: return BLUE_GOAL_ENDLINE; case 58: return YELLOW_GOAL_ENDLINE; case 59: return TOP_SIDELINE; case 60: return BOTTOM_SIDELINE; case 61: return MIDLINE; case 62: return BLUE_GOALBOX_TOP_LINE; case 63: return BLUE_GOALBOX_LEFT_LINE; case 64: return BLUE_GOALBOX_RIGHT_LINE; case 65: return YELLOW_GOALBOX_TOP_LINE; case 66: return YELLOW_GOALBOX_LEFT_LINE; case 67: return YELLOW_GOALBOX_RIGHT_LINE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<line_id> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<line_id> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<line_id>() { public line_id findValueByNumber(int number) { return line_id.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return messages.VisualLine.getDescriptor().getEnumTypes().get(0); } private static final line_id[] VALUES = values(); public static line_id valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; private line_id(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:messages.VisualLine.line_id) } private int bitField0_; // optional .messages.VisualDetection visual_detection = 1; public static final int VISUAL_DETECTION_FIELD_NUMBER = 1; private messages.VisualDetection visualDetection_; /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public boolean hasVisualDetection() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public messages.VisualDetection getVisualDetection() { return visualDetection_; } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public messages.VisualDetectionOrBuilder getVisualDetectionOrBuilder() { return visualDetection_; } // optional int32 start_x = 2; public static final int START_X_FIELD_NUMBER = 2; private int startX_; /** * <code>optional int32 start_x = 2;</code> */ public boolean hasStartX() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 start_x = 2;</code> */ public int getStartX() { return startX_; } // optional int32 start_y = 3; public static final int START_Y_FIELD_NUMBER = 3; private int startY_; /** * <code>optional int32 start_y = 3;</code> */ public boolean hasStartY() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional int32 start_y = 3;</code> */ public int getStartY() { return startY_; } // optional float start_dist = 12; public static final int START_DIST_FIELD_NUMBER = 12; private float startDist_; /** * <code>optional float start_dist = 12;</code> */ public boolean hasStartDist() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional float start_dist = 12;</code> */ public float getStartDist() { return startDist_; } // optional float start_bearing = 13; public static final int START_BEARING_FIELD_NUMBER = 13; private float startBearing_; /** * <code>optional float start_bearing = 13;</code> */ public boolean hasStartBearing() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional float start_bearing = 13;</code> */ public float getStartBearing() { return startBearing_; } // optional int32 end_x = 4; public static final int END_X_FIELD_NUMBER = 4; private int endX_; /** * <code>optional int32 end_x = 4;</code> */ public boolean hasEndX() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional int32 end_x = 4;</code> */ public int getEndX() { return endX_; } // optional int32 end_y = 5; public static final int END_Y_FIELD_NUMBER = 5; private int endY_; /** * <code>optional int32 end_y = 5;</code> */ public boolean hasEndY() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional int32 end_y = 5;</code> */ public int getEndY() { return endY_; } // optional float end_dist = 14; public static final int END_DIST_FIELD_NUMBER = 14; private float endDist_; /** * <code>optional float end_dist = 14;</code> */ public boolean hasEndDist() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * <code>optional float end_dist = 14;</code> */ public float getEndDist() { return endDist_; } // optional float end_bearing = 15; public static final int END_BEARING_FIELD_NUMBER = 15; private float endBearing_; /** * <code>optional float end_bearing = 15;</code> */ public boolean hasEndBearing() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * <code>optional float end_bearing = 15;</code> */ public float getEndBearing() { return endBearing_; } // optional float angle = 6; public static final int ANGLE_FIELD_NUMBER = 6; private float angle_; /** * <code>optional float angle = 6;</code> */ public boolean hasAngle() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * <code>optional float angle = 6;</code> */ public float getAngle() { return angle_; } // optional float avg_width = 7; public static final int AVG_WIDTH_FIELD_NUMBER = 7; private float avgWidth_; /** * <code>optional float avg_width = 7;</code> */ public boolean hasAvgWidth() { return ((bitField0_ & 0x00000400) == 0x00000400); } /** * <code>optional float avg_width = 7;</code> */ public float getAvgWidth() { return avgWidth_; } // optional float length = 8; public static final int LENGTH_FIELD_NUMBER = 8; private float length_; /** * <code>optional float length = 8;</code> */ public boolean hasLength() { return ((bitField0_ & 0x00000800) == 0x00000800); } /** * <code>optional float length = 8;</code> */ public float getLength() { return length_; } // optional float slope = 9; public static final int SLOPE_FIELD_NUMBER = 9; private float slope_; /** * <code>optional float slope = 9;</code> */ public boolean hasSlope() { return ((bitField0_ & 0x00001000) == 0x00001000); } /** * <code>optional float slope = 9;</code> */ public float getSlope() { return slope_; } // optional float y_int = 10; public static final int Y_INT_FIELD_NUMBER = 10; private float yInt_; /** * <code>optional float y_int = 10;</code> */ public boolean hasYInt() { return ((bitField0_ & 0x00002000) == 0x00002000); } /** * <code>optional float y_int = 10;</code> */ public float getYInt() { return yInt_; } // repeated .messages.VisualLine.line_id possibilities = 11; public static final int POSSIBILITIES_FIELD_NUMBER = 11; private java.util.List<messages.VisualLine.line_id> possibilities_; /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public java.util.List<messages.VisualLine.line_id> getPossibilitiesList() { return possibilities_; } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public int getPossibilitiesCount() { return possibilities_.size(); } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public messages.VisualLine.line_id getPossibilities(int index) { return possibilities_.get(index); } private void initFields() { visualDetection_ = messages.VisualDetection.getDefaultInstance(); startX_ = 0; startY_ = 0; startDist_ = 0F; startBearing_ = 0F; endX_ = 0; endY_ = 0; endDist_ = 0F; endBearing_ = 0F; angle_ = 0F; avgWidth_ = 0F; length_ = 0F; slope_ = 0F; yInt_ = 0F; possibilities_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, visualDetection_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, startX_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, startY_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeInt32(4, endX_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeInt32(5, endY_); } if (((bitField0_ & 0x00000200) == 0x00000200)) { output.writeFloat(6, angle_); } if (((bitField0_ & 0x00000400) == 0x00000400)) { output.writeFloat(7, avgWidth_); } if (((bitField0_ & 0x00000800) == 0x00000800)) { output.writeFloat(8, length_); } if (((bitField0_ & 0x00001000) == 0x00001000)) { output.writeFloat(9, slope_); } if (((bitField0_ & 0x00002000) == 0x00002000)) { output.writeFloat(10, yInt_); } for (int i = 0; i < possibilities_.size(); i++) { output.writeEnum(11, possibilities_.get(i).getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeFloat(12, startDist_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeFloat(13, startBearing_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeFloat(14, endDist_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeFloat(15, endBearing_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, visualDetection_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, startX_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, startY_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, endX_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(5, endY_); } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(6, angle_); } if (((bitField0_ & 0x00000400) == 0x00000400)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(7, avgWidth_); } if (((bitField0_ & 0x00000800) == 0x00000800)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(8, length_); } if (((bitField0_ & 0x00001000) == 0x00001000)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(9, slope_); } if (((bitField0_ & 0x00002000) == 0x00002000)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(10, yInt_); } { int dataSize = 0; for (int i = 0; i < possibilities_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(possibilities_.get(i).getNumber()); } size += dataSize; size += 1 * possibilities_.size(); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(12, startDist_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(13, startBearing_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(14, endDist_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(15, endBearing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static messages.VisualLine parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static messages.VisualLine parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static messages.VisualLine parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static messages.VisualLine parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static messages.VisualLine parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static messages.VisualLine parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static messages.VisualLine parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static messages.VisualLine parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static messages.VisualLine parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static messages.VisualLine parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(messages.VisualLine prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code messages.VisualLine} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements messages.VisualLineOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return messages._File_VisionField.internal_static_messages_VisualLine_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return messages._File_VisionField.internal_static_messages_VisualLine_fieldAccessorTable .ensureFieldAccessorsInitialized( messages.VisualLine.class, messages.VisualLine.Builder.class); } // Construct using messages.VisualLine.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getVisualDetectionFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (visualDetectionBuilder_ == null) { visualDetection_ = messages.VisualDetection.getDefaultInstance(); } else { visualDetectionBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); startX_ = 0; bitField0_ = (bitField0_ & ~0x00000002); startY_ = 0; bitField0_ = (bitField0_ & ~0x00000004); startDist_ = 0F; bitField0_ = (bitField0_ & ~0x00000008); startBearing_ = 0F; bitField0_ = (bitField0_ & ~0x00000010); endX_ = 0; bitField0_ = (bitField0_ & ~0x00000020); endY_ = 0; bitField0_ = (bitField0_ & ~0x00000040); endDist_ = 0F; bitField0_ = (bitField0_ & ~0x00000080); endBearing_ = 0F; bitField0_ = (bitField0_ & ~0x00000100); angle_ = 0F; bitField0_ = (bitField0_ & ~0x00000200); avgWidth_ = 0F; bitField0_ = (bitField0_ & ~0x00000400); length_ = 0F; bitField0_ = (bitField0_ & ~0x00000800); slope_ = 0F; bitField0_ = (bitField0_ & ~0x00001000); yInt_ = 0F; bitField0_ = (bitField0_ & ~0x00002000); possibilities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00004000); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return messages._File_VisionField.internal_static_messages_VisualLine_descriptor; } public messages.VisualLine getDefaultInstanceForType() { return messages.VisualLine.getDefaultInstance(); } public messages.VisualLine build() { messages.VisualLine result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public messages.VisualLine buildPartial() { messages.VisualLine result = new messages.VisualLine(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (visualDetectionBuilder_ == null) { result.visualDetection_ = visualDetection_; } else { result.visualDetection_ = visualDetectionBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.startX_ = startX_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.startY_ = startY_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.startDist_ = startDist_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.startBearing_ = startBearing_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.endX_ = endX_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } result.endY_ = endY_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } result.endDist_ = endDist_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } result.endBearing_ = endBearing_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000200; } result.angle_ = angle_; if (((from_bitField0_ & 0x00000400) == 0x00000400)) { to_bitField0_ |= 0x00000400; } result.avgWidth_ = avgWidth_; if (((from_bitField0_ & 0x00000800) == 0x00000800)) { to_bitField0_ |= 0x00000800; } result.length_ = length_; if (((from_bitField0_ & 0x00001000) == 0x00001000)) { to_bitField0_ |= 0x00001000; } result.slope_ = slope_; if (((from_bitField0_ & 0x00002000) == 0x00002000)) { to_bitField0_ |= 0x00002000; } result.yInt_ = yInt_; if (((bitField0_ & 0x00004000) == 0x00004000)) { possibilities_ = java.util.Collections.unmodifiableList(possibilities_); bitField0_ = (bitField0_ & ~0x00004000); } result.possibilities_ = possibilities_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof messages.VisualLine) { return mergeFrom((messages.VisualLine)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(messages.VisualLine other) { if (other == messages.VisualLine.getDefaultInstance()) return this; if (other.hasVisualDetection()) { mergeVisualDetection(other.getVisualDetection()); } if (other.hasStartX()) { setStartX(other.getStartX()); } if (other.hasStartY()) { setStartY(other.getStartY()); } if (other.hasStartDist()) { setStartDist(other.getStartDist()); } if (other.hasStartBearing()) { setStartBearing(other.getStartBearing()); } if (other.hasEndX()) { setEndX(other.getEndX()); } if (other.hasEndY()) { setEndY(other.getEndY()); } if (other.hasEndDist()) { setEndDist(other.getEndDist()); } if (other.hasEndBearing()) { setEndBearing(other.getEndBearing()); } if (other.hasAngle()) { setAngle(other.getAngle()); } if (other.hasAvgWidth()) { setAvgWidth(other.getAvgWidth()); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasSlope()) { setSlope(other.getSlope()); } if (other.hasYInt()) { setYInt(other.getYInt()); } if (!other.possibilities_.isEmpty()) { if (possibilities_.isEmpty()) { possibilities_ = other.possibilities_; bitField0_ = (bitField0_ & ~0x00004000); } else { ensurePossibilitiesIsMutable(); possibilities_.addAll(other.possibilities_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { messages.VisualLine parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (messages.VisualLine) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional .messages.VisualDetection visual_detection = 1; private messages.VisualDetection visualDetection_ = messages.VisualDetection.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< messages.VisualDetection, messages.VisualDetection.Builder, messages.VisualDetectionOrBuilder> visualDetectionBuilder_; /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public boolean hasVisualDetection() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public messages.VisualDetection getVisualDetection() { if (visualDetectionBuilder_ == null) { return visualDetection_; } else { return visualDetectionBuilder_.getMessage(); } } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public Builder setVisualDetection(messages.VisualDetection value) { if (visualDetectionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } visualDetection_ = value; onChanged(); } else { visualDetectionBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public Builder setVisualDetection( messages.VisualDetection.Builder builderForValue) { if (visualDetectionBuilder_ == null) { visualDetection_ = builderForValue.build(); onChanged(); } else { visualDetectionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public Builder mergeVisualDetection(messages.VisualDetection value) { if (visualDetectionBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && visualDetection_ != messages.VisualDetection.getDefaultInstance()) { visualDetection_ = messages.VisualDetection.newBuilder(visualDetection_).mergeFrom(value).buildPartial(); } else { visualDetection_ = value; } onChanged(); } else { visualDetectionBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public Builder clearVisualDetection() { if (visualDetectionBuilder_ == null) { visualDetection_ = messages.VisualDetection.getDefaultInstance(); onChanged(); } else { visualDetectionBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public messages.VisualDetection.Builder getVisualDetectionBuilder() { bitField0_ |= 0x00000001; onChanged(); return getVisualDetectionFieldBuilder().getBuilder(); } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ public messages.VisualDetectionOrBuilder getVisualDetectionOrBuilder() { if (visualDetectionBuilder_ != null) { return visualDetectionBuilder_.getMessageOrBuilder(); } else { return visualDetection_; } } /** * <code>optional .messages.VisualDetection visual_detection = 1;</code> */ private com.google.protobuf.SingleFieldBuilder< messages.VisualDetection, messages.VisualDetection.Builder, messages.VisualDetectionOrBuilder> getVisualDetectionFieldBuilder() { if (visualDetectionBuilder_ == null) { visualDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilder< messages.VisualDetection, messages.VisualDetection.Builder, messages.VisualDetectionOrBuilder>( visualDetection_, getParentForChildren(), isClean()); visualDetection_ = null; } return visualDetectionBuilder_; } // optional int32 start_x = 2; private int startX_ ; /** * <code>optional int32 start_x = 2;</code> */ public boolean hasStartX() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional int32 start_x = 2;</code> */ public int getStartX() { return startX_; } /** * <code>optional int32 start_x = 2;</code> */ public Builder setStartX(int value) { bitField0_ |= 0x00000002; startX_ = value; onChanged(); return this; } /** * <code>optional int32 start_x = 2;</code> */ public Builder clearStartX() { bitField0_ = (bitField0_ & ~0x00000002); startX_ = 0; onChanged(); return this; } // optional int32 start_y = 3; private int startY_ ; /** * <code>optional int32 start_y = 3;</code> */ public boolean hasStartY() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional int32 start_y = 3;</code> */ public int getStartY() { return startY_; } /** * <code>optional int32 start_y = 3;</code> */ public Builder setStartY(int value) { bitField0_ |= 0x00000004; startY_ = value; onChanged(); return this; } /** * <code>optional int32 start_y = 3;</code> */ public Builder clearStartY() { bitField0_ = (bitField0_ & ~0x00000004); startY_ = 0; onChanged(); return this; } // optional float start_dist = 12; private float startDist_ ; /** * <code>optional float start_dist = 12;</code> */ public boolean hasStartDist() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional float start_dist = 12;</code> */ public float getStartDist() { return startDist_; } /** * <code>optional float start_dist = 12;</code> */ public Builder setStartDist(float value) { bitField0_ |= 0x00000008; startDist_ = value; onChanged(); return this; } /** * <code>optional float start_dist = 12;</code> */ public Builder clearStartDist() { bitField0_ = (bitField0_ & ~0x00000008); startDist_ = 0F; onChanged(); return this; } // optional float start_bearing = 13; private float startBearing_ ; /** * <code>optional float start_bearing = 13;</code> */ public boolean hasStartBearing() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional float start_bearing = 13;</code> */ public float getStartBearing() { return startBearing_; } /** * <code>optional float start_bearing = 13;</code> */ public Builder setStartBearing(float value) { bitField0_ |= 0x00000010; startBearing_ = value; onChanged(); return this; } /** * <code>optional float start_bearing = 13;</code> */ public Builder clearStartBearing() { bitField0_ = (bitField0_ & ~0x00000010); startBearing_ = 0F; onChanged(); return this; } // optional int32 end_x = 4; private int endX_ ; /** * <code>optional int32 end_x = 4;</code> */ public boolean hasEndX() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional int32 end_x = 4;</code> */ public int getEndX() { return endX_; } /** * <code>optional int32 end_x = 4;</code> */ public Builder setEndX(int value) { bitField0_ |= 0x00000020; endX_ = value; onChanged(); return this; } /** * <code>optional int32 end_x = 4;</code> */ public Builder clearEndX() { bitField0_ = (bitField0_ & ~0x00000020); endX_ = 0; onChanged(); return this; } // optional int32 end_y = 5; private int endY_ ; /** * <code>optional int32 end_y = 5;</code> */ public boolean hasEndY() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional int32 end_y = 5;</code> */ public int getEndY() { return endY_; } /** * <code>optional int32 end_y = 5;</code> */ public Builder setEndY(int value) { bitField0_ |= 0x00000040; endY_ = value; onChanged(); return this; } /** * <code>optional int32 end_y = 5;</code> */ public Builder clearEndY() { bitField0_ = (bitField0_ & ~0x00000040); endY_ = 0; onChanged(); return this; } // optional float end_dist = 14; private float endDist_ ; /** * <code>optional float end_dist = 14;</code> */ public boolean hasEndDist() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * <code>optional float end_dist = 14;</code> */ public float getEndDist() { return endDist_; } /** * <code>optional float end_dist = 14;</code> */ public Builder setEndDist(float value) { bitField0_ |= 0x00000080; endDist_ = value; onChanged(); return this; } /** * <code>optional float end_dist = 14;</code> */ public Builder clearEndDist() { bitField0_ = (bitField0_ & ~0x00000080); endDist_ = 0F; onChanged(); return this; } // optional float end_bearing = 15; private float endBearing_ ; /** * <code>optional float end_bearing = 15;</code> */ public boolean hasEndBearing() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * <code>optional float end_bearing = 15;</code> */ public float getEndBearing() { return endBearing_; } /** * <code>optional float end_bearing = 15;</code> */ public Builder setEndBearing(float value) { bitField0_ |= 0x00000100; endBearing_ = value; onChanged(); return this; } /** * <code>optional float end_bearing = 15;</code> */ public Builder clearEndBearing() { bitField0_ = (bitField0_ & ~0x00000100); endBearing_ = 0F; onChanged(); return this; } // optional float angle = 6; private float angle_ ; /** * <code>optional float angle = 6;</code> */ public boolean hasAngle() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * <code>optional float angle = 6;</code> */ public float getAngle() { return angle_; } /** * <code>optional float angle = 6;</code> */ public Builder setAngle(float value) { bitField0_ |= 0x00000200; angle_ = value; onChanged(); return this; } /** * <code>optional float angle = 6;</code> */ public Builder clearAngle() { bitField0_ = (bitField0_ & ~0x00000200); angle_ = 0F; onChanged(); return this; } // optional float avg_width = 7; private float avgWidth_ ; /** * <code>optional float avg_width = 7;</code> */ public boolean hasAvgWidth() { return ((bitField0_ & 0x00000400) == 0x00000400); } /** * <code>optional float avg_width = 7;</code> */ public float getAvgWidth() { return avgWidth_; } /** * <code>optional float avg_width = 7;</code> */ public Builder setAvgWidth(float value) { bitField0_ |= 0x00000400; avgWidth_ = value; onChanged(); return this; } /** * <code>optional float avg_width = 7;</code> */ public Builder clearAvgWidth() { bitField0_ = (bitField0_ & ~0x00000400); avgWidth_ = 0F; onChanged(); return this; } // optional float length = 8; private float length_ ; /** * <code>optional float length = 8;</code> */ public boolean hasLength() { return ((bitField0_ & 0x00000800) == 0x00000800); } /** * <code>optional float length = 8;</code> */ public float getLength() { return length_; } /** * <code>optional float length = 8;</code> */ public Builder setLength(float value) { bitField0_ |= 0x00000800; length_ = value; onChanged(); return this; } /** * <code>optional float length = 8;</code> */ public Builder clearLength() { bitField0_ = (bitField0_ & ~0x00000800); length_ = 0F; onChanged(); return this; } // optional float slope = 9; private float slope_ ; /** * <code>optional float slope = 9;</code> */ public boolean hasSlope() { return ((bitField0_ & 0x00001000) == 0x00001000); } /** * <code>optional float slope = 9;</code> */ public float getSlope() { return slope_; } /** * <code>optional float slope = 9;</code> */ public Builder setSlope(float value) { bitField0_ |= 0x00001000; slope_ = value; onChanged(); return this; } /** * <code>optional float slope = 9;</code> */ public Builder clearSlope() { bitField0_ = (bitField0_ & ~0x00001000); slope_ = 0F; onChanged(); return this; } // optional float y_int = 10; private float yInt_ ; /** * <code>optional float y_int = 10;</code> */ public boolean hasYInt() { return ((bitField0_ & 0x00002000) == 0x00002000); } /** * <code>optional float y_int = 10;</code> */ public float getYInt() { return yInt_; } /** * <code>optional float y_int = 10;</code> */ public Builder setYInt(float value) { bitField0_ |= 0x00002000; yInt_ = value; onChanged(); return this; } /** * <code>optional float y_int = 10;</code> */ public Builder clearYInt() { bitField0_ = (bitField0_ & ~0x00002000); yInt_ = 0F; onChanged(); return this; } // repeated .messages.VisualLine.line_id possibilities = 11; private java.util.List<messages.VisualLine.line_id> possibilities_ = java.util.Collections.emptyList(); private void ensurePossibilitiesIsMutable() { if (!((bitField0_ & 0x00004000) == 0x00004000)) { possibilities_ = new java.util.ArrayList<messages.VisualLine.line_id>(possibilities_); bitField0_ |= 0x00004000; } } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public java.util.List<messages.VisualLine.line_id> getPossibilitiesList() { return java.util.Collections.unmodifiableList(possibilities_); } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public int getPossibilitiesCount() { return possibilities_.size(); } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public messages.VisualLine.line_id getPossibilities(int index) { return possibilities_.get(index); } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public Builder setPossibilities( int index, messages.VisualLine.line_id value) { if (value == null) { throw new NullPointerException(); } ensurePossibilitiesIsMutable(); possibilities_.set(index, value); onChanged(); return this; } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public Builder addPossibilities(messages.VisualLine.line_id value) { if (value == null) { throw new NullPointerException(); } ensurePossibilitiesIsMutable(); possibilities_.add(value); onChanged(); return this; } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public Builder addAllPossibilities( java.lang.Iterable<? extends messages.VisualLine.line_id> values) { ensurePossibilitiesIsMutable(); super.addAll(values, possibilities_); onChanged(); return this; } /** * <code>repeated .messages.VisualLine.line_id possibilities = 11;</code> */ public Builder clearPossibilities() { possibilities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00004000); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:messages.VisualLine) } static { defaultInstance = new VisualLine(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:messages.VisualLine) }