Skip to content

Commit b827264

Browse files
feat(api): api update
1 parent 0d243eb commit b827264

File tree

5 files changed

+19
-387
lines changed

5 files changed

+19
-387
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1742
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1a70cc6fe7c1ec1d793133a672d1e0bdd4dfcdf23f28246fa833d76140869e29.yml
3-
openapi_spec_hash: 4e7a4ba089bee2e706981ed398bc5b9e
1+
configured_endpoints: 1741
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b4dbefdb8c8221e020b1c2337feceddd7e944a9247767f75dd8b976265cb66a3.yml
3+
openapi_spec_hash: 4e17b0e1f919eb7951a91307b790c576
44
config_hash: cb36b26a5fcc81fa60c65016b1e74f0a

addressing/addressmap.go

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/cloudflare/cloudflare-go/v4/internal/apijson"
1313
"github.com/cloudflare/cloudflare-go/v4/internal/param"
1414
"github.com/cloudflare/cloudflare-go/v4/internal/requestconfig"
15+
"github.com/cloudflare/cloudflare-go/v4/ips"
1516
"github.com/cloudflare/cloudflare-go/v4/option"
1617
"github.com/cloudflare/cloudflare-go/v4/packages/pagination"
1718
)
@@ -231,7 +232,7 @@ type AddressMapNewResponse struct {
231232
// with IP addresses on an Address Map until the map is enabled.
232233
Enabled bool `json:"enabled,nullable"`
233234
// The set of IPs on the Address Map.
234-
IPs []AddressMapNewResponseIP `json:"ips"`
235+
IPs ips.IPs `json:"ips"`
235236
// Zones and Accounts which will be assigned IPs on this Address Map. A zone
236237
// membership will take priority over an account membership.
237238
Memberships []AddressMapNewResponseMembership `json:"memberships"`
@@ -264,30 +265,6 @@ func (r addressMapNewResponseJSON) RawJSON() string {
264265
return r.raw
265266
}
266267

267-
type AddressMapNewResponseIP struct {
268-
CreatedAt time.Time `json:"created_at" format:"date-time"`
269-
// An IPv4 or IPv6 address.
270-
IP string `json:"ip"`
271-
JSON addressMapNewResponseIPJSON `json:"-"`
272-
}
273-
274-
// addressMapNewResponseIPJSON contains the JSON metadata for the struct
275-
// [AddressMapNewResponseIP]
276-
type addressMapNewResponseIPJSON struct {
277-
CreatedAt apijson.Field
278-
IP apijson.Field
279-
raw string
280-
ExtraFields map[string]apijson.Field
281-
}
282-
283-
func (r *AddressMapNewResponseIP) UnmarshalJSON(data []byte) (err error) {
284-
return apijson.UnmarshalRoot(data, r)
285-
}
286-
287-
func (r addressMapNewResponseIPJSON) RawJSON() string {
288-
return r.raw
289-
}
290-
291268
type AddressMapNewResponseMembership struct {
292269
// Controls whether the membership can be deleted via the API or not.
293270
CanDelete bool `json:"can_delete"`
@@ -511,7 +488,7 @@ type AddressMapGetResponse struct {
511488
// with IP addresses on an Address Map until the map is enabled.
512489
Enabled bool `json:"enabled,nullable"`
513490
// The set of IPs on the Address Map.
514-
IPs []AddressMapGetResponseIP `json:"ips"`
491+
IPs ips.IPs `json:"ips"`
515492
// Zones and Accounts which will be assigned IPs on this Address Map. A zone
516493
// membership will take priority over an account membership.
517494
Memberships []AddressMapGetResponseMembership `json:"memberships"`
@@ -544,30 +521,6 @@ func (r addressMapGetResponseJSON) RawJSON() string {
544521
return r.raw
545522
}
546523

547-
type AddressMapGetResponseIP struct {
548-
CreatedAt time.Time `json:"created_at" format:"date-time"`
549-
// An IPv4 or IPv6 address.
550-
IP string `json:"ip"`
551-
JSON addressMapGetResponseIPJSON `json:"-"`
552-
}
553-
554-
// addressMapGetResponseIPJSON contains the JSON metadata for the struct
555-
// [AddressMapGetResponseIP]
556-
type addressMapGetResponseIPJSON struct {
557-
CreatedAt apijson.Field
558-
IP apijson.Field
559-
raw string
560-
ExtraFields map[string]apijson.Field
561-
}
562-
563-
func (r *AddressMapGetResponseIP) UnmarshalJSON(data []byte) (err error) {
564-
return apijson.UnmarshalRoot(data, r)
565-
}
566-
567-
func (r addressMapGetResponseIPJSON) RawJSON() string {
568-
return r.raw
569-
}
570-
571524
type AddressMapGetResponseMembership struct {
572525
// Controls whether the membership can be deleted via the API or not.
573526
CanDelete bool `json:"can_delete"`

api.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ Methods:
152152
Response Types:
153153

154154
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips#IPs">IPs</a>
155-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips#JDCloudIPs">JDCloudIPs</a>
156-
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips#IPListResponse">IPListResponse</a>
157-
158-
Methods:
159-
160-
- <code title="get /ips">client.IPs.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips#IPService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips#IPListParams">IPListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v4/ips#IPListResponse">IPListResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
161155

162156
# Memberships
163157

0 commit comments

Comments
 (0)