teamcity/context_params.go [63:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	var plan contextParamsResourceModel
	diags := req.Plan.Get(ctx, &plan)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	var params map[string]string
	diags = plan.Params.ElementsAs(ctx, &params, false)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	result, err := r.client.SetContextParams(plan.Project.ValueString(), params)
	if err != nil {
		resp.Diagnostics.AddError(
			"Error setting context parameters",
			err.Error(),
		)
		return
	}
	v, diags := types.MapValueFrom(ctx, types.StringType, result)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	var newState contextParamsResourceModel
	newState.Project = plan.Project
	newState.Params = v

	diags = resp.State.Set(ctx, newState)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



teamcity/context_params.go [137:172]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	var plan contextParamsResourceModel
	diags := req.Plan.Get(ctx, &plan)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	var params map[string]string
	diags = plan.Params.ElementsAs(ctx, &params, false)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	result, err := r.client.SetContextParams(plan.Project.ValueString(), params)
	if err != nil {
		resp.Diagnostics.AddError(
			"Error setting context parameters",
			err.Error(),
		)
		return
	}
	v, diags := types.MapValueFrom(ctx, types.StringType, result)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	var newState contextParamsResourceModel
	newState.Project = plan.Project
	newState.Params = v

	diags = resp.State.Set(ctx, newState)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



