"http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg"));
creativeAsset.setSize(size);
imageCreative.setPrimaryImageAsset(creativeAsset);
// Create an image redirect creative.
ImageRedirectCreative imageRedirectCreative = new ImageRedirectCreative();
imageRedirectCreative.setName(
"Image redirect creative #" + new Random().nextInt(Integer.MAX_VALUE));
imageRedirectCreative.setAdvertiserId(advertiserId);
imageRedirectCreative.setDestinationUrl("http://google.com");
imageRedirectCreative.setImageUrl(
"http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg");
imageRedirectCreative.setSize(size);
// Create the creatives on the server.
Creative[] creatives =
creativeService.createCreatives(new Creative[] {imageCreative, imageRedirectCreative});