public B member(ShapeId target, Consumer<MemberShape.Builder> memberUpdater) {
            if (getId() == null) {
                throw new IllegalStateException("An id must be set before setting a member with a target");
            }

            MemberShape.Builder builder = MemberShape.builder()
                    .target(target)
                    .id(getId().withMember("member"));

            if (memberUpdater != null) {
                memberUpdater.accept(builder);
            }

            return member(builder.build());
        }
Sets the member of the collection.

@param target Target of the member.
@param memberUpdater Consumer that can update the created member shape.
@return Returns the builder.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/CollectionShape.java