vsphere/distributed_virtual_port_setting_structure.go
func flattenVmwareDistributedVirtualSwitchTrunkVlanSpec(d *schema.ResourceData, obj *types.VmwareDistributedVirtualSwitchTrunkVlanSpec) error {
	var s []interface{}
	for _, rng := range obj.VlanId {
		m := make(map[string]interface{})
		m["min_vlan"] = rng.Start
		m["max_vlan"] = rng.End
		s = append(s, m)
	}
	if err := d.Set("vlan_range", s); err != nil {
		return err
	}
	return nil
}
func flattenVmwareDistributedVirtualSwitchTrunkVlanSpec(d *schema.ResourceData, obj *types.VmwareDistributedVirtualSwitchTrunkVlanSpec) error {
	var s []interface{}
	for _, rng := range obj.VlanId {
		m := make(map[string]interface{})
		m["min_vlan"] = rng.Start
		m["max_vlan"] = rng.End
		s = append(s, m)
	}
	if err := d.Set("vlan_range", s); err != nil {
		return err
	}
	return nil
}
func flattenVmwareDistributedVirtualSwitchTrunkVlanSpec ( d * schema . ResourceData , obj * types . VmwareDistributedVirtualSwitchTrunkVlanSpec ) error { var s [ ] interface { } for _ , rng := range obj . VlanId { m := make ( map [ string ] interface { } ) m [ " " ] = rng . Start m [ " " ] = rng . End s = append ( s , m ) } if err := d . Set ( " " , s ) ; err != nil { return err } return nil }
// flattenVmwareDistributedVirtualSwitchTrunkVlanSpec reads various fields from a
// VmwareDistributedVirtualSwitchTrunkVlanSpec into the passed in ResourceData.
flattenVmwareDistributedVirtualSwitchTrunkVlanSpec reads various fields from a VmwareDistributedVirtualSwitchTrunkVlanSpec into the passed in ResourceData .