Package com.google.api.ads.dfp.axis.v201311

Examples of com.google.api.ads.dfp.axis.v201311.CustomCriteriaSet


      // Create action.
      com.google.api.ads.dfp.axis.v201311.ApproveOrders action =
          new com.google.api.ads.dfp.axis.v201311.ApproveOrders();

      // Perform action.
      UpdateResult result =
          orderService.performOrderAction(action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of orders approved: %d\n", result.getNumChanges());
      } else {
        System.out.println("No orders were approved.");
      }
    }
  }
View Full Code Here


        new LongCreativeTemplateVariableValue();
    imageHeightVariableValue.setUniqueName("Imageheight");
    imageHeightVariableValue.setValue(250L);

    // Create the URL variable value.
    UrlCreativeTemplateVariableValue urlVariableValue =
        new UrlCreativeTemplateVariableValue();
    urlVariableValue.setUniqueName("ClickthroughURL");
    urlVariableValue.setValue("www.google.com");

    // Create the target window variable value.
    StringCreativeTemplateVariableValue targetWindowVariableValue =
        new StringCreativeTemplateVariableValue();
    targetWindowVariableValue.setUniqueName("Targetwindow");
View Full Code Here

      // Create the custom criteria set that will resemble:
      //
      // (customCriteria1.key == customCriteria1.value OR
      //     (customCriteria2.key != customCriteria2.value AND
      //         customCriteria3.key == customCriteria3.value))
      CustomCriteriaSet topCustomCriteriaSet = new CustomCriteriaSet();
      topCustomCriteriaSet.setLogicalOperator(CustomCriteriaSetLogicalOperator.OR);

      CustomCriteriaSet subCustomCriteriaSet = new CustomCriteriaSet();
      subCustomCriteriaSet.setLogicalOperator(CustomCriteriaSetLogicalOperator.AND);
      subCustomCriteriaSet.setChildren(
          new CustomCriteriaNode[] {customCriteria2, customCriteria3});
      topCustomCriteriaSet.setChildren(
          new CustomCriteriaNode[] {customCriteria1, subCustomCriteriaSet});

      // Set the custom criteria targeting on the line item.
