vsphere/distributed_virtual_port_setting_structure.go
func flattenVmwareUplinkPortTeamingPolicy(d *schema.ResourceData, obj *types.VmwareUplinkPortTeamingPolicy) error {
	if obj == nil {
		return nil
	}

	structure.SetStringPolicy(d, "teaming_policy", obj.Policy)
	structure.SetBoolPolicy(d, "notify_switches", obj.NotifySwitches)
	structure.SetBoolPolicyReverse(d, "failback", obj.RollingOrder)

	if err := flattenDVSFailureCriteria(d, obj.FailureCriteria); err != nil {
		return err
	}
	if err := flattenVMwareUplinkPortOrderPolicy(d, obj.UplinkPortOrder); err != nil {
		return err
	}
	return nil
}
func flattenVmwareUplinkPortTeamingPolicy(d *schema.ResourceData, obj *types.VmwareUplinkPortTeamingPolicy) error {
	if obj == nil {
		return nil
	}

	structure.SetStringPolicy(d, "teaming_policy", obj.Policy)
	structure.SetBoolPolicy(d, "notify_switches", obj.NotifySwitches)
	structure.SetBoolPolicyReverse(d, "failback", obj.RollingOrder)

	if err := flattenDVSFailureCriteria(d, obj.FailureCriteria); err != nil {
		return err
	}
	if err := flattenVMwareUplinkPortOrderPolicy(d, obj.UplinkPortOrder); err != nil {
		return err
	}
	return nil
}
func flattenVmwareUplinkPortTeamingPolicy ( d * schema . ResourceData , obj * types . VmwareUplinkPortTeamingPolicy ) error { if obj == nil { return nil } structure . SetStringPolicy ( d , " " , obj . Policy ) structure . SetBoolPolicy ( d , " " , obj . NotifySwitches ) structure . SetBoolPolicyReverse ( d , " " , obj . RollingOrder ) if err := flattenDVSFailureCriteria ( d , obj . FailureCriteria ) ; err != nil { return err } if err := flattenVMwareUplinkPortOrderPolicy ( d , obj . UplinkPortOrder ) ; err != nil { return err } return nil }
// flattenVmwareUplinkPortTeamingPolicy reads various fields from a
// VmwareUplinkPortTeamingPolicy into the passed in ResourceData.
flattenVmwareUplinkPortTeamingPolicy reads various fields from a VmwareUplinkPortTeamingPolicy into the passed in ResourceData .