@Test @SuppressWarnings("all") public void getCampaignExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockCampaignService.addException(exception); try { CampaignName resourceName = CampaignName.of("[CUSTOMER]", "[CAMPAIGN]"); client.getCampaign(resourceName); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final Campaign getCampaign(CampaignName resourceName) { GetCampaignRequest request = GetCampaignRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaign(request); }
CampaignServiceClient implements BackgroundResource { public final Campaign getCampaign(CampaignName resourceName) { GetCampaignRequest request = GetCampaignRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaign(request); } }
CampaignServiceClient implements BackgroundResource { public final Campaign getCampaign(CampaignName resourceName) { GetCampaignRequest request = GetCampaignRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaign(request); } protected  CampaignServiceClient(CampaignServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  CampaignServiceClient(CampaignServiceStub stub); }
CampaignServiceClient implements BackgroundResource { public final Campaign getCampaign(CampaignName resourceName) { GetCampaignRequest request = GetCampaignRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaign(request); } protected  CampaignServiceClient(CampaignServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  CampaignServiceClient(CampaignServiceStub stub); static final CampaignServiceClient create(); static final CampaignServiceClient create(CampaignServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final CampaignServiceClient create(CampaignServiceStub stub); final CampaignServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") CampaignServiceStub getStub(); final Campaign getCampaign(CampaignName resourceName); final Campaign getCampaign(String resourceName); final Campaign getCampaign(GetCampaignRequest request); final UnaryCallable<GetCampaignRequest, Campaign> getCampaignCallable(); final MutateCampaignsResponse mutateCampaigns(
      String customerId, List<CampaignOperation> operations); final MutateCampaignsResponse mutateCampaigns(MutateCampaignsRequest request); final UnaryCallable<MutateCampaignsRequest, MutateCampaignsResponse> mutateCampaignsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
CampaignServiceClient implements BackgroundResource { public final Campaign getCampaign(CampaignName resourceName) { GetCampaignRequest request = GetCampaignRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getCampaign(request); } protected  CampaignServiceClient(CampaignServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  CampaignServiceClient(CampaignServiceStub stub); static final CampaignServiceClient create(); static final CampaignServiceClient create(CampaignServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final CampaignServiceClient create(CampaignServiceStub stub); final CampaignServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") CampaignServiceStub getStub(); final Campaign getCampaign(CampaignName resourceName); final Campaign getCampaign(String resourceName); final Campaign getCampaign(GetCampaignRequest request); final UnaryCallable<GetCampaignRequest, Campaign> getCampaignCallable(); final MutateCampaignsResponse mutateCampaigns(
      String customerId, List<CampaignOperation> operations); final MutateCampaignsResponse mutateCampaigns(MutateCampaignsRequest request); final UnaryCallable<MutateCampaignsRequest, MutateCampaignsResponse> mutateCampaignsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }