public static class AmazonPlaybackEvent.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
AmazonPlaybackEvent |
buildActiveEvent()
Converts the builder to an instance of an actively occurring event.
|
AmazonPlaybackEvent |
buildOffDeviceEvent()
Converts the builder to an instance of an off device playback event.
|
AmazonPlaybackEvent.Builder |
contentId(AmazonContentId contentId)
Sets the ID of the content being played.
|
AmazonPlaybackEvent.Builder |
creditsPositionMs(long creditsPositionMs)
Sets the position of the credits in the content, offset from 0.
|
AmazonPlaybackEvent.Builder |
durationMs(long durationMs)
Sets the duration of the content.
|
AmazonPlaybackEvent.Builder |
eventTimestampMs(long eventTimestampMs)
Sets the timestamp of when the playback event occurred.
|
AmazonPlaybackEvent.Builder |
liveStationId(AmazonContentId liveStationId)
Sets the ID of the linear station the content is playing on.
|
AmazonPlaybackEvent.Builder |
playbackPositionMs(long playbackPositionMs)
Sets the customer's current position in playback, offset from 0.
|
AmazonPlaybackEvent.Builder |
profileId(AmazonProfileId profileId)
Sets the associated profileId of the user who is watching the content.
|
AmazonPlaybackEvent.Builder |
state(int state)
Sets the customer's current viewing state of the content.
|
public AmazonPlaybackEvent.Builder contentId(AmazonContentId contentId)
contentId
- ID object.public AmazonPlaybackEvent.Builder liveStationId(AmazonContentId liveStationId)
liveStationId
- ID object.public AmazonPlaybackEvent.Builder durationMs(long durationMs)
durationMs
- duration of the content in milliseconds.public AmazonPlaybackEvent.Builder playbackPositionMs(long playbackPositionMs)
playbackPositionMs
- current position in milliseconds.public AmazonPlaybackEvent.Builder creditsPositionMs(long creditsPositionMs)
creditsPositionMs
- credits position in milliseconds.public AmazonPlaybackEvent.Builder eventTimestampMs(long eventTimestampMs)
eventTimestampMs
- timestamp represented in millisecond format.public AmazonPlaybackEvent.Builder state(int state)
AmazonPlaybackState
for possible options. This field is always required.state
- current playback state of the content. See AmazonPlaybackState
.public AmazonPlaybackEvent.Builder profileId(AmazonProfileId profileId)
profileId
- An obfuscated profile ID.public AmazonPlaybackEvent buildActiveEvent() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if data is missing required fields or fails basic data validation.public AmazonPlaybackEvent buildOffDeviceEvent()
java.lang.IllegalArgumentException
- if data is missing required fields or fails basic data validation.