code: func UnmarshalProvisionToken(data []byte, opts ...MarshalOption) (ProvisionToken, error) {
  	if len(data) == 0 {
  		return nil, trace.BadParameter("missing provision token 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 "":
  		var p ProvisionTokenV1
  		err := utils.FastUnmarshal(data, &p)
  		if err != nil {
  			return nil, trace.Wrap(err)
  		}
  		v2 := p.V2()
  		if cfg.ID != 0 {
  			v2.SetResourceID(cfg.ID)
  		}
  		return v2, nil
  	case V2:
  		var p ProvisionTokenV2
  		if cfg.SkipValidation {
  			if err := utils.FastUnmarshal(data, &p); err != nil {
  				return nil, trace.BadParameter(err.Error())
  			}
  		} else {
  			if err := utils.UnmarshalWithSchema(GetProvisionTokenSchema(), &p, data); err != nil {
  				return nil, trace.BadParameter(err.Error())
  			}
  		}
  		if err := p.CheckAndSetDefaults(); err != nil {
  			return nil, trace.Wrap(err)
  		}
  		if cfg.ID != 0 {
  			p.SetResourceID(cfg.ID)
  		}
  		return &p, nil
  	}
  	return nil, trace.BadParameter("server resource version %v is not supported", h.Version)
  }
docs: // UnmarshalProvisionToken unmarshals provision token from JSON or YAML,
  // sets defaults and checks the schema