func (opts CreateOpts) ToLBMonitorCreateMap() (map[string]interface{}, error) {
	if opts.Type == TypeHTTP || opts.Type == TypeHTTPS {
		if opts.URLPath == "" {
			err := gophercloud.ErrMissingInput{}
			err.Argument = "monitors.CreateOpts.URLPath"
			return nil, err
		}
		if opts.ExpectedCodes == "" {
			err := gophercloud.ErrMissingInput{}
			err.Argument = "monitors.CreateOpts.ExpectedCodes"
			return nil, err
		}
	}
	if opts.Delay < opts.Timeout {
		err := gophercloud.ErrInvalidInput{}
		err.Argument = "monitors.CreateOpts.Delay/monitors.CreateOpts.Timeout"
		err.Info = "Delay must be greater than or equal to timeout"
		return nil, err
	}
	return gophercloud.BuildRequestBody(opts, "health_monitor")
}
ToLBMonitorCreateMap allows CreateOpts to satisfy the CreateOptsBuilder
interface
package monitors
import (
	"fmt"
	"github.com/gophercloud/gophercloud"
	"github.com/gophercloud/gophercloud/pagination"
)
type ListOpts struct {
	ID            string `q:"id"`
	TenantID      string `q:"tenant_id"`
	Type          string `q:"type"`
	Delay         int    `q:"delay"`
	Timeout       int    `q:"timeout"`
	MaxRetries    int    `q:"max_retries"`
	HTTPMethod    string `q:"http_method"`
	URLPath       string `q:"url_path"`
	ExpectedCodes string `q:"expected_codes"`
	AdminStateUp  *bool  `q:"admin_state_up"`
	Status        string `q:"status"`
	Limit         int    `q:"limit"`
	Marker        string `q:"marker"`
	SortKey       string `q:"sort_key"`
	SortDir       string `q:"sort_dir"`
}
func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager {
	q, err := gophercloud.BuildQueryString(&opts)
	if err != nil {
		return pagination.Pager{Err: err}
	}
	u := rootURL(c) + q.String()
	return pagination.NewPager(c, u, func(r pagination.PageResult) pagination.Page {
		return MonitorPage{pagination.LinkedPageBase{PageResult: r}}
	})
}
type MonitorType string
const (
	TypePING  MonitorType = "PING"
	TypeTCP   MonitorType = "TCP"
	TypeHTTP  MonitorType = "HTTP"
	TypeHTTPS MonitorType = "HTTPS"
)
type CreateOptsBuilder interface {
	ToLBMonitorCreateMap() (map[string]interface{}, error)
}
type CreateOpts struct {
	Type MonitorType `json:"type" required:"true"`
	Delay int `json:"delay" required:"true"`
	Timeout int `json:"timeout" required:"true"`
	MaxRetries int `json:"max_retries" required:"true"`
	URLPath string `json:"url_path,omitempty"`
	HTTPMethod string `json:"http_method,omitempty"`
	ExpectedCodes string `json:"expected_codes,omitempty"`
	TenantID     string `json:"tenant_id,omitempty"`
	AdminStateUp *bool  `json:"admin_state_up,omitempty"`
}