@Test @SuppressWarnings("all") public void mutateSharedCriteriaTest() { MutateSharedCriteriaResponse expectedResponse = MutateSharedCriteriaResponse.newBuilder().build(); mockSharedCriterionService.addResponse(expectedResponse); String customerId = "customerId-1772061412"; List<SharedCriterionOperation> operations = new ArrayList<>(); MutateSharedCriteriaResponse actualResponse = client.mutateSharedCriteria(customerId, operations); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockSharedCriterionService.getRequests(); Assert.assertEquals(1, actualRequests.size()); MutateSharedCriteriaRequest actualRequest = (MutateSharedCriteriaRequest) actualRequests.get(0); Assert.assertEquals(customerId, actualRequest.getCustomerId()); Assert.assertEquals(operations, actualRequest.getOperationsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public final MutateSharedCriteriaResponse mutateSharedCriteria( String customerId, List<SharedCriterionOperation> operations) { MutateSharedCriteriaRequest request = MutateSharedCriteriaRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateSharedCriteria(request); }
SharedCriterionServiceClient implements BackgroundResource { public final MutateSharedCriteriaResponse mutateSharedCriteria( String customerId, List<SharedCriterionOperation> operations) { MutateSharedCriteriaRequest request = MutateSharedCriteriaRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateSharedCriteria(request); } }
SharedCriterionServiceClient implements BackgroundResource { public final MutateSharedCriteriaResponse mutateSharedCriteria( String customerId, List<SharedCriterionOperation> operations) { MutateSharedCriteriaRequest request = MutateSharedCriteriaRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateSharedCriteria(request); } protected  SharedCriterionServiceClient(SharedCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  SharedCriterionServiceClient(SharedCriterionServiceStub stub); }
SharedCriterionServiceClient implements BackgroundResource { public final MutateSharedCriteriaResponse mutateSharedCriteria( String customerId, List<SharedCriterionOperation> operations) { MutateSharedCriteriaRequest request = MutateSharedCriteriaRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateSharedCriteria(request); } protected  SharedCriterionServiceClient(SharedCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  SharedCriterionServiceClient(SharedCriterionServiceStub stub); static final SharedCriterionServiceClient create(); static final SharedCriterionServiceClient create(SharedCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final SharedCriterionServiceClient create(SharedCriterionServiceStub stub); final SharedCriterionServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") SharedCriterionServiceStub getStub(); final SharedCriterion getSharedCriterion(SharedCriterionName resourceName); final SharedCriterion getSharedCriterion(String resourceName); final SharedCriterion getSharedCriterion(GetSharedCriterionRequest request); final UnaryCallable<GetSharedCriterionRequest, SharedCriterion> getSharedCriterionCallable(); final MutateSharedCriteriaResponse mutateSharedCriteria(
      String customerId, List<SharedCriterionOperation> operations); final MutateSharedCriteriaResponse mutateSharedCriteria(
      MutateSharedCriteriaRequest request); final UnaryCallable<MutateSharedCriteriaRequest, MutateSharedCriteriaResponse> mutateSharedCriteriaCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
SharedCriterionServiceClient implements BackgroundResource { public final MutateSharedCriteriaResponse mutateSharedCriteria( String customerId, List<SharedCriterionOperation> operations) { MutateSharedCriteriaRequest request = MutateSharedCriteriaRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateSharedCriteria(request); } protected  SharedCriterionServiceClient(SharedCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  SharedCriterionServiceClient(SharedCriterionServiceStub stub); static final SharedCriterionServiceClient create(); static final SharedCriterionServiceClient create(SharedCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final SharedCriterionServiceClient create(SharedCriterionServiceStub stub); final SharedCriterionServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") SharedCriterionServiceStub getStub(); final SharedCriterion getSharedCriterion(SharedCriterionName resourceName); final SharedCriterion getSharedCriterion(String resourceName); final SharedCriterion getSharedCriterion(GetSharedCriterionRequest request); final UnaryCallable<GetSharedCriterionRequest, SharedCriterion> getSharedCriterionCallable(); final MutateSharedCriteriaResponse mutateSharedCriteria(
      String customerId, List<SharedCriterionOperation> operations); final MutateSharedCriteriaResponse mutateSharedCriteria(
      MutateSharedCriteriaRequest request); final UnaryCallable<MutateSharedCriteriaRequest, MutateSharedCriteriaResponse> mutateSharedCriteriaCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }