static InsertAllResponse fromPb(TableDataInsertAllResponse responsePb) { Map<Long, List<BigQueryError>> insertErrors = null; if (responsePb.getInsertErrors() != null) { List<InsertErrors> errorsPb = responsePb.getInsertErrors(); insertErrors = Maps.newHashMapWithExpectedSize(errorsPb.size()); for (InsertErrors errorPb : errorsPb) { insertErrors.put( errorPb.getIndex(), Lists.transform( errorPb.getErrors() != null ? errorPb.getErrors() : ImmutableList.<ErrorProto>of(), BigQueryError.FROM_PB_FUNCTION)); } } return new InsertAllResponse(insertErrors); } }
static InsertAllResponse fromPb(TableDataInsertAllResponse responsePb) { Map<Long, List<BigQueryError>> insertErrors = null; if (responsePb.getInsertErrors() != null) { List<InsertErrors> errorsPb = responsePb.getInsertErrors(); insertErrors = Maps.newHashMapWithExpectedSize(errorsPb.size()); for (InsertErrors errorPb : errorsPb) { insertErrors.put(errorPb.getIndex(), Lists.transform( errorPb.getErrors() != null ? errorPb.getErrors() : ImmutableList.<ErrorProto>of(), BigQueryError.FROM_PB_FUNCTION)); } } return new InsertAllResponse(insertErrors); } }
static InsertAllResponse fromPb(TableDataInsertAllResponse responsePb) { Map<Long, List<BigQueryError>> insertErrors = null; if (responsePb.getInsertErrors() != null) { List<InsertErrors> errorsPb = responsePb.getInsertErrors(); insertErrors = Maps.newHashMapWithExpectedSize(errorsPb.size()); for (InsertErrors errorPb : errorsPb) { insertErrors.put(errorPb.getIndex(), Lists.transform( errorPb.getErrors() != null ? errorPb.getErrors() : ImmutableList.<ErrorProto>of(), BigQueryError.FROM_PB_FUNCTION)); } } return new InsertAllResponse(insertErrors); } }
static InsertAllResponse fromPb(TableDataInsertAllResponse responsePb) { Map<Long, List<BigQueryError>> insertErrors = null; if (responsePb.getInsertErrors() != null) { List<InsertErrors> errorsPb = responsePb.getInsertErrors(); insertErrors = Maps.newHashMapWithExpectedSize(errorsPb.size()); for (InsertErrors errorPb : errorsPb) { insertErrors.put( errorPb.getIndex(), Lists.transform( errorPb.getErrors() != null ? errorPb.getErrors() : ImmutableList.<ErrorProto>of(), BigQueryError.FROM_PB_FUNCTION)); } } return new InsertAllResponse(insertErrors); } }