# BsonObjectId


```
class BsonObjectId
```

<br />

*** ** * ** ***

Represents a BSON ObjectId type in Firestore documents.

## Summary

| ### Public constructors |
|---|
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/firestore/BsonObjectId#BsonObjectId(java.lang.String)(oid: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Constructor that creates a new BSON ObjectId value with the given value. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/firestore/BsonObjectId#equals(java.lang.Object)(obj: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html!)` Returns true if this BsonObjectId is equal to the provided object. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/firestore/BsonObjectId#hashCode()()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/firestore/BsonObjectId#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/firestore/BsonObjectId#value()` |

## Public constructors

### BsonObjectId

```
BsonObjectId(oid: String)
```

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

| Parameters |
|---|---|
| `oid: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The 24-character hex string representing the ObjectId. |

## Public functions

### equals

```
fun equals(obj: Any!): Boolean
```

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

| Parameters |
|---|---|
| `obj: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html!` | The object to compare against. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | Whether this BsonObjectId is equal to the provided object. |

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String!
```

## Public properties

### value

```
val value: String!
```