@Test @SuppressWarnings("all") public void getCampaignCriterionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockCampaignCriterionService.addException(exception); try { CampaignCriterionName resourceName = CampaignCriterionName.of("[CUSTOMER]", "[CAMPAIGN_CRITERION]"); client.getCampaignCriterion(resourceName); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName) { GetCampaignCriterionRequest request = GetCampaignCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaignCriterion(request); }
CampaignCriterionServiceClient implements BackgroundResource { public final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName) { GetCampaignCriterionRequest request = GetCampaignCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaignCriterion(request); } }
CampaignCriterionServiceClient implements BackgroundResource { public final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName) { GetCampaignCriterionRequest request = GetCampaignCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaignCriterion(request); } protected  CampaignCriterionServiceClient(CampaignCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  CampaignCriterionServiceClient(CampaignCriterionServiceStub stub); }
CampaignCriterionServiceClient implements BackgroundResource { public final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName) { GetCampaignCriterionRequest request = GetCampaignCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaignCriterion(request); } protected  CampaignCriterionServiceClient(CampaignCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  CampaignCriterionServiceClient(CampaignCriterionServiceStub stub); static final CampaignCriterionServiceClient create(); static final CampaignCriterionServiceClient create(
      CampaignCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final CampaignCriterionServiceClient create(CampaignCriterionServiceStub stub); final CampaignCriterionServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") CampaignCriterionServiceStub getStub(); final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName); final CampaignCriterion getCampaignCriterion(String resourceName); final CampaignCriterion getCampaignCriterion(GetCampaignCriterionRequest request); final UnaryCallable<GetCampaignCriterionRequest, CampaignCriterion> getCampaignCriterionCallable(); final MutateCampaignCriteriaResponse mutateCampaignCriteria(
      String customerId, List<CampaignCriterionOperation> operations); final MutateCampaignCriteriaResponse mutateCampaignCriteria(
      MutateCampaignCriteriaRequest request); final UnaryCallable<MutateCampaignCriteriaRequest, MutateCampaignCriteriaResponse> mutateCampaignCriteriaCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
CampaignCriterionServiceClient implements BackgroundResource { public final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName) { GetCampaignCriterionRequest request = GetCampaignCriterionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaignCriterion(request); } protected  CampaignCriterionServiceClient(CampaignCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  CampaignCriterionServiceClient(CampaignCriterionServiceStub stub); static final CampaignCriterionServiceClient create(); static final CampaignCriterionServiceClient create(
      CampaignCriterionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final CampaignCriterionServiceClient create(CampaignCriterionServiceStub stub); final CampaignCriterionServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") CampaignCriterionServiceStub getStub(); final CampaignCriterion getCampaignCriterion(CampaignCriterionName resourceName); final CampaignCriterion getCampaignCriterion(String resourceName); final CampaignCriterion getCampaignCriterion(GetCampaignCriterionRequest request); final UnaryCallable<GetCampaignCriterionRequest, CampaignCriterion> getCampaignCriterionCallable(); final MutateCampaignCriteriaResponse mutateCampaignCriteria(
      String customerId, List<CampaignCriterionOperation> operations); final MutateCampaignCriteriaResponse mutateCampaignCriteria(
      MutateCampaignCriteriaRequest request); final UnaryCallable<MutateCampaignCriteriaRequest, MutateCampaignCriteriaResponse> mutateCampaignCriteriaCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }