def __init__(self, locale, caseLevel=None, caseFirst=None, strength=None, numericOrdering=None, alternate=None, maxVariable=None, normalization=None, backwards=None, **kwargs): locale = common.validate_string('locale', locale) self.__document = {'locale': locale} if caseLevel is not None: self.__document['caseLevel'] = common.validate_boolean( 'caseLevel', caseLevel) if caseFirst is not None: self.__document['caseFirst'] = common.validate_string( 'caseFirst', caseFirst) if strength is not None: self.__document['strength'] = common.validate_integer( 'strength', strength) if numericOrdering is not None: self.__document['numericOrdering'] = common.validate_boolean( 'numericOrdering', numericOrdering) if alternate is not None: self.__document['alternate'] = common.validate_string( 'alternate', alternate) if maxVariable is not None: self.__document['maxVariable'] = common.validate_string( 'maxVariable', maxVariable) if normalization is not None: self.__document['normalization'] = common.validate_boolean( 'normalization', normalization) if backwards is not None: self.__document['backwards'] = common.validate_boolean( 'backwards', backwards) self.__document.update(kwargs)
def __init__(self, locale: str, caseLevel: Optional[bool] = None, caseFirst: Optional[str] = None, strength: Optional[int] = None, numericOrdering: Optional[bool] = None, alternate: Optional[str] = None, maxVariable: Optional[str] = None, normalization: Optional[bool] = None, backwards: Optional[bool] = None, **kwargs: Any) -> None: locale = common.validate_string("locale", locale) self.__document: Dict[str, Any] = {"locale": locale} if caseLevel is not None: self.__document["caseLevel"] = common.validate_boolean( "caseLevel", caseLevel) if caseFirst is not None: self.__document["caseFirst"] = common.validate_string( "caseFirst", caseFirst) if strength is not None: self.__document["strength"] = common.validate_integer( "strength", strength) if numericOrdering is not None: self.__document["numericOrdering"] = common.validate_boolean( "numericOrdering", numericOrdering) if alternate is not None: self.__document["alternate"] = common.validate_string( "alternate", alternate) if maxVariable is not None: self.__document["maxVariable"] = common.validate_string( "maxVariable", maxVariable) if normalization is not None: self.__document["normalization"] = common.validate_boolean( "normalization", normalization) if backwards is not None: self.__document["backwards"] = common.validate_boolean( "backwards", backwards) self.__document.update(kwargs)