@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (type_ != com.google.cloud.language.v1.Document.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(1, type_); } if (sourceCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); } if (sourceCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); } if (!getLanguageBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, language_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != com.google.cloud.language.v1.Document.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } if (sourceCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); } if (sourceCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); } if (!getLanguageBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, language_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (type_ != com.google.cloud.language.v1.Document.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(1, type_); } if (sourceCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); } if (sourceCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); } if (!getLanguageBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, language_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != com.google.cloud.language.v1.Document.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } if (sourceCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); } if (sourceCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); } if (!getLanguageBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, language_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }