func (loc *BudgetAlertLocator) Create(budget *BudgetStruct, frequency string, name string, type_ string, options rsapi.APIParams) (*BudgetAlertLocator, error) {
	var res *BudgetAlertLocator
	if budget == nil {
		return res, fmt.Errorf("budget is required")
	}
	if frequency == "" {
		return res, fmt.Errorf("frequency is required")
	}
	if name == "" {
		return res, fmt.Errorf("name is required")
	}
	if type_ == "" {
		return res, fmt.Errorf("type_ is required")
	}
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"budget":    budget,
		"frequency": frequency,
		"name":      name,
		"type":      type_,
	}
	var additionalEmailsOpt = options["additional_emails"]
	if additionalEmailsOpt != nil {
		p["additional_emails"] = additionalEmailsOpt
	}
	var attachCsvOpt = options["attach_csv"]
	if attachCsvOpt != nil {
		p["attach_csv"] = attachCsvOpt
	}
	var filtersOpt = options["filters"]
	if filtersOpt != nil {
		p["filters"] = filtersOpt
	}
	uri, err := loc.ActionPath("BudgetAlert", "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)
	}
	location := resp.Header.Get("Location")
	if len(location) == 0 {
		return res, fmt.Errorf("Missing location header in response")
	} else {
		return &BudgetAlertLocator{Href(location), loc.api}, nil
	}
}
===== Actions
POST /api/budget_alerts

Create a new BudgetAlert.
package cac
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 Account struct {
}
type AccountLocator struct {
	Href
	api *API
}
func (api *API) AccountLocator(href string) *AccountLocator {
	return &AccountLocator{Href(href), api}
}
func (loc *AccountLocator) Create(options rsapi.APIParams) (*AccountLocator, error) {
	var res *AccountLocator
	var params rsapi.APIParams
	var p rsapi.APIParams
	p = rsapi.APIParams{}
	var dunnoOpt = options["dunno"]
	if dunnoOpt != nil {
		p["dunno"] = dunnoOpt
	}
	uri, err := loc.ActionPath("Account", "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)
	}
	location := resp.Header.Get("Location")
	if len(location) == 0 {
		return res, fmt.Errorf("Missing location header in response")
	} else {
		return &AccountLocator{Href(location), loc.api}, nil
	}
}
func (loc *AccountLocator) Index(options rsapi.APIParams) ([]*Account, error) {
	var res []*Account
	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("Account", "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 *AccountLocator) Show(options rsapi.APIParams) (*Account, error) {
	var res *Account
	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("Account", "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 AnalysisSnapshot struct {
}
type AnalysisSnapshotLocator struct {
	Href
	api *API
}
func (api *API) AnalysisSnapshotLocator(href string) *AnalysisSnapshotLocator {
	return &AnalysisSnapshotLocator{Href(href), api}
}
func (loc *AnalysisSnapshotLocator) Create(endTime *time.Time, granularity string, startTime *time.Time, options rsapi.APIParams) (*AnalysisSnapshotLocator, error) {
	var res *AnalysisSnapshotLocator
	if granularity == "" {
		return res, fmt.Errorf("granularity is required")
	}
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"end_time":    endTime,
		"granularity": granularity,
		"start_time":  startTime,
	}
	var excludedTagTypesOpt = options["excluded_tag_types"]
	if excludedTagTypesOpt != nil {
		p["excluded_tag_types"] = excludedTagTypesOpt
	}
	var filtersOpt = options["filters"]
	if filtersOpt != nil {
		p["filters"] = filtersOpt
	}
	var isComparisonOpt = options["is_comparison"]
	if isComparisonOpt != nil {
		p["is_comparison"] = isComparisonOpt
	}
	var metricsOpt = options["metrics"]
	if metricsOpt != nil {
		p["metrics"] = metricsOpt
	}
	var moduleStatesOpt = options["module_states"]
	if moduleStatesOpt != nil {
		p["module_states"] = moduleStatesOpt
	}
	uri, err := loc.ActionPath("AnalysisSnapshot", "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)
	}
	location := resp.Header.Get("Location")
	if len(location) == 0 {
		return res, fmt.Errorf("Missing location header in response")
	} else {
		return &AnalysisSnapshotLocator{Href(location), loc.api}, nil
	}
}
func (loc *AnalysisSnapshotLocator) Show(options rsapi.APIParams) (*AnalysisSnapshot, error) {
	var res *AnalysisSnapshot
	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("AnalysisSnapshot", "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 BudgetAlert struct {
}
type BudgetAlertLocator struct {
	Href
	api *API
}
func (api *API) BudgetAlertLocator(href string) *BudgetAlertLocator {
	return &BudgetAlertLocator{Href(href), api}
}