public static ParameterType fromNode(Node node) throws RuleError {
        if (node.isStringNode()) {
            return STRING;
        }
        if (node.isBooleanNode()) {
            return BOOLEAN;
        }
        if (node.isArrayNode()) {
            // confirm all elements are Strings
            node.expectArrayNode().getElements().forEach(memberNode -> {
                if (!memberNode.isStringNode()) {
                    throw new RuleError(new SourceException(
                            String.format("Unexpected array member parameter type `%s`. Expected a string.",
                                    memberNode.getType()),
                            memberNode));
                }
            });
            return STRING_ARRAY;
        }
        throw new RuleError(new SourceException(
                String.format("Unexpected parameter type `%s`. Expected a string or boolean.", node.getType()),
                node));
    }
Creates a {@link ParameterType} of a specific type from the given Node type.

@param node the node to deserialize.
@return the created ParameterType.
@throws RuleError when the node would not create a valid ParameterType.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/parameters/ParameterType.java