docs: func (s *Shape) Clone(newName string) *Shape {
  	if s.AliasedShapeName {
  		panic(fmt.Sprintf("attempted to clone and rename %s, but flagged as aliased",
  			s.ShapeName))
  	}
  
  	n := new(Shape)
  	*n = *s
  
  	debugLogger.Logln("cloning", s.ShapeName, "to", newName)
  
  	n.MemberRefs = map[string]*ShapeRef{}
  	for k, r := range s.MemberRefs {
  		nr := new(ShapeRef)
  		*nr = *r
  		nr.Shape.refs = append(nr.Shape.refs, nr)
  		n.MemberRefs[k] = nr
  	}
  
  	if n.MemberRef.Shape != nil {
  		n.MemberRef.Shape.refs = append(n.MemberRef.Shape.refs, &n.MemberRef)
  	}
  	if n.KeyRef.Shape != nil {
  		n.KeyRef.Shape.refs = append(n.KeyRef.Shape.refs, &n.KeyRef)
  	}
  	if n.ValueRef.Shape != nil {
  		n.ValueRef.Shape.refs = append(n.ValueRef.Shape.refs, &n.ValueRef)
  	}
  
  	n.refs = []*ShapeRef{}
  
  	n.Required = append([]string{}, n.Required...)
  	n.Enum = append([]string{}, n.Enum...)
  	n.EnumConsts = append([]string{}, n.EnumConsts...)
  
  	n.OrigShapeName = n.ShapeName
  	n.API.Shapes[newName] = n
  	n.ShapeName = newName
  
  	return n
  }