code: func (c Common) ObjectName(ctx context.Context) (string, error) {
  	var o mo.ManagedEntity
  
  	err := c.Properties(ctx, c.Reference(), []string{"name"}, &o)
  	if err != nil {
  		return "", err
  	}
  
  	if o.Name != "" {
  		return o.Name, nil
  	}
  
  	// Network has its own "name" field...
  	var n mo.Network
  
  	err = c.Properties(ctx, c.Reference(), []string{"name"}, &n)
  	if err != nil {
  		return "", err
  	}
  
  	return n.Name, nil
  }
docs: // ObjectName returns the base name of the InventoryPath field if set,
  // otherwise fetches the mo.ManagedEntity.Name field via the property collector.