RemarketingActionServiceClient implements BackgroundResource { public final RemarketingAction getRemarketingAction(RemarketingActionName resourceName) { GetRemarketingActionRequest request = GetRemarketingActionRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getRemarketingAction(request); } protected  RemarketingActionServiceClient(RemarketingActionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  RemarketingActionServiceClient(RemarketingActionServiceStub stub); static final RemarketingActionServiceClient create(); static final RemarketingActionServiceClient create(
      RemarketingActionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final RemarketingActionServiceClient create(RemarketingActionServiceStub stub); final RemarketingActionServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") RemarketingActionServiceStub getStub(); final RemarketingAction getRemarketingAction(RemarketingActionName resourceName); final RemarketingAction getRemarketingAction(String resourceName); final RemarketingAction getRemarketingAction(GetRemarketingActionRequest request); final UnaryCallable<GetRemarketingActionRequest, RemarketingAction> getRemarketingActionCallable(); final MutateRemarketingActionsResponse mutateRemarketingActions(
      String customerId, List<RemarketingActionOperation> operations); final MutateRemarketingActionsResponse mutateRemarketingActions(
      MutateRemarketingActionsRequest request); final UnaryCallable<MutateRemarketingActionsRequest, MutateRemarketingActionsResponse> mutateRemarketingActionsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }
@Test @SuppressWarnings("all") public void getRemarketingActionTest() { com.google.ads.googleads.v5.services.RemarketingActionName resourceName2 = com.google.ads.googleads.v5.services.RemarketingActionName.of( "[CUSTOMER]", "[REMARKETING_ACTION]"); long id = 3355L; com.google.ads.googleads.v5.services.RemarketingActionName name = com.google.ads.googleads.v5.services.RemarketingActionName.of( "[CUSTOMER]", "[REMARKETING_ACTION]"); RemarketingAction expectedResponse = RemarketingAction.newBuilder() .setResourceName(resourceName2.toString()) .setId(id) .setName(name.toString()) .build(); mockRemarketingActionService.addResponse(expectedResponse); RemarketingActionName resourceName = RemarketingActionName.of("[CUSTOMER]", "[REMARKETING_ACTION]"); RemarketingAction actualResponse = client.getRemarketingAction(resourceName); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockRemarketingActionService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetRemarketingActionRequest actualRequest = (GetRemarketingActionRequest) actualRequests.get(0); Assert.assertEquals(resourceName, RemarketingActionName.parse(actualRequest.getResourceName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Test @SuppressWarnings("all") public void getRemarketingActionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockRemarketingActionService.addException(exception); try { RemarketingActionName resourceName = RemarketingActionName.of("[CUSTOMER]", "[REMARKETING_ACTION]"); client.getRemarketingAction(resourceName); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }