vsphere/distributed_port_group_structure.go
func expandVMwareDVSPortgroupPolicy(d *schema.ResourceData) *types.VMwareDVSPortgroupPolicy {
	obj := &types.VMwareDVSPortgroupPolicy{
		DVPortgroupPolicy: types.DVPortgroupPolicy{
			BlockOverrideAllowed:               d.Get("block_override_allowed").(bool),
			ShapingOverrideAllowed:             d.Get("shaping_override_allowed").(bool),
			LivePortMovingAllowed:              d.Get("live_port_moving_allowed").(bool),
			PortConfigResetAtDisconnect:        d.Get("port_config_reset_at_disconnect").(bool),
			NetworkResourcePoolOverrideAllowed: structure.GetBoolPtr(d, "network_resource_pool_override_allowed"),
			TrafficFilterOverrideAllowed:       structure.GetBoolPtr(d, "traffic_filter_override_allowed"),
		},
		VlanOverrideAllowed:           d.Get("vlan_override_allowed").(bool),
		UplinkTeamingOverrideAllowed:  d.Get("uplink_teaming_override_allowed").(bool),
		SecurityPolicyOverrideAllowed: d.Get("security_policy_override_allowed").(bool),
		IpfixOverrideAllowed:          structure.GetBoolPtr(d, "netflow_override_allowed"),
	}
	return obj
}
func expandVMwareDVSPortgroupPolicy(d *schema.ResourceData) *types.VMwareDVSPortgroupPolicy {
	obj := &types.VMwareDVSPortgroupPolicy{
		DVPortgroupPolicy: types.DVPortgroupPolicy{
			BlockOverrideAllowed:               d.Get("block_override_allowed").(bool),
			ShapingOverrideAllowed:             d.Get("shaping_override_allowed").(bool),
			LivePortMovingAllowed:              d.Get("live_port_moving_allowed").(bool),
			PortConfigResetAtDisconnect:        d.Get("port_config_reset_at_disconnect").(bool),
			NetworkResourcePoolOverrideAllowed: structure.GetBoolPtr(d, "network_resource_pool_override_allowed"),
			TrafficFilterOverrideAllowed:       structure.GetBoolPtr(d, "traffic_filter_override_allowed"),
		},
		VlanOverrideAllowed:           d.Get("vlan_override_allowed").(bool),
		UplinkTeamingOverrideAllowed:  d.Get("uplink_teaming_override_allowed").(bool),
		SecurityPolicyOverrideAllowed: d.Get("security_policy_override_allowed").(bool),
		IpfixOverrideAllowed:          structure.GetBoolPtr(d, "netflow_override_allowed"),
	}
	return obj
}
// expandVMwareDVSPortgroupPolicy reads certain ResourceData keys and
// returns a VMwareDVSPortgroupPolicy.