ss/ssc/codegen_client.go
func (loc *ApplicationLocator) Create(name string, shortDescription string, options rsapi.APIParams) (*ApplicationLocator, error) {
	var res *ApplicationLocator
	if name == "" {
		return res, fmt.Errorf("name is required")
	}
	if shortDescription == "" {
		return res, fmt.Errorf("shortDescription is required")
	}
	var params rsapi.APIParams
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"name":              name,
		"short_description": shortDescription,
	}
	var compiledCatOpt = options["compiled_cat"]
	if compiledCatOpt != nil {
		p["compiled_cat"] = compiledCatOpt
	}
	var longDescriptionOpt = options["long_description"]
	if longDescriptionOpt != nil {
		p["long_description"] = longDescriptionOpt
	}
	var scheduleRequiredOpt = options["schedule_required"]
	if scheduleRequiredOpt != nil {
		p["schedule_required"] = scheduleRequiredOpt
	}
	var schedulesOpt = options["schedules"]
	if schedulesOpt != nil {
		p["schedules"] = schedulesOpt
	}
	var templateHrefOpt = options["template_href"]
	if templateHrefOpt != nil {
		p["template_href"] = templateHrefOpt
	}
	uri, err := loc.ActionPath("Application", "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 &ApplicationLocator{Href(location), loc.api}, nil
	}
}
func (loc *ApplicationLocator) Create(name string, shortDescription string, options rsapi.APIParams) (*ApplicationLocator, error) {
	var res *ApplicationLocator
	if name == "" {
		return res, fmt.Errorf("name is required")
	}
	if shortDescription == "" {
		return res, fmt.Errorf("shortDescription is required")
	}
	var params rsapi.APIParams
	var p rsapi.APIParams
	p = rsapi.APIParams{
		"name":              name,
		"short_description": shortDescription,
	}
	var compiledCatOpt = options["compiled_cat"]
	if compiledCatOpt != nil {
		p["compiled_cat"] = compiledCatOpt
	}
	var longDescriptionOpt = options["long_description"]
	if longDescriptionOpt != nil {
		p["long_description"] = longDescriptionOpt
	}
	var scheduleRequiredOpt = options["schedule_required"]
	if scheduleRequiredOpt != nil {
		p["schedule_required"] = scheduleRequiredOpt
	}
	var schedulesOpt = options["schedules"]
	if schedulesOpt != nil {
		p["schedules"] = schedulesOpt
	}
	var templateHrefOpt = options["template_href"]
	if templateHrefOpt != nil {
		p["template_href"] = templateHrefOpt
	}
	uri, err := loc.ActionPath("Application", "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 &ApplicationLocator{Href(location), loc.api}, nil
	}
}
// POST /api/catalog/catalogs/:catalog_id/applications
//
// Create a new Application in the Catalog.