Firestore/src/Transaction.php
public function set(DocumentReference $document, array $fields, array $options = [])
    {
        $this->writer->set($document->name(), $fields, $options);

        return $this;
    }
public function set(DocumentReference $document, array $fields, array $options = [])
    {
        $this->writer->set($document->name(), $fields, $options);

        return $this;
    }
public function set ( DocumentReference $ document , array $ fields , array $ options = [ ] ) { $ this -> writer -> set ( $ document -> name ( ) , $ fields , $ options ) ; return $ this ; }
Enqueue an operation to modify or replace a Firestore document.

Example:
```
// In this example, all field not explicitly specified will be removed.
$transaction->set($document, [
'name' => 'Johnny'
]);
```

```
// To specify MERGE over REPLACE, set `$options.merge` to `true`.
$transaction->set($document, [
'name' => 'Johnny'
], [
'merge' => true
]);
```

@param DocumentReference $document The document to modify or replace.
@param array $fields An array containing fields, where keys are the field
names, and values are field values. Nested arrays are allowed.
Note that unlike {@see Google\Cloud\Firestore\Transaction::update()},
field paths are NOT supported by this method.
@param array $options {
Configuration options.

@type bool $merge If true, unwritten fields will be preserved.
Otherwise, they will be overwritten (removed). **Defaults to**
`false`.
}
@return Transaction
Enqueue an operation to modify or replace a Firestore document .