ca/cac/codegen_client.go
func (loc *UserSettingLocator) Update(options rsapi.APIParams) (*UserSetting, error) {
	var res *UserSetting
	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 dateRangeOpt = options["date_range"]
	if dateRangeOpt != nil {
		p["date_range"] = dateRangeOpt
	}
	var dismissedDialogsOpt = options["dismissed_dialogs"]
	if dismissedDialogsOpt != nil {
		p["dismissed_dialogs"] = dismissedDialogsOpt
	}
	var excludedTagTypesOpt = options["excluded_tag_types"]
	if excludedTagTypesOpt != nil {
		p["excluded_tag_types"] = excludedTagTypesOpt
	}
	var filtersOpt = options["filters"]
	if filtersOpt != nil {
		p["filters"] = filtersOpt
	}
	var granularityOpt = options["granularity"]
	if granularityOpt != nil {
		p["granularity"] = granularityOpt
	}
	var mainMenuVisibilityOpt = options["main_menu_visibility"]
	if mainMenuVisibilityOpt != nil {
		p["main_menu_visibility"] = mainMenuVisibilityOpt
	}
	var metricsOpt = options["metrics"]
	if metricsOpt != nil {
		p["metrics"] = metricsOpt
	}
	var moduleStatesOpt = options["module_states"]
	if moduleStatesOpt != nil {
		p["module_states"] = moduleStatesOpt
	}
	var onboardingStatusOpt = options["onboarding_status"]
	if onboardingStatusOpt != nil {
		p["onboarding_status"] = onboardingStatusOpt
	}
	var selectedCloudVendorNamesOpt = options["selected_cloud_vendor_names"]
	if selectedCloudVendorNamesOpt != nil {
		p["selected_cloud_vendor_names"] = selectedCloudVendorNamesOpt
	}
	var sortingOpt = options["sorting"]
	if sortingOpt != nil {
		p["sorting"] = sortingOpt
	}
	var tableColumnVisibilityOpt = options["table_column_visibility"]
	if tableColumnVisibilityOpt != nil {
		p["table_column_visibility"] = tableColumnVisibilityOpt
	}
	uri, err := loc.ActionPath("UserSetting", "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 *UserSettingLocator) Update(options rsapi.APIParams) (*UserSetting, error) {
	var res *UserSetting
	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 dateRangeOpt = options["date_range"]
	if dateRangeOpt != nil {
		p["date_range"] = dateRangeOpt
	}
	var dismissedDialogsOpt = options["dismissed_dialogs"]
	if dismissedDialogsOpt != nil {
		p["dismissed_dialogs"] = dismissedDialogsOpt
	}
	var excludedTagTypesOpt = options["excluded_tag_types"]
	if excludedTagTypesOpt != nil {
		p["excluded_tag_types"] = excludedTagTypesOpt
	}
	var filtersOpt = options["filters"]
	if filtersOpt != nil {
		p["filters"] = filtersOpt
	}
	var granularityOpt = options["granularity"]
	if granularityOpt != nil {
		p["granularity"] = granularityOpt
	}
	var mainMenuVisibilityOpt = options["main_menu_visibility"]
	if mainMenuVisibilityOpt != nil {
		p["main_menu_visibility"] = mainMenuVisibilityOpt
	}
	var metricsOpt = options["metrics"]
	if metricsOpt != nil {
		p["metrics"] = metricsOpt
	}
	var moduleStatesOpt = options["module_states"]
	if moduleStatesOpt != nil {
		p["module_states"] = moduleStatesOpt
	}
	var onboardingStatusOpt = options["onboarding_status"]
	if onboardingStatusOpt != nil {
		p["onboarding_status"] = onboardingStatusOpt
	}
	var selectedCloudVendorNamesOpt = options["selected_cloud_vendor_names"]
	if selectedCloudVendorNamesOpt != nil {
		p["selected_cloud_vendor_names"] = selectedCloudVendorNamesOpt
	}
	var sortingOpt = options["sorting"]
	if sortingOpt != nil {
		p["sorting"] = sortingOpt
	}
	var tableColumnVisibilityOpt = options["table_column_visibility"]
	if tableColumnVisibilityOpt != nil {
		p["table_column_visibility"] = tableColumnVisibilityOpt
	}
	uri, err := loc.ActionPath("UserSetting", "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/user_settings
//
// Update the provided attributes of UserSettings.