ObjectNode extends Node implements ToSmithyBuilder<ObjectNode> { public StringNode expectStringMember(String name) { return expectMember(name) .expectStringNode(format("Expected `%s` member to be a string, but found {type}.", name)); } ObjectNode(Map<StringNode, Node> members, SourceLocation sourceLocation);   ObjectNode(Map<StringNode, Node> nodeMap, SourceLocation sourceLocation, boolean defensiveCopy); static ObjectNode fromStringMap(Map<String, String> map); @Override NodeType getType(); @Override R accept(NodeVisitor<R> visitor); @Override ObjectNode expectObjectNode(String errorMessage); @Override Optional<ObjectNode> asObjectNode(); ObjectNode withMember(StringNode key, T value); ObjectNode withMember(String key, T value); ObjectNode withMember(String key, String value); ObjectNode withMember(String key, boolean value); ObjectNode withMember(String key, Number value); ObjectNode withOptionalMember(String key, Optional<T> value); ObjectNode withoutMember(String memberName); Map<StringNode, Node> getMembers(); boolean containsMember(String memberName); Optional<Node> getMember(String memberName); Map<String, Node> getMembersByPrefix(String prefix); Map<String, Node> getStringMap(); Optional<StringNode> getStringMember(String memberName); String getStringMemberOrDefault(String memberName, String defaultValue); Optional<NumberNode> getNumberMember(String memberName); Number getNumberMemberOrDefault(String memberName, Number defaultValue); Optional<ArrayNode> getArrayMember(String memberName); Optional<ObjectNode> getObjectMember(String memberName); Optional<BooleanNode> getBooleanMember(String memberName); Boolean getBooleanMemberOrDefault(String memberName, Boolean defaultValue); boolean getBooleanMemberOrDefault(String memberName); Node expectMember(String name); Node expectMember(String name, String errorMessage); ArrayNode expectArrayMember(String name); BooleanNode expectBooleanMember(String name); NullNode expectNullMember(String name); NumberNode expectNumberMember(String name); ObjectNode expectObjectMember(String name); StringNode expectStringMember(String name); ObjectNode expectNoAdditionalProperties(Collection<String> allowedProperties); ObjectNode warnIfAdditionalProperties(Collection<String> allowedProperties); boolean isEmpty(); int size(); ObjectNode merge(ObjectNode other); static Collector<T, Map<StringNode, Node>, ObjectNode> collect(
            Function<T, StringNode> keyMapper,
            Function<T, ToNode> valueMapper
    ); static Collector<T, Map<StringNode, Node>, ObjectNode> collectStringKeys(
            Function<T, String> keyMapper,
            Function<T, ToNode> valueMapper
    ); @Override boolean equals(Object other); @Override int hashCode(); @Override Builder toBuilder();  }
@Test public void expectsStringMember() { EXPECTATION_NODE.expectStringMember("string"); Assertions.assertThrows(ExpectationNotMetException.class, () -> { EXPECTATION_NODE.expectStringMember("object"); }); }