Datastore/src/DatastoreClient.php
public function insert(EntityInterface $entity, array $options = [])
    {
        $res = $this->insertBatch([$entity], $options);
        return $this->parseSingleMutationResult($res);
    }
public function insert(EntityInterface $entity, array $options = [])
    {
        $res = $this->insertBatch([$entity], $options);
        return $this->parseSingleMutationResult($res);
    }
public function insert ( EntityInterface $ entity , array $ options = [ ] ) { $ res = $ this -> insertBatch ( [ $ entity ] , $ options ) ; return $ this -> parseSingleMutationResult ( $ res ) ; }
Insert an entity

An entity with incomplete keys will be allocated an ID prior to insertion.

Insert by this method is non-transactional. If you need transaction
support, use {@see Google\Cloud\Datastore\Transaction::insert()}.

Example:
```
$key = $datastore->key('Person', 'Bob');
$entity = $datastore->entity($key, ['firstName' => 'Bob']);

$datastore->insert($entity);
```

@see https://cloud.google.com/datastore/docs/reference/rest/v1/projects/commit Commit API documentation

@param EntityInterface $entity The entity to be inserted.
@param array $options [optional] Configuration options.
@return string The entity version.
@throws DomainException If a conflict occurs, fail.
Insert an entity