exemptableTextAd.setDescription2("Low-gravity fun for everyone!");
exemptableTextAd.setDisplayUrl("www.example.com");
exemptableTextAd.setUrl("http://www.example.com/");
// Create ad group ad.
AdGroupAd exemptableAdGroupAd = new AdGroupAd();
exemptableAdGroupAd.setAdGroupId(adGroupId);
exemptableAdGroupAd.setAd(exemptableTextAd);
// Create operations.
AdGroupAdOperation exemptableOperation = new AdGroupAdOperation();
exemptableOperation.setOperand(exemptableAdGroupAd);
exemptableOperation.setOperator(Operator.ADD);
// Create text ad that violates an non-exemptable policy.
TextAd nonExemptableTextAd = new TextAd();
nonExemptableTextAd.setHeadline("Mars Cruise with too long of a headline.");
nonExemptableTextAd.setDescription1("Visit the Red Planet in style.");
nonExemptableTextAd.setDescription2("Low-gravity fun for everyone.");
nonExemptableTextAd.setDisplayUrl("www.example.com");
nonExemptableTextAd.setUrl("http://www.example.com/");
// Create ad group ad.
AdGroupAd nonExemptableAdGroupAd = new AdGroupAd();
nonExemptableAdGroupAd.setAdGroupId(adGroupId);
nonExemptableAdGroupAd.setAd(nonExemptableTextAd);
// Create operations.
AdGroupAdOperation nonExemptableOperation = new AdGroupAdOperation();
nonExemptableOperation.setOperand(nonExemptableAdGroupAd);
nonExemptableOperation.setOperator(Operator.ADD);