@Test @SuppressWarnings("all") public void getFeedItemTargetTest() { com.google.ads.googleads.v5.services.FeedItemTargetName resourceName2 = com.google.ads.googleads.v5.services.FeedItemTargetName.of( "[CUSTOMER]", "[FEED_ITEM_TARGET]"); FeedItemTarget expectedResponse = FeedItemTarget.newBuilder().setResourceName(resourceName2.toString()).build(); mockFeedItemTargetService.addResponse(expectedResponse); FeedItemTargetName resourceName = FeedItemTargetName.of("[CUSTOMER]", "[FEED_ITEM_TARGET]"); FeedItemTarget actualResponse = client.getFeedItemTarget(resourceName); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockFeedItemTargetService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetFeedItemTargetRequest actualRequest = (GetFeedItemTargetRequest) actualRequests.get(0); Assert.assertEquals(resourceName, FeedItemTargetName.parse(actualRequest.getResourceName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName) { GetFeedItemTargetRequest request = GetFeedItemTargetRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getFeedItemTarget(request); }
FeedItemTargetServiceClient implements BackgroundResource { public final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName) { GetFeedItemTargetRequest request = GetFeedItemTargetRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getFeedItemTarget(request); } }
FeedItemTargetServiceClient implements BackgroundResource { public final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName) { GetFeedItemTargetRequest request = GetFeedItemTargetRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getFeedItemTarget(request); } protected  FeedItemTargetServiceClient(FeedItemTargetServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  FeedItemTargetServiceClient(FeedItemTargetServiceStub stub); }
FeedItemTargetServiceClient implements BackgroundResource { public final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName) { GetFeedItemTargetRequest request = GetFeedItemTargetRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getFeedItemTarget(request); } protected  FeedItemTargetServiceClient(FeedItemTargetServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  FeedItemTargetServiceClient(FeedItemTargetServiceStub stub); static final FeedItemTargetServiceClient create(); static final FeedItemTargetServiceClient create(FeedItemTargetServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final FeedItemTargetServiceClient create(FeedItemTargetServiceStub stub); final FeedItemTargetServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") FeedItemTargetServiceStub getStub(); final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName); final FeedItemTarget getFeedItemTarget(String resourceName); final FeedItemTarget getFeedItemTarget(GetFeedItemTargetRequest request); final UnaryCallable<GetFeedItemTargetRequest, FeedItemTarget> getFeedItemTargetCallable(); final MutateFeedItemTargetsResponse mutateFeedItemTargets(
      String customerId, List<FeedItemTargetOperation> operations); final MutateFeedItemTargetsResponse mutateFeedItemTargets(
      MutateFeedItemTargetsRequest request); final UnaryCallable<MutateFeedItemTargetsRequest, MutateFeedItemTargetsResponse> mutateFeedItemTargetsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
FeedItemTargetServiceClient implements BackgroundResource { public final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName) { GetFeedItemTargetRequest request = GetFeedItemTargetRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getFeedItemTarget(request); } protected  FeedItemTargetServiceClient(FeedItemTargetServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  FeedItemTargetServiceClient(FeedItemTargetServiceStub stub); static final FeedItemTargetServiceClient create(); static final FeedItemTargetServiceClient create(FeedItemTargetServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final FeedItemTargetServiceClient create(FeedItemTargetServiceStub stub); final FeedItemTargetServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") FeedItemTargetServiceStub getStub(); final FeedItemTarget getFeedItemTarget(FeedItemTargetName resourceName); final FeedItemTarget getFeedItemTarget(String resourceName); final FeedItemTarget getFeedItemTarget(GetFeedItemTargetRequest request); final UnaryCallable<GetFeedItemTargetRequest, FeedItemTarget> getFeedItemTargetCallable(); final MutateFeedItemTargetsResponse mutateFeedItemTargets(
      String customerId, List<FeedItemTargetOperation> operations); final MutateFeedItemTargetsResponse mutateFeedItemTargets(
      MutateFeedItemTargetsRequest request); final UnaryCallable<MutateFeedItemTargetsRequest, MutateFeedItemTargetsResponse> mutateFeedItemTargetsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }