@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceStream_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceStream_);
    }
    if (type_
        != com.google.cloud.visionai.v1.StreamAnnotationType.STREAM_ANNOTATION_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(4, type_);
    }
    if (annotationPayloadCase_ == 5) {
      output.writeMessage(5, (com.google.cloud.visionai.v1.NormalizedPolygon) annotationPayload_);
    }
    if (annotationPayloadCase_ == 6) {
      output.writeMessage(6, (com.google.cloud.visionai.v1.NormalizedPolyline) annotationPayload_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
The actual type of Annotation.
</pre>

<code>.google.cloud.visionai.v1.StreamAnnotationType type = 4;</code>

@return The type.
java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamAnnotation.java