# GenerateTypedContentRequestKt


```
public final class GenerateTypedContentRequestKt
```

<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/GenerateTypedContentRequest<@https://developer.android.com/reference/androidx/annotation/NonNull.html T>` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequestKt#generateTypedContentRequest(com.google.mlkit.genai.prompt.GenerateContentRequest,kotlin.reflect.KClass)( @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateContentRequest generateContentRequest, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull.html T> outputClass )` Helper method to construct a `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequest` in a DSL-like manner. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequest<@https://developer.android.com/reference/androidx/annotation/NonNull.html T>` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequestKt#generateTypedContentRequest(com.google.mlkit.genai.prompt.GenerateContentRequest,kotlin.reflect.KClass,kotlin.Boolean)( @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateContentRequest generateContentRequest, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull.html T> outputClass, boolean includeSchemaInPrompt )` Helper method to construct a `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequest` with the specified `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/package-summary#generateTypedContentRequest(com.google.mlkit.genai.prompt.GenerateContentRequest,kotlin.reflect.KClass,kotlin.Boolean)` flag. |

## Public methods

### generateTypedContentRequest

```
public static final @NonNull GenerateTypedContentRequest<@NonNull T> <T extends Object> generateTypedContentRequest(
    @NonNull GenerateContentRequest generateContentRequest,
    @NonNull KClass<@NonNull T> outputClass
)
```

Helper method to construct a `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequest` in a DSL-like manner.

This is an experimental feature.

Example Usage:

```
// Generation Request for typed content:
generateTypedContentRequest(request, MyClass::class) {
}
```

### generateTypedContentRequest

```
public static final @NonNull GenerateTypedContentRequest<@NonNull T> <T extends Object> generateTypedContentRequest(
    @NonNull GenerateContentRequest generateContentRequest,
    @NonNull KClass<@NonNull T> outputClass,
    boolean includeSchemaInPrompt
)
```

Helper method to construct a `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/GenerateTypedContentRequest` with the specified `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/package-summary#generateTypedContentRequest(com.google.mlkit.genai.prompt.GenerateContentRequest,kotlin.reflect.KClass,kotlin.Boolean)` flag.

This is an experimental feature.

Example Usage:

```
// Generation Request for typed content:
generateTypedContentRequest(request, MyClass::class, false)
```