@Test @SuppressWarnings("all") public void getAdGroupAdExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockAdGroupAdService.addException(exception); try { AdGroupAdName resourceName = AdGroupAdName.of("[CUSTOMER]", "[AD_GROUP_AD]"); client.getAdGroupAd(resourceName); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final AdGroupAd getAdGroupAd(AdGroupAdName resourceName) { GetAdGroupAdRequest request = GetAdGroupAdRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupAd(request); }
AdGroupAdServiceClient implements BackgroundResource { public final AdGroupAd getAdGroupAd(AdGroupAdName resourceName) { GetAdGroupAdRequest request = GetAdGroupAdRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupAd(request); } }
AdGroupAdServiceClient implements BackgroundResource { public final AdGroupAd getAdGroupAd(AdGroupAdName resourceName) { GetAdGroupAdRequest request = GetAdGroupAdRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupAd(request); } protected  AdGroupAdServiceClient(AdGroupAdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupAdServiceClient(AdGroupAdServiceStub stub); }
AdGroupAdServiceClient implements BackgroundResource { public final AdGroupAd getAdGroupAd(AdGroupAdName resourceName) { GetAdGroupAdRequest request = GetAdGroupAdRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupAd(request); } protected  AdGroupAdServiceClient(AdGroupAdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupAdServiceClient(AdGroupAdServiceStub stub); static final AdGroupAdServiceClient create(); static final AdGroupAdServiceClient create(AdGroupAdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdGroupAdServiceClient create(AdGroupAdServiceStub stub); final AdGroupAdServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdGroupAdServiceStub getStub(); final AdGroupAd getAdGroupAd(AdGroupAdName resourceName); final AdGroupAd getAdGroupAd(String resourceName); final AdGroupAd getAdGroupAd(GetAdGroupAdRequest request); final UnaryCallable<GetAdGroupAdRequest, AdGroupAd> getAdGroupAdCallable(); final MutateAdGroupAdsResponse mutateAdGroupAds(
      String customerId, List<AdGroupAdOperation> operations); final MutateAdGroupAdsResponse mutateAdGroupAds(MutateAdGroupAdsRequest request); final UnaryCallable<MutateAdGroupAdsRequest, MutateAdGroupAdsResponse> mutateAdGroupAdsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
AdGroupAdServiceClient implements BackgroundResource { public final AdGroupAd getAdGroupAd(AdGroupAdName resourceName) { GetAdGroupAdRequest request = GetAdGroupAdRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupAd(request); } protected  AdGroupAdServiceClient(AdGroupAdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupAdServiceClient(AdGroupAdServiceStub stub); static final AdGroupAdServiceClient create(); static final AdGroupAdServiceClient create(AdGroupAdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdGroupAdServiceClient create(AdGroupAdServiceStub stub); final AdGroupAdServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdGroupAdServiceStub getStub(); final AdGroupAd getAdGroupAd(AdGroupAdName resourceName); final AdGroupAd getAdGroupAd(String resourceName); final AdGroupAd getAdGroupAd(GetAdGroupAdRequest request); final UnaryCallable<GetAdGroupAdRequest, AdGroupAd> getAdGroupAdCallable(); final MutateAdGroupAdsResponse mutateAdGroupAds(
      String customerId, List<AdGroupAdOperation> operations); final MutateAdGroupAdsResponse mutateAdGroupAds(MutateAdGroupAdsRequest request); final UnaryCallable<MutateAdGroupAdsRequest, MutateAdGroupAdsResponse> mutateAdGroupAdsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }