@Override
    public Map<String, MemberShape> getAllMembers() {
        Map<String, MemberShape> result = memberMap;

        // Create a two-entry map that only knows about "key" and "value".
        if (result == null) {
            result = new AbstractMap<String, MemberShape>() {
                private transient Set<Entry<String, MemberShape>> entries;
                private transient List<MemberShape> values;

                @Override
                public MemberShape get(Object keyName) {
                    if ("key".equals(keyName)) {
                        return key;
                    } else if ("value".equals(keyName)) {
                        return value;
                    } else {
                        return null;
                    }
                }

                @Override
                public boolean containsKey(Object keyName) {
                    return "key".equals(keyName) || "value".equals(keyName);
                }

                @Override
                public Set<String> keySet() {
                    return SetUtils.of("key", "value");
                }

                @Override
                public Collection<MemberShape> values() {
                    List<MemberShape> result = values;
                    if (result == null) {
                        result = ListUtils.of(key, value);
                        values = result;
                    }
                    return result;
                }

                @Override
                public Set<Entry<String, MemberShape>> entrySet() {
                    Set<Entry<String, MemberShape>> result = entries;
                    if (result == null) {
                        result = SetUtils.of(Pair.of("key", key), Pair.of("value", value));
                        entries = result;
                    }
                    return result;
                }
            };
            memberMap = result;
        }

        return result;
    }
Get the key member shape of the map.

@return Returns the key member shape.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/MapShape.java