@Override
        public Builder addMember(MemberShape member) {
            if (!member.getTarget().equals(UnitTypeTrait.UNIT)) {
                throw new SourceException(String.format(
                        "Enum members may only target `smithy.api#Unit`, but found `%s`",
                        member.getTarget()), getSourceLocation());
            }
            if (!member.hasTrait(EnumValueTrait.ID)) {
                member = member.toBuilder()
                        .addTrait(EnumValueTrait.builder().stringValue(member.getMemberName()).build())
                        .build();
            }
            members.get().put(member.getMemberName(), member);

            return this;
        }
Adds a member to the shape.

<p>If the member does not already have an {@link EnumValueTrait}, one will
be generated with the value being equal to the member name.

@param member Member to add to the shape.
@return Returns the model assembler.
@throws UnsupportedOperationException if the shape does not support members.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/EnumShape.java