# BsonObjectId


```
public final class BsonObjectId
```

<br />

*** ** * ** ***

Represents a BSON ObjectId type in Firestore documents.

## Summary

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/kotlin/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/BsonObjectId#value()` |

| ### Public constructors |
|---|
| `https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/BsonObjectId#BsonObjectId(java.lang.String)(@https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://developer.android.com/reference/kotlin/java/lang/String.html oid)` Constructor that creates a new BSON ObjectId value with the given value. |

| ### Public methods |
|---|---|
| `boolean` | `https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/BsonObjectId#equals(java.lang.Object)(https://developer.android.com/reference/kotlin/java/lang/Object.html obj)` Returns true if this BsonObjectId is equal to the provided object. |
| `int` | `https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/BsonObjectId#hashCode()()` |
| `https://developer.android.com/reference/kotlin/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/BsonObjectId#toString()()` |

## Public fields

### value

```
public final String value
```

## Public constructors

### BsonObjectId

```
public BsonObjectId(@NonNull String oid)
```

Constructor that creates a new BSON ObjectId value with the given value.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html https://developer.android.com/reference/kotlin/java/lang/String.html oid` | The 24-character hex string representing the ObjectId. |

## Public methods

### equals

```
public boolean equals(Object obj)
```

Returns true if this BsonObjectId is equal to the provided object.

| Parameters |
|---|---|
| `https://developer.android.com/reference/kotlin/java/lang/Object.html obj` | The object to compare against. |

| Returns |
|---|---|
| `boolean` | Whether this BsonObjectId is equal to the provided object. |

### hashCode

```
public int hashCode()
```

### toString

```
public String toString()
```