vsphere/distributed_virtual_port_setting_structure.go
func expandVmwareUplinkPortTeamingPolicy(d *schema.ResourceData) *types.VmwareUplinkPortTeamingPolicy {
	obj := &types.VmwareUplinkPortTeamingPolicy{
		Policy:          structure.GetStringPolicy(d, "teaming_policy"),
		NotifySwitches:  structure.GetBoolPolicy(d, "notify_switches"),
		RollingOrder:    structure.GetBoolPolicyReverse(d, "failback"),
		FailureCriteria: expandDVSFailureCriteria(d),
		UplinkPortOrder: expandVMwareUplinkPortOrderPolicy(d),
	}

	if structure.AllFieldsEmpty(obj) {
		return nil
	}
	return obj
}
func expandVmwareUplinkPortTeamingPolicy(d *schema.ResourceData) *types.VmwareUplinkPortTeamingPolicy {
	obj := &types.VmwareUplinkPortTeamingPolicy{
		Policy:          structure.GetStringPolicy(d, "teaming_policy"),
		NotifySwitches:  structure.GetBoolPolicy(d, "notify_switches"),
		RollingOrder:    structure.GetBoolPolicyReverse(d, "failback"),
		FailureCriteria: expandDVSFailureCriteria(d),
		UplinkPortOrder: expandVMwareUplinkPortOrderPolicy(d),
	}

	if structure.AllFieldsEmpty(obj) {
		return nil
	}
	return obj
}
func expandVmwareUplinkPortTeamingPolicy ( d * schema . ResourceData ) * types . VmwareUplinkPortTeamingPolicy { obj := & types . VmwareUplinkPortTeamingPolicy { Policy : structure . GetStringPolicy ( d , " " ) , NotifySwitches : structure . GetBoolPolicy ( d , " " ) , RollingOrder : structure . GetBoolPolicyReverse ( d , " " ) , FailureCriteria : expandDVSFailureCriteria ( d ) , UplinkPortOrder : expandVMwareUplinkPortOrderPolicy ( d ) , } if structure . AllFieldsEmpty ( obj ) { return nil } return obj }
// expandVmwareUplinkPortTeamingPolicy reads certain ResourceData keys and
// returns a VmwareUplinkPortTeamingPolicy.
expandVmwareUplinkPortTeamingPolicy reads certain ResourceData keys and returns a VmwareUplinkPortTeamingPolicy .