package drivers

import (
	"gerrit.mcp.mirantis.net/debian/gophercloud.git"
	"gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination"
)

type commonResult struct {
	gophercloud.Result
}

func (r commonResult) Extract() (*Driver, error) {
	var d struct {
		Driver *Driver `json:"driver"`
	}
	err := r.ExtractInto(&d)
	return d.Driver, err
}

type GetResult struct {
	commonResult
}

type Link struct {
	Href string `json:"href"`
	Rel  string `json:"rel"`
}

type Driver struct {
	Name       string   `json:"name"`
	Type       string   `json:"type"`
	Hosts      []string `json:"hosts"`
	Links      []Link   `json:"links"`
	Properties []Link   `json:"properties"`
}

type DriverPage struct {
	pagination.SinglePageBase
}

func (r DriverPage) NextPageURL() (string, error) {
	var d struct {
		Links []gophercloud.Link `json:"drivers_links"`
	}
	err := r.ExtractInto(&d)
	if err != nil {
		return "", err
	}
	return gophercloud.ExtractNextURL(d.Links)
}

func (r DriverPage) IsEmpty() (bool, error) {
	is, err := ExtractDrivers(r)
	return len(is) == 0, err
}

func ExtractDrivers(r pagination.Page) ([]Driver, error) {
	var d struct {
		Drivers []Driver `json:"drivers"`
	}
	err := (r.(DriverPage)).ExtractInto(&d)
	return d.Drivers, err
}
