Package com.restfb.types.ads
Class CustomAudience
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.ads.BaseAdsObject
-
- com.restfb.types.ads.NamedAdsObject
-
- com.restfb.types.ads.CustomAudience
-
- All Implemented Interfaces:
Serializable
public class CustomAudience extends NamedAdsObject
Represents the Custom Audience Marketing API type- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CustomAudience()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAccountId()
Long
getApproximateCount()
CustomAudienceDataSource
getDataSource()
CustomAudienceStatus
getDeliveryStatus()
String
getDescription()
List<CustomAudience>
getExcludedCustomAudiences()
AdsPixel
getExternalEventSource()
List<CustomAudience>
getIncludedCustomAudiences()
String
getLastUsedTime()
List<String>
getLookalikeAudienceIds()
LookalikeSpec
getLookalikeSpec()
CustomAudienceStatus
getOperationStatus()
String
getOptOutLink()
Long
getOriginAudienceId()
Business
getOwnerBusiness()
CustomAudiencePermission
getPermissionForActions()
String
getPixelId()
Long
getRetentionDays()
String
getRule()
String
getSubtype()
Long
getTimeContentUpdated()
Long
getTimeCreated()
Long
getTimeUpdated()
void
setAccountId(String accountId)
Ad Account IDvoid
setApproximateCount(Long approximateCount)
Approximate number of people in this audiencevoid
setDataSource(CustomAudienceDataSource dataSource)
JSON dictionary of type, sub_type to indicate by which method the custom audience was created.void
setDeliveryStatus(CustomAudienceStatus deliveryStatus)
JSON dictionary of code and description.void
setDescription(String description)
Custom audience descriptionvoid
setExcludedCustomAudiences(List<CustomAudience> excludedCustomAudiences)
void
setExternalEventSource(AdsPixel externalEventSource)
Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audiencevoid
setIncludedCustomAudiences(List<CustomAudience> includedCustomAudiences)
void
setLastUsedTime(String lastUsedTime)
last used time of this object by the current viewervoid
setLookalikeAudienceIds(List<String> lookalikeAudienceIds)
The IDs of the lookalike audiences generated from this audiencevoid
setLookalikeSpec(LookalikeSpec lookalikeSpec)
Generated only when the subtype is LOOKALIKE.void
setOperationStatus(CustomAudienceStatus operationStatus)
JSON dictionary of code to int value and description to a description string.void
setOptOutLink(String optOutLink)
Your opt-out URL so people can choose not to be targetedvoid
setOriginAudienceId(Long originAudienceId)
The ID of origin Custom Audience.void
setOwnerBusiness(Business ownerBusiness)
owner business of this objectvoid
setPermissionForActions(CustomAudiencePermission permissionForActions)
JSON dictionary of permissions (string) to boolean value if the custom audience has that permissionvoid
setPixelId(String pixelId)
ID of the pixel which is collecting events for this Website Custom audiencevoid
setRetentionDays(Long retentionDays)
Number of days to keep the user in this cluster.void
setRule(String rule)
Audience rules to be applied on the referrer URLvoid
setSubtype(String subtype)
Type of custom audience, derived from original data sourcevoid
setTimeContentUpdated(Long timeContentUpdated)
Last update of people in this custom audiencevoid
setTimeCreated(Long timeCreated)
Creation timevoid
setTimeUpdated(Long timeUpdated)
Last time this audience metadata was updated-
Methods inherited from class com.restfb.types.ads.NamedAdsObject
getName, setName
-
Methods inherited from class com.restfb.types.ads.BaseAdsObject
getId, setId
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
CustomAudience
public CustomAudience()
-
-
Method Detail
-
getAccountId
public String getAccountId()
- Returns:
- Ad Account ID
-
setAccountId
public void setAccountId(String accountId)
Ad Account ID
-
getApproximateCount
public Long getApproximateCount()
- Returns:
- Approximate number of people in this audience
-
setApproximateCount
public void setApproximateCount(Long approximateCount)
Approximate number of people in this audience
-
getDataSource
public CustomAudienceDataSource getDataSource()
- Returns:
- JSON dictionary of type, sub_type to indicate by which method the custom audience was created.
-
setDataSource
public void setDataSource(CustomAudienceDataSource dataSource)
JSON dictionary of type, sub_type to indicate by which method the custom audience was created.
-
getDeliveryStatus
public CustomAudienceStatus getDeliveryStatus()
- Returns:
- dictionary of code and description
-
setDeliveryStatus
public void setDeliveryStatus(CustomAudienceStatus deliveryStatus)
JSON dictionary of code and description. Indicates whether or not an audience can be used in ads. There are two situations that an audience will make ads not deliverable. First, if the size is smaller than 20 people, the audience can't be delivered. Second, if for some reason the audience is disabled (such as violation of policy, expired), validation will fail when it is used in ads.
-
getDescription
public String getDescription()
- Returns:
- Custom audience description
-
setDescription
public void setDescription(String description)
Custom audience description
-
getExcludedCustomAudiences
public List<CustomAudience> getExcludedCustomAudiences()
-
setExcludedCustomAudiences
public void setExcludedCustomAudiences(List<CustomAudience> excludedCustomAudiences)
-
getExternalEventSource
public AdsPixel getExternalEventSource()
- Returns:
- Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience
-
setExternalEventSource
public void setExternalEventSource(AdsPixel externalEventSource)
Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience
-
getIncludedCustomAudiences
public List<CustomAudience> getIncludedCustomAudiences()
-
setIncludedCustomAudiences
public void setIncludedCustomAudiences(List<CustomAudience> includedCustomAudiences)
-
getLastUsedTime
public String getLastUsedTime()
- Returns:
- last used time of this object by the current viewer
-
setLastUsedTime
public void setLastUsedTime(String lastUsedTime)
last used time of this object by the current viewer
-
getLookalikeAudienceIds
public List<String> getLookalikeAudienceIds()
- Returns:
- The IDs of the lookalike audiences generated from this audience
-
setLookalikeAudienceIds
public void setLookalikeAudienceIds(List<String> lookalikeAudienceIds)
The IDs of the lookalike audiences generated from this audience
-
getLookalikeSpec
public LookalikeSpec getLookalikeSpec()
- Returns:
- Generated only when the subtype is LOOKALIKE.
-
setLookalikeSpec
public void setLookalikeSpec(LookalikeSpec lookalikeSpec)
Generated only when the subtype is LOOKALIKE.
-
getOperationStatus
public CustomAudienceStatus getOperationStatus()
- Returns:
- dictionary of code to int value and description to a description string
-
setOperationStatus
public void setOperationStatus(CustomAudienceStatus operationStatus)
JSON dictionary of code to int value and description to a description string. The operation status represents the status of the last operation performed on an audience. In general, it will have following states:- 0: Status not available
- 200: Normal: there is no updating or issues found
- 400: Warning: there is some message we would like advertisers to know
- 410: No upload: no file has been uploaded
- 411: Low match rate: low rate of matched people
- 412: High invalid rate: high rate of invalid people
- 421: No pixel: Your Facebook pixel hasn't been installed on your website yet
- 422: Pixel not firing: Your Facebook pixel isn't firing
- 423: Invalid pixel: Your Facebook pixel is invalid
- 431: Lookalike Audience refresh failed
- 432: Lookalike Audience build failed
- 433: Lookalike Audience build failed
- 434: Lookalike Audience build retrying
- 500: Error: there is some error and advertisers need to take action items to fix the error
-
getOptOutLink
public String getOptOutLink()
- Returns:
- Your opt-out URL so people can choose not to be targeted
-
setOptOutLink
public void setOptOutLink(String optOutLink)
Your opt-out URL so people can choose not to be targeted
-
getOriginAudienceId
public Long getOriginAudienceId()
- Returns:
- The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100.
-
setOriginAudienceId
public void setOriginAudienceId(Long originAudienceId)
The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100.
-
getOwnerBusiness
public Business getOwnerBusiness()
- Returns:
- owner business of this object
-
setOwnerBusiness
public void setOwnerBusiness(Business ownerBusiness)
owner business of this object
-
getPermissionForActions
public CustomAudiencePermission getPermissionForActions()
- Returns:
- JSON dictionary of permissions (string) to boolean value if the custom audience has that permission
-
setPermissionForActions
public void setPermissionForActions(CustomAudiencePermission permissionForActions)
JSON dictionary of permissions (string) to boolean value if the custom audience has that permission
-
getPixelId
public String getPixelId()
- Returns:
- ID of the pixel which is collecting events for this Website Custom audience
-
setPixelId
public void setPixelId(String pixelId)
ID of the pixel which is collecting events for this Website Custom audience
-
getRetentionDays
public Long getRetentionDays()
- Returns:
- Number of days to keep the user in this cluster.
-
setRetentionDays
public void setRetentionDays(Long retentionDays)
Number of days to keep the user in this cluster. You can use any value between 1 and 180 days. Defaults to 14 days if not specified
-
getSubtype
public String getSubtype()
- Returns:
- Type of custom audience, derived from original data source
-
setSubtype
public void setSubtype(String subtype)
Type of custom audience, derived from original data source
-
getTimeContentUpdated
public Long getTimeContentUpdated()
- Returns:
- Last update of people in this custom audience
-
setTimeContentUpdated
public void setTimeContentUpdated(Long timeContentUpdated)
Last update of people in this custom audience
-
getTimeCreated
public Long getTimeCreated()
- Returns:
- Creation time
-
setTimeCreated
public void setTimeCreated(Long timeCreated)
Creation time
-
getTimeUpdated
public Long getTimeUpdated()
- Returns:
- Last time this audience metadata was updated
-
setTimeUpdated
public void setTimeUpdated(Long timeUpdated)
Last time this audience metadata was updated
-
-