ErrorProto toPb() { ErrorProto errorPb = new ErrorProto(); if (reason != null) { errorPb.setReason(reason); } if (location != null) { errorPb.setLocation(location); } if (message != null) { errorPb.setMessage(message); } if (debugInfo != null) { errorPb.setDebugInfo(debugInfo); } return errorPb; }
ErrorProto toPb() { ErrorProto errorPb = new ErrorProto(); if (reason != null) { errorPb.setReason(reason); } if (location != null) { errorPb.setLocation(location); } if (message != null) { errorPb.setMessage(message); } if (debugInfo != null) { errorPb.setDebugInfo(debugInfo); } return errorPb; }
ErrorProto toPb() { ErrorProto errorPb = new ErrorProto(); if (reason != null) { errorPb.setReason(reason); } if (location != null) { errorPb.setLocation(location); } if (message != null) { errorPb.setMessage(message); } if (debugInfo != null) { errorPb.setDebugInfo(debugInfo); } return errorPb; }
ErrorProto toPb() { ErrorProto errorPb = new ErrorProto(); if (reason != null) { errorPb.setReason(reason); } if (location != null) { errorPb.setLocation(location); } if (message != null) { errorPb.setMessage(message); } if (debugInfo != null) { errorPb.setDebugInfo(debugInfo); } return errorPb; }
@Test public void testDecodeEncodeEqual() throws Exception { BigQueryInsertError value = new BigQueryInsertError( new TableRow().setF(Collections.singletonList(new TableCell().setV("Value"))), new TableDataInsertAllResponse.InsertErrors() .setIndex(0L) .setErrors( Collections.singletonList( new ErrorProto() .setReason("a Reason") .setLocation("A location") .setMessage("A message") .setDebugInfo("The debug info"))), new TableReference() .setProjectId("dummy-project-id") .setDatasetId("dummy-dataset-id") .setTableId("dummy-table-id")); CoderProperties.coderDecodeEncodeEqual(TEST_CODER, value); } }