Trait

com.google.appsscript.adwords

AdCustomizerItemBuilder

Related Doc: package adwords

Permalink

trait AdCustomizerItemBuilder extends Object with Builder[AdCustomizerItem]

Builder for AdCustomizerItem objects. Example usage:

 adCustomizerSource.adCustomizerItemBuilder()
   .withAttributeValues({numLeft: 5, lowCost: "$0.99"}) // at least one value is required
   .withTargetCampaign("Campaign name")                 //
   .withTargetKeyword("[keyword]")                      // optional
   .withMobilePreferred(true)                           // optional
   .build();                                            // create the ad customizer item

Annotations
@RawJSType()
Linear Supertypes
Builder[AdCustomizerItem], Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AdCustomizerItemBuilder
  2. Builder
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def build(): Operation[AdCustomizerItem]

    Permalink
    Definition Classes
    Builder
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def withAttributeValue(name: String, value: AnyRef): AdCustomizerItemBuilder

    Permalink

    Sets the value of the named attribute of the ad customizer item.

    Sets the value of the named attribute of the ad customizer item. The value must be consistent with the type of the attribute. See AdCustomizerItem.setAttributeValue for more information on the expected values for all attribute types. As an example, an attribute of type text expects a string as the value, while an attribute of type date expects a string in YYYYMMDD HHMMSS format.

    An error will be thrown if the item's source has no attribute of the given name.

    At least one attribute is required to have a value in order to create the ad customizer item. For instance,

     var adCustomizerItemOperation = adCustomizerItemBuilder
       .withAttributeValue("lowCost", "$0.99")
       .withTargetCampaign("Campaign")
       .build();
    
    will create an item with lowCost = "$0.99" and target the campaign named Campaign , while
     var adCustomizerItemOperation = adCustomizerItemBuilder
       .withTargetCampaign("Campaign")
       .build();
    
    or
     var adCustomizerItemOperation = adCustomizerItemBuilder
       .withAttributeValue("lowCost", null)
       .withTargetCampaign("Campaign")
       .build();
    
    will result in an error.

  27. def withAttributeValues(attributeValues: AnyRef): AdCustomizerItemBuilder

    Permalink

    Sets the values of the ad customizer item's attributes.

    Sets the values of the ad customizer item's attributes. Expects an object containing the name-value pairs of the attribute values to set. For instance, adCustomizerItemBuilder.withAttributeValues({numLeft: 5, lowCost: "$0.99"}) sets the attribute numLeft to have the value 5 , and lowCost to have value "$0.99" .

    At least one attribute is required to have a value in order to create the ad customizer item. For instance,

     var adCustomizerItemOperation = adCustomizerItemBuilder
       .withAttributeValues({lowCost: "$0.99", numLeft: 5})
       .withTargetCampaign("Campaign")
       .build();
    
    will create an item with lowCost "$0.99", numLeft 5, and target campaign "Campaign", while
     var adCustomizerItemOperation = adCustomizerItemBuilder
       .withTargetCampaign("Campaign")
       .build();
    
    or
     var adCustomizerItemOperation = adCustomizerItemBuilder
       .withAttributeValues({lowCost: null, numLeft: null})
       .withTargetCampaign("Campaign")
       .build();
    
    will result in an error.

  28. def withEndDate(date: AnyRef): AdCustomizerItemBuilder

    Permalink

    Sets the ad customizer item's end date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format.

    Sets the ad customizer item's end date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format. This field is optional. For instance, adCustomizerItemBuilder.withEndDate("20130503"); is equivalent to adCustomizerItemBuilder.withEndDate({year: 2013, month: 5, day: 3}); . The change will fail and report an error if:

    • the given date is invalid (e.g., {year: 2013, month: 5, day: 55}),
    • the start date now comes after the end date, or
    • it's a date in the past
  29. def withMobilePreferred(isMobilePreferred: Boolean): AdCustomizerItemBuilder

    Permalink

    Sets the ad customizer item's device preference to mobile or clears it.

    Sets the ad customizer item's device preference to mobile or clears it. This field is optional and defaults to false .

  30. def withSchedules(schedules: Array[ExtensionSchedule]): AdCustomizerItemBuilder

    Permalink

    Sets the ad customizer item scheduling.

    Sets the ad customizer item scheduling. Scheduling of a ad customizer item allows you to control the days of week and times of day during which the ad customizer item will show alongside your ads.

    Passing in an empty array clears the scheduling field, causing the ad customizer item to run at all times.

    The following example sets the ad customizer item to run on Mondays and Tuesday from 8:00 to 11:00.

      var mondayMorning = {
        dayOfWeek: "MONDAY",
        startHour: 8,
        startMinute: 0,
        endHour: 11,
        endMinute: 0
      };
      var tuesdayMorning = {
        dayOfWeek: "TUESDAY",
        startHour: 8,
        startMinute: 0,
        endHour: 11,
        endMinute: 0
      };
      adCustomizerItemBuilder.withSchedules([mondayMorning, tuesdayMorning]);
    

  31. def withStartDate(date: AnyRef): AdCustomizerItemBuilder

    Permalink

    Sets the ad customizer item's start date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format.

    Sets the ad customizer item's start date from either an object containing year, month, and day fields, or an 8-digit string in YYYYMMDD format. This field is optional. For instance, adCustomizerItemBuilder.withStartDate("20130503"); is equivalent to adCustomizerItemBuilder.withStartDate({year: 2013, month: 5, day: 3}); . The change will fail and report an error if:

    • the given date is invalid (e.g., {year: 2013, month: 5, day: 55}),
    • the given date is after the ad customizer item's end date,
  32. def withTargetAdGroup(campaignName: String, adGroupName: String): AdCustomizerItemBuilder

    Permalink

    Sets the target ad group and campaign of the new ad customizer item.

    Sets the target ad group and campaign of the new ad customizer item. This will fail if there were any previous calls to withTargetCampaign("previous campaign") . For instance,

     adCustomizerItemBuilder
       .withTargetCampaign("Other campaign")
       .withTargetAdGroup("Campaign", "Ad group");
    
    will fail, while
     adCustomizerItemBuilder
       .withTargetAdGroup("Campaign", "Old ad group")
       .withTargetAdGroup("Campaign", "Ad group");
    
    will result in an ad customizer item builder with target campaign "Campaign" and target ad group "Ad group".

  33. def withTargetCampaign(campaignName: String): AdCustomizerItemBuilder

    Permalink

    Sets the target campaign of the new ad customizer item.

    Sets the target campaign of the new ad customizer item. This will fail if there were any previous calls to withTargetAdGroup("previous ad group", "campaign") . For instance,

     adCustomizerItemBuilder
       .withTargetAdGroup("Campaign", "Ad group")
       .withTargetCampaign("Other campaign");
    
    will fail, while
     adCustomizerItemBuilder
       .withTargetCampaign("Old campaign");
       .withTargetCampaign("Campaign");
    
    will result in an ad customizer item builder with target campaign "Campaign" and no target ad group.

  34. def withTargetKeyword(keyword: String): AdCustomizerItemBuilder

    Permalink

    Sets the target keyword of the new ad customizer item.

    Sets the target keyword of the new ad customizer item. The keyword includes its match type. For instance, adCustomizerItemBuilder.withTargetKeyword("[shoes]"); will target exact matches to "shoes". Setting the target keyword to one that does not yet exist in your account will not cause an error, but will prevent the ad customizer item from being used to populate ads (until you create the keyword in your account).

Inherited from Builder[AdCustomizerItem]

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped