Skip to content

Commit

Permalink
feat: update via SDK Studio (#1560)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 14, 2024
1 parent d929b51 commit f416888
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Methods:
Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips#IPs">IPs</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips#JdcloudIPs">JdcloudIPs</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips#JDCloudIPs">JDCloudIPs</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips">ips</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/ips#IPListResponse">IPListResponse</a>

Methods:
Expand Down
22 changes: 11 additions & 11 deletions ips/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,39 +78,39 @@ func (r ipsJSON) RawJSON() string {

func (r IPs) implementsIPsIPListResponse() {}

type JdcloudIPs struct {
type JDCloudIPs struct {
// A digest of the IP data. Useful for determining if the data has changed.
Etag string `json:"etag"`
// List of Cloudflare IPv4 CIDR addresses.
IPV4CIDRs []string `json:"ipv4_cidrs"`
// List of Cloudflare IPv6 CIDR addresses.
IPV6CIDRs []string `json:"ipv6_cidrs"`
// List IPv4 and IPv6 CIDRs, only populated if `?networks=jdcloud` is used.
JdcloudCIDRs []string `json:"jdcloud_cidrs"`
JSON jdcloudIPsJSON `json:"-"`
JDCloudCIDRs []string `json:"jdcloud_cidrs"`
JSON JDCloudIPsJSON `json:"-"`
}

// jdcloudIPsJSON contains the JSON metadata for the struct [JdcloudIPs]
type jdcloudIPsJSON struct {
// JDCloudIPsJSON contains the JSON metadata for the struct [JDCloudIPs]
type JDCloudIPsJSON struct {
Etag apijson.Field
IPV4CIDRs apijson.Field
IPV6CIDRs apijson.Field
JdcloudCIDRs apijson.Field
JDCloudCIDRs apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *JdcloudIPs) UnmarshalJSON(data []byte) (err error) {
func (r *JDCloudIPs) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r jdcloudIPsJSON) RawJSON() string {
func (r JDCloudIPsJSON) RawJSON() string {
return r.raw
}

func (r JdcloudIPs) implementsIPsIPListResponse() {}
func (r JDCloudIPs) implementsIPsIPListResponse() {}

// Union satisfied by [ips.IPs] or [ips.JdcloudIPs].
// Union satisfied by [ips.IPs] or [ips.JDCloudIPs].
type IPListResponse interface {
implementsIPsIPListResponse()
}
Expand All @@ -125,7 +125,7 @@ func init() {
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(JdcloudIPs{}),
Type: reflect.TypeOf(JDCloudIPs{}),
},
)
}
Expand Down

0 comments on commit f416888

Please sign in to comment.