@Test @SuppressWarnings("all") public void getAdGroupSimulationTest() { com.google.ads.googleads.v5.services.AdGroupSimulationName resourceName2 = com.google.ads.googleads.v5.services.AdGroupSimulationName.of( "[CUSTOMER]", "[AD_GROUP_SIMULATION]"); long adGroupId = 85224585L; String startDate = "startDate-1573629589"; String endDate = "endDate1725067410"; AdGroupSimulation expectedResponse = AdGroupSimulation.newBuilder() .setResourceName(resourceName2.toString()) .setAdGroupId(adGroupId) .setStartDate(startDate) .setEndDate(endDate) .build(); mockAdGroupSimulationService.addResponse(expectedResponse); AdGroupSimulationName resourceName = AdGroupSimulationName.of("[CUSTOMER]", "[AD_GROUP_SIMULATION]"); AdGroupSimulation actualResponse = client.getAdGroupSimulation(resourceName); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockAdGroupSimulationService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetAdGroupSimulationRequest actualRequest = (GetAdGroupSimulationRequest) actualRequests.get(0); Assert.assertEquals(resourceName, AdGroupSimulationName.parse(actualRequest.getResourceName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName) { GetAdGroupSimulationRequest request = GetAdGroupSimulationRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupSimulation(request); }
AdGroupSimulationServiceClient implements BackgroundResource { public final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName) { GetAdGroupSimulationRequest request = GetAdGroupSimulationRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupSimulation(request); } }
AdGroupSimulationServiceClient implements BackgroundResource { public final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName) { GetAdGroupSimulationRequest request = GetAdGroupSimulationRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupSimulation(request); } protected  AdGroupSimulationServiceClient(AdGroupSimulationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupSimulationServiceClient(AdGroupSimulationServiceStub stub); }
AdGroupSimulationServiceClient implements BackgroundResource { public final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName) { GetAdGroupSimulationRequest request = GetAdGroupSimulationRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupSimulation(request); } protected  AdGroupSimulationServiceClient(AdGroupSimulationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupSimulationServiceClient(AdGroupSimulationServiceStub stub); static final AdGroupSimulationServiceClient create(); static final AdGroupSimulationServiceClient create(
      AdGroupSimulationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdGroupSimulationServiceClient create(AdGroupSimulationServiceStub stub); final AdGroupSimulationServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdGroupSimulationServiceStub getStub(); final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName); final AdGroupSimulation getAdGroupSimulation(String resourceName); final AdGroupSimulation getAdGroupSimulation(GetAdGroupSimulationRequest request); final UnaryCallable<GetAdGroupSimulationRequest, AdGroupSimulation> getAdGroupSimulationCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
AdGroupSimulationServiceClient implements BackgroundResource { public final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName) { GetAdGroupSimulationRequest request = GetAdGroupSimulationRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupSimulation(request); } protected  AdGroupSimulationServiceClient(AdGroupSimulationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupSimulationServiceClient(AdGroupSimulationServiceStub stub); static final AdGroupSimulationServiceClient create(); static final AdGroupSimulationServiceClient create(
      AdGroupSimulationServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdGroupSimulationServiceClient create(AdGroupSimulationServiceStub stub); final AdGroupSimulationServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdGroupSimulationServiceStub getStub(); final AdGroupSimulation getAdGroupSimulation(AdGroupSimulationName resourceName); final AdGroupSimulation getAdGroupSimulation(String resourceName); final AdGroupSimulation getAdGroupSimulation(GetAdGroupSimulationRequest request); final UnaryCallable<GetAdGroupSimulationRequest, AdGroupSimulation> getAdGroupSimulationCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }