Examples of Placement


Examples of com.amazonaws.services.ec2.model.Placement

            log.info("InstanceType=" + instanceType.get());
        }

        if (availabilityZone.isPresent())
        {
            runInstancesRequest.setPlacement(new Placement().
                    withAvailabilityZone(availabilityZone.get()));

            log.info("Placement.AvailabilityZone=" + availabilityZone.get());
        }
View Full Code Here

Examples of com.amazonaws.services.ec2.model.Placement

              workerConfig.getMinInstances(),
              workerConfig.getMaxInstances()
          )
              .withInstanceType(workerConfig.getInstanceType())
              .withSecurityGroupIds(workerConfig.getSecurityGroupIds())
              .withPlacement(new Placement(setupData.getAvailabilityZone()))
              .withKeyName(workerConfig.getKeyName())
              .withUserData(userDataBase64)
      );

      final List<String> instanceIds = Lists.transform(
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201306.cm.Placement

    // Display related placements.
    if (page.getEntries() != null && page.getEntries().length > 0) {
      for (TargetingIdea targetingIdea : page.getEntries()) {
        Map<AttributeType, Attribute> data = Maps.toMap(targetingIdea.getData());
        Placement placement =
            (Placement) ((CriterionAttribute) data.get(AttributeType.CRITERION)).getValue();
        SiteConstantsPlacementType placementType =
            ((PlacementTypeAttribute) data.get(AttributeType.PLACEMENT_TYPE)).getValue();
        System.out.println("Placement with url '" + placement.getUrl() + "' and type '"
            + placementType + "' was found.");
      }
    } else {
      System.out.println("No related placements were found.");
    }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201309.cm.Placement

    String[] placements =
        new String[] {"www.example.com/something", "INVALID!!_URL",
            "www.example.com/somethingelse", "BAD!!_URL"};
    for (String url : placements) {
      // Create placement
      Placement placement = new Placement();
      placement.setUrl(url);

      // Create biddable ad group criterion.
      BiddableAdGroupCriterion placementBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
      placementBiddableAdGroupCriterion.setAdGroupId(adGroupId);
      placementBiddableAdGroupCriterion.setCriterion(placement);
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_19.Placement

      long dfaSiteId, long campaignId, int pricingType, long sizeId) throws Exception {
    // Request the placement service from the service client factory.
    PlacementRemote placementService = dfaServices.get(session, PlacementRemote.class);

    // Create the placement.
    Placement placement = new Placement();
    placement.setId(0);
    placement.setName(placementName);
    placement.setCampaignId(campaignId);
    placement.setDfaSiteId(dfaSiteId);
    placement.setSizeId(sizeId);
    // The type ID for regular agency paid placements is 3. See
    // GetPlacementTypes.java
    placement.setPlacementType(3);

    // Set the pricing schedule for the placement.
    PricingSchedule pricingSchedule = new PricingSchedule();
    Calendar startDate = Calendar.getInstance();
    Calendar endDate = Calendar.getInstance();
    endDate.add(Calendar.MONTH, 1);
    pricingSchedule.setStartDate(startDate);
    pricingSchedule.setEndDate(endDate);
    pricingSchedule.setPricingType(pricingType);
    placement.setPricingSchedule(pricingSchedule);

    // Set the placement tag settings.
    TagSettings tagSettings = new TagSettings();
    PlacementTagOption[] placementTagOptions = placementService.getRegularPlacementTagOptions();
    int[] tagTypes = new int[placementTagOptions.length];

    for (int i = 0; i < placementTagOptions.length; i++) {
      tagTypes[i] = (int) placementTagOptions[i].getId();
    }

    tagSettings.setTagTypes(tagTypes);
    placement.setTagSettings(tagSettings);

    // Save the placement.
    PlacementSaveResult placementSaveResult = placementService.savePlacement(placement);

    // Display the new placement ID.
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.Placement

      long dfaSiteId, long campaignId, int pricingType, long sizeId) throws Exception {
    // Request the placement service from the service client factory.
    PlacementRemote placementService = dfaServices.get(session, PlacementRemote.class);

    // Create the placement.
    Placement placement = new Placement();
    placement.setId(0);
    placement.setName(placementName);
    placement.setCampaignId(campaignId);
    placement.setDfaSiteId(dfaSiteId);
    placement.setSizeId(sizeId);
    // The type ID for regular agency paid placements is 3. See
    // GetPlacementTypes.java
    placement.setPlacementType(3);

    // Set the pricing schedule for the placement.
    PricingSchedule pricingSchedule = new PricingSchedule();
    Calendar startDate = Calendar.getInstance();
    Calendar endDate = Calendar.getInstance();
    endDate.add(Calendar.MONTH, 1);
    pricingSchedule.setStartDate(startDate);
    pricingSchedule.setEndDate(endDate);
    pricingSchedule.setPricingType(pricingType);
    placement.setPricingSchedule(pricingSchedule);

    // Set the placement tag settings.
    TagSettings tagSettings = new TagSettings();
    PlacementTagOption[] placementTagOptions = placementService.getRegularPlacementTagOptions();
    int[] tagTypes = new int[placementTagOptions.length];

    for (int i = 0; i < placementTagOptions.length; i++) {
      tagTypes[i] = (int) placementTagOptions[i].getId();
    }

    tagSettings.setTagTypes(tagTypes);
    placement.setTagSettings(tagSettings);

    // Save the placement.
    PlacementSaveResult placementSaveResult = placementService.savePlacement(placement);

    // Display the new placement ID.
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201302.Placement

    List<Placement> placementsToCreate = Lists.newArrayList();

    // Only create placements with one or more ad unit.
    if (!mediumSquareAdUnitIds.isEmpty()) {
      // Create medium square placement.
      Placement mediumSquareAdUnitPlacement = new Placement();
      mediumSquareAdUnitPlacement.setName("Medium Square AdUnit Placement #"
          + new Random().nextInt(Integer.MAX_VALUE));
      mediumSquareAdUnitPlacement.setDescription(
          "Contains ad units that can hold creatives of size 300x250");
      mediumSquareAdUnitPlacement.setTargetedAdUnitIds(
          mediumSquareAdUnitIds.toArray(new String[] {}));

      placementsToCreate.add(mediumSquareAdUnitPlacement);
    }

    if (!skyscraperAdUnitIds.isEmpty()) {
      // Create skyscraper placement.
      Placement skyscraperAdUnitPlacement = new Placement();
      skyscraperAdUnitPlacement.setName(
          "Skyscraper AdUnit Placement #" + new Random().nextInt(Integer.MAX_VALUE));
      skyscraperAdUnitPlacement.setDescription(
          "Contains ad units that can hold creatives of size 120x600");
      skyscraperAdUnitPlacement.setTargetedAdUnitIds(skyscraperAdUnitIds.toArray(new String[] {}));
      placementsToCreate.add(skyscraperAdUnitPlacement);
    }

    if (!bannerAdUnitIds.isEmpty()) {
      // Create banner placement.
      Placement bannerAdUnitPlacement = new Placement();
      bannerAdUnitPlacement.setName(
          "Banner AdUnit Placement #" + new Random().nextInt(Integer.MAX_VALUE));
      bannerAdUnitPlacement.setDescription(
          "Contains ad units that can hold creatives of size 468x60");
      bannerAdUnitPlacement.setTargetedAdUnitIds(bannerAdUnitIds.toArray(new String[] {}));
      placementsToCreate.add(bannerAdUnitPlacement);
    }

    if (!placementsToCreate.isEmpty()) {
      // Create the placements on the server.
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201306.Placement

    // Get the PlacementService.
    PlacementServiceInterface placementService =
        dfpServices.get(session, PlacementServiceInterface.class);

    // Get the placement.
    Placement placement = placementService.getPlacement(placementId);

    // Enable AdSense targeting.
    placement.setTargetingDescription(
        (placement.getDescription() == null || placement.getDescription().isEmpty())
        ? "Insert description here." : placement.getDescription());
    placement.setTargetingAdLocation("All images on sports pages.");
    placement.setTargetingSiteName("https://news.google.com");
    placement.setIsAdSenseTargetingEnabled(true);

    // Update the placement on the server.
    Placement[] placements = placementService.updatePlacements(new Placement[] {placement});

    for (Placement updatedPlacement : placements) {
View Full Code Here

Examples of com.google.api.ads.dfp.axis.v201308.Placement

    // Get the PlacementService.
    PlacementServiceInterface placementService =
        dfpServices.get(session, PlacementServiceInterface.class);

    // Get the placement.
    Placement placement = placementService.getPlacement(placementId);

    // Enable AdSense targeting.
    placement.setTargetingDescription(
        (placement.getDescription() == null || placement.getDescription().isEmpty())
        ? "Insert description here." : placement.getDescription());
    placement.setTargetingAdLocation("All images on sports pages.");
    placement.setTargetingSiteName("https://news.google.com");
    placement.setIsAdSenseTargetingEnabled(true);

    // Update the placement on the server.
    Placement[] placements = placementService.updatePlacements(new Placement[] {placement});

    for (Placement updatedPlacement : placements) {
View Full Code Here

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

    // Get the PlacementService.
    PlacementServiceInterface placementService =
        dfpServices.get(session, PlacementServiceInterface.class);

    // Get the placement.
    Placement placement = placementService.getPlacement(placementId);

    // Enable AdSense targeting.
    placement.setTargetingDescription(
        (placement.getDescription() == null || placement.getDescription().isEmpty())
        ? "Insert description here." : placement.getDescription());
    placement.setTargetingAdLocation("All images on sports pages.");
    placement.setTargetingSiteName("https://news.google.com");
    placement.setIsAdSenseTargetingEnabled(true);

    // Update the placement on the server.
    Placement[] placements = placementService.updatePlacements(new Placement[] {placement});

    for (Placement updatedPlacement : placements) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.