@java.lang.Override public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { return com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getRequestsCount() > 0) { hash = (37 * hash) + REQUESTS_FIELD_NUMBER; hash = (53 * hash) + getRequestsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)) { return super.equals(obj); } com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) obj; boolean result = true; result = result && getRequestsList().equals(other.getRequestsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest build() { com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest buildPartial() { com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } result.requests_ = requests_; } else { result.requests_ = requestsBuilder_.build(); } onBuilt(); return result; }
@Test @SuppressWarnings("all") public void asyncBatchAnnotateFilesTest() throws Exception { AsyncBatchAnnotateFilesResponse expectedResponse = AsyncBatchAnnotateFilesResponse.newBuilder().build(); Operation resultOperation = Operation.newBuilder() .setName("asyncBatchAnnotateFilesTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockImageAnnotator.addResponse(resultOperation); List<AsyncAnnotateFileRequest> requests = new ArrayList<>(); AsyncBatchAnnotateFilesResponse actualResponse = client.asyncBatchAnnotateFilesAsync(requests).get(); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockImageAnnotator.getRequests(); Assert.assertEquals(1, actualRequests.size()); AsyncBatchAnnotateFilesRequest actualRequest = (AsyncBatchAnnotateFilesRequest) actualRequests.get(0); Assert.assertEquals(requests, actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
public static Builder newBuilder( com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest build() { com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest buildPartial() { com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } result.requests_ = requests_; } else { result.requests_ = requestsBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getRequestsCount() > 0) { hash = (37 * hash) + REQUESTS_FIELD_NUMBER; hash = (53 * hash) + getRequestsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other) { if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; if (requestsBuilder_ == null) {
/** * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, * which may contain multiple pages and multiple images per page. Progress and results can be * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` * (results). * * <p>Sample code: * * <pre><code> * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { * List<AsyncAnnotateFileRequest> requests = new ArrayList<>(); * AsyncBatchAnnotateFilesResponse response = imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); * } * </code></pre> * * @param requests Individual async file annotation requests for this batch. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<AsyncBatchAnnotateFilesResponse, OperationMetadata> asyncBatchAnnotateFilesAsync(List<AsyncAnnotateFileRequest> requests) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); return asyncBatchAnnotateFilesAsync(request); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)) { return super.equals(obj); } com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) obj; boolean result = true; result = result && getRequestsList().equals(other.getRequestsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
io.grpc.protobuf.ProtoUtils.marshaller( com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }