protected function throwExceptionIfNotInitialized()
{
parent::throwExceptionIfNotInitialized();
if ($this->attachmentId === null) {
throw new Ec2Exception(sprintf('attachmentId has not been initialized for the "%s" yet.', get_class($this)));
}
}