code: func flattenDVPortgroupConfigInfo(d *schema.ResourceData, obj types.DVPortgroupConfigInfo) error {
  	d.Set("config_version", obj.ConfigVersion)
  	d.Set("name", obj.Name)
  	d.Set("number_of_ports", obj.NumPorts)
  	d.Set("port_name_format", obj.PortNameFormat)
  	d.Set("description", obj.Description)
  	d.Set("type", obj.Type)
  	structure.SetBoolPtr(d, "auto_expand", obj.AutoExpand)
  	d.Set("network_resource_pool_key", obj.VmVnicNetworkResourcePoolKey)
  
  	if err := flattenVMwareDVSPortSetting(d, obj.DefaultPortConfig.(*types.VMwareDVSPortSetting)); err != nil {
  		return err
  	}
  	if err := flattenVMwareDVSPortgroupPolicy(d, obj.Policy.(*types.VMwareDVSPortgroupPolicy)); err != nil {
  		return err
  	}
  	return nil
  }
docs: // flattenDVPortgroupConfigInfo reads various fields from a
  // DVPortgroupConfigInfo into the passed in ResourceData.
  //
  // This is the flatten counterpart to expandDVPortgroupConfigSpec.