Api\StructType\ApiItem::setId PHP Method

setId() public method

Set id value
public setId ( string $id = null ) : ApiItem
$id string
return ApiItem
    public function setId($id = null)
    {
        // validation for constraint: string
        if (!is_null($id) && !is_string($id)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($id)), __LINE__);
        }
        $this->id = $id;
        return $this;
    }