@SmithyInternalApi
    public static void injectTagsMember(
            CfnConfig config,
            Model model,
            ResourceShape resource,
            StructureShape.Builder builder
    ) {
        String tagMemberName = getTagMemberName(config, resource);
        if (resource.hasTrait(TaggableTrait.ID)) {
            AwsTagIndex tagIndex = AwsTagIndex.of(model);
            TaggableTrait trait = resource.expectTrait(TaggableTrait.class);
            CfnResourceIndex resourceIndex = CfnResourceIndex.of(model);
            CfnResource cfnResource = resourceIndex.getResource(resource).get();

            if (!trait.getProperty().isPresent() || !cfnResource.getProperties()
                    .containsKey(trait.getProperty().get())) {
                if (trait.getProperty().isPresent()) {
                    ShapeId definition = resource.getProperties().get(trait.getProperty().get());
                    builder.addMember(tagMemberName, definition);
                } else {
                    // A valid TagResource operation certainly has a single tags input member.
                    Optional<ShapeId> tagOperation = tagIndex.getTagResourceOperation(resource.getId());
                    MemberShape member = tagIndex.getTagsMember(tagOperation.get()).get();
                    member = member.toBuilder().id(builder.getId().withMember(tagMemberName)).build();
                    builder.addMember(member);
                }
            }
        }
    }
Generates the resource's Tagging configuration based on the AwsTagIndex, including
the tagging property and operations that interact with tags.

@see <a href="https://github.com/aws-cloudformation/cloudformation-cli/blob/master/src/rpdk/core/data/schema/provider.definition.schema.v1.json#L198">permissions property definition</a>
smithy-aws-cloudformation/src/main/java/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/TaggingMapper.java