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

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


        "ParentLocations", "Reach", "TargetingStatus"});

    selector.setPredicates(new Predicate[] {
        // Location names must match exactly, only EQUALS and IN are
        // supported.
        new Predicate("LocationName", PredicateOperator.IN, locationNames),
        // Set the locale of the returned location names.
        new Predicate("Locale", PredicateOperator.EQUALS, new String[] {"en"})});

    // Make the get request.
    LocationCriterion[] locationCriteria = locationCriterionService.get(selector);

    // Display the resulting location criteria.
View Full Code Here


    // Create selector.
    Selector selector = new Selector();
    selector.setFields(new String[] {"CampaignId", "Id", "CriteriaType", "PlatformName",
        "LanguageName", "LocationName", "KeywordText"});
    selector.setPredicates(new Predicate[] {new Predicate("CriteriaType", PredicateOperator.IN,
        new String[] {"KEYWORD", "LANGUAGE", "LOCATION", "PLATFORM"})});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    CampaignCriterionPage page = null;
    do {
View Full Code Here

    Selector selector = new Selector();
    selector.setFields(new String[] {"Id", "DisapprovalReasons"});
    selector.setOrdering(new OrderBy[] {new OrderBy("Id", SortOrder.ASCENDING)});

    // Create predicates.
    Predicate adGroupIdPredicate =
        new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
    Predicate approvalStatusPredicate = new Predicate(
        "AdGroupCreativeApprovalStatus", PredicateOperator.IN, new String[] {"DISAPPROVED"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, approvalStatusPredicate});

    // Get all disapproved ads.
    AdGroupAdPage page = adGroupAdService.get(selector);
View Full Code Here

    Selector selector = new Selector();
    selector.setFields(new String[] {"AdGroupId", "CriterionId", "StartDate", "EndDate", "Bid",
        "LocalClicks", "LocalCost", "MarginalCpc", "LocalImpressions"});

    // Create predicates.
    Predicate adGroupIdPredicate =
        new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
    Predicate criterionIdPredicate =
        new Predicate("CriterionId", PredicateOperator.IN, new String[] {criterionId.toString()});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, criterionIdPredicate});

    // Get bid landscape for ad group criteria.
    CriterionBidLandscapePage page = dataService.getCriterionBidLandscape(selector);
View Full Code Here

      throws Exception {
    Selector selector = new Selector();
    selector.setFields(new String[] {"FeedId", "FeedMappingId", "PlaceholderType", "Status",
        "AttributeFieldMappings"});

    Predicate placeHolderPredicate = new Predicate();
    placeHolderPredicate.setField("PlaceholderType");
    placeHolderPredicate.setOperator(PredicateOperator.EQUALS);
    placeHolderPredicate.setValues(new String[] {Integer.toString(PLACEHOLDER_SITELINKS)});

    Predicate statusPredicate = new Predicate();
    statusPredicate.setField("Status");
    statusPredicate.setOperator(PredicateOperator.EQUALS);
    statusPredicate.setValues(new String[] {"ACTIVE"});

    selector.setPredicates(new Predicate[] {placeHolderPredicate, statusPredicate});

    FeedMappingPage page = feedMappingService.get(selector);
View Full Code Here

    Selector selector = new Selector();
    selector.setFields(new String[] {"CampaignId", "AdExtensionId", "Status", "DisplayText",
        "DestinationUrl"});

    // Filter the results for specified campaign id.
    Predicate campaignPredicate = new Predicate();
    campaignPredicate.setOperator(PredicateOperator.EQUALS);
    campaignPredicate.setField("CampaignId");
    campaignPredicate.setValues(new String[] {Long.toString(campaignId)});

    // Filter the results for active campaign ad extensions. You may add
    // additional filtering conditions here as required.
    Predicate statusPredicate = new Predicate();
    statusPredicate.setOperator(PredicateOperator.EQUALS);
    statusPredicate.setField("Status");
    statusPredicate.setValues(new String[] {CampaignAdExtensionStatus.ACTIVE.getValue()});

    // Filter for sitelinks ad extension type.
    Predicate typePredicate = new Predicate();
    typePredicate.setOperator(PredicateOperator.EQUALS);
    typePredicate.setField("AdExtensionType");
    typePredicate.setValues(new String[] {"SITELINKS_EXTENSION"});

    selector.setPredicates(new Predicate[] {campaignPredicate, statusPredicate, typePredicate});

    CampaignAdExtensionPage page = campaignExtensionService.get(selector);
    if (page.getEntries() != null && page.getEntries().length > 0) {
View Full Code Here

    int offset = 0;

    // Create selector.
    Selector selector = new Selector();
    selector.setFields(new String[] {"Id", "Name", "Impressions", "Clicks", "Cost", "Ctr"});
    selector.setPredicates(new Predicate[] {new Predicate("Impressions",
        PredicateOperator.GREATER_THAN, new String[] {"0"})});
    String oneWeekAgo = new DateTime().minusDays(7).toString("yyyyMMdd");
    String yesterday = new DateTime().minusDays(1).toString("yyyyMMdd");
    selector.setDateRange(new DateRange(oneWeekAgo, yesterday));
    selector.setPaging(new Paging(offset, PAGE_SIZE));
View Full Code Here

    selector.setFields(new String[] {"Id", "AdGroupId", "MatchType", "KeywordText"});
    selector.setOrdering(new OrderBy[] {new OrderBy("AdGroupId", SortOrder.ASCENDING)});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    // Create predicates.
    Predicate adGroupIdPredicate =
        new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
    Predicate criteriaTypePredicate =
        new Predicate("CriteriaType", PredicateOperator.EQUALS, new String[] {"KEYWORD"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, criteriaTypePredicate});

    while (morePages) {
      // Get all ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.get(selector);
View Full Code Here

    selector.setFields(new String[] {"Id", "AdGroupId", "PlacementUrl"});
    selector.setOrdering(new OrderBy[] {new OrderBy("AdGroupId", SortOrder.ASCENDING)});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    // Create predicates.
    Predicate adGroupIdPredicate =
        new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
    Predicate criteriaTypePredicate =
        new Predicate("CriteriaType", PredicateOperator.EQUALS, new String[] {"PLACEMENT"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, criteriaTypePredicate});

    while (morePages) {
      // Get all ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.get(selector);
View Full Code Here

    selector.setFields(new String[] {"Id", "AdGroupId", "Status"});
    selector.setOrdering(new OrderBy[] {new OrderBy("Id", SortOrder.ASCENDING)});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    // Create predicates.
    Predicate adGroupIdPredicate =
        new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
    // By default disabled ads aren't returned by the selector. To return them
    // include the DISABLED status in a predicate.
    Predicate statusPredicate =
        new Predicate("Status", PredicateOperator.IN,
            new String[] {"ENABLED", "PAUSED", "DISABLED"});
    Predicate adTypePredicate =
        new Predicate("AdType", PredicateOperator.EQUALS, new String[] {"THIRD_PARTY_REDIRECT_AD"});
    selector.setPredicates(new Predicate[] {adGroupIdPredicate, statusPredicate, adTypePredicate});

    while (morePages) {
      // Get all ads.
      AdGroupAdPage page = adGroupAdService.get(selector);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201309.cm.Predicate

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.