ca/cac/codegen_client.go
func (loc *ScenarioLocator) Create(snapshotTimestamp *time.Time, options rsapi.APIParams) (*ScenarioLocator, error) {
	var res *ScenarioLocator
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"snapshot_timestamp": snapshotTimestamp,
	}
	var filtersOpt = options["filters"]
	if filtersOpt != nil {
		p["filters"] = filtersOpt
	}
	var isBlankOpt = options["is_blank"]
	if isBlankOpt != nil {
		p["is_blank"] = isBlankOpt
	}
	var isPersistedOpt = options["is_persisted"]
	if isPersistedOpt != nil {
		p["is_persisted"] = isPersistedOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		p["name"] = nameOpt
	}
	var privateCloudInstanceCountOpt = options["private_cloud_instance_count"]
	if privateCloudInstanceCountOpt != nil {
		p["private_cloud_instance_count"] = privateCloudInstanceCountOpt
	}
	uri, err := loc.ActionPath("Scenario", "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 &ScenarioLocator{Href(location), loc.api}, nil
	}
}
func (loc *ScenarioLocator) Create(snapshotTimestamp *time.Time, options rsapi.APIParams) (*ScenarioLocator, error) {
	var res *ScenarioLocator
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"snapshot_timestamp": snapshotTimestamp,
	}
	var filtersOpt = options["filters"]
	if filtersOpt != nil {
		p["filters"] = filtersOpt
	}
	var isBlankOpt = options["is_blank"]
	if isBlankOpt != nil {
		p["is_blank"] = isBlankOpt
	}
	var isPersistedOpt = options["is_persisted"]
	if isPersistedOpt != nil {
		p["is_persisted"] = isPersistedOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		p["name"] = nameOpt
	}
	var privateCloudInstanceCountOpt = options["private_cloud_instance_count"]
	if privateCloudInstanceCountOpt != nil {
		p["private_cloud_instance_count"] = privateCloudInstanceCountOpt
	}
	uri, err := loc.ActionPath("Scenario", "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 &ScenarioLocator{Href(location), loc.api}, nil
	}
}
//===== Actions
// POST /api/scenarios
//
// Create a new Scenario.