vsphere/resource_vsphere_compute_cluster_vm_host_rule.go
func flattenClusterVMHostRuleInfo(d *schema.ResourceData, obj *types.ClusterVmHostRuleInfo) error {
	return structure.SetBatch(d, map[string]interface{}{
		"enabled":                       obj.Enabled,
		"mandatory":                     obj.Mandatory,
		"name":                          obj.Name,
		"affinity_host_group_name":      obj.AffineHostGroupName,
		"anti_affinity_host_group_name": obj.AntiAffineHostGroupName,
		"vm_group_name":                 obj.VmGroupName,
	})
}
func flattenClusterVMHostRuleInfo(d *schema.ResourceData, obj *types.ClusterVmHostRuleInfo) error {
	return structure.SetBatch(d, map[string]interface{}{
		"enabled":                       obj.Enabled,
		"mandatory":                     obj.Mandatory,
		"name":                          obj.Name,
		"affinity_host_group_name":      obj.AffineHostGroupName,
		"anti_affinity_host_group_name": obj.AntiAffineHostGroupName,
		"vm_group_name":                 obj.VmGroupName,
	})
}
// flattenClusterVMHostRuleInfo saves a ClusterVmHostRuleInfo into the supplied ResourceData.