code: func expandHostPortGroupSpec(d *schema.ResourceData) *types.HostPortGroupSpec {
  	obj := &types.HostPortGroupSpec{
  		Name:        d.Get("name").(string),
  		VlanId:      int32(d.Get("vlan_id").(int)),
  		VswitchName: d.Get("virtual_switch_name").(string),
  		Policy:      *expandHostNetworkPolicy(d),
  	}
  	return obj
  }
docs: // expandHostPortGroupSpec reads certain ResourceData keys and returns a
  // HostPortGroupSpec.