# ContentKt


```
public final class ContentKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/ContentKt#content(kotlin.Function1)( @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/androidx/annotation/NonNull.html Function1<@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Builder, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> init )` Helper function for DSL-like syntax to construct `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content` with default `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Role#USER()` role. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/ContentKt#content(kotlin.Int,kotlin.Function1)( @https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Role int role, @https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html @https://developer.android.com/reference/androidx/annotation/NonNull.html Function1<@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Builder, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html> init )` Helper function for DSL-like syntax to construct `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content` with specified `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Role`. |

## Public methods

### content

```
public static final @NonNull Content content(
    @ExtensionFunctionType @NonNull Function1<@NonNull Content.Builder, Unit> init
)
```

Helper function for DSL-like syntax to construct `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content` with default `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Role#USER()` role.

### content

```
public static final @NonNull Content content(
    @Content.Role int role,
    @ExtensionFunctionType @NonNull Function1<@NonNull Content.Builder, Unit> init
)
```

Helper function for DSL-like syntax to construct `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content` with specified `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Content.Role`.