Content.Builder

class Content.Builder


Builder for Content.

Summary

Public constructors

Public functions

Content.Builder

Adds a Part to the content.

Content
Content.Builder

Convenience method to add an ImagePart.

Content.Builder
parts(vararg part: Part)

Adds multiple Part objects to the content.

Content.Builder

Convenience method to add a TextPart.

Public constructors

Builder

Builder()

Public functions

addPart

@CanIgnoreReturnValue
fun addPart(part: Part): Content.Builder

Adds a Part to the content.

build

fun build(): Content

image

@CanIgnoreReturnValue
fun image(bitmap: Bitmap): Content.Builder

Convenience method to add an ImagePart.

parts

fun parts(vararg part: Part): Content.Builder

Adds multiple Part objects to the content.

text

@CanIgnoreReturnValue
fun text(text: String): Content.Builder

Convenience method to add a TextPart.