}
public static void runExample(AdWordsServices adWordsServices,
AdWordsSession session, Long campaignId) throws Exception {
// Get the VideoCampaignCriterionService.
VideoCampaignCriterionServiceInterface videoCampaignCriterionService =
adWordsServices.get(session, VideoCampaignCriterionServiceInterface.class);
VideoCampaignCriterion criterion = new VideoCampaignCriterion();
criterion.setCampaignId(campaignId);
// This creates an English language criterion
// For a list of languages, see ConstantDataService
LanguageVideoCriterion englishCriterion = new LanguageVideoCriterion();
englishCriterion.setId(1001L);
criterion.setCriterion(englishCriterion);
VideoCampaignCriterionOperation operation =
new VideoCampaignCriterionOperation();
operation.setOperand(criterion);
operation.setOperator(Operator.ADD);
VideoCampaignCriterionReturnValue result = videoCampaignCriterionService.mutate(
new VideoCampaignCriterionOperation[] {operation});
for (VideoCampaignCriterion videoCampaignCriterionResult : result.getValue()) {
System.out.printf("Video campaign criterion with campaign id %d, "
+ "criterion id %d, and type '%s' was added.%n",