Builder


class Builder
kotlin.Any
   ↳ android.app.personalcontext.hint.ChatMessageContextData.Builder

Builder for ChatMessageContextData.

Summary

Public constructors

Public methods
ChatMessageContextData

Builds the ChatMessageContextData.

ChatMessageContextData.Builder

Sets the AutofillId of the view that this message corresponds to.

ChatMessageContextData.Builder
setRawDateString(rawDateString: String)

Sets a user-friendly string representing the date of the message (e.g., "Today").

ChatMessageContextData.Builder
setRawTimeString(rawTimeString: String)

Sets a user-friendly string representing the time of the message (e.g., "10:00 AM").

Public constructors

Builder

Builder()

Public methods

build

fun build(): ChatMessageContextData

Builds the ChatMessageContextData.

Return
ChatMessageContextData This value cannot be null.
Exceptions
java.lang.NullPointerException if any of setRawTimeString(String), setRawDateString(String), and setAutofillId(AutofillId) are not set.

setAutofillId

fun setAutofillId(autofillId: AutofillId): ChatMessageContextData.Builder

Sets the AutofillId of the view that this message corresponds to.

This is a required builder input.

Parameters
autofillId AutofillId: This value cannot be null.
Return
ChatMessageContextData.Builder This value cannot be null.

setRawDateString

fun setRawDateString(rawDateString: String): ChatMessageContextData.Builder

Sets a user-friendly string representing the date of the message (e.g., "Today").

This is a required builder input and should be a string that is copied directly from the message view and provided as-is.

Parameters
rawDateString String: This value cannot be null.
Return
ChatMessageContextData.Builder This value cannot be null.

setRawTimeString

fun setRawTimeString(rawTimeString: String): ChatMessageContextData.Builder

Sets a user-friendly string representing the time of the message (e.g., "10:00 AM").

This is a required builder input and should be a string that is copied directly from the message view and provided as-is.

Parameters
rawTimeString String: This value cannot be null.
Return
ChatMessageContextData.Builder This value cannot be null.