location.setId(1014044L);
criteria.add(location);
selector.setCriteria(criteria.toArray(new Criterion[criteria.size()]));
BudgetSuggestion budgetSuggestion = service.get(selector);
System.out.printf("Budget suggestion for criteria is:%n"
+ "\tSuggestedBudget=%s%n"
+ "\tMin/MaxBudget=%s/%s%n"
+ "\tMin/MaxCpc=%s/%s%n"
+ "\tCPM=%s%n"
+ "\tCPC=%s%n"
+ "\tImpressions=%s%n",
toString(budgetSuggestion.getSuggestedBudget()),
toString(budgetSuggestion.getMinBudget()),
toString(budgetSuggestion.getMaxBudget()),
toString(budgetSuggestion.getMinCpc()),
toString(budgetSuggestion.getMaxCpc()),
toString(budgetSuggestion.getCpm()),
toString(budgetSuggestion.getCpc()),
budgetSuggestion.getImpressions());
if (budgetSuggestion.getBudgetQuantiles() != null
&& budgetSuggestion.getBudgetQuantiles().length > 0) {
int quantileCount = 0;
System.out.println("\tBudget quantiles:");
for (Money budgetQuantile : budgetSuggestion.getBudgetQuantiles()) {
System.out.printf("\t\t%d) %s%n", ++quantileCount, toString(budgetQuantile));
}
} else {
System.out.println("\tNo budget quantiles found on budget suggestion");
}