def METHOD_NAME(cls, v):
    instance = OneOfEnumString.construct()
    error_messages = []
    match = 0
    # validate data type: EnumString1
    if not isinstance(v, EnumString1):
        error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString1`")
    else:
        match += 1
    # validate data type: EnumString2
    if not isinstance(v, EnumString2):
        error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString2`")
    else:
        match += 1
    if match > 1:
        # more than 1 match
        raise ValueError("Multiple matches found when setting `actual_instance` in OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages))
    elif match == 0:
        # no match
        raise ValueError("No match found when setting `actual_instance` in OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages))
    else:
        return v