func (loc *ApprovalLocator) Index(options rsapi.APIParams) (*ApprovalRequestList, error) {
	var res *ApprovalRequestList
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var idOpt = options["id"]
	if idOpt != nil {
		params["id"] = idOpt
	}
	var subjectKindOpt = options["subject_kind"]
	if subjectKindOpt != nil {
		params["subject_kind"] = subjectKindOpt
	}
	var subjectHrefOpt = options["subject_href"]
	if subjectHrefOpt != nil {
		params["subject_href"] = subjectHrefOpt
	}
	var statusOpt = options["status"]
	if statusOpt != nil {
		params["status"] = statusOpt
	}
	var p rsapi.APIParams
	uri, err := loc.ActionPath("Approval", "index")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
===== Actions
GET /api/governance/projects/{project_id}/approval_requests

Index retrieves the list of approval requests in a project.
**
package policy
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"time"
	"github.com/rightscale/rsc/metadata"
	"github.com/rightscale/rsc/rsapi"
)
const APIVersion = "1.0"
type Href string
func (r *Href) ActionPath(rName, aName string) (*metadata.ActionPath, error) {
	res, ok := GenMetadata[rName]
	if !ok {
		return nil, fmt.Errorf("No resource with name '%s'", rName)
	}
	var action *metadata.Action
	for _, a := range res.Actions {
		if a.Name == aName {
			action = a
			break
		}
	}
	if action == nil {
		return nil, fmt.Errorf("No action with name '%s' on %s", aName, rName)
	}
	vars, err := res.ExtractVariables(string(*r))
	if err != nil {
		return nil, err
	}
	return action.URL(vars)
}
type ActionStatus struct {
	FinishedAt *time.Time             `json:"finished_at,omitempty"`
	Id         string                 `json:"id,omitempty"`
	Kind       string                 `json:"kind,omitempty"`
	Label      string                 `json:"label,omitempty"`
	Name       string                 `json:"name,omitempty"`
	Options    []*ConfigurationOption `json:"options,omitempty"`
	RunBy      *User                  `json:"run_by,omitempty"`
	StartedAt  *time.Time             `json:"started_at,omitempty"`
	Status     string                 `json:"status,omitempty"`
}
type ActionStatusLocator struct {
	Href
	api *API
}
func (api *API) ActionStatusLocator(href string) *ActionStatusLocator {
	return &ActionStatusLocator{Href(href), api}
}
func (loc *ActionStatusLocator) Index(options rsapi.APIParams) (*ActionStatusList, error) {
	var res *ActionStatusList
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var incidentIdOpt = options["incident_id"]
	if incidentIdOpt != nil {
		params["incident_id"] = incidentIdOpt
	}
	var appliedPolicyIdOpt = options["applied_policy_id"]
	if appliedPolicyIdOpt != nil {
		params["applied_policy_id"] = appliedPolicyIdOpt
	}
	var p rsapi.APIParams
	uri, err := loc.ActionPath("ActionStatus", "index")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
func (loc *ActionStatusLocator) Show(options rsapi.APIParams) (*ActionStatus, error) {
	var res *ActionStatus
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	uri, err := loc.ActionPath("ActionStatus", "show")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
type AppliedPolicy struct {
	Category            string                 `json:"category,omitempty"`
	CreatedAt           *time.Time             `json:"created_at,omitempty"`
	CreatedBy           *User                  `json:"created_by,omitempty"`
	Credentials         map[string]interface{} `json:"credentials,omitempty"`
	Description         string                 `json:"description,omitempty"`
	DocLink             string                 `json:"doc_link,omitempty"`
	DryRun              bool                   `json:"dry_run,omitempty"`
	Error               string                 `json:"error,omitempty"`
	ErroredAt           *time.Time             `json:"errored_at,omitempty"`
	Frequency           string                 `json:"frequency,omitempty"`
	Href                string                 `json:"href,omitempty"`
	Id                  string                 `json:"id,omitempty"`
	IncidentAggregateId string                 `json:"incident_aggregate_id,omitempty"`
	Info                map[string]interface{} `json:"info,omitempty"`
	Kind                string                 `json:"kind,omitempty"`
	Name                string                 `json:"name,omitempty"`
	Options             []*ConfigurationOption `json:"options,omitempty"`
	PolicyAggregateId   string                 `json:"policy_aggregate_id,omitempty"`
	PolicyTemplate      *PolicyTemplateLink    `json:"policy_template,omitempty"`
	Project             *Project               `json:"project,omitempty"`
	PublishedTemplate   *PublishedTemplateLink `json:"published_template,omitempty"`
	Scope               string                 `json:"scope,omitempty"`
	Severity            string                 `json:"severity,omitempty"`
	SkipApprovals       bool                   `json:"skip_approvals,omitempty"`
	Status              string                 `json:"status,omitempty"`
	UpdatedAt           *time.Time             `json:"updated_at,omitempty"`
}
type AppliedPolicyLocator struct {
	Href
	api *API
}
func (api *API) AppliedPolicyLocator(href string) *AppliedPolicyLocator {
	return &AppliedPolicyLocator{Href(href), api}
}
func (loc *AppliedPolicyLocator) Index(options rsapi.APIParams) (*AppliedPolicyList, error) {
	var res *AppliedPolicyList
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		params["name"] = nameOpt
	}
	var p rsapi.APIParams
	uri, err := loc.ActionPath("AppliedPolicy", "index")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
func (loc *AppliedPolicyLocator) Create(name string, templateHref string, options rsapi.APIParams) (*AppliedPolicy, error) {
	var res *AppliedPolicy
	if name == "" {
		return res, fmt.Errorf("name is required")
	}
	if templateHref == "" {
		return res, fmt.Errorf("templateHref is required")
	}
	var params rsapi.APIParams
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"name":          name,
		"template_href": templateHref,
	}
	var credentialsOpt = options["credentials"]
	if credentialsOpt != nil {
		p["credentials"] = credentialsOpt
	}
	var descriptionOpt = options["description"]
	if descriptionOpt != nil {
		p["description"] = descriptionOpt
	}
	var dryRunOpt = options["dry_run"]
	if dryRunOpt != nil {
		p["dry_run"] = dryRunOpt
	}
	var frequencyOpt = options["frequency"]
	if frequencyOpt != nil {
		p["frequency"] = frequencyOpt
	}
	var optionsOpt = options["options"]
	if optionsOpt != nil {
		p["options"] = optionsOpt
	}
	var severityOpt = options["severity"]
	if severityOpt != nil {
		p["severity"] = severityOpt
	}
	var skipApprovalsOpt = options["skip_approvals"]
	if skipApprovalsOpt != nil {
		p["skip_approvals"] = skipApprovalsOpt
	}
	uri, err := loc.ActionPath("AppliedPolicy", "create")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
func (loc *AppliedPolicyLocator) Show(options rsapi.APIParams) (*AppliedPolicy, error) {
	var res *AppliedPolicy
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	uri, err := loc.ActionPath("AppliedPolicy", "show")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
func (loc *AppliedPolicyLocator) Delete() error {
	var params rsapi.APIParams
	var p rsapi.APIParams
	uri, err := loc.ActionPath("AppliedPolicy", "delete")
	if err != nil {
		return err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	return nil
}
func (loc *AppliedPolicyLocator) Evaluate() error {
	var params rsapi.APIParams
	var p rsapi.APIParams
	uri, err := loc.ActionPath("AppliedPolicy", "evaluate")
	if err != nil {
		return err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	return nil
}
func (loc *AppliedPolicyLocator) ShowLog() (string, error) {
	var res string
	var params rsapi.APIParams
	var p rsapi.APIParams
	uri, err := loc.ActionPath("AppliedPolicy", "show_log")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	res = string(respBody)
	return res, err
}
func (loc *AppliedPolicyLocator) ShowStatus() (*AppliedPolicyStatus, error) {
	var res *AppliedPolicyStatus
	var params rsapi.APIParams
	var p rsapi.APIParams
	uri, err := loc.ActionPath("AppliedPolicy", "show_status")
	if err != nil {
		return res, err
	}
	req, err := loc.api.BuildHTTPRequest(uri.HTTPMethod, uri.Path, APIVersion, params, p)
	if err != nil {
		return res, err
	}
	resp, err := loc.api.PerformRequest(req)
	if err != nil {
		return res, err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		respBody, _ := ioutil.ReadAll(resp.Body)
		sr := string(respBody)
		if sr != "" {
			sr = ": " + sr
		}
		return res, fmt.Errorf("invalid response %s%s", resp.Status, sr)
	}
	defer resp.Body.Close()
	respBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal(respBody, &res)
	return res, err
}
type Approval struct {
}
type ApprovalLocator struct {
	Href
	api *API
}
func (api *API) ApprovalLocator(href string) *ApprovalLocator {
	return &ApprovalLocator{Href(href), api}
}