Skip to content

Commit 333b364

Browse files
feat(api): api update
1 parent 23f3ab9 commit 333b364

File tree

7 files changed

+176
-50
lines changed

7 files changed

+176
-50
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1782
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-37baa5bf56cb5d922c72fa374252a211dfc396eeb8d9628d9763470983f799c2.yml
3-
openapi_spec_hash: df85101112d7aad9a1e0cb8dd01e6d8b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1c7ea16df9e6779bde93724a1b17ec38fc7921fdffc77fec8df85457573b6711.yml
3+
openapi_spec_hash: 49a080f1a33a4bd9c7e6cab08709ea0e
44
config_hash: eda5b3d9487ce675d1fadf88153b457d

magic_transit/cfinterconnect.go

Lines changed: 77 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ type CfInterconnectUpdateResponseModifiedInterconnect struct {
166166
// of the tunnel. Select the subnet from the following private IP space:
167167
// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
168168
InterfaceAddress string `json:"interface_address"`
169+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
170+
// address being the first IP of the subnet and not same as the address of
171+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
172+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
173+
InterfaceAddress6 string `json:"interface_address6"`
169174
// The date and time the tunnel was last modified.
170175
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
171176
// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
@@ -179,18 +184,19 @@ type CfInterconnectUpdateResponseModifiedInterconnect struct {
179184
// cfInterconnectUpdateResponseModifiedInterconnectJSON contains the JSON metadata
180185
// for the struct [CfInterconnectUpdateResponseModifiedInterconnect]
181186
type cfInterconnectUpdateResponseModifiedInterconnectJSON struct {
182-
ID apijson.Field
183-
ColoName apijson.Field
184-
CreatedOn apijson.Field
185-
Description apijson.Field
186-
GRE apijson.Field
187-
HealthCheck apijson.Field
188-
InterfaceAddress apijson.Field
189-
ModifiedOn apijson.Field
190-
Mtu apijson.Field
191-
Name apijson.Field
192-
raw string
193-
ExtraFields map[string]apijson.Field
187+
ID apijson.Field
188+
ColoName apijson.Field
189+
CreatedOn apijson.Field
190+
Description apijson.Field
191+
GRE apijson.Field
192+
HealthCheck apijson.Field
193+
InterfaceAddress apijson.Field
194+
InterfaceAddress6 apijson.Field
195+
ModifiedOn apijson.Field
196+
Mtu apijson.Field
197+
Name apijson.Field
198+
raw string
199+
ExtraFields map[string]apijson.Field
194200
}
195201

196202
func (r *CfInterconnectUpdateResponseModifiedInterconnect) UnmarshalJSON(data []byte) (err error) {
@@ -262,6 +268,11 @@ type CfInterconnectListResponseInterconnect struct {
262268
// of the tunnel. Select the subnet from the following private IP space:
263269
// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
264270
InterfaceAddress string `json:"interface_address"`
271+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
272+
// address being the first IP of the subnet and not same as the address of
273+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
274+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
275+
InterfaceAddress6 string `json:"interface_address6"`
265276
// The date and time the tunnel was last modified.
266277
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
267278
// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
@@ -275,18 +286,19 @@ type CfInterconnectListResponseInterconnect struct {
275286
// cfInterconnectListResponseInterconnectJSON contains the JSON metadata for the
276287
// struct [CfInterconnectListResponseInterconnect]
277288
type cfInterconnectListResponseInterconnectJSON struct {
278-
ID apijson.Field
279-
ColoName apijson.Field
280-
CreatedOn apijson.Field
281-
Description apijson.Field
282-
GRE apijson.Field
283-
HealthCheck apijson.Field
284-
InterfaceAddress apijson.Field
285-
ModifiedOn apijson.Field
286-
Mtu apijson.Field
287-
Name apijson.Field
288-
raw string
289-
ExtraFields map[string]apijson.Field
289+
ID apijson.Field
290+
ColoName apijson.Field
291+
CreatedOn apijson.Field
292+
Description apijson.Field
293+
GRE apijson.Field
294+
HealthCheck apijson.Field
295+
InterfaceAddress apijson.Field
296+
InterfaceAddress6 apijson.Field
297+
ModifiedOn apijson.Field
298+
Mtu apijson.Field
299+
Name apijson.Field
300+
raw string
301+
ExtraFields map[string]apijson.Field
290302
}
291303

292304
func (r *CfInterconnectListResponseInterconnect) UnmarshalJSON(data []byte) (err error) {
@@ -360,6 +372,11 @@ type CfInterconnectBulkUpdateResponseModifiedInterconnect struct {
360372
// of the tunnel. Select the subnet from the following private IP space:
361373
// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
362374
InterfaceAddress string `json:"interface_address"`
375+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
376+
// address being the first IP of the subnet and not same as the address of
377+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
378+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
379+
InterfaceAddress6 string `json:"interface_address6"`
363380
// The date and time the tunnel was last modified.
364381
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
365382
// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
@@ -373,18 +390,19 @@ type CfInterconnectBulkUpdateResponseModifiedInterconnect struct {
373390
// cfInterconnectBulkUpdateResponseModifiedInterconnectJSON contains the JSON
374391
// metadata for the struct [CfInterconnectBulkUpdateResponseModifiedInterconnect]
375392
type cfInterconnectBulkUpdateResponseModifiedInterconnectJSON struct {
376-
ID apijson.Field
377-
ColoName apijson.Field
378-
CreatedOn apijson.Field
379-
Description apijson.Field
380-
GRE apijson.Field
381-
HealthCheck apijson.Field
382-
InterfaceAddress apijson.Field
383-
ModifiedOn apijson.Field
384-
Mtu apijson.Field
385-
Name apijson.Field
386-
raw string
387-
ExtraFields map[string]apijson.Field
393+
ID apijson.Field
394+
ColoName apijson.Field
395+
CreatedOn apijson.Field
396+
Description apijson.Field
397+
GRE apijson.Field
398+
HealthCheck apijson.Field
399+
InterfaceAddress apijson.Field
400+
InterfaceAddress6 apijson.Field
401+
ModifiedOn apijson.Field
402+
Mtu apijson.Field
403+
Name apijson.Field
404+
raw string
405+
ExtraFields map[string]apijson.Field
388406
}
389407

390408
func (r *CfInterconnectBulkUpdateResponseModifiedInterconnect) UnmarshalJSON(data []byte) (err error) {
@@ -457,6 +475,11 @@ type CfInterconnectGetResponseInterconnect struct {
457475
// of the tunnel. Select the subnet from the following private IP space:
458476
// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
459477
InterfaceAddress string `json:"interface_address"`
478+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
479+
// address being the first IP of the subnet and not same as the address of
480+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
481+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
482+
InterfaceAddress6 string `json:"interface_address6"`
460483
// The date and time the tunnel was last modified.
461484
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
462485
// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
@@ -470,18 +493,19 @@ type CfInterconnectGetResponseInterconnect struct {
470493
// cfInterconnectGetResponseInterconnectJSON contains the JSON metadata for the
471494
// struct [CfInterconnectGetResponseInterconnect]
472495
type cfInterconnectGetResponseInterconnectJSON struct {
473-
ID apijson.Field
474-
ColoName apijson.Field
475-
CreatedOn apijson.Field
476-
Description apijson.Field
477-
GRE apijson.Field
478-
HealthCheck apijson.Field
479-
InterfaceAddress apijson.Field
480-
ModifiedOn apijson.Field
481-
Mtu apijson.Field
482-
Name apijson.Field
483-
raw string
484-
ExtraFields map[string]apijson.Field
496+
ID apijson.Field
497+
ColoName apijson.Field
498+
CreatedOn apijson.Field
499+
Description apijson.Field
500+
GRE apijson.Field
501+
HealthCheck apijson.Field
502+
InterfaceAddress apijson.Field
503+
InterfaceAddress6 apijson.Field
504+
ModifiedOn apijson.Field
505+
Mtu apijson.Field
506+
Name apijson.Field
507+
raw string
508+
ExtraFields map[string]apijson.Field
485509
}
486510

487511
func (r *CfInterconnectGetResponseInterconnect) UnmarshalJSON(data []byte) (err error) {
@@ -528,6 +552,11 @@ type CfInterconnectUpdateParams struct {
528552
// of the tunnel. Select the subnet from the following private IP space:
529553
// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
530554
InterfaceAddress param.Field[string] `json:"interface_address"`
555+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
556+
// address being the first IP of the subnet and not same as the address of
557+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
558+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
559+
InterfaceAddress6 param.Field[string] `json:"interface_address6"`
531560
// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
532561
// value is 576.
533562
Mtu param.Field[int64] `json:"mtu"`

magic_transit/cfinterconnect_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func TestCfInterconnectUpdateWithOptionalParams(t *testing.T) {
4646
Type: cloudflare.F(magic_transit.HealthCheckTypeRequest),
4747
}),
4848
InterfaceAddress: cloudflare.F("192.0.2.0/31"),
49+
InterfaceAddress6: cloudflare.F("2606:54c1:7:0:a9fe:12d2:1:200/127"),
4950
Mtu: cloudflare.F(int64(0)),
5051
XMagicNewHcTarget: cloudflare.F(true),
5152
},

magic_transit/gretunnel.go

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ type GRETunnelNewResponse struct {
192192
// An optional description of the GRE tunnel.
193193
Description string `json:"description"`
194194
HealthCheck GRETunnelNewResponseHealthCheck `json:"health_check"`
195+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
196+
// address being the first IP of the subnet and not same as the address of
197+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
198+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
199+
InterfaceAddress6 string `json:"interface_address6"`
195200
// The date and time the tunnel was last modified.
196201
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
197202
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
@@ -213,6 +218,7 @@ type greTunnelNewResponseJSON struct {
213218
CreatedOn apijson.Field
214219
Description apijson.Field
215220
HealthCheck apijson.Field
221+
InterfaceAddress6 apijson.Field
216222
ModifiedOn apijson.Field
217223
Mtu apijson.Field
218224
TTL apijson.Field
@@ -398,6 +404,11 @@ type GRETunnelUpdateResponseModifiedGRETunnel struct {
398404
// An optional description of the GRE tunnel.
399405
Description string `json:"description"`
400406
HealthCheck GRETunnelUpdateResponseModifiedGRETunnelHealthCheck `json:"health_check"`
407+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
408+
// address being the first IP of the subnet and not same as the address of
409+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
410+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
411+
InterfaceAddress6 string `json:"interface_address6"`
401412
// The date and time the tunnel was last modified.
402413
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
403414
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
@@ -419,6 +430,7 @@ type greTunnelUpdateResponseModifiedGRETunnelJSON struct {
419430
CreatedOn apijson.Field
420431
Description apijson.Field
421432
HealthCheck apijson.Field
433+
InterfaceAddress6 apijson.Field
422434
ModifiedOn apijson.Field
423435
Mtu apijson.Field
424436
TTL apijson.Field
@@ -603,6 +615,11 @@ type GRETunnelListResponseGRETunnel struct {
603615
// An optional description of the GRE tunnel.
604616
Description string `json:"description"`
605617
HealthCheck GRETunnelListResponseGRETunnelsHealthCheck `json:"health_check"`
618+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
619+
// address being the first IP of the subnet and not same as the address of
620+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
621+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
622+
InterfaceAddress6 string `json:"interface_address6"`
606623
// The date and time the tunnel was last modified.
607624
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
608625
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
@@ -624,6 +641,7 @@ type greTunnelListResponseGRETunnelJSON struct {
624641
CreatedOn apijson.Field
625642
Description apijson.Field
626643
HealthCheck apijson.Field
644+
InterfaceAddress6 apijson.Field
627645
ModifiedOn apijson.Field
628646
Mtu apijson.Field
629647
TTL apijson.Field
@@ -810,6 +828,11 @@ type GRETunnelDeleteResponseDeletedGRETunnel struct {
810828
// An optional description of the GRE tunnel.
811829
Description string `json:"description"`
812830
HealthCheck GRETunnelDeleteResponseDeletedGRETunnelHealthCheck `json:"health_check"`
831+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
832+
// address being the first IP of the subnet and not same as the address of
833+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
834+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
835+
InterfaceAddress6 string `json:"interface_address6"`
813836
// The date and time the tunnel was last modified.
814837
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
815838
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
@@ -831,6 +854,7 @@ type greTunnelDeleteResponseDeletedGRETunnelJSON struct {
831854
CreatedOn apijson.Field
832855
Description apijson.Field
833856
HealthCheck apijson.Field
857+
InterfaceAddress6 apijson.Field
834858
ModifiedOn apijson.Field
835859
Mtu apijson.Field
836860
TTL apijson.Field
@@ -1017,6 +1041,11 @@ type GRETunnelBulkUpdateResponseModifiedGRETunnel struct {
10171041
// An optional description of the GRE tunnel.
10181042
Description string `json:"description"`
10191043
HealthCheck GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheck `json:"health_check"`
1044+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
1045+
// address being the first IP of the subnet and not same as the address of
1046+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
1047+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
1048+
InterfaceAddress6 string `json:"interface_address6"`
10201049
// The date and time the tunnel was last modified.
10211050
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
10221051
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
@@ -1038,6 +1067,7 @@ type greTunnelBulkUpdateResponseModifiedGRETunnelJSON struct {
10381067
CreatedOn apijson.Field
10391068
Description apijson.Field
10401069
HealthCheck apijson.Field
1070+
InterfaceAddress6 apijson.Field
10411071
ModifiedOn apijson.Field
10421072
Mtu apijson.Field
10431073
TTL apijson.Field
@@ -1223,6 +1253,11 @@ type GRETunnelGetResponseGRETunnel struct {
12231253
// An optional description of the GRE tunnel.
12241254
Description string `json:"description"`
12251255
HealthCheck GRETunnelGetResponseGRETunnelHealthCheck `json:"health_check"`
1256+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
1257+
// address being the first IP of the subnet and not same as the address of
1258+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
1259+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
1260+
InterfaceAddress6 string `json:"interface_address6"`
12261261
// The date and time the tunnel was last modified.
12271262
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
12281263
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
@@ -1244,6 +1279,7 @@ type greTunnelGetResponseGRETunnelJSON struct {
12441279
CreatedOn apijson.Field
12451280
Description apijson.Field
12461281
HealthCheck apijson.Field
1282+
InterfaceAddress6 apijson.Field
12471283
ModifiedOn apijson.Field
12481284
Mtu apijson.Field
12491285
TTL apijson.Field
@@ -1405,6 +1441,11 @@ type GRETunnelNewParams struct {
14051441
// An optional description of the GRE tunnel.
14061442
Description param.Field[string] `json:"description"`
14071443
HealthCheck param.Field[GRETunnelNewParamsHealthCheck] `json:"health_check"`
1444+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
1445+
// address being the first IP of the subnet and not same as the address of
1446+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
1447+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
1448+
InterfaceAddress6 param.Field[string] `json:"interface_address6"`
14081449
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
14091450
// is 576.
14101451
Mtu param.Field[int64] `json:"mtu"`
@@ -1555,6 +1596,11 @@ type GRETunnelUpdateParams struct {
15551596
// An optional description of the GRE tunnel.
15561597
Description param.Field[string] `json:"description"`
15571598
HealthCheck param.Field[GRETunnelUpdateParamsHealthCheck] `json:"health_check"`
1599+
// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
1600+
// address being the first IP of the subnet and not same as the address of
1601+
// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
1602+
// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
1603+
InterfaceAddress6 param.Field[string] `json:"interface_address6"`
15581604
// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
15591605
// is 576.
15601606
Mtu param.Field[int64] `json:"mtu"`

magic_transit/gretunnel_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func TestGRETunnelNewWithOptionalParams(t *testing.T) {
4444
}),
4545
Type: cloudflare.F(magic_transit.HealthCheckTypeRequest),
4646
}),
47+
InterfaceAddress6: cloudflare.F("2606:54c1:7:0:a9fe:12d2:1:200/127"),
4748
Mtu: cloudflare.F(int64(0)),
4849
TTL: cloudflare.F(int64(0)),
4950
XMagicNewHcTarget: cloudflare.F(true),
@@ -90,6 +91,7 @@ func TestGRETunnelUpdateWithOptionalParams(t *testing.T) {
9091
}),
9192
Type: cloudflare.F(magic_transit.HealthCheckTypeRequest),
9293
}),
94+
InterfaceAddress6: cloudflare.F("2606:54c1:7:0:a9fe:12d2:1:200/127"),
9395
Mtu: cloudflare.F(int64(0)),
9496
TTL: cloudflare.F(int64(0)),
9597
XMagicNewHcTarget: cloudflare.F(true),

0 commit comments

Comments
 (0)