// Get AdWordsUser from "~/adwords.properties".
AdWordsUser user = new AdWordsUser();
// Get the CampaignCriterionService.
CampaignCriterionServiceInterface campaignCriterionService =
user.getService(AdWordsService.V201309.CAMPAIGN_CRITERION_SERVICE);
long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE");
// Create mobile platform. The ID can be found in the documentation.
// https://developers.google.com/adwords/api/docs/appendix/platforms
Platform mobile = new Platform();
mobile.setId(30001L);
CampaignCriterionOperation operation = new CampaignCriterionOperation();
CampaignCriterion campaignCriterion = new CampaignCriterion();
campaignCriterion.setCampaignId(campaignId);
campaignCriterion.setCriterion(mobile);
campaignCriterion.setBidModifier(1.5);
operation.setOperand(campaignCriterion);
operation.setOperator(Operator.SET);
CampaignCriterionReturnValue result =
campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});
// Display campaign criteria.
if (result != null && result.getValue() != null) {
for (CampaignCriterion campaignCriterionResult : result.getValue()) {
System.out.printf("Campaign criterion with campaign id '%s', criterion id '%s', "