Skip to content

Commit c0e650a

Browse files
committed
Update deprecated
1 parent 5c82255 commit c0e650a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

internal/service/invoicing/invoice_unit.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ type ruleModel struct {
121121

122122
func (r *invoiceUnitResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) {
123123
var data invoiceUnitResourceModel
124-
smerr.EnrichAppend(ctx, &response.Diagnostics, request.Plan.Get(ctx, &data))
124+
smerr.AddEnrich(ctx, &response.Diagnostics, request.Plan.Get(ctx, &data))
125125
if response.Diagnostics.HasError() {
126126
return
127127
}
128128

129129
conn := r.Meta().InvoicingClient(ctx)
130130

131131
input := invoicing.CreateInvoiceUnitInput{}
132-
smerr.EnrichAppend(ctx, &response.Diagnostics, fwflex.Expand(ctx, data, &input))
132+
smerr.AddEnrich(ctx, &response.Diagnostics, fwflex.Expand(ctx, data, &input))
133133
if response.Diagnostics.HasError() {
134134
return
135135
}
@@ -152,17 +152,17 @@ func (r *invoiceUnitResource) Create(ctx context.Context, request resource.Creat
152152
}
153153

154154
// Set values for unknowns after creation is complete
155-
smerr.EnrichAppend(ctx, &response.Diagnostics, fwflex.Flatten(ctx, invoiceUnit, &data, fwflex.WithFieldNamePrefix("InvoiceUnit")))
155+
smerr.AddEnrich(ctx, &response.Diagnostics, fwflex.Flatten(ctx, invoiceUnit, &data, fwflex.WithFieldNamePrefix("InvoiceUnit")))
156156
if response.Diagnostics.HasError() {
157157
return
158158
}
159159

160-
smerr.EnrichAppend(ctx, &response.Diagnostics, response.State.Set(ctx, data))
160+
smerr.AddEnrich(ctx, &response.Diagnostics, response.State.Set(ctx, data))
161161
}
162162

163163
func (r *invoiceUnitResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) {
164164
var data invoiceUnitResourceModel
165-
smerr.EnrichAppend(ctx, &response.Diagnostics, request.State.Get(ctx, &data))
165+
smerr.AddEnrich(ctx, &response.Diagnostics, request.State.Get(ctx, &data))
166166
if response.Diagnostics.HasError() {
167167
return
168168
}
@@ -180,18 +180,18 @@ func (r *invoiceUnitResource) Read(ctx context.Context, request resource.ReadReq
180180
return
181181
}
182182

183-
smerr.EnrichAppend(ctx, &response.Diagnostics, fwflex.Flatten(ctx, output, &data, fwflex.WithFieldNamePrefix("InvoiceUnit")))
183+
smerr.AddEnrich(ctx, &response.Diagnostics, fwflex.Flatten(ctx, output, &data, fwflex.WithFieldNamePrefix("InvoiceUnit")))
184184
if response.Diagnostics.HasError() {
185185
return
186186
}
187187

188-
smerr.EnrichAppend(ctx, &response.Diagnostics, response.State.Set(ctx, data))
188+
smerr.AddEnrich(ctx, &response.Diagnostics, response.State.Set(ctx, data))
189189
}
190190

191191
func (r *invoiceUnitResource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) {
192192
var old, new invoiceUnitResourceModel
193-
smerr.EnrichAppend(ctx, &response.Diagnostics, request.State.Get(ctx, &old))
194-
smerr.EnrichAppend(ctx, &response.Diagnostics, request.Plan.Get(ctx, &new))
193+
smerr.AddEnrich(ctx, &response.Diagnostics, request.State.Get(ctx, &old))
194+
smerr.AddEnrich(ctx, &response.Diagnostics, request.Plan.Get(ctx, &new))
195195
if response.Diagnostics.HasError() {
196196
return
197197
}
@@ -204,7 +204,7 @@ func (r *invoiceUnitResource) Update(ctx context.Context, request resource.Updat
204204
input := invoicing.UpdateInvoiceUnitInput{
205205
InvoiceUnitArn: new.ARN.ValueStringPointer(),
206206
}
207-
smerr.EnrichAppend(ctx, &response.Diagnostics, fwflex.Expand(ctx, new, &input))
207+
smerr.AddEnrich(ctx, &response.Diagnostics, fwflex.Expand(ctx, new, &input))
208208
if response.Diagnostics.HasError() {
209209
return
210210
}
@@ -222,12 +222,12 @@ func (r *invoiceUnitResource) Update(ctx context.Context, request resource.Updat
222222
}
223223
}
224224

225-
smerr.EnrichAppend(ctx, &response.Diagnostics, response.State.Set(ctx, new))
225+
smerr.AddEnrich(ctx, &response.Diagnostics, response.State.Set(ctx, new))
226226
}
227227

228228
func (r *invoiceUnitResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) {
229229
var data invoiceUnitResourceModel
230-
smerr.EnrichAppend(ctx, &response.Diagnostics, request.State.Get(ctx, &data))
230+
smerr.AddEnrich(ctx, &response.Diagnostics, request.State.Get(ctx, &data))
231231
if response.Diagnostics.HasError() {
232232
return
233233
}

0 commit comments

Comments
 (0)