private Collection<MemberShape> getMembers() {
        return switch (listingType) {
            case INPUT -> context.model()
                    .expectShape(shape.asOperationShape().get().getInputShape())
                    .getAllMembers()
                    .values();
            case OUTPUT -> context.model()
                    .expectShape(shape.asOperationShape().get().getOutputShape())
                    .getAllMembers()
                    .values();
            case RESOURCE_IDENTIFIERS -> synthesizeResourceMembers(shape.asResourceShape().get().getIdentifiers());
            case RESOURCE_PROPERTIES -> synthesizeResourceMembers(shape.asResourceShape().get().getProperties());
            default -> shape.getAllMembers().values();
        };
    }
Constructs a MemberGenerator.

@param context The context used to generate documentation.
@param writer The writer to write to.
@param shape The shape whose members are being generated.
@param listingType The type of listing being generated.
smithy-docgen/src/main/java/software/amazon/smithy/docgen/generators/MemberGenerator.java