code: func (v ContainerView) Retrieve(ctx context.Context, kind []string, ps []string, dst interface{}) error {
  	pc := property.DefaultCollector(v.Client())
  
  	ospec := types.ObjectSpec{
  		Obj:  v.Reference(),
  		Skip: types.NewBool(true),
  		SelectSet: []types.BaseSelectionSpec{
  			&types.TraversalSpec{
  				Type: v.Reference().Type,
  				Path: "view",
  			},
  		},
  	}
  
  	var pspec []types.PropertySpec
  
  	if len(kind) == 0 {
  		kind = []string{"ManagedEntity"}
  	}
  
  	for _, t := range kind {
  		spec := types.PropertySpec{
  			Type: t,
  		}
  
  		if len(ps) == 0 {
  			spec.All = types.NewBool(true)
  		} else {
  			spec.PathSet = ps
  		}
  
  		pspec = append(pspec, spec)
  	}
  
  	req := types.RetrieveProperties{
  		SpecSet: []types.PropertyFilterSpec{
  			{
  				ObjectSet: []types.ObjectSpec{ospec},
  				PropSet:   pspec,
  			},
  		},
  	}
  
  	res, err := pc.RetrieveProperties(ctx, req)
  	if err != nil {
  		return err
  	}
  
  	if d, ok := dst.(*[]types.ObjectContent); ok {
  		*d = res.Returnval
  		return nil
  	}
  
  	return mo.LoadRetrievePropertiesResponse(res, dst)
  }
docs: // Retrieve populates dst as property.Collector.Retrieve does, for all entities in the view of types specified by kind.