ca/cac/codegen_client.go
func (loc *PatternLocator) Update(options rsapi.APIParams) (*Pattern, error) {
	var res *Pattern
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	p = rsapi.APIParams{}
	var monthsOpt = options["months"]
	if monthsOpt != nil {
		p["months"] = monthsOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		p["name"] = nameOpt
	}
	var operationOpt = options["operation"]
	if operationOpt != nil {
		p["operation"] = operationOpt
	}
	var summaryOpt = options["summary"]
	if summaryOpt != nil {
		p["summary"] = summaryOpt
	}
	var type_Opt = options["type"]
	if type_Opt != nil {
		p["type"] = type_Opt
	}
	var valueOpt = options["value"]
	if valueOpt != nil {
		p["value"] = valueOpt
	}
	var yearsOpt = options["years"]
	if yearsOpt != nil {
		p["years"] = yearsOpt
	}
	uri, err := loc.ActionPath("Pattern", "update")
	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 *PatternLocator) Update(options rsapi.APIParams) (*Pattern, error) {
	var res *Pattern
	var params rsapi.APIParams
	params = rsapi.APIParams{}
	var viewOpt = options["view"]
	if viewOpt != nil {
		params["view"] = viewOpt
	}
	var p rsapi.APIParams
	p = rsapi.APIParams{}
	var monthsOpt = options["months"]
	if monthsOpt != nil {
		p["months"] = monthsOpt
	}
	var nameOpt = options["name"]
	if nameOpt != nil {
		p["name"] = nameOpt
	}
	var operationOpt = options["operation"]
	if operationOpt != nil {
		p["operation"] = operationOpt
	}
	var summaryOpt = options["summary"]
	if summaryOpt != nil {
		p["summary"] = summaryOpt
	}
	var type_Opt = options["type"]
	if type_Opt != nil {
		p["type"] = type_Opt
	}
	var valueOpt = options["value"]
	if valueOpt != nil {
		p["value"] = valueOpt
	}
	var yearsOpt = options["years"]
	if yearsOpt != nil {
		p["years"] = yearsOpt
	}
	uri, err := loc.ActionPath("Pattern", "update")
	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
}
// PATCH /api/patterns/:id
//
// Update the provided attributes of a Pattern.