func expandVMwareDVSPortSetting(d *schema.ResourceData) *types.VMwareDVSPortSetting {
	obj := &types.VMwareDVSPortSetting{
		DVPortSetting: types.DVPortSetting{
			Blocked:                 structure.GetBoolPolicy(d, "block_all_ports"),
			InShapingPolicy:         expandDVSTrafficShapingPolicyIngress(d),
			OutShapingPolicy:        expandDVSTrafficShapingPolicyEgress(d),
			VmDirectPathGen2Allowed: structure.GetBoolPolicy(d, "directpath_gen2_allowed"),
		},
		Vlan:                expandBaseVmwareDistributedVirtualSwitchVlanSpec(d),
		UplinkTeamingPolicy: expandVmwareUplinkPortTeamingPolicy(d),
		SecurityPolicy:      expandDVSSecurityPolicy(d),
		IpfixEnabled:        structure.GetBoolPolicy(d, "netflow_enabled"),
		TxUplink:            structure.GetBoolPolicy(d, "tx_uplink"),
		LacpPolicy:          expandVMwareUplinkLacpPolicy(d),
	}

	if structure.AllFieldsEmpty(obj) {
		return nil
	}
	return obj
}
func expandVMwareDVSPortSetting(d *schema.ResourceData) *types.VMwareDVSPortSetting {
	obj := &types.VMwareDVSPortSetting{
		DVPortSetting: types.DVPortSetting{
			Blocked:                 structure.GetBoolPolicy(d, "block_all_ports"),
			InShapingPolicy:         expandDVSTrafficShapingPolicyIngress(d),
			OutShapingPolicy:        expandDVSTrafficShapingPolicyEgress(d),
			VmDirectPathGen2Allowed: structure.GetBoolPolicy(d, "directpath_gen2_allowed"),
		},
		Vlan:                expandBaseVmwareDistributedVirtualSwitchVlanSpec(d),
		UplinkTeamingPolicy: expandVmwareUplinkPortTeamingPolicy(d),
		SecurityPolicy:      expandDVSSecurityPolicy(d),
		IpfixEnabled:        structure.GetBoolPolicy(d, "netflow_enabled"),
		TxUplink:            structure.GetBoolPolicy(d, "tx_uplink"),
		LacpPolicy:          expandVMwareUplinkLacpPolicy(d),
	}

	if structure.AllFieldsEmpty(obj) {
		return nil
	}
	return obj
}
func expandVMwareDVSPortSetting ( d * schema . ResourceData ) * types . VMwareDVSPortSetting { obj := & types . VMwareDVSPortSetting { DVPortSetting : types . DVPortSetting { Blocked : structure . GetBoolPolicy ( d , " " ) , InShapingPolicy : expandDVSTrafficShapingPolicyIngress ( d ) , OutShapingPolicy : expandDVSTrafficShapingPolicyEgress ( d ) , VmDirectPathGen2Allowed : structure . GetBoolPolicy ( d , " " ) , } , Vlan : expandBaseVmwareDistributedVirtualSwitchVlanSpec ( d ) , UplinkTeamingPolicy : expandVmwareUplinkPortTeamingPolicy ( d ) , SecurityPolicy : expandDVSSecurityPolicy ( d ) , IpfixEnabled : structure . GetBoolPolicy ( d , " " ) , TxUplink : structure . GetBoolPolicy ( d , " " ) , LacpPolicy : expandVMwareUplinkLacpPolicy ( d ) , } if structure . AllFieldsEmpty ( obj ) { return nil } return obj }
// expandVMwareDVSPortSetting reads certain ResourceData keys and
// returns a VMwareDVSPortSetting.
expandVMwareDVSPortSetting reads certain ResourceData keys and returns a VMwareDVSPortSetting .