public class ContentMetadata
extends java.lang.Object
implements android.os.Parcelable
Class for describing metadata for a piece of content represented by a BranchUniversalObject
Modifier and Type | Class and Description |
---|---|
static class |
ContentMetadata.CONDITION |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
addressCity
City name associated with the qualifying content item
|
java.lang.String |
addressCountry
Country name associated with the qualifying content item
|
java.lang.String |
addressPostalCode
Postal code associated with the qualifying content item
|
java.lang.String |
addressRegion
Region or province name associated with the qualifying content item
|
java.lang.String |
addressStreet
Street address associated with the qualifying content item
|
ContentMetadata.CONDITION |
condition
Condition of the product item.
|
static android.os.Parcelable.Creator |
CREATOR |
CurrencyType |
currencyType
Currency type associated with the price
|
java.lang.Double |
latitude
Latitude value associated with the qualifying content item
|
java.lang.Double |
longitude
Latitude value associated with the qualifying content item
|
java.lang.Double |
price
Any price associated with the qualifying content item
|
java.lang.String |
productBrand
Any brand name associated with this metadata
|
ProductCategory |
productCategory
Category of product if this metadata is for a product
Value should be one of the enumeration from
ProductCategory |
java.lang.String |
productName
Name of any product specified by this metadata
|
java.lang.String |
productVariant
Variant of product if this metadata is for a product
|
java.lang.Double |
quantity
Quantity of the thing associated with the qualifying content item
|
java.lang.Double |
rating
Rating for the qualifying content item
|
java.lang.Double |
ratingAverage
Average rating for the qualifying content item
|
java.lang.Integer |
ratingCount
Total number of ratings for the qualifying content item
|
java.lang.Double |
ratingMax
Maximum ratings for the qualifying content item
|
java.lang.String |
sku
Holds any associated store keeping unit
|
Constructor and Description |
---|
ContentMetadata() |
Modifier and Type | Method and Description |
---|---|
ContentMetadata |
addCustomMetadata(java.lang.String key,
java.lang.String value)
Adds any custom metadata associated with the qualifying content item
|
ContentMetadata |
addImageCaptions(java.lang.String... captions)
Adds any image captions associated with the qualifying content item
|
org.json.JSONObject |
convertToJson() |
static ContentMetadata |
createFromJson(BranchUtil.JsonReader jsonReader) |
int |
describeContents() |
java.util.HashMap<java.lang.String,java.lang.String> |
getCustomMetadata()
Returns a Map of custom metadata associated with the qualifying content item
|
java.util.ArrayList<java.lang.String> |
getImageCaptions()
Gets the list of Image Captions
|
ContentMetadata |
setAddress(java.lang.String street,
java.lang.String city,
java.lang.String region,
java.lang.String country,
java.lang.String postalCode) |
ContentMetadata |
setContentSchema(BranchContentSchema contentSchema) |
ContentMetadata |
setLocation(java.lang.Double latitude,
java.lang.Double longitude) |
ContentMetadata |
setPrice(java.lang.Double price,
CurrencyType currency) |
ContentMetadata |
setProductBrand(java.lang.String productBrand) |
ContentMetadata |
setProductCategory(ProductCategory productCategory) |
ContentMetadata |
setProductCondition(ContentMetadata.CONDITION productCondition) |
ContentMetadata |
setProductName(java.lang.String productName) |
ContentMetadata |
setProductVariant(java.lang.String productVariant) |
ContentMetadata |
setQuantity(java.lang.Double quantity) |
ContentMetadata |
setRating(java.lang.Double rating,
java.lang.Double averageRating,
java.lang.Double maximumRating,
java.lang.Integer ratingCount) |
ContentMetadata |
setRating(java.lang.Double averageRating,
java.lang.Double maximumRating,
java.lang.Integer ratingCount)
Deprecated.
please use
setRating(Double, Double, Double, Integer) instead |
ContentMetadata |
setSku(java.lang.String sku) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public java.lang.Double quantity
public java.lang.Double price
public CurrencyType currencyType
public java.lang.String sku
public java.lang.String productName
public java.lang.String productBrand
public ProductCategory productCategory
ProductCategory
public ContentMetadata.CONDITION condition
ContentMetadata.CONDITION
public java.lang.String productVariant
public java.lang.Double rating
public java.lang.Double ratingAverage
public java.lang.Integer ratingCount
public java.lang.Double ratingMax
public java.lang.String addressStreet
public java.lang.String addressCity
public java.lang.String addressRegion
public java.lang.String addressCountry
public java.lang.String addressPostalCode
public java.lang.Double latitude
public java.lang.Double longitude
public static final android.os.Parcelable.Creator CREATOR
public ContentMetadata addImageCaptions(java.lang.String... captions)
captions
- String
image captionsContentMetadata
object for method chainingpublic ContentMetadata addCustomMetadata(java.lang.String key, java.lang.String value)
key
- Name of the custom datavalue
- Value for the custom dataContentMetadata
object for method chainingpublic ContentMetadata setContentSchema(BranchContentSchema contentSchema)
public ContentMetadata setQuantity(java.lang.Double quantity)
public ContentMetadata setAddress(java.lang.String street, java.lang.String city, java.lang.String region, java.lang.String country, java.lang.String postalCode)
public ContentMetadata setLocation(java.lang.Double latitude, java.lang.Double longitude)
public ContentMetadata setRating(java.lang.Double rating, java.lang.Double averageRating, java.lang.Double maximumRating, java.lang.Integer ratingCount)
public ContentMetadata setRating(java.lang.Double averageRating, java.lang.Double maximumRating, java.lang.Integer ratingCount)
setRating(Double, Double, Double, Integer)
insteadpublic ContentMetadata setPrice(java.lang.Double price, CurrencyType currency)
public ContentMetadata setProductBrand(java.lang.String productBrand)
public ContentMetadata setProductCategory(ProductCategory productCategory)
public ContentMetadata setProductCondition(ContentMetadata.CONDITION productCondition)
public ContentMetadata setProductName(java.lang.String productName)
public ContentMetadata setProductVariant(java.lang.String productVariant)
public ContentMetadata setSku(java.lang.String sku)
public java.util.ArrayList<java.lang.String> getImageCaptions()
ArrayList
containing the collection of image captionspublic java.util.HashMap<java.lang.String,java.lang.String> getCustomMetadata()
HashMap
custom metadata keys and valuespublic org.json.JSONObject convertToJson()
public static ContentMetadata createFromJson(BranchUtil.JsonReader jsonReader)
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable