code: func expandClusterVMHostRuleInfo(d *schema.ResourceData) (*types.ClusterVmHostRuleInfo, error) {
  	obj := &types.ClusterVmHostRuleInfo{
  		ClusterRuleInfo: types.ClusterRuleInfo{
  			Enabled:     structure.GetBool(d, "enabled"),
  			Mandatory:   structure.GetBool(d, "mandatory"),
  			Name:        d.Get("name").(string),
  			UserCreated: structure.BoolPtr(true),
  		},
  		AffineHostGroupName:     d.Get("affinity_host_group_name").(string),
  		AntiAffineHostGroupName: d.Get("anti_affinity_host_group_name").(string),
  		VmGroupName:             d.Get("vm_group_name").(string),
  	}
  	return obj, nil
  }
docs: // expandClusterVMHostRuleInfo reads certain ResourceData keys and returns a
  // ClusterVmHostRuleInfo.