Tabnine Logo
TableDataInsertAllResponse$InsertErrors.setIndex
Code IndexAdd Tabnine to your IDE (free)

How to use
setIndex
method
in
com.google.api.services.bigquery.model.TableDataInsertAllResponse$InsertErrors

Best Java code snippets using com.google.api.services.bigquery.model.TableDataInsertAllResponse$InsertErrors.setIndex (Showing top 10 results out of 315)

origin: googleapis/google-cloud-java

      ImmutableList.of(
        new TableDataInsertAllResponse.InsertErrors()
          .setIndex(0L)
          .setErrors(ImmutableList.of(new ErrorProto().setMessage("ErrorMessage")))));
EasyMock.expect(bigqueryRpcMock.insertAll(OTHER_PROJECT, DATASET, TABLE, requestPb))
origin: googleapis/google-cloud-java

      ImmutableList.of(
        new TableDataInsertAllResponse.InsertErrors()
          .setIndex(0L)
          .setErrors(ImmutableList.of(new ErrorProto().setMessage("ErrorMessage")))));
EasyMock.expect(
origin: googleapis/google-cloud-java

      ImmutableList.of(
        new TableDataInsertAllResponse.InsertErrors()
          .setIndex(0L)
          .setErrors(ImmutableList.of(new ErrorProto().setMessage("ErrorMessage")))));
EasyMock.expect(bigqueryRpcMock.insertAll(PROJECT, DATASET, TABLE, requestPb))
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

ImmutableList.of(
  new InsertErrors()
    .setIndex(0L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("timeout"))),
  new InsertErrors()
    .setIndex(1L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("invalid")))));
ImmutableList.of(
  new InsertErrors()
    .setIndex(0L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("timeout")))));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

.setInsertErrors(ImmutableList.of(new InsertErrors().setIndex(1L)));
.setInsertErrors(ImmutableList.of(new InsertErrors().setIndex(0L)));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

.setInsertErrors(
  ImmutableList.of(
    new InsertErrors().setIndex(1L).setErrors(ImmutableList.of(new ErrorProto()))));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

ImmutableList.of(
  new InsertErrors()
    .setIndex(0L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("timeout"))),
  new InsertErrors()
    .setIndex(1L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("invalid")))));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

ImmutableList.of(
  new InsertErrors()
    .setIndex(0L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("timeout"))),
  new InsertErrors()
    .setIndex(1L)
    .setErrors(ImmutableList.of(new ErrorProto().setReason("invalid")))));
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

private void onInsertAll(List<List<Long>> errorIndicesSequence) throws Exception {
 when(mockClient.tabledata()).thenReturn(mockTabledata);
 final List<TableDataInsertAllResponse> responses = new ArrayList<>();
 for (List<Long> errorIndices : errorIndicesSequence) {
  List<TableDataInsertAllResponse.InsertErrors> errors = new ArrayList<>();
  for (long i : errorIndices) {
   TableDataInsertAllResponse.InsertErrors error =
     new TableDataInsertAllResponse.InsertErrors();
   error.setIndex(i);
  }
  TableDataInsertAllResponse response = new TableDataInsertAllResponse();
  response.setInsertErrors(errors);
  responses.add(response);
 }
 doAnswer(
     invocation -> {
      Bigquery.Tabledata.InsertAll mockInsertAll = mock(Bigquery.Tabledata.InsertAll.class);
      when(mockInsertAll.execute())
        .thenReturn(
          responses.get(0),
          responses
            .subList(1, responses.size())
            .toArray(new TableDataInsertAllResponse[responses.size() - 1]));
      return mockInsertAll;
     })
   .when(mockTabledata)
   .insertAll(anyString(), anyString(), anyString(), any(TableDataInsertAllRequest.class));
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

 @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);
 }
}
com.google.api.services.bigquery.modelTableDataInsertAllResponse$InsertErrorssetIndex

Javadoc

The index of the row that error applies to.

Popular methods of TableDataInsertAllResponse$InsertErrors

  • getErrors
    Error information for the row indicated by the index property.
  • getIndex
    The index of the row that error applies to.
  • <init>
  • setErrors
    Error information for the row indicated by the index property.
  • toPrettyString

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • BoxLayout (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now