code: func MarshalTunnelConnection(rt TunnelConnection, opts ...MarshalOption) ([]byte, error) {
  	cfg, err := collectOptions(opts)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	switch resource := rt.(type) {
  	case *TunnelConnectionV2:
  		if !cfg.PreserveResourceID {
  			// avoid modifying the original object
  			// to prevent unexpected data races
  			copy := *resource
  			copy.SetResourceID(0)
  			resource = &copy
  		}
  		return utils.FastMarshal(resource)
  	default:
  		return nil, trace.BadParameter("unrecognized resource version %T", rt)
  	}
  }
docs: // MarshalTunnelConnection marshals tunnel connection