Skip to content

Commit

Permalink
feat: update via SDK Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 19, 2024
1 parent 3c34f1a commit db77502
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions internal/shared/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,35 @@ import (
"github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig"
)

type V4PagePaginationResult struct {
Items []interface{} `json:"items"`
JSON v4PagePaginationResultJSON `json:"-"`
}

// v4PagePaginationResultJSON contains the JSON metadata for the struct
// [V4PagePaginationResult]
type v4PagePaginationResultJSON struct {
Items apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

type V4PagePagination[T any] struct {
Data []T `json:"data"`
ResultInfo interface{} `json:"result_info"`
JSON v4PagePaginationJSON `json:"-"`
Result V4PagePaginationResult `json:"result"`
ResultInfo interface{} `json:"result_info"`
JSON v4PagePaginationJSON `json:"-"`
cfg *requestconfig.RequestConfig
res *http.Response
}

// v4PagePaginationJSON contains the JSON metadata for the struct
// [V4PagePagination[T]]
type v4PagePaginationJSON struct {
Data apijson.Field
Result apijson.Field
ResultInfo apijson.Field
raw string
ExtraFields map[string]apijson.Field
Expand Down

0 comments on commit db77502

Please sign in to comment.