public static EndpointRuleSet fromNode(Node node) throws RuleError {
        return RuleError.context("when parsing endpoint ruleset", () -> {
            ObjectNode objectNode = node.expectObjectNode("The root of a ruleset must be an object");

            EndpointRuleSet.Builder builder = new Builder(node);
            builder.parameters(Parameters.fromNode(objectNode.expectObjectMember(PARAMETERS)));
            objectNode.expectStringMember(VERSION, builder::version);

            for (Node element : objectNode.expectArrayMember(RULES).getElements()) {
                builder.addRule(context("while parsing rule", element, () -> EndpointRule.fromNode(element)));
            }

            return builder.build();
        });
    }
Creates an {@link EndpointRuleSet} of a specific type from the given Node information.

@param node the node to deserialize.
@return the created EndpointRuleSet.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/EndpointRuleSet.java