Program.Builder


class Program.Builder


This Builder class simplifies the creation of a Program object.

Summary

Public constructors

Creates a new Builder object.

Builder(other: Program!)

Creates a new Builder object with values copied from another Program.

Public functions

Program!
Program.Builder!

Sets the broadcast-specified genres of the program.

Program.Builder!
setChannelId(channelId: Long)

Sets the ID of the Channel that contains this program.

Program.Builder!
setEndTimeUtcMillis(endTimeUtcMillis: Long)

Sets the time when this program is going to end in milliseconds since the epoch.

Program.Builder
setEventId(eventId: Int)

Sets the event ID for this program.

Program.Builder
setGlobalContentId(globalContentId: String?)

Sets the global content ID for this program.

Program.Builder!

Sets whether this program cannot be recorded.

Program.Builder!
setStartTimeUtcMillis(startTimeUtcMillis: Long)

Sets the time when the program is going to begin in milliseconds since the epoch.

Public constructors

Builder

Added in 1.1.0-alpha02
Builder()

Creates a new Builder object.

Builder

Added in 1.1.0-alpha02
Builder(other: Program!)

Creates a new Builder object with values copied from another Program.

Parameters
other: Program!

The Program you're copying from.

Public functions

build

Added in 1.1.0-alpha02
fun build(): Program!
Returns
Program!

A new Program with values supplied by the Builder.

setBroadcastGenres

Added in 1.1.0-alpha02
fun setBroadcastGenres(genres: Array<String!>!): Program.Builder!

Sets the broadcast-specified genres of the program.

Parameters
genres: Array<String!>!

Array of genres that apply to the program based on the broadcast standard which will be flattened to a String to store in a database.

Returns
Program.Builder!

This Builder object to allow for chaining of calls to builder methods.

setChannelId

Added in 1.1.0-alpha02
fun setChannelId(channelId: Long): Program.Builder!

Sets the ID of the Channel that contains this program.

setEndTimeUtcMillis

Added in 1.1.0-alpha02
fun setEndTimeUtcMillis(endTimeUtcMillis: Long): Program.Builder!

Sets the time when this program is going to end in milliseconds since the epoch.

Parameters
endTimeUtcMillis: Long

The value of COLUMN_END_TIME_UTC_MILLIS for the program.

Returns
Program.Builder!

This Builder object to allow for chaining of calls to builder methods.

setEventId

Added in 1.1.0-alpha02
fun setEventId(eventId: Int): Program.Builder

Sets the event ID for this program.

No-op on devices prior to R.

Parameters
eventId: Int

The value of COLUMN_EVENT_ID for the program.

Returns
Program.Builder

This Builder object to allow for chaining of calls to builder methods.

setGlobalContentId

Added in 1.1.0-alpha02
fun setGlobalContentId(globalContentId: String?): Program.Builder

Sets the global content ID for this program.

No-op on devices prior to R.

Parameters
globalContentId: String?

The value of COLUMN_GLOBAL_CONTENT_ID for the program.

Returns
Program.Builder

This Builder object to allow for chaining of calls to builder methods.

setRecordingProhibited

Added in 1.1.0-alpha02
fun setRecordingProhibited(prohibited: Boolean): Program.Builder!

Sets whether this program cannot be recorded.

Parameters
prohibited: Boolean

The value of COLUMN_RECORDING_PROHIBITED for the program.

Returns
Program.Builder!

This Builder object to allow for chaining of calls to builder methods.

setStartTimeUtcMillis

Added in 1.1.0-alpha02
fun setStartTimeUtcMillis(startTimeUtcMillis: Long): Program.Builder!

Sets the time when the program is going to begin in milliseconds since the epoch.

Parameters
startTimeUtcMillis: Long

The value of COLUMN_START_TIME_UTC_MILLIS for the program.

Returns
Program.Builder!

This Builder object to allow for chaining of calls to builder methods.