@Test @SuppressWarnings("all") public void getAdGroupBidModifierTest() { com.google.ads.googleads.v5.services.AdGroupBidModifierName resourceName2 = com.google.ads.googleads.v5.services.AdGroupBidModifierName.of( "[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"); AdGroupName adGroup = AdGroupName.of("[CUSTOMER]", "[AD_GROUP]"); long criterionId = 326773895L; double bidModifier = 1.36236335E8; AdGroupName baseAdGroup = AdGroupName.of("[CUSTOMER]", "[AD_GROUP]"); AdGroupBidModifier expectedResponse = AdGroupBidModifier.newBuilder() .setResourceName(resourceName2.toString()) .setAdGroup(adGroup.toString()) .setCriterionId(criterionId) .setBidModifier(bidModifier) .setBaseAdGroup(baseAdGroup.toString()) .build(); mockAdGroupBidModifierService.addResponse(expectedResponse); AdGroupBidModifierName resourceName = AdGroupBidModifierName.of("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"); AdGroupBidModifier actualResponse = client.getAdGroupBidModifier(resourceName); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockAdGroupBidModifierService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetAdGroupBidModifierRequest actualRequest = (GetAdGroupBidModifierRequest) actualRequests.get(0); Assert.assertEquals( resourceName, AdGroupBidModifierName.parse(actualRequest.getResourceName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
public final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName) { GetAdGroupBidModifierRequest request = GetAdGroupBidModifierRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupBidModifier(request); }
AdGroupBidModifierServiceClient implements BackgroundResource { public final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName) { GetAdGroupBidModifierRequest request = GetAdGroupBidModifierRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupBidModifier(request); } }
AdGroupBidModifierServiceClient implements BackgroundResource { public final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName) { GetAdGroupBidModifierRequest request = GetAdGroupBidModifierRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupBidModifier(request); } protected  AdGroupBidModifierServiceClient(AdGroupBidModifierServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupBidModifierServiceClient(AdGroupBidModifierServiceStub stub); }
AdGroupBidModifierServiceClient implements BackgroundResource { public final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName) { GetAdGroupBidModifierRequest request = GetAdGroupBidModifierRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupBidModifier(request); } protected  AdGroupBidModifierServiceClient(AdGroupBidModifierServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupBidModifierServiceClient(AdGroupBidModifierServiceStub stub); static final AdGroupBidModifierServiceClient create(); static final AdGroupBidModifierServiceClient create(
      AdGroupBidModifierServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdGroupBidModifierServiceClient create(AdGroupBidModifierServiceStub stub); final AdGroupBidModifierServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdGroupBidModifierServiceStub getStub(); final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName); final AdGroupBidModifier getAdGroupBidModifier(String resourceName); final AdGroupBidModifier getAdGroupBidModifier(GetAdGroupBidModifierRequest request); final UnaryCallable<GetAdGroupBidModifierRequest, AdGroupBidModifier> getAdGroupBidModifierCallable(); final MutateAdGroupBidModifiersResponse mutateAdGroupBidModifiers(
      String customerId, List<AdGroupBidModifierOperation> operations); final MutateAdGroupBidModifiersResponse mutateAdGroupBidModifiers(
      MutateAdGroupBidModifiersRequest request); final UnaryCallable<MutateAdGroupBidModifiersRequest, MutateAdGroupBidModifiersResponse> mutateAdGroupBidModifiersCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
AdGroupBidModifierServiceClient implements BackgroundResource { public final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName) { GetAdGroupBidModifierRequest request = GetAdGroupBidModifierRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .build(); return getAdGroupBidModifier(request); } protected  AdGroupBidModifierServiceClient(AdGroupBidModifierServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdGroupBidModifierServiceClient(AdGroupBidModifierServiceStub stub); static final AdGroupBidModifierServiceClient create(); static final AdGroupBidModifierServiceClient create(
      AdGroupBidModifierServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdGroupBidModifierServiceClient create(AdGroupBidModifierServiceStub stub); final AdGroupBidModifierServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdGroupBidModifierServiceStub getStub(); final AdGroupBidModifier getAdGroupBidModifier(AdGroupBidModifierName resourceName); final AdGroupBidModifier getAdGroupBidModifier(String resourceName); final AdGroupBidModifier getAdGroupBidModifier(GetAdGroupBidModifierRequest request); final UnaryCallable<GetAdGroupBidModifierRequest, AdGroupBidModifier> getAdGroupBidModifierCallable(); final MutateAdGroupBidModifiersResponse mutateAdGroupBidModifiers(
      String customerId, List<AdGroupBidModifierOperation> operations); final MutateAdGroupBidModifiersResponse mutateAdGroupBidModifiers(
      MutateAdGroupBidModifiersRequest request); final UnaryCallable<MutateAdGroupBidModifiersRequest, MutateAdGroupBidModifiersResponse> mutateAdGroupBidModifiersCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }