code: func UnmarshalTunnelConnection(data []byte, opts ...MarshalOption) (TunnelConnection, error) {
  	if len(data) == 0 {
  		return nil, trace.BadParameter("missing tunnel connection data")
  	}
  	cfg, err := collectOptions(opts)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	var h ResourceHeader
  	err = utils.FastUnmarshal(data, &h)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	switch h.Version {
  	case V2:
  		var r TunnelConnectionV2
  
  		if cfg.SkipValidation {
  			if err := utils.FastUnmarshal(data, &r); err != nil {
  				return nil, trace.BadParameter(err.Error())
  			}
  		} else {
  			if err := utils.UnmarshalWithSchema(GetTunnelConnectionSchema(), &r, data); err != nil {
  				return nil, trace.BadParameter(err.Error())
  			}
  		}
  
  		if err := r.CheckAndSetDefaults(); err != nil {
  			return nil, trace.Wrap(err)
  		}
  		if cfg.ID != 0 {
  			r.SetResourceID(cfg.ID)
  		}
  		if !cfg.Expires.IsZero() {
  			r.SetExpiry(cfg.Expires)
  		}
  		return &r, nil
  	}
  	return nil, trace.BadParameter("reverse tunnel version %v is not supported", h.Version)
  }
docs: // UnmarshalTunnelConnection unmarshals reverse tunnel from JSON or YAML,
  // sets defaults and checks the schema