@@ -17,29 +17,29 @@ import (
17
17
"github.com/cloudflare/cloudflare-go/v3/shared"
18
18
)
19
19
20
- // SfuService contains methods and other services that help with interacting with
20
+ // SFUService contains methods and other services that help with interacting with
21
21
// the cloudflare API.
22
22
//
23
23
// Note, unlike clients, this service does not read variables from the environment
24
24
// automatically. You should not instantiate this service directly, and instead use
25
- // the [NewSfuService ] method instead.
26
- type SfuService struct {
25
+ // the [NewSFUService ] method instead.
26
+ type SFUService struct {
27
27
Options []option.RequestOption
28
28
}
29
29
30
- // NewSfuService generates a new service that applies the given options to each
30
+ // NewSFUService generates a new service that applies the given options to each
31
31
// request. These options are applied after the parent client's options (if there
32
32
// is one), and before any request-specific options.
33
- func NewSfuService (opts ... option.RequestOption ) (r * SfuService ) {
34
- r = & SfuService {}
33
+ func NewSFUService (opts ... option.RequestOption ) (r * SFUService ) {
34
+ r = & SFUService {}
35
35
r .Options = opts
36
36
return
37
37
}
38
38
39
39
// Creates a new Cloudflare calls app. An app is an unique enviroment where each
40
40
// Session can access all Tracks within the app.
41
- func (r * SfuService ) New (ctx context.Context , params SfuNewParams , opts ... option.RequestOption ) (res * SfuNewResponse , err error ) {
42
- var env SfuNewResponseEnvelope
41
+ func (r * SFUService ) New (ctx context.Context , params SFUNewParams , opts ... option.RequestOption ) (res * SFUNewResponse , err error ) {
42
+ var env SFUNewResponseEnvelope
43
43
opts = append (r .Options [:], opts ... )
44
44
if params .AccountID .Value == "" {
45
45
err = errors .New ("missing required account_id parameter" )
@@ -55,8 +55,8 @@ func (r *SfuService) New(ctx context.Context, params SfuNewParams, opts ...optio
55
55
}
56
56
57
57
// Edit details for a single app.
58
- func (r * SfuService ) Update (ctx context.Context , appID string , params SfuUpdateParams , opts ... option.RequestOption ) (res * SfuUpdateResponse , err error ) {
59
- var env SfuUpdateResponseEnvelope
58
+ func (r * SFUService ) Update (ctx context.Context , appID string , params SFUUpdateParams , opts ... option.RequestOption ) (res * SFUUpdateResponse , err error ) {
59
+ var env SFUUpdateResponseEnvelope
60
60
opts = append (r .Options [:], opts ... )
61
61
if params .AccountID .Value == "" {
62
62
err = errors .New ("missing required account_id parameter" )
@@ -76,7 +76,7 @@ func (r *SfuService) Update(ctx context.Context, appID string, params SfuUpdateP
76
76
}
77
77
78
78
// Lists all apps in the Cloudflare account
79
- func (r * SfuService ) List (ctx context.Context , query SfuListParams , opts ... option.RequestOption ) (res * pagination.SinglePage [SfuListResponse ], err error ) {
79
+ func (r * SFUService ) List (ctx context.Context , query SFUListParams , opts ... option.RequestOption ) (res * pagination.SinglePage [SFUListResponse ], err error ) {
80
80
var raw * http.Response
81
81
opts = append (r .Options [:], opts ... )
82
82
opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
@@ -98,13 +98,13 @@ func (r *SfuService) List(ctx context.Context, query SfuListParams, opts ...opti
98
98
}
99
99
100
100
// Lists all apps in the Cloudflare account
101
- func (r * SfuService ) ListAutoPaging (ctx context.Context , query SfuListParams , opts ... option.RequestOption ) * pagination.SinglePageAutoPager [SfuListResponse ] {
101
+ func (r * SFUService ) ListAutoPaging (ctx context.Context , query SFUListParams , opts ... option.RequestOption ) * pagination.SinglePageAutoPager [SFUListResponse ] {
102
102
return pagination .NewSinglePageAutoPager (r .List (ctx , query , opts ... ))
103
103
}
104
104
105
105
// Deletes an app from Cloudflare Calls
106
- func (r * SfuService ) Delete (ctx context.Context , appID string , body SfuDeleteParams , opts ... option.RequestOption ) (res * SfuDeleteResponse , err error ) {
107
- var env SfuDeleteResponseEnvelope
106
+ func (r * SFUService ) Delete (ctx context.Context , appID string , body SFUDeleteParams , opts ... option.RequestOption ) (res * SFUDeleteResponse , err error ) {
107
+ var env SFUDeleteResponseEnvelope
108
108
opts = append (r .Options [:], opts ... )
109
109
if body .AccountID .Value == "" {
110
110
err = errors .New ("missing required account_id parameter" )
@@ -124,8 +124,8 @@ func (r *SfuService) Delete(ctx context.Context, appID string, body SfuDeletePar
124
124
}
125
125
126
126
// Fetches details for a single Calls app.
127
- func (r * SfuService ) Get (ctx context.Context , appID string , query SfuGetParams , opts ... option.RequestOption ) (res * SfuGetResponse , err error ) {
128
- var env SfuGetResponseEnvelope
127
+ func (r * SFUService ) Get (ctx context.Context , appID string , query SFUGetParams , opts ... option.RequestOption ) (res * SFUGetResponse , err error ) {
128
+ var env SFUGetResponseEnvelope
129
129
opts = append (r .Options [:], opts ... )
130
130
if query .AccountID .Value == "" {
131
131
err = errors .New ("missing required account_id parameter" )
@@ -144,7 +144,7 @@ func (r *SfuService) Get(ctx context.Context, appID string, query SfuGetParams,
144
144
return
145
145
}
146
146
147
- type SfuNewResponse struct {
147
+ type SFUNewResponse struct {
148
148
// The date and time the item was created.
149
149
Created time.Time `json:"created" format:"date-time"`
150
150
// The date and time the item was last modified.
@@ -158,7 +158,7 @@ type SfuNewResponse struct {
158
158
JSON sfuNewResponseJSON `json:"-"`
159
159
}
160
160
161
- // sfuNewResponseJSON contains the JSON metadata for the struct [SfuNewResponse ]
161
+ // sfuNewResponseJSON contains the JSON metadata for the struct [SFUNewResponse ]
162
162
type sfuNewResponseJSON struct {
163
163
Created apijson.Field
164
164
Modified apijson.Field
@@ -169,15 +169,15 @@ type sfuNewResponseJSON struct {
169
169
ExtraFields map [string ]apijson.Field
170
170
}
171
171
172
- func (r * SfuNewResponse ) UnmarshalJSON (data []byte ) (err error ) {
172
+ func (r * SFUNewResponse ) UnmarshalJSON (data []byte ) (err error ) {
173
173
return apijson .UnmarshalRoot (data , r )
174
174
}
175
175
176
176
func (r sfuNewResponseJSON ) RawJSON () string {
177
177
return r .raw
178
178
}
179
179
180
- type SfuUpdateResponse struct {
180
+ type SFUUpdateResponse struct {
181
181
// The date and time the item was created.
182
182
Created time.Time `json:"created" format:"date-time"`
183
183
// The date and time the item was last modified.
@@ -190,7 +190,7 @@ type SfuUpdateResponse struct {
190
190
}
191
191
192
192
// sfuUpdateResponseJSON contains the JSON metadata for the struct
193
- // [SfuUpdateResponse ]
193
+ // [SFUUpdateResponse ]
194
194
type sfuUpdateResponseJSON struct {
195
195
Created apijson.Field
196
196
Modified apijson.Field
@@ -200,15 +200,15 @@ type sfuUpdateResponseJSON struct {
200
200
ExtraFields map [string ]apijson.Field
201
201
}
202
202
203
- func (r * SfuUpdateResponse ) UnmarshalJSON (data []byte ) (err error ) {
203
+ func (r * SFUUpdateResponse ) UnmarshalJSON (data []byte ) (err error ) {
204
204
return apijson .UnmarshalRoot (data , r )
205
205
}
206
206
207
207
func (r sfuUpdateResponseJSON ) RawJSON () string {
208
208
return r .raw
209
209
}
210
210
211
- type SfuListResponse struct {
211
+ type SFUListResponse struct {
212
212
// The date and time the item was created.
213
213
Created time.Time `json:"created" format:"date-time"`
214
214
// The date and time the item was last modified.
@@ -220,7 +220,7 @@ type SfuListResponse struct {
220
220
JSON sfuListResponseJSON `json:"-"`
221
221
}
222
222
223
- // sfuListResponseJSON contains the JSON metadata for the struct [SfuListResponse ]
223
+ // sfuListResponseJSON contains the JSON metadata for the struct [SFUListResponse ]
224
224
type sfuListResponseJSON struct {
225
225
Created apijson.Field
226
226
Modified apijson.Field
@@ -230,15 +230,15 @@ type sfuListResponseJSON struct {
230
230
ExtraFields map [string ]apijson.Field
231
231
}
232
232
233
- func (r * SfuListResponse ) UnmarshalJSON (data []byte ) (err error ) {
233
+ func (r * SFUListResponse ) UnmarshalJSON (data []byte ) (err error ) {
234
234
return apijson .UnmarshalRoot (data , r )
235
235
}
236
236
237
237
func (r sfuListResponseJSON ) RawJSON () string {
238
238
return r .raw
239
239
}
240
240
241
- type SfuDeleteResponse struct {
241
+ type SFUDeleteResponse struct {
242
242
// The date and time the item was created.
243
243
Created time.Time `json:"created" format:"date-time"`
244
244
// The date and time the item was last modified.
@@ -251,7 +251,7 @@ type SfuDeleteResponse struct {
251
251
}
252
252
253
253
// sfuDeleteResponseJSON contains the JSON metadata for the struct
254
- // [SfuDeleteResponse ]
254
+ // [SFUDeleteResponse ]
255
255
type sfuDeleteResponseJSON struct {
256
256
Created apijson.Field
257
257
Modified apijson.Field
@@ -261,15 +261,15 @@ type sfuDeleteResponseJSON struct {
261
261
ExtraFields map [string ]apijson.Field
262
262
}
263
263
264
- func (r * SfuDeleteResponse ) UnmarshalJSON (data []byte ) (err error ) {
264
+ func (r * SFUDeleteResponse ) UnmarshalJSON (data []byte ) (err error ) {
265
265
return apijson .UnmarshalRoot (data , r )
266
266
}
267
267
268
268
func (r sfuDeleteResponseJSON ) RawJSON () string {
269
269
return r .raw
270
270
}
271
271
272
- type SfuGetResponse struct {
272
+ type SFUGetResponse struct {
273
273
// The date and time the item was created.
274
274
Created time.Time `json:"created" format:"date-time"`
275
275
// The date and time the item was last modified.
@@ -281,7 +281,7 @@ type SfuGetResponse struct {
281
281
JSON sfuGetResponseJSON `json:"-"`
282
282
}
283
283
284
- // sfuGetResponseJSON contains the JSON metadata for the struct [SfuGetResponse ]
284
+ // sfuGetResponseJSON contains the JSON metadata for the struct [SFUGetResponse ]
285
285
type sfuGetResponseJSON struct {
286
286
Created apijson.Field
287
287
Modified apijson.Field
@@ -291,36 +291,36 @@ type sfuGetResponseJSON struct {
291
291
ExtraFields map [string ]apijson.Field
292
292
}
293
293
294
- func (r * SfuGetResponse ) UnmarshalJSON (data []byte ) (err error ) {
294
+ func (r * SFUGetResponse ) UnmarshalJSON (data []byte ) (err error ) {
295
295
return apijson .UnmarshalRoot (data , r )
296
296
}
297
297
298
298
func (r sfuGetResponseJSON ) RawJSON () string {
299
299
return r .raw
300
300
}
301
301
302
- type SfuNewParams struct {
302
+ type SFUNewParams struct {
303
303
// The account identifier tag.
304
304
AccountID param.Field [string ] `path:"account_id,required"`
305
305
// A short description of Calls app, not shown to end users.
306
306
Name param.Field [string ] `json:"name"`
307
307
}
308
308
309
- func (r SfuNewParams ) MarshalJSON () (data []byte , err error ) {
309
+ func (r SFUNewParams ) MarshalJSON () (data []byte , err error ) {
310
310
return apijson .MarshalRoot (r )
311
311
}
312
312
313
- type SfuNewResponseEnvelope struct {
313
+ type SFUNewResponseEnvelope struct {
314
314
Errors []shared.ResponseInfo `json:"errors,required"`
315
315
Messages []shared.ResponseInfo `json:"messages,required"`
316
316
// Whether the API call was successful
317
- Success SfuNewResponseEnvelopeSuccess `json:"success,required"`
318
- Result SfuNewResponse `json:"result"`
317
+ Success SFUNewResponseEnvelopeSuccess `json:"success,required"`
318
+ Result SFUNewResponse `json:"result"`
319
319
JSON sfuNewResponseEnvelopeJSON `json:"-"`
320
320
}
321
321
322
322
// sfuNewResponseEnvelopeJSON contains the JSON metadata for the struct
323
- // [SfuNewResponseEnvelope ]
323
+ // [SFUNewResponseEnvelope ]
324
324
type sfuNewResponseEnvelopeJSON struct {
325
325
Errors apijson.Field
326
326
Messages apijson.Field
@@ -330,7 +330,7 @@ type sfuNewResponseEnvelopeJSON struct {
330
330
ExtraFields map [string ]apijson.Field
331
331
}
332
332
333
- func (r * SfuNewResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
333
+ func (r * SFUNewResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
334
334
return apijson .UnmarshalRoot (data , r )
335
335
}
336
336
@@ -339,42 +339,42 @@ func (r sfuNewResponseEnvelopeJSON) RawJSON() string {
339
339
}
340
340
341
341
// Whether the API call was successful
342
- type SfuNewResponseEnvelopeSuccess bool
342
+ type SFUNewResponseEnvelopeSuccess bool
343
343
344
344
const (
345
- SfuNewResponseEnvelopeSuccessTrue SfuNewResponseEnvelopeSuccess = true
345
+ SFUNewResponseEnvelopeSuccessTrue SFUNewResponseEnvelopeSuccess = true
346
346
)
347
347
348
- func (r SfuNewResponseEnvelopeSuccess ) IsKnown () bool {
348
+ func (r SFUNewResponseEnvelopeSuccess ) IsKnown () bool {
349
349
switch r {
350
- case SfuNewResponseEnvelopeSuccessTrue :
350
+ case SFUNewResponseEnvelopeSuccessTrue :
351
351
return true
352
352
}
353
353
return false
354
354
}
355
355
356
- type SfuUpdateParams struct {
356
+ type SFUUpdateParams struct {
357
357
// The account identifier tag.
358
358
AccountID param.Field [string ] `path:"account_id,required"`
359
359
// A short description of Calls app, not shown to end users.
360
360
Name param.Field [string ] `json:"name"`
361
361
}
362
362
363
- func (r SfuUpdateParams ) MarshalJSON () (data []byte , err error ) {
363
+ func (r SFUUpdateParams ) MarshalJSON () (data []byte , err error ) {
364
364
return apijson .MarshalRoot (r )
365
365
}
366
366
367
- type SfuUpdateResponseEnvelope struct {
367
+ type SFUUpdateResponseEnvelope struct {
368
368
Errors []shared.ResponseInfo `json:"errors,required"`
369
369
Messages []shared.ResponseInfo `json:"messages,required"`
370
370
// Whether the API call was successful
371
- Success SfuUpdateResponseEnvelopeSuccess `json:"success,required"`
372
- Result SfuUpdateResponse `json:"result"`
371
+ Success SFUUpdateResponseEnvelopeSuccess `json:"success,required"`
372
+ Result SFUUpdateResponse `json:"result"`
373
373
JSON sfuUpdateResponseEnvelopeJSON `json:"-"`
374
374
}
375
375
376
376
// sfuUpdateResponseEnvelopeJSON contains the JSON metadata for the struct
377
- // [SfuUpdateResponseEnvelope ]
377
+ // [SFUUpdateResponseEnvelope ]
378
378
type sfuUpdateResponseEnvelopeJSON struct {
379
379
Errors apijson.Field
380
380
Messages apijson.Field
@@ -384,7 +384,7 @@ type sfuUpdateResponseEnvelopeJSON struct {
384
384
ExtraFields map [string ]apijson.Field
385
385
}
386
386
387
- func (r * SfuUpdateResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
387
+ func (r * SFUUpdateResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
388
388
return apijson .UnmarshalRoot (data , r )
389
389
}
390
390
@@ -393,41 +393,41 @@ func (r sfuUpdateResponseEnvelopeJSON) RawJSON() string {
393
393
}
394
394
395
395
// Whether the API call was successful
396
- type SfuUpdateResponseEnvelopeSuccess bool
396
+ type SFUUpdateResponseEnvelopeSuccess bool
397
397
398
398
const (
399
- SfuUpdateResponseEnvelopeSuccessTrue SfuUpdateResponseEnvelopeSuccess = true
399
+ SFUUpdateResponseEnvelopeSuccessTrue SFUUpdateResponseEnvelopeSuccess = true
400
400
)
401
401
402
- func (r SfuUpdateResponseEnvelopeSuccess ) IsKnown () bool {
402
+ func (r SFUUpdateResponseEnvelopeSuccess ) IsKnown () bool {
403
403
switch r {
404
- case SfuUpdateResponseEnvelopeSuccessTrue :
404
+ case SFUUpdateResponseEnvelopeSuccessTrue :
405
405
return true
406
406
}
407
407
return false
408
408
}
409
409
410
- type SfuListParams struct {
410
+ type SFUListParams struct {
411
411
// The account identifier tag.
412
412
AccountID param.Field [string ] `path:"account_id,required"`
413
413
}
414
414
415
- type SfuDeleteParams struct {
415
+ type SFUDeleteParams struct {
416
416
// The account identifier tag.
417
417
AccountID param.Field [string ] `path:"account_id,required"`
418
418
}
419
419
420
- type SfuDeleteResponseEnvelope struct {
420
+ type SFUDeleteResponseEnvelope struct {
421
421
Errors []shared.ResponseInfo `json:"errors,required"`
422
422
Messages []shared.ResponseInfo `json:"messages,required"`
423
423
// Whether the API call was successful
424
- Success SfuDeleteResponseEnvelopeSuccess `json:"success,required"`
425
- Result SfuDeleteResponse `json:"result"`
424
+ Success SFUDeleteResponseEnvelopeSuccess `json:"success,required"`
425
+ Result SFUDeleteResponse `json:"result"`
426
426
JSON sfuDeleteResponseEnvelopeJSON `json:"-"`
427
427
}
428
428
429
429
// sfuDeleteResponseEnvelopeJSON contains the JSON metadata for the struct
430
- // [SfuDeleteResponseEnvelope ]
430
+ // [SFUDeleteResponseEnvelope ]
431
431
type sfuDeleteResponseEnvelopeJSON struct {
432
432
Errors apijson.Field
433
433
Messages apijson.Field
@@ -437,7 +437,7 @@ type sfuDeleteResponseEnvelopeJSON struct {
437
437
ExtraFields map [string ]apijson.Field
438
438
}
439
439
440
- func (r * SfuDeleteResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
440
+ func (r * SFUDeleteResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
441
441
return apijson .UnmarshalRoot (data , r )
442
442
}
443
443
@@ -446,36 +446,36 @@ func (r sfuDeleteResponseEnvelopeJSON) RawJSON() string {
446
446
}
447
447
448
448
// Whether the API call was successful
449
- type SfuDeleteResponseEnvelopeSuccess bool
449
+ type SFUDeleteResponseEnvelopeSuccess bool
450
450
451
451
const (
452
- SfuDeleteResponseEnvelopeSuccessTrue SfuDeleteResponseEnvelopeSuccess = true
452
+ SFUDeleteResponseEnvelopeSuccessTrue SFUDeleteResponseEnvelopeSuccess = true
453
453
)
454
454
455
- func (r SfuDeleteResponseEnvelopeSuccess ) IsKnown () bool {
455
+ func (r SFUDeleteResponseEnvelopeSuccess ) IsKnown () bool {
456
456
switch r {
457
- case SfuDeleteResponseEnvelopeSuccessTrue :
457
+ case SFUDeleteResponseEnvelopeSuccessTrue :
458
458
return true
459
459
}
460
460
return false
461
461
}
462
462
463
- type SfuGetParams struct {
463
+ type SFUGetParams struct {
464
464
// The account identifier tag.
465
465
AccountID param.Field [string ] `path:"account_id,required"`
466
466
}
467
467
468
- type SfuGetResponseEnvelope struct {
468
+ type SFUGetResponseEnvelope struct {
469
469
Errors []shared.ResponseInfo `json:"errors,required"`
470
470
Messages []shared.ResponseInfo `json:"messages,required"`
471
471
// Whether the API call was successful
472
- Success SfuGetResponseEnvelopeSuccess `json:"success,required"`
473
- Result SfuGetResponse `json:"result"`
472
+ Success SFUGetResponseEnvelopeSuccess `json:"success,required"`
473
+ Result SFUGetResponse `json:"result"`
474
474
JSON sfuGetResponseEnvelopeJSON `json:"-"`
475
475
}
476
476
477
477
// sfuGetResponseEnvelopeJSON contains the JSON metadata for the struct
478
- // [SfuGetResponseEnvelope ]
478
+ // [SFUGetResponseEnvelope ]
479
479
type sfuGetResponseEnvelopeJSON struct {
480
480
Errors apijson.Field
481
481
Messages apijson.Field
@@ -485,7 +485,7 @@ type sfuGetResponseEnvelopeJSON struct {
485
485
ExtraFields map [string ]apijson.Field
486
486
}
487
487
488
- func (r * SfuGetResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
488
+ func (r * SFUGetResponseEnvelope ) UnmarshalJSON (data []byte ) (err error ) {
489
489
return apijson .UnmarshalRoot (data , r )
490
490
}
491
491
@@ -494,15 +494,15 @@ func (r sfuGetResponseEnvelopeJSON) RawJSON() string {
494
494
}
495
495
496
496
// Whether the API call was successful
497
- type SfuGetResponseEnvelopeSuccess bool
497
+ type SFUGetResponseEnvelopeSuccess bool
498
498
499
499
const (
500
- SfuGetResponseEnvelopeSuccessTrue SfuGetResponseEnvelopeSuccess = true
500
+ SFUGetResponseEnvelopeSuccessTrue SFUGetResponseEnvelopeSuccess = true
501
501
)
502
502
503
- func (r SfuGetResponseEnvelopeSuccess ) IsKnown () bool {
503
+ func (r SFUGetResponseEnvelopeSuccess ) IsKnown () bool {
504
504
switch r {
505
- case SfuGetResponseEnvelopeSuccessTrue :
505
+ case SFUGetResponseEnvelopeSuccessTrue :
506
506
return true
507
507
}
508
508
return false
0 commit comments