@Override
        public Set<ShapeId> structureShape(StructureShape shape) {
            Set<ShapeId> excludedShapes = new HashSet<>();
            for (MemberShape member : shape.members()) {
                if (member.hasTrait(CfnExcludePropertyTrait.ID)) {
                    excludedShapes.add(member.getId());
                } else if (!propertyBindingIndex.doesMemberShapeRequireProperty(member)) {
                    excludedShapes.add(member.getId());
                } else {
                    excludedShapes.addAll(model.expectShape(member.getTarget()).accept(this));
                }
            }
            return excludedShapes;
        }
Gets the definition of the specified CloudFormation resource.

@param resource ShapeID of a resource
@return The resource definition.
smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java