public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getKeyBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { output.writeEnum(2, valueType_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getKeyBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, valueType_); } if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } memoizedSize = size; return size; }