View Full Code Here

      sb.append(String.format("Custom criteria: operator: [%s] key: [%s] values: [%s]\n",
          customCriteria.getOperator(), customCriteria.getKeyId(),
          StringUtils.join(ArrayUtils.toObject(customCriteria.getValueIds()), ",")));
      return sb.toString();
    } else if (root instanceof CustomCriteriaSet){
      CustomCriteriaSet customCriteriaSet = (CustomCriteriaSet) root;
      sb.append(String.format("Custom criteria set: operator: [%s] children: \n",
          customCriteriaSet.getLogicalOperator()));
      for (CustomCriteriaNode node : customCriteriaSet.getChildren()) {
        sb.append(getCustomCriteriaSetString(node, level + 1));
      }
      return sb.append("\n").toString();
    } else {
      throw new IllegalStateException("Unexpected node: " + root);
View Full Code Here

      contentCustomCriteria.setKeyId(contentCustomTargetingKeyId);
      contentCustomCriteria.setValueIds(new long[] {contentCustomTargetingValueId});
      contentCustomCriteria.setOperator(CustomCriteriaComparisonOperator.IS);

      // Create custom criteria set.
      CustomCriteriaSet customCriteriaSet = new CustomCriteriaSet();
      customCriteriaSet.setChildren(new CustomCriteriaNode[] {contentCustomCriteria});

      // Create inventory targeting.
      InventoryTargeting inventoryTargeting = new InventoryTargeting();
      inventoryTargeting.setTargetedAdUnits(
          new AdUnitTargeting[] {new AdUnitTargeting(targetedVideoAdUnitId, true)});
View Full Code Here

      contentCustomCriteria.setKeyId(contentCustomTargetingKeyId);
      contentCustomCriteria.setValueIds(new long[] {contentCustomTargetingValueId});
      contentCustomCriteria.setOperator(CustomCriteriaComparisonOperator.IS);

      // Create custom criteria set.
      CustomCriteriaSet customCriteriaSet = new CustomCriteriaSet();
      customCriteriaSet.setChildren(new CustomCriteriaNode[] {contentCustomCriteria});

      // Create inventory targeting.
      InventoryTargeting inventoryTargeting = new InventoryTargeting();
      inventoryTargeting.setTargetedAdUnits(
          new AdUnitTargeting[] {new AdUnitTargeting(targetedVideoAdUnitId, true)});
View Full Code Here

      // Create the custom criteria set that will resemble:
      //
      // (customCriteria1.key == customCriteria1.value OR
      //     (customCriteria2.key != customCriteria2.value AND
      //         customCriteria3.key == customCriteria3.value))
      CustomCriteriaSet topCustomCriteriaSet = new CustomCriteriaSet();
      topCustomCriteriaSet.setLogicalOperator(CustomCriteriaSetLogicalOperator.OR);

      CustomCriteriaSet subCustomCriteriaSet = new CustomCriteriaSet();
      subCustomCriteriaSet.setLogicalOperator(CustomCriteriaSetLogicalOperator.AND);
      subCustomCriteriaSet.setChildren(
          new CustomCriteriaNode[] {customCriteria2, customCriteria3});
      topCustomCriteriaSet.setChildren(
          new CustomCriteriaNode[] {customCriteria1, subCustomCriteriaSet});

      // Set the custom criteria targeting on the line item.
View Full Code Here

      sb.append(String.format("Custom criteria: operator: [%s] key: [%s] values: [%s]\n",
          customCriteria.getOperator(), customCriteria.getKeyId(),
          StringUtils.join(ArrayUtils.toObject(customCriteria.getValueIds()), ",")));
      return sb.toString();
    } else if (root instanceof CustomCriteriaSet){
      CustomCriteriaSet customCriteriaSet = (CustomCriteriaSet) root;
      sb.append(String.format("Custom criteria set: operator: [%s] children: \n",
          customCriteriaSet.getLogicalOperator()));
      for (CustomCriteriaNode node : customCriteriaSet.getChildren()) {
        sb.append(getCustomCriteriaSetString(node, level + 1));
      }
      return sb.append("\n").toString();
    } else {
      throw new IllegalStateException("Unexpected node: " + root);
View Full Code Here

      contentCustomCriteria.setKeyId(contentCustomTargetingKeyId);
      contentCustomCriteria.setValueIds(new long[] {contentCustomTargetingValueId});
      contentCustomCriteria.setOperator(CustomCriteriaComparisonOperator.IS);

      // Create custom criteria set.
      CustomCriteriaSet customCriteriaSet = new CustomCriteriaSet();
      customCriteriaSet.setChildren(new CustomCriteriaNode[] {contentCustomCriteria});

      // Create inventory targeting.
      InventoryTargeting inventoryTargeting = new InventoryTargeting();
      inventoryTargeting.setTargetedAdUnits(
          new AdUnitTargeting[] {new AdUnitTargeting(targetedVideoAdUnitId, true)});
View Full Code Here

      // Create the custom criteria set that will resemble:
      //
      // (customCriteria1.key == customCriteria1.value OR
      //     (customCriteria2.key != customCriteria2.value AND
      //         customCriteria3.key == customCriteria3.value))
      CustomCriteriaSet topCustomCriteriaSet = new CustomCriteriaSet();
      topCustomCriteriaSet.setLogicalOperator(CustomCriteriaSetLogicalOperator.OR);

      CustomCriteriaSet subCustomCriteriaSet = new CustomCriteriaSet();
      subCustomCriteriaSet.setLogicalOperator(CustomCriteriaSetLogicalOperator.AND);
      subCustomCriteriaSet.setChildren(
          new CustomCriteriaNode[] {customCriteria2, customCriteria3});
      topCustomCriteriaSet.setChildren(
          new CustomCriteriaNode[] {customCriteria1, subCustomCriteriaSet});

      // Set the custom criteria targeting on the line item.
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201311.CustomCriteriaSet

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.