// Get the VideoCampaignService.
VideoCampaignServiceInterface videoCampaignService =
adWordsServices.get(session, VideoCampaignServiceInterface.class);
// Create video campaign.
VideoCampaign videoCampaign = new VideoCampaign();
videoCampaign.setName("Interplanetary Cruise #"
+ System.currentTimeMillis());
videoCampaign.setStatus(VideoCampaignStatus.PAUSED);
VideoAdNetworks networks = new VideoAdNetworks();
networks.setNetworks(new VideoAdNetwork[] {
VideoAdNetwork.GOOGLE_DISPLAY_NETWORK,
VideoAdNetwork.YOUTUBE_WATCH});
videoCampaign.setNetworks(networks);
// You can optionally provide these field(s).
videoCampaign.setStartDate(new DateTime().plusDays(1).toString("yyyyMMdd"));
videoCampaign.setBudgetId(budgetId);
// Create operations.
VideoCampaignOperation operation = new VideoCampaignOperation();
operation.setOperand(videoCampaign);
operation.setOperator(Operator.ADD);