'will check if value (or all values in it ) are in allowed values
will raise an exception if value is "out of range"
if bool(allowedValue) == False a check is not performed and all values are excepted'

def _check_param_value(self, value, name, allowedValues):

    if allowedValues:
        error = False
        if isinstance(value, list):
            for item in value:
                if (not (item in allowedValues)):
                    error = True
        elif (not (value in allowedValues)):
            error = True
        if error:
            raise ApiError(((((((u"param:    '" + str(name)) + u"'    with    given    value:    '") + str(value)) + u"'    is    out    of    allowed    range    '") + str(allowedValues)) + u"'"))
