public function setIpAddress($ipAddress = null)
{
// validation for constraint: maxLength
if (is_scalar($ipAddress) && strlen($ipAddress) > 35 || is_array($ipAddress) && count($ipAddress) > 35) {
throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($ipAddress) ? strlen($ipAddress) : count($ipAddress)), __LINE__);
}
// validation for constraint: minLength
if (is_scalar($ipAddress) && strlen($ipAddress) < 1 || is_array($ipAddress) && count($ipAddress) < 1) {
throw new \InvalidArgumentException('Invalid length, please provide an array with 1 element(s) or a scalar of 1 character(s) at least', __LINE__);
}
// validation for constraint: string
if (!is_null($ipAddress) && !is_string($ipAddress)) {
throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($ipAddress)), __LINE__);
}
$this->ipAddress = $ipAddress;
return $this;
}