@Test @SuppressWarnings("all") public void dismissRecommendationTest() { DismissRecommendationResponse expectedResponse = DismissRecommendationResponse.newBuilder().build(); mockRecommendationService.addResponse(expectedResponse); String customerId = "customerId-1772061412"; List<DismissRecommendationRequest.DismissRecommendationOperation> operations = new ArrayList<>(); DismissRecommendationResponse actualResponse = client.dismissRecommendation(customerId, operations); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockRecommendationService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DismissRecommendationRequest actualRequest = (DismissRecommendationRequest) actualRequests.get(0); Assert.assertEquals(customerId, actualRequest.getCustomerId()); Assert.assertEquals(operations, actualRequest.getOperationsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public final DismissRecommendationResponse dismissRecommendation( String customerId, List<DismissRecommendationRequest.DismissRecommendationOperation> operations) { DismissRecommendationRequest request = DismissRecommendationRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return dismissRecommendation(request); }
RecommendationServiceClient implements BackgroundResource { public final DismissRecommendationResponse dismissRecommendation( String customerId, List<DismissRecommendationRequest.DismissRecommendationOperation> operations) { DismissRecommendationRequest request = DismissRecommendationRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return dismissRecommendation(request); } }
RecommendationServiceClient implements BackgroundResource { public final DismissRecommendationResponse dismissRecommendation( String customerId, List<DismissRecommendationRequest.DismissRecommendationOperation> operations) { DismissRecommendationRequest request = DismissRecommendationRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return dismissRecommendation(request); } protected  RecommendationServiceClient(RecommendationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  RecommendationServiceClient(RecommendationServiceStub stub); }
RecommendationServiceClient implements BackgroundResource { public final DismissRecommendationResponse dismissRecommendation( String customerId, List<DismissRecommendationRequest.DismissRecommendationOperation> operations) { DismissRecommendationRequest request = DismissRecommendationRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return dismissRecommendation(request); } protected  RecommendationServiceClient(RecommendationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  RecommendationServiceClient(RecommendationServiceStub stub); static final RecommendationServiceClient create(); static final RecommendationServiceClient create(RecommendationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final RecommendationServiceClient create(RecommendationServiceStub stub); final RecommendationServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") RecommendationServiceStub getStub(); final Recommendation getRecommendation(RecommendationName resourceName); final Recommendation getRecommendation(String resourceName); final Recommendation getRecommendation(GetRecommendationRequest request); final UnaryCallable<GetRecommendationRequest, Recommendation> getRecommendationCallable(); final ApplyRecommendationResponse applyRecommendation(
      String customerId, List<ApplyRecommendationOperation> operations); final ApplyRecommendationResponse applyRecommendation(ApplyRecommendationRequest request); final UnaryCallable<ApplyRecommendationRequest, ApplyRecommendationResponse> applyRecommendationCallable(); final DismissRecommendationResponse dismissRecommendation(
      String customerId,
      List<DismissRecommendationRequest.DismissRecommendationOperation> operations); final DismissRecommendationResponse dismissRecommendation(
      DismissRecommendationRequest request); final UnaryCallable<DismissRecommendationRequest, DismissRecommendationResponse> dismissRecommendationCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
RecommendationServiceClient implements BackgroundResource { public final DismissRecommendationResponse dismissRecommendation( String customerId, List<DismissRecommendationRequest.DismissRecommendationOperation> operations) { DismissRecommendationRequest request = DismissRecommendationRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return dismissRecommendation(request); } protected  RecommendationServiceClient(RecommendationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  RecommendationServiceClient(RecommendationServiceStub stub); static final RecommendationServiceClient create(); static final RecommendationServiceClient create(RecommendationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final RecommendationServiceClient create(RecommendationServiceStub stub); final RecommendationServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") RecommendationServiceStub getStub(); final Recommendation getRecommendation(RecommendationName resourceName); final Recommendation getRecommendation(String resourceName); final Recommendation getRecommendation(GetRecommendationRequest request); final UnaryCallable<GetRecommendationRequest, Recommendation> getRecommendationCallable(); final ApplyRecommendationResponse applyRecommendation(
      String customerId, List<ApplyRecommendationOperation> operations); final ApplyRecommendationResponse applyRecommendation(ApplyRecommendationRequest request); final UnaryCallable<ApplyRecommendationRequest, ApplyRecommendationResponse> applyRecommendationCallable(); final DismissRecommendationResponse dismissRecommendation(
      String customerId,
      List<DismissRecommendationRequest.DismissRecommendationOperation> operations); final DismissRecommendationResponse dismissRecommendation(
      DismissRecommendationRequest request); final UnaryCallable<DismissRecommendationRequest, DismissRecommendationResponse> dismissRecommendationCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }