func (opts CreateOpts) ToNetworkCreateMap() (map[string]interface{}, error) {
	n := make(map[string]interface{})
	if opts.CIDR == "" {
		return nil, errors.New("Required field CIDR not set.")
	}
	if opts.Label == "" {
		return nil, errors.New("Required field Label not set.")
	}
	n["label"] = opts.Label
	n["cidr"] = opts.CIDR
	return map[string]interface{}{"network": n}, nil
}
ToNetworkCreateMap casts a CreateOpts struct to a map.
package networks
import (
	"errors"
	"github.com/rackspace/gophercloud"
	"github.com/rackspace/gophercloud/pagination"
)
func List(c *gophercloud.ServiceClient) pagination.Pager {
	createPage := func(r pagination.PageResult) pagination.Page {
		return NetworkPage{pagination.SinglePageBase(r)}
	}
	return pagination.NewPager(c, listURL(c), createPage)
}
func Get(c *gophercloud.ServiceClient, id string) GetResult {
	var res GetResult
	_, res.Err = c.Request("GET", getURL(c, id), gophercloud.RequestOpts{
		JSONResponse: &res.Body,
		OkCodes:      []int{200},
	})
	return res
}
type CreateOptsBuilder interface {
	ToNetworkCreateMap() (map[string]interface{}, error)
}
type CreateOpts struct {
	CIDR string
	Label string
}