ca/cac/codegen_client.go
func (loc *InstanceCombinationLocator) Create(cloudName string, cloudVendorName string, instanceTypeName string, monthlyUsageOption string, platform string, quantity int, options rsapi.APIParams) (*InstanceCombinationLocator, error) {
	var res *InstanceCombinationLocator
	if cloudName == "" {
		return res, fmt.Errorf("cloudName is required")
	}
	if cloudVendorName == "" {
		return res, fmt.Errorf("cloudVendorName is required")
	}
	if instanceTypeName == "" {
		return res, fmt.Errorf("instanceTypeName is required")
	}
	if monthlyUsageOption == "" {
		return res, fmt.Errorf("monthlyUsageOption is required")
	}
	if platform == "" {
		return res, fmt.Errorf("platform 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{
		"cloud_name":           cloudName,
		"cloud_vendor_name":    cloudVendorName,
		"instance_type_name":   instanceTypeName,
		"monthly_usage_option": monthlyUsageOption,
		"platform":             platform,
		"quantity":             quantity,
	}
	var datacenterNameOpt = options["datacenter_name"]
	if datacenterNameOpt != nil {
		p["datacenter_name"] = datacenterNameOpt
	}
	var monthlyUsageHoursOpt = options["monthly_usage_hours"]
	if monthlyUsageHoursOpt != nil {
		p["monthly_usage_hours"] = monthlyUsageHoursOpt
	}
	var patternsOpt = options["patterns"]
	if patternsOpt != nil {
		p["patterns"] = patternsOpt
	}
	uri, err := loc.ActionPath("InstanceCombination", "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 &InstanceCombinationLocator{Href(location), loc.api}, nil
	}
}
func (loc *InstanceCombinationLocator) Create(cloudName string, cloudVendorName string, instanceTypeName string, monthlyUsageOption string, platform string, quantity int, options rsapi.APIParams) (*InstanceCombinationLocator, error) {
	var res *InstanceCombinationLocator
	if cloudName == "" {
		return res, fmt.Errorf("cloudName is required")
	}
	if cloudVendorName == "" {
		return res, fmt.Errorf("cloudVendorName is required")
	}
	if instanceTypeName == "" {
		return res, fmt.Errorf("instanceTypeName is required")
	}
	if monthlyUsageOption == "" {
		return res, fmt.Errorf("monthlyUsageOption is required")
	}
	if platform == "" {
		return res, fmt.Errorf("platform 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{
		"cloud_name":           cloudName,
		"cloud_vendor_name":    cloudVendorName,
		"instance_type_name":   instanceTypeName,
		"monthly_usage_option": monthlyUsageOption,
		"platform":             platform,
		"quantity":             quantity,
	}
	var datacenterNameOpt = options["datacenter_name"]
	if datacenterNameOpt != nil {
		p["datacenter_name"] = datacenterNameOpt
	}
	var monthlyUsageHoursOpt = options["monthly_usage_hours"]
	if monthlyUsageHoursOpt != nil {
		p["monthly_usage_hours"] = monthlyUsageHoursOpt
	}
	var patternsOpt = options["patterns"]
	if patternsOpt != nil {
		p["patterns"] = patternsOpt
	}
	uri, err := loc.ActionPath("InstanceCombination", "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 &InstanceCombinationLocator{Href(location), loc.api}, nil
	}
}
//===== Actions
// POST /api/scenarios/:scenario_id/instance_combinations
//
// Create a new InstanceCombination.