Interface IContentEntitlementBuilder
interface IContentEntitlementBuilder
Extends com.amazon.apmf.IStandard
Builder interface to create a ContentEntitlement object.
Methods
acquisitionTimestamp()
Sets the date the entitlement was acquired.IContentEntitlementBuilder*acquisitionTimestamp(com.amazon.apmf.RealTimeInstantacquisitionTimestamp)
Parameters
acquisitionTimestamp
com.amazon.apmf.RealTimeInstant — Required
Acquisition date in time since epoch.
Returns
IContentEntitlementBuilder*
a non-null pointer to the current IContentEntitlementBuilder instance.
Throws
InvalidArgumentError— if theacquisitionTimestampis less than 0.
contentId()
Sets the ID of the content entitlement resolvable in the Amazon catalog. This is a required field.IContentEntitlementBuilder*contentId(IContentId*contentId)
build() will fail if this field is not set.
Parameters
contentId
IContentId* — Required
ID of the content entitlement resolvable in the Amazon catalog.
Returns
IContentEntitlementBuilder*
a non-null pointer to the current IContentEntitlementBuilder instance.
expirationTimestamp()
Sets date of expiration for the entitlement.IContentEntitlementBuilder*expirationTimestamp(com.amazon.apmf.RealTimeInstantexpirationTimestamp)
Parameters
expirationTimestamp
com.amazon.apmf.RealTimeInstant — Required
Expiration date in time since epoch.
Value of to 0 implies no expiration.
Returns
IContentEntitlementBuilder*
a non-null pointer to the current IContentEntitlementBuilder instance.
Throws
InvalidArgumentError— if the expirationTimestamp is less than 0.
entitlementType()
Sets type of entitlement. This is a required field.IContentEntitlementBuilder*entitlementType(EntitlementTypeEnumentitlementType)
build() will fail if this field is not set.
Parameters
entitlementType
EntitlementTypeEnum — Required
The type of entitlement.
Returns
IContentEntitlementBuilder*
a non-null pointer to the current IContentEntitlementBuilder instance.
build()
Builds aIContentEntitlement*build()
ContentEntitlement object with the fields set on the builder.
Returns
IContentEntitlement*
a non-null pointer to the IContentEntitlement object created.
Throws
ObjectCreationError— if required fields are not set.

