ss/ssm/codegen_client.go
func (loc *ExecutionLocator) Create(options rsapi.APIParams) (*ExecutionLocator, error) {
	var res *ExecutionLocator
	var params rsapi.APIParams
	var p rsapi.APIParams
	p = rsapi.APIParams{}
	var applicationHrefOpt = options["application_href"]
	if applicationHrefOpt != nil {
		p["application_href"] = applicationHrefOpt
	}
	var compilationHrefOpt = options["compilation_href"]
	if compilationHrefOpt != nil {
		p["compilation_href"] = compilationHrefOpt
	}
	var compiledCatOpt = options["compiled_cat"]
	if compiledCatOpt != nil {
		p["compiled_cat"] = compiledCatOpt
	}
	var currentScheduleOpt = options["current_schedule"]
	if currentScheduleOpt != nil {
		p["current_schedule"] = currentScheduleOpt
	}
	var deferLaunchOpt = options["defer_launch"]
	if deferLaunchOpt != nil {
		p["defer_launch"] = deferLaunchOpt
	}
	var descriptionOpt = options["description"]
	if descriptionOpt != nil {
		p["description"] = descriptionOpt
	}
	var endsAtOpt = options["ends_at"]
	if endsAtOpt != nil {
		p["ends_at"] = endsAtOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		p["name"] = nameOpt
	}
	var options_Opt = options["options"]
	if options_Opt != nil {
		p["options"] = options_Opt
	}
	var scheduleRequiredOpt = options["schedule_required"]
	if scheduleRequiredOpt != nil {
		p["schedule_required"] = scheduleRequiredOpt
	}
	var scheduledActionsOpt = options["scheduled_actions"]
	if scheduledActionsOpt != nil {
		p["scheduled_actions"] = scheduledActionsOpt
	}
	var schedulesOpt = options["schedules"]
	if schedulesOpt != nil {
		p["schedules"] = schedulesOpt
	}
	var sourceOpt = options["source"]
	if sourceOpt != nil {
		p["source"] = sourceOpt
	}
	var templateHrefOpt = options["template_href"]
	if templateHrefOpt != nil {
		p["template_href"] = templateHrefOpt
	}
	uri, err := loc.ActionPath("Execution", "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 &ExecutionLocator{Href(location), loc.api}, nil
	}
}
func (loc *ExecutionLocator) Create(options rsapi.APIParams) (*ExecutionLocator, error) {
	var res *ExecutionLocator
	var params rsapi.APIParams
	var p rsapi.APIParams
	p = rsapi.APIParams{}
	var applicationHrefOpt = options["application_href"]
	if applicationHrefOpt != nil {
		p["application_href"] = applicationHrefOpt
	}
	var compilationHrefOpt = options["compilation_href"]
	if compilationHrefOpt != nil {
		p["compilation_href"] = compilationHrefOpt
	}
	var compiledCatOpt = options["compiled_cat"]
	if compiledCatOpt != nil {
		p["compiled_cat"] = compiledCatOpt
	}
	var currentScheduleOpt = options["current_schedule"]
	if currentScheduleOpt != nil {
		p["current_schedule"] = currentScheduleOpt
	}
	var deferLaunchOpt = options["defer_launch"]
	if deferLaunchOpt != nil {
		p["defer_launch"] = deferLaunchOpt
	}
	var descriptionOpt = options["description"]
	if descriptionOpt != nil {
		p["description"] = descriptionOpt
	}
	var endsAtOpt = options["ends_at"]
	if endsAtOpt != nil {
		p["ends_at"] = endsAtOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		p["name"] = nameOpt
	}
	var options_Opt = options["options"]
	if options_Opt != nil {
		p["options"] = options_Opt
	}
	var scheduleRequiredOpt = options["schedule_required"]
	if scheduleRequiredOpt != nil {
		p["schedule_required"] = scheduleRequiredOpt
	}
	var scheduledActionsOpt = options["scheduled_actions"]
	if scheduledActionsOpt != nil {
		p["scheduled_actions"] = scheduledActionsOpt
	}
	var schedulesOpt = options["schedules"]
	if schedulesOpt != nil {
		p["schedules"] = schedulesOpt
	}
	var sourceOpt = options["source"]
	if sourceOpt != nil {
		p["source"] = sourceOpt
	}
	var templateHrefOpt = options["template_href"]
	if templateHrefOpt != nil {
		p["template_href"] = templateHrefOpt
	}
	uri, err := loc.ActionPath("Execution", "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 &ExecutionLocator{Href(location), loc.api}, nil
	}
}
// POST /api/manager/projects/:project_id/executions
//
// Create a new execution from a CAT, a compiled CAT, an Application in the Catalog, or a Template in Designer