func ExtractLBs(page pagination.Page) ([]LoadBalancer, error) {
	var resp struct {
		LBs []LoadBalancer `mapstructure:"loadBalancers" json:"loadBalancers"`
	}
	coll := page.(LBPage).Body
	err := mapstructure.Decode(coll, &resp)
	s := reflect.ValueOf(coll.(map[string]interface{})["loadBalancers"])
	for i := 0; i < s.Len(); i++ {
		val := (s.Index(i).Interface()).(map[string]interface{})
		ts, err := extractTS(val, "created")
		if err != nil {
			return resp.LBs, err
		}
		resp.LBs[i].Created.Time = ts
		ts, err = extractTS(val, "updated")
		if err != nil {
			return resp.LBs, err
		}
		resp.LBs[i].Updated.Time = ts
	}
	return resp.LBs, err
}
ExtractLBs accepts a Page struct, specifically a LBPage struct, and extracts
the elements into a slice of LoadBalancer structs. In other words, a generic
collection is mapped into a relevant slice.
package lbs
import (
	"reflect"
	"time"
	"github.com/mitchellh/mapstructure"
	"github.com/rackspace/gophercloud"
	"github.com/rackspace/gophercloud/pagination"
	"github.com/rackspace/gophercloud/rackspace/lb/v1/acl"
	"github.com/rackspace/gophercloud/rackspace/lb/v1/nodes"
	"github.com/rackspace/gophercloud/rackspace/lb/v1/sessions"
	"github.com/rackspace/gophercloud/rackspace/lb/v1/throttle"
	"github.com/rackspace/gophercloud/rackspace/lb/v1/vips"
)
type Protocol struct {
	Name string
	Port int
}
type Algorithm struct {
	Name string
}
type Status string
const (
	ACTIVE Status = "ACTIVE"
	BUILD Status = "BUILD"
	PENDINGUPDATE Status = "PENDING_UPDATE"
	PENDINGDELETE Status = "PENDING_DELETE"
	SUSPENDED Status = "SUSPENDED"
	ERROR Status = "ERROR"
	DELETED Status = "DELETED"
)
type Datetime struct {
	Time time.Time `mapstructure:"-"`
}
type LoadBalancer struct {
	Name string
	ID int
	Protocol string
	Algorithm string
	Status Status
	NodeCount int `mapstructure:"nodeCount"`
	VIPs []vips.VIP `mapstructure:"virtualIps"`
	Created Datetime
	Updated Datetime
	Port int
	HalfClosed bool
	Timeout int
	Cluster Cluster
	Nodes []nodes.Node
	ConnectionLogging ConnectionLogging
	SessionPersistence sessions.SessionPersistence
	ConnectionThrottle throttle.ConnectionThrottle
	SourceAddrs SourceAddrs `mapstructure:"sourceAddresses"`
	AccessList acl.AccessList
}
type SourceAddrs struct {
	IPv4Public  string `json:"ipv4Public" mapstructure:"ipv4Public"`
	IPv4Private string `json:"ipv4Servicenet" mapstructure:"ipv4Servicenet"`
	IPv6Public  string `json:"ipv6Public" mapstructure:"ipv6Public"`
	IPv6Private string `json:"ipv6Servicenet" mapstructure:"ipv6Servicenet"`
}
type ConnectionLogging struct {
	Enabled bool
}
type Cluster struct {
	Name string
}
type LBPage struct {
	pagination.LinkedPageBase
}
func (p LBPage) IsEmpty() (bool, error) {
	is, err := ExtractLBs(p)
	if err != nil {
		return true, nil
	}
	return len(is) == 0, nil
}