MemberShape extends Shape implements ToSmithyBuilder<MemberShape> { public static Builder builder() { return new Builder(); } private  MemberShape(Builder builder); static Builder builder(); @Override Builder toBuilder(); ShapeId getContainer(); @Override R accept(ShapeVisitor<R> cases); @Override Optional<MemberShape> asMemberShape(); ShapeId getTarget(); String getMemberName(); boolean isRequired(); boolean isOptional(); @Override boolean equals(Object other); @Override Optional<T> getMemberTrait(Model model, Class<T> trait); @Override Optional<Trait> findMemberTrait(Model model, String traitName);  }
@Test public void mustContainMembersInShapeId() { Assertions.assertThrows(SourceException.class, () -> { MemberShape.builder().id("ns.foo#bar").target("ns.foo#bar").build(); }); }
@Test public void returnsType() { MemberShape shape = MemberShape.builder() .id(ShapeId.from("ns.foo#bar$baz")) .target("ns.foo#baz") .build(); assertEquals(ShapeType.MEMBER, shape.getType()); }
@Test public void requiresShapeTargetId() { Assertions.assertThrows(IllegalStateException.class, () -> { MemberShape.builder().id("ns.foo#bar$baz").build(); }); }