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

Examples of com.google.api.ads.adwords.axis.v201406.video.VideoAdServiceInterface


  public static void runExample(AdWordsServices adWordsServices,
      AdWordsSession session, Long campaignId, String videoId)
          throws Exception {
    // Get the VideoAdService
    VideoAdServiceInterface videoAdService =
        adWordsServices.get(session, VideoAdServiceInterface.class);
   
    // Create a new VideoAd.
    VideoAd videoAd = new VideoAd();
    videoAd.setCampaignId(campaignId);
    videoAd.setName("Video ad #" + System.currentTimeMillis());
    videoAd.setStatus(VideoAdStatus.PAUSED);

    VideoAdDisplayFormat_VideoAdStatusMapEntry trueViewStatus =
        new VideoAdDisplayFormat_VideoAdStatusMapEntry(
          VideoAdDisplayFormat.TRUE_VIEW_IN_STREAM,
          VideoAdStatus.ENABLED);
    videoAd.setStatusByFormat(
      new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});

    videoAd.setHeadline("Best headline");
    videoAd.setDestinationUrl("http://www.example.com");
    videoAd.setDisplayUrl("www.example.com");
    videoAd.setDescription1("My favorite line 1");
    videoAd.setDescription2("My favorite line 2");
    videoAd.setVideoId(videoId);
   
    VideoAdOperation operation = new VideoAdOperation();
    operation.setOperand(videoAd);
    operation.setOperator(Operator.ADD);

    VideoAdOperation[] operations = new VideoAdOperation[] {operation};
   
    VideoAdReturnValue result = videoAdService.mutate(operations);

    for (VideoAd videoAdResult : result.getValue()) {
      System.out.printf("Video ad with campaign id %d, "
          + "video ad id %d, and name '%s' was added.%n",
          videoAdResult.getCampaignId(),
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

    // Create base class criterion to avoid setting keyword specific fields.
    Criterion criterion = new Criterion();
    criterion.setId(criterionId);

    // Create ad group criterion.
    AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
    adGroupCriterion.setAdGroupId(adGroupId);
    adGroupCriterion.setCriterion(criterion);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(adGroupCriterion);
    operation.setOperator(Operator.REMOVE);
View Full Code Here

    AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
    adGroupCriterion.setAdGroupId(adGroupId);
    adGroupCriterion.setCriterion(criterion);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(adGroupCriterion);
    operation.setOperator(Operator.REMOVE);

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

    // Remove ad group criteria.
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);
View Full Code Here

    operation.setOperator(Operator.REMOVE);

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

    // Remove ad group criteria.
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);

    // Display ad group criteria.
    for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
      System.out.println("Ad group criterion with ad group id \""
          + adGroupCriterionResult.getAdGroupId() + "\", criterion id \""
          + adGroupCriterionResult.getCriterion().getId() + "\", and type \""
          + adGroupCriterionResult.getCriterion().getCriterionType() + "\" was removed.");
    }
View Full Code Here

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, long adGroupId,
      long criterionId) throws Exception {
    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // Create base class criterion to avoid setting keyword specific fields.
    Criterion criterion = new Criterion();
    criterion.setId(criterionId);

    // Create ad group criterion.
    AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
    adGroupCriterion.setAdGroupId(adGroupId);
    adGroupCriterion.setCriterion(criterion);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(adGroupCriterion);
    operation.setOperator(Operator.REMOVE);

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

    // Remove ad group criteria.
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);

    // Display ad group criteria.
    for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
      System.out.println("Ad group criterion with ad group id \""
          + adGroupCriterionResult.getAdGroupId() + "\", criterion id \""
View Full Code Here

    // Get the BudgetService.
    BudgetServiceInterface budgetService =
        adWordsServices.get(session, BudgetServiceInterface.class);

    // Create a budget, which can be shared by multiple video campaigns.
    Budget sharedBudget = new Budget();
    sharedBudget.setName("Interplanetary Cruise #" + System.currentTimeMillis());
    Money budgetAmount = new Money();
    budgetAmount.setMicroAmount(50000000L);
    sharedBudget.setAmount(budgetAmount);
    sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    sharedBudget.setPeriod(BudgetBudgetPeriod.DAILY);

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);
View Full Code Here

    budgetAmount.setMicroAmount(50000000L);
    sharedBudget.setAmount(budgetAmount);
    sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    sharedBudget.setPeriod(BudgetBudgetPeriod.DAILY);

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);

    // Add the budget and get the budget ID.
    BudgetReturnValue budgetResult = budgetService.mutate(
        new BudgetOperation[] {budgetOperation});
    Long budgetId = budgetResult.getValue(0).getBudgetId();
View Full Code Here

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);

    // Add the budget and get the budget ID.
    BudgetReturnValue budgetResult = budgetService.mutate(
        new BudgetOperation[] {budgetOperation});
    Long budgetId = budgetResult.getValue(0).getBudgetId();

    // Get the VideoCampaignService.
    VideoCampaignServiceInterface videoCampaignService =
        adWordsServices.get(session, VideoCampaignServiceInterface.class);
View Full Code Here

  }

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session) throws Exception {
    // Get the BudgetService.
    BudgetServiceInterface budgetService =
        adWordsServices.get(session, BudgetServiceInterface.class);

    // Create a budget, which can be shared by multiple video campaigns.
    Budget sharedBudget = new Budget();
    sharedBudget.setName("Interplanetary Cruise #" + System.currentTimeMillis());
    Money budgetAmount = new Money();
    budgetAmount.setMicroAmount(50000000L);
    sharedBudget.setAmount(budgetAmount);
    sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    sharedBudget.setPeriod(BudgetBudgetPeriod.DAILY);

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);

    // Add the budget and get the budget ID.
    BudgetReturnValue budgetResult = budgetService.mutate(
        new BudgetOperation[] {budgetOperation});
    Long budgetId = budgetResult.getValue(0).getBudgetId();

    // Get the VideoCampaignService.
    VideoCampaignServiceInterface videoCampaignService =
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201406.video.VideoAdServiceInterface

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.