# TextPart


```
public final class TextPart extends Part
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [com.google.mlkit.genai.embedding.Part](https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/Part) ||
|   | ↳ | [com.google.mlkit.genai.embedding.TextPart](https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/TextPart) |

*** ** * ** ***

A class representing a text part of `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/Content` for embedding.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/TextPart#TextPart(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html textString)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/TextPart#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/TextPart#getTextString()()` The text content of this part. |
| `int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/TextPart#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/TextPart#toString()()` |

## Public constructors

### TextPart

```
public TextPart(@NonNull String textString)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getTextString

```
public final @NonNull String getTextString()
```

The text content of this part.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```