@Test @SuppressWarnings("all") public void getSharedCriterionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockSharedCriterionService.addException(exception); try { SharedCriterionName resourceName = SharedCriterionName.of("[CUSTOMER]", "[SHARED_CRITERION]"); client.getSharedCriterion(resourceName); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final SharedCriterion getSharedCriterion(SharedCriterionName resourceName) { GetSharedCriterionRequest request = GetSharedCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getSharedCriterion(request); }
SharedCriterionServiceClient implements BackgroundResource { public final SharedCriterion getSharedCriterion(SharedCriterionName resourceName) { GetSharedCriterionRequest request = GetSharedCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getSharedCriterion(request); } }
SharedCriterionServiceClient implements BackgroundResource { public final SharedCriterion getSharedCriterion(SharedCriterionName resourceName) { GetSharedCriterionRequest request = GetSharedCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getSharedCriterion(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 SharedCriterion getSharedCriterion(SharedCriterionName resourceName) { GetSharedCriterionRequest request = GetSharedCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getSharedCriterion(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 SharedCriterion getSharedCriterion(SharedCriterionName resourceName) { GetSharedCriterionRequest request = GetSharedCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getSharedCriterion(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);  }