public function setInternalId($id)
    {
        if ($this->_id !== null && $this->_id !== $id) {
            throw new ClientException('Should not update the id of an existing document');
        }


        if (!preg_match('/^[a-zA-Z0-9_-]{1,64}\/[a-zA-Z0-9_:.@\-()+,=;$!*\'%]{1,254}$/', $id)) {
            throw new ClientException('Invalid format for document id');
        }

        $this->_id = (string) $id;
    }
public function setInternalId($id)
    {
        if ($this->_id !== null && $this->_id !== $id) {
            throw new ClientException('Should not update the id of an existing document');
        }


        if (!preg_match('/^[a-zA-Z0-9_-]{1,64}\/[a-zA-Z0-9_:.@\-()+,=;$!*\'%]{1,254}$/', $id)) {
            throw new ClientException('Invalid format for document id');
        }

        $this->_id = (string) $id;
    }
public function setInternalId ( $ id ) { if ( $ this -> _id !== null && $ this -> _id !== $ id ) { throw new ClientException ( 'Should not update the id of an existing document' ) ; } if ( ! preg_match ( '/^[a-zA-Z0-9_-]{1,64}\/[a-zA-Z0-9_:.@\-()+,=;$!*\'%]{1,254}$/' , $ id ) ) { throw new ClientException ( 'Invalid format for document id' ) ; } $ this -> _id = ( string ) $ id ; }
Set the internal document id

This will throw if the id of an existing document gets updated to some other id

@throws ClientException

@param string $id - internal document id

@return void
Set the internal document id