@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Creates new occurrences in batch. * * <p>Sample code: * * <pre><code> * try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * List<Occurrence> occurrences = new ArrayList<>(); * BatchCreateOccurrencesResponse response = grafeasV1Beta1Client.batchCreateOccurrences(parent.toString(), occurrences); * } * </code></pre> * * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the * occurrences are to be created. * @param occurrences The occurrences to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final BatchCreateOccurrencesResponse batchCreateOccurrences( String parent, List<Occurrence> occurrences) { BatchCreateOccurrencesRequest request = BatchCreateOccurrencesRequest.newBuilder() .setParent(parent) .addAllOccurrences(occurrences) .build(); return batchCreateOccurrences(request); }
/** * Creates new occurrences in batch. * * <p>Sample code: * * <pre><code> * try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { * ProjectName parent = ProjectName.of("[PROJECT]"); * List<Occurrence> occurrences = new ArrayList<>(); * BatchCreateOccurrencesResponse response = grafeasV1Beta1Client.batchCreateOccurrences(parent, occurrences); * } * </code></pre> * * @param parent The name of the project in the form of `projects/[PROJECT_ID]`, under which the * occurrences are to be created. * @param occurrences The occurrences to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final BatchCreateOccurrencesResponse batchCreateOccurrences( ProjectName parent, List<Occurrence> occurrences) { BatchCreateOccurrencesRequest request = BatchCreateOccurrencesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .addAllOccurrences(occurrences) .build(); return batchCreateOccurrences(request); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }