code: func NewObjectManager(client *vim25.Client, ref ...types.ManagedObjectReference) *ObjectManager {
  	mref := *client.ServiceContent.VStorageObjectManager
  
  	if len(ref) == 1 {
  		mref = ref[0]
  	}
  
  	m := ObjectManager{
  		ManagedObjectReference: mref,
  		c:                      client,
  		isVC:                   mref.Type == "VcenterVStorageObjectManager",
  	}
  
  	return &m
  }
docs: // NewObjectManager returns an ObjectManager referencing the VcenterVStorageObjectManager singleton when connected to vCenter or
  // the HostVStorageObjectManager singleton when connected to an ESX host.  The optional ref param can be used to specify a ESX
  // host instead, when connected to vCenter.