docs: func (ref *ShapeRef) GoTags(toplevel bool, isRequired bool) string {
  	tags := ShapeTags{}
  
  	if ref.Location != "" {
  		tags = append(tags, ShapeTag{"location", ref.Location})
  	} else if ref.Shape.Location != "" {
  		tags = append(tags, ShapeTag{"location", ref.Shape.Location})
  	} else if ref.IsEventHeader {
  		tags = append(tags, ShapeTag{"location", "header"})
  	}
  
  	if ref.LocationName != "" {
  		tags = append(tags, ShapeTag{"locationName", ref.LocationName})
  	} else if ref.Shape.LocationName != "" {
  		tags = append(tags, ShapeTag{"locationName", ref.Shape.LocationName})
  	} else if len(ref.Shape.EventFor) != 0 && ref.API.Metadata.Protocol == "rest-xml" {
  		// RPC JSON events need to have location name modeled for round trip testing.
  		tags = append(tags, ShapeTag{"locationName", ref.Shape.ShapeName})
  	}
  
  	if ref.QueryName != "" {
  		tags = append(tags, ShapeTag{"queryName", ref.QueryName})
  	}
  	if ref.Shape.MemberRef.LocationName != "" {
  		tags = append(tags, ShapeTag{"locationNameList", ref.Shape.MemberRef.LocationName})
  	}
  	if ref.Shape.KeyRef.LocationName != "" {
  		tags = append(tags, ShapeTag{"locationNameKey", ref.Shape.KeyRef.LocationName})
  	}
  	if ref.Shape.ValueRef.LocationName != "" {
  		tags = append(tags, ShapeTag{"locationNameValue", ref.Shape.ValueRef.LocationName})
  	}
  	if ref.Shape.Min > 0 {
  		tags = append(tags, ShapeTag{"min", fmt.Sprintf("%v", ref.Shape.Min)})
  	}
  
  	if ref.Deprecated || ref.Shape.Deprecated {
  		tags = append(tags, ShapeTag{"deprecated", "true"})
  	}
  
  	// All shapes have a type
  	tags = append(tags, ShapeTag{"type", ref.Shape.Type})
  
  	// embed the timestamp type for easier lookups
  	if ref.Shape.Type == "timestamp" {
  		if format := ref.GetTimestampFormat(); len(format) > 0 {
  			tags = append(tags, ShapeTag{
  				Key: "timestampFormat",
  				Val: format,
  			})
  		}
  	}
  
  	if ref.Shape.Flattened || ref.Flattened {
  		tags = append(tags, ShapeTag{"flattened", "true"})
  	}
  	if ref.XMLAttribute {
  		tags = append(tags, ShapeTag{"xmlAttribute", "true"})
  	}
  	if isRequired {
  		tags = append(tags, ShapeTag{"required", "true"})
  	}
  	if ref.Shape.IsEnum() {
  		tags = append(tags, ShapeTag{"enum", ref.ShapeName})
  	}
  
  	if toplevel {
  		if name := ref.Shape.PayloadRefName(); len(name) > 0 {
  			tags = append(tags, ShapeTag{"payload", name})
  		}
  	}
  
  	if ref.XMLNamespace.Prefix != "" {
  		tags = append(tags, ShapeTag{"xmlPrefix", ref.XMLNamespace.Prefix})
  	} else if ref.Shape.XMLNamespace.Prefix != "" {
  		tags = append(tags, ShapeTag{"xmlPrefix", ref.Shape.XMLNamespace.Prefix})
  	}
  
  	if ref.XMLNamespace.URI != "" {
  		tags = append(tags, ShapeTag{"xmlURI", ref.XMLNamespace.URI})
  	} else if ref.Shape.XMLNamespace.URI != "" {
  		tags = append(tags, ShapeTag{"xmlURI", ref.Shape.XMLNamespace.URI})
  	}
  
  	if ref.IdempotencyToken || ref.Shape.IdempotencyToken {
  		tags = append(tags, ShapeTag{"idempotencyToken", "true"})
  	}
  
  	if ref.Ignore {
  		tags = append(tags, ShapeTag{"ignore", "true"})
  	}
  
  	if ref.Shape.Sensitive {
  		tags = append(tags, ShapeTag{"sensitive", "true"})
  	}
  
  	return fmt.Sprintf("`%s`", tags)
  }