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

Examples of com.google.api.ads.adwords.axis.v201406.o.StringAttribute


    productCustomAttribute.setValue("my attribute value");

    ProductOfferId productOfferId = new ProductOfferId();
    productOfferId.setValue("book1");

    ProductType productTypeLevel1Media = new ProductType();
    productTypeLevel1Media.setType(ProductDimensionType.PRODUCT_TYPE_L1);
    productTypeLevel1Media.setValue("Media");

    ProductType productTypeLevel2Books = new ProductType();
    productTypeLevel2Books.setType(ProductDimensionType.PRODUCT_TYPE_L2);
    productTypeLevel2Books.setValue("Books");

    // The value for the bidding category is a fixed ID for the 'Luggage & Bags'
    // category. You can retrieve IDs for categories from the ConstantDataService.
    // See the 'GetProductCategoryTaxonomy' example for more details.
    ProductBiddingCategory productBiddingCategory = new ProductBiddingCategory();
View Full Code Here


    int offset = 0;

    // Create selector.
    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder
        .fields("MediaId", "Width", "Height", "MimeType")
        .orderAscBy("MediaId")
        .offset(offset)
        .limit(PAGE_SIZE)
        .in("Type", "IMAGE", "VIDEO")
View Full Code Here

      throws Exception {
    // Get the constant data service.
    ConstantDataServiceInterface constantDataService =
        adWordsServices.get(session, ConstantDataServiceInterface.class);
   
    Selector selector = new SelectorBuilder()
      .equals("Country", "US")
      .build();
   
    ProductBiddingCategoryData[] results =
        constantDataService.getProductBiddingCategoryData(selector);
View Full Code Here

    // Set keyword matching setting (required).
    KeywordMatchSetting keywordMatchSetting = new KeywordMatchSetting();
    keywordMatchSetting.setOptIn(false);

    // All Shopping campaigns need a ShoppingSetting.
    ShoppingSetting shoppingSetting = new ShoppingSetting();
    shoppingSetting.setSalesCountry("US");
    shoppingSetting.setCampaignPriority(0);
    shoppingSetting.setMerchantId(merchantId);
   
    campaign.setSettings(new Setting[] {keywordMatchSetting, shoppingSetting});

    // Create operation.
    CampaignOperation campaignOperation = new CampaignOperation();
View Full Code Here

  public static void runExample(AdWordsServices adWordsServices, AdWordsSession session)
      throws Exception {
    CustomerServiceInterface customerService =
        adWordsServices.get(session, CustomerServiceInterface.class);
    Customer customer = customerService.get();
    System.out.printf("You are logged in as customer: %s", customer.getCustomerId());
  }
View Full Code Here

        .build();
  }

  public static void runExample(AdWordsServices adWordsServices, AdWordsSession session)
      throws Exception {
    CustomerServiceInterface customerService =
        adWordsServices.get(session, CustomerServiceInterface.class);
    Customer customer = customerService.get();
    System.out.printf("You are logged in as customer: %s", customer.getCustomerId());
  }
View Full Code Here

    // Display related keywords.
    if (page.getEntries() != null && page.getEntries().length > 0) {
      for (TargetingIdea targetingIdea : page.getEntries()) {
        Map<AttributeType, Attribute> data = Maps.toMap(targetingIdea.getData());
        StringAttribute keyword = (StringAttribute) data.get(AttributeType.KEYWORD_TEXT);

        IntegerSetAttribute categories =
            (IntegerSetAttribute) data.get(AttributeType.CATEGORY_PRODUCTS_AND_SERVICES);
        String categoriesString = "(none)";
        if (categories != null && categories.getValue() != null) {
          categoriesString = Joiner.on(", ").join(Ints.asList(categories.getValue()));
        }
        Long averageMonthlySearches =
            ((LongAttribute) data.get(AttributeType.SEARCH_VOLUME))
                .getValue();
        System.out.println("Keyword with text '" + keyword.getValue()
            + "', and average monthly search volume '" + averageMonthlySearches
            + "' was found with categories: " + categoriesString);
      }
    } else {
      System.out.println("No related keywords were found.");
View Full Code Here

    // Create an age criterion for age range 18 to 24.
    TargetingGroupCriterion ageCriterion = new TargetingGroupCriterion();
    ageCriterion.setCampaignId(campaignId);
    ageCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge age = new AudienceAge();
    age.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_18_24);
    ageCriterion.setCriterion(age);

    TargetingGroupCriterionOperation addAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addAgeCriterionOp.setOperand(ageCriterion);
    addAgeCriterionOp.setOperator(Operator.ADD);
   
    // Create a negative age criterion for age 65+.
    NegativeTargetingGroupCriterion negativeAgeCriterion =
        new NegativeTargetingGroupCriterion();
    negativeAgeCriterion.setCampaignId(campaignId);
    negativeAgeCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge negativeAge = new AudienceAge();
    negativeAge.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_65_UP);
    negativeAgeCriterion.setCriterion(negativeAge);

    TargetingGroupCriterionOperation addNegativeAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addNegativeAgeCriterionOp.setOperand(negativeAgeCriterion);
View Full Code Here

    addNegativeAgeCriterionOp.setOperand(negativeAgeCriterion);
    addNegativeAgeCriterionOp.setOperator(Operator.ADD);

    // Create a gender criterion for male.
    TargetingGroupCriterion genderCriterion = new TargetingGroupCriterion();
    AudienceGender gender = new AudienceGender();
    gender.setGenderType(AudienceGenderGenderType.GENDER_MALE);
    genderCriterion.setCampaignId(campaignId);
    genderCriterion.setTargetingGroupId(targetingGroupId);
    genderCriterion.setCriterion(gender);

    TargetingGroupCriterionOperation addGenderCriterionOp =
View Full Code Here

    addTopicCriterionOp.setOperator(Operator.ADD);

    // Create an interest criterion for the Tablet PC interest.
    // See ConstantDataService for a list of verticals.
    TargetingGroupCriterion interestCriterion = new TargetingGroupCriterion();
    AudienceInterest interest = new AudienceInterest();
    interest.setInterestId(1277L);

    interestCriterion.setCampaignId(campaignId);
    interestCriterion.setTargetingGroupId(targetingGroupId);
    interestCriterion.setCriterion(interest);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201406.o.StringAttribute

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.