// Get the VideoAdService
VideoAdServiceInterface videoAdService =
adWordsServices.get(session, VideoAdServiceInterface.class);
// Create a new VideoAd.
VideoAd videoAd = new VideoAd();
videoAd.setCampaignId(campaignId);
videoAd.setName("Video ad #" + System.currentTimeMillis());
videoAd.setStatus(VideoAdStatus.PAUSED);
VideoAdDisplayFormat_VideoAdStatusMapEntry trueViewStatus =
new VideoAdDisplayFormat_VideoAdStatusMapEntry(
VideoAdDisplayFormat.TRUE_VIEW_IN_STREAM,
VideoAdStatus.ENABLED);
videoAd.setStatusByFormat(
new VideoAdDisplayFormat_VideoAdStatusMapEntry[] {trueViewStatus});
videoAd.setHeadline("Best headline");
videoAd.setDestinationUrl("http://www.example.com");
videoAd.setDisplayUrl("www.example.com");
videoAd.setDescription1("My favorite line 1");
videoAd.setDescription2("My favorite line 2");
videoAd.setVideoId(videoId);
VideoAdOperation operation = new VideoAdOperation();
operation.setOperand(videoAd);
operation.setOperator(Operator.ADD);