public static ParameterType fromType(Type type) {
        if (type instanceof StringType) {
            return STRING;
        }
        if (type instanceof BooleanType) {
            return BOOLEAN;
        }
        if (type instanceof ArrayType) {
            ArrayType arrayType = (ArrayType) type;
            if (arrayType.getMember().isA(Type.stringType()) || arrayType.getMember().isA(Type.emptyType())) {
                return STRING_ARRAY;
            }
        }
        throw new RuntimeException(
                String.format("Unexpected parameter type `%s`. Expected a string, boolean, or array<string>.", type));
    }
Creates a {@link ParameterType} of a specific type from the given parameter Type.

@param type the Type to create from.
@return the created ParameterType.
@throws RuntimeException when the value would not create a valid ParameterType.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/parameters/ParameterType.java