vsphere/distributed_virtual_switch_structure.go
func flattenSliceOfDistributedVirtualSwitchHostMember(d *schema.ResourceData, members []types.DistributedVirtualSwitchHostMember) error {
	var hosts []map[string]interface{}
	for _, m := range members {
		hosts = append(hosts, flattenDistributedVirtualSwitchHostMember(m))
	}
	if err := d.Set("host", hosts); err != nil {
		return err
	}
	return nil
}
func flattenSliceOfDistributedVirtualSwitchHostMember(d *schema.ResourceData, members []types.DistributedVirtualSwitchHostMember) error {
	var hosts []map[string]interface{}
	for _, m := range members {
		hosts = append(hosts, flattenDistributedVirtualSwitchHostMember(m))
	}
	if err := d.Set("host", hosts); err != nil {
		return err
	}
	return nil
}
// flattenSliceOfDistributedVirtualSwitchHostMember creates a set of all host
// entries for a supplied slice of DistributedVirtualSwitchHostMember.
//
// This is the flatten counterpart to
// expandSliceOfDistributedVirtualSwitchHostMemberConfigSpec.