Package com.google.api.ads.adwords.axis.v201406.cm

Examples of com.google.api.ads.adwords.axis.v201406.cm.Address


        adWordsServices.get(session, VideoTargetingGroupCriterionServiceInterface.class);

    int offset = 0;

    // Create selector.
    TargetingGroupCriterionSelector selector = new TargetingGroupCriterionSelector();
    selector.setTargetingGroupIds(new long[] {targetingGroupId});
    selector.setCriteriaDimension(CriteriaDimension.KEYWORD);
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    TargetingGroupCriterionPage page;
    do {
      // Get all criteria for the campaign.
      page = videoTargetingGroupCriterionService.get(selector);

      // Display criteria.
      if (page.getEntries() != null) {
        for (TargetingGroupCriterion targetingGroupCampaignCriterion : page.getEntries()) {
          String negative =
              (targetingGroupCampaignCriterion instanceof NegativeTargetingGroupCriterion)
                  ? " (negative)"
                  : "";
          System.out.printf("Video%s criterion id %d of type '%s' was found.%n",
              negative,
              targetingGroupCampaignCriterion.getCriterion().getId(),
              targetingGroupCampaignCriterion.getCriterion().getBaseCriterionType());
        }
      } else {
        System.out.println("No criteria were found.");
      }

      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here


    addGenderCriterionOp.setOperator(Operator.ADD);

    // Create a topic criterion for the Autos & Vehicles topic.
    // See ConstantDataService for a list of verticals.
    TargetingGroupCriterion topicCriterion = new TargetingGroupCriterion();
    Topic topic = new Topic();
    topic.setVerticalId(47L);
    topicCriterion.setCampaignId(campaignId);
    topicCriterion.setTargetingGroupId(targetingGroupId);
    topicCriterion.setCriterion(topic);

    TargetingGroupCriterionOperation addTopicCriterionOp =
View Full Code Here

        new VideoAdDisplayFormat_VideoAdStatusMapEntry();
   
    trueViewStatus.setKey(VideoAdDisplayFormat.TRUE_VIEW_IN_DISPLAY);
    trueViewStatus.setValue(VideoAdStatus.PAUSED);

    VideoAd ad = new VideoAd();
    ad.setId(videoAdId);
    ad.setStatusByFormat(new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});

    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(ad);
    operation.setOperator(Operator.SET);
View Full Code Here

          throws Exception {
    // Get the VideoCampaignService.
    VideoAdServiceInterface videoAdService =
        adWordsServices.get(session, VideoAdServiceInterface.class);

    VideoAdDisplayFormat_VideoAdStatusMapEntry trueViewStatus =
        new VideoAdDisplayFormat_VideoAdStatusMapEntry();
   
    trueViewStatus.setKey(VideoAdDisplayFormat.TRUE_VIEW_IN_DISPLAY);
    trueViewStatus.setValue(VideoAdStatus.PAUSED);

    VideoAd ad = new VideoAd();
    ad.setId(videoAdId);
    ad.setStatusByFormat(new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});
View Full Code Here

    // Create video campaign.
    VideoCampaign videoCampaign = new VideoCampaign();
    videoCampaign.setName("Interplanetary Cruise #"
        + System.currentTimeMillis());
    videoCampaign.setStatus(VideoCampaignStatus.PAUSED);
    VideoAdNetworks networks = new VideoAdNetworks();
    networks.setNetworks(new VideoAdNetwork[] {
        VideoAdNetwork.GOOGLE_DISPLAY_NETWORK,
        VideoAdNetwork.YOUTUBE_WATCH});
    videoCampaign.setNetworks(networks);

    // You can optionally provide these field(s).
View Full Code Here

    VideoAd ad = new VideoAd();
    ad.setId(videoAdId);
    ad.setStatusByFormat(new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});

    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(ad);
    operation.setOperator(Operator.SET);

    VideoAdReturnValue result = videoAdService.mutate(new VideoAdOperation[] {operation});
   
    for (VideoAd videoAdResult : result.getValue()) {
      System.out.printf("Video ad with id %d was updated.%n",
View Full Code Here

    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(ad);
    operation.setOperator(Operator.SET);

    VideoAdReturnValue result = videoAdService.mutate(new VideoAdOperation[] {operation});
   
    for (VideoAd videoAdResult : result.getValue()) {
      System.out.printf("Video ad with id %d was updated.%n",
          videoAdResult.getId());
    }
  }
View Full Code Here

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long videoAdId)
          throws Exception {
    // Get the VideoCampaignService.
    VideoAdServiceInterface videoAdService =
        adWordsServices.get(session, VideoAdServiceInterface.class);

    VideoAdDisplayFormat_VideoAdStatusMapEntry trueViewStatus =
        new VideoAdDisplayFormat_VideoAdStatusMapEntry();
   
    trueViewStatus.setKey(VideoAdDisplayFormat.TRUE_VIEW_IN_DISPLAY);
    trueViewStatus.setValue(VideoAdStatus.PAUSED);

    VideoAd ad = new VideoAd();
    ad.setId(videoAdId);
    ad.setStatusByFormat(new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});

    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(ad);
    operation.setOperator(Operator.SET);

    VideoAdReturnValue result = videoAdService.mutate(new VideoAdOperation[] {operation});
   
    for (VideoAd videoAdResult : result.getValue()) {
      System.out.printf("Video ad with id %d was updated.%n",
          videoAdResult.getId());
    }
View Full Code Here

    // Get the VideoService.
    VideoServiceInterface videoService =
        adWordsServices.get(session, VideoServiceInterface.class);

    // Create the call to action.
    VideoCallToAction videoCallToAction = new VideoCallToAction();
    videoCallToAction.setId(videoId);
   
    CallToAction callToAction = new CallToAction();
    CallToActionCreative callToActionCreative = new CallToActionCreative();
    callToActionCreative.setHeadline("Mars cruise");
    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
   
    // Use SET to add a new Call to Action, or to overwrite an existing one.
View Full Code Here

    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
   
    // Use SET to add a new Call to Action, or to overwrite an existing one.
    operation.setOperator(Operator.SET);

    VideoCallToActionOperation[] operations = new VideoCallToActionOperation[] {operation};

    // Add video call to action.
    VideoReturnValue result = videoService.mutateCallToAction(operations);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201406.cm.Address

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.