code: func expandDVPortgroupConfigSpec(d *schema.ResourceData) types.DVPortgroupConfigSpec {
  	obj := types.DVPortgroupConfigSpec{
  		ConfigVersion:                d.Get("config_version").(string),
  		Name:                         d.Get("name").(string),
  		NumPorts:                     int32(d.Get("number_of_ports").(int)),
  		PortNameFormat:               d.Get("port_name_format").(string),
  		DefaultPortConfig:            expandVMwareDVSPortSetting(d),
  		Description:                  d.Get("description").(string),
  		Type:                         d.Get("type").(string),
  		Policy:                       expandVMwareDVSPortgroupPolicy(d),
  		AutoExpand:                   structure.GetBoolPtr(d, "auto_expand"),
  		VmVnicNetworkResourcePoolKey: d.Get("network_resource_pool_key").(string),
  	}
  	return obj
  }
docs: // expandDVPortgroupConfigSpec reads certain ResourceData keys and
  // returns a DVPortgroupConfigSpec.