-
- All Implemented Interfaces:
-
android.os.Parcelable
public class ContentMetadata implements Parcelable
Created by sojanpr on 7/25/17.
Class for describing metadata for a piece of content represented by a io.branch.indexing.BranchUniversalObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumContentMetadata.CONDITION
-
Field Summary
Fields Modifier and Type Field Description BranchContentSchemacontentSchemapublic Doublequantitypublic Doublepricepublic CurrencyTypecurrencyTypepublic Stringskupublic StringproductNamepublic StringproductBrandpublic ProductCategoryproductCategorypublic ContentMetadata.CONDITIONconditionpublic StringproductVariantpublic Doubleratingpublic DoubleratingAveragepublic IntegerratingCountpublic DoubleratingMaxpublic StringaddressStreetpublic StringaddressCitypublic StringaddressRegionpublic StringaddressCountrypublic StringaddressPostalCodepublic Doublelatitudepublic Doublelongitudeprivate final ArrayList<String>imageCaptionsprivate final HashMap<String, String>customMetadatapublic final static Parcelable.CreatorCREATOR
-
Constructor Summary
Constructors Constructor Description ContentMetadata()
-
Method Summary
-
-
Method Detail
-
setContentSchema
ContentMetadata setContentSchema(BranchContentSchema contentSchema)
-
setQuantity
ContentMetadata setQuantity(Double quantity)
-
setPrice
ContentMetadata setPrice(Double price, @Nullable() CurrencyType currency)
-
setSku
ContentMetadata setSku(String sku)
-
setProductName
ContentMetadata setProductName(String productName)
-
setProductBrand
ContentMetadata setProductBrand(String productBrand)
-
setProductCategory
ContentMetadata setProductCategory(ProductCategory productCategory)
-
setProductVariant
ContentMetadata setProductVariant(String productVariant)
-
setRating
ContentMetadata setRating(@Nullable() Double rating, @Nullable() Double averageRating, @Nullable() Double maximumRating, @Nullable() Integer ratingCount)
-
getImageCaptions
ArrayList<String> getImageCaptions()
Gets the list of Image Captions
-
getCustomMetadata
HashMap<String, String> getCustomMetadata()
Returns a Map of custom metadata associated with the qualifying content item
-
addImageCaptions
ContentMetadata addImageCaptions(Array<String> captions)
Adds any image captions associated with the qualifying content item
- Parameters:
captions- String image captions
-
addCustomMetadata
ContentMetadata addCustomMetadata(String key, String value)
Adds any custom metadata associated with the qualifying content item
- Parameters:
key- Name of the custom datavalue- Value for the custom data
-
setAddress
ContentMetadata setAddress(@Nullable() String street, @Nullable() String city, @Nullable() String region, @Nullable() String country, @Nullable() String postalCode)
-
setLocation
ContentMetadata setLocation(@Nullable() Double latitude, @Nullable() Double longitude)
-
setProductCondition
ContentMetadata setProductCondition(ContentMetadata.CONDITION productCondition)
-
convertToJson
JSONObject convertToJson()
-
createFromJson
static ContentMetadata createFromJson(BranchUtil.JsonReader jsonReader)
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
-
-
-