vsphere/host_network_policy_structure.go
func expandHostNetworkTrafficShapingPolicy(d *schema.ResourceData) *types.HostNetworkTrafficShapingPolicy {
	obj := &types.HostNetworkTrafficShapingPolicy{
		AverageBandwidth: int64(d.Get("shaping_average_bandwidth").(int)),
		BurstSize:        int64(d.Get("shaping_burst_size").(int)),
		PeakBandwidth:    int64(d.Get("shaping_peak_bandwidth").(int)),
	}
	if v, ok := d.GetOkExists("shaping_enabled"); ok {
		obj.Enabled = structure.BoolPtr(v.(bool))
	}
	return obj
}
func expandHostNetworkTrafficShapingPolicy(d *schema.ResourceData) *types.HostNetworkTrafficShapingPolicy {
	obj := &types.HostNetworkTrafficShapingPolicy{
		AverageBandwidth: int64(d.Get("shaping_average_bandwidth").(int)),
		BurstSize:        int64(d.Get("shaping_burst_size").(int)),
		PeakBandwidth:    int64(d.Get("shaping_peak_bandwidth").(int)),
	}
	if v, ok := d.GetOkExists("shaping_enabled"); ok {
		obj.Enabled = structure.BoolPtr(v.(bool))
	}
	return obj
}
// expandHostNetworkTrafficShapingPolicy reads certain ResourceData keys and
// returns a HostNetworkTrafficShapingPolicy.