From b00377cbd41b30a1ce1597097bc85756369a7f6f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 9 Oct 2026 14:09:49 +0000 Subject: [PATCH] Regenerate client from commit 2a18ee3 of spec repo --- .generator/schemas/v2/openapi.yaml | 161 ++++++++++++++++-- api/datadogV2/api_rum.go | 105 +++++++++++- .../model_js_sourcemap_attributes.go | 38 ++++- api/datadogV2/model_sourcemap_search_by.go | 64 +++++++ .../model_sourcemaps_list_meta_page.go | 47 ++++- 5 files changed, 397 insertions(+), 18 deletions(-) create mode 100644 api/datadogV2/model_sourcemap_search_by.go diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7acea8a9716..ca88c370ad9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -65561,6 +65561,12 @@ components: example: "2024-01-01T00:00:00Z" format: date-time type: string + debug_id: + description: |- + The debug identifier (UUID format) that uniquely identifies this + JavaScript source map. Returned for source maps indexed by debug ID. + example: 00000000-0000-4000-8000-000000000001 + type: string domain: description: The domain associated with the source map. example: example.com @@ -120642,6 +120648,14 @@ components: - ELF - NDK - IL2CPP + SourcemapSearchBy: + description: The search mode for listing JavaScript source maps. + enum: + - debug_id + example: debug_id + type: string + x-enum-varnames: + - DEBUG_ID SourcemapsData: description: List of source map data objects. items: @@ -120662,8 +120676,17 @@ components: description: Whether there are more results available beyond the current page. example: false type: boolean + next_cursor: + description: |- + Cursor for the next page of a JavaScript cursor-based listing. Pass + this value as `page[after]` with the same search mode and filters. + Only returned when another page is available. + type: string total_filtered_count: - description: Total number of source maps matching the filter criteria. + description: |- + Total number of matching source maps for legacy page-number pagination. + Cursor-based listings do not compute a total; this field may be zero + even when records are returned. Use `has_more_results` to continue. example: 100 format: int64 type: integer @@ -231257,33 +231280,129 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/sourcemaps/list: get: - description: Retrieves a paginated list of source maps matching the specified filter criteria. + description: |- + Retrieves a paginated list of source maps. Send filters as query parameters, + not in a JSON request body. `mapkind` defaults to `js`. + + For JavaScript source maps, choose one of these searches: + + - **Service and version:** provide both `filter[service]` and `filter[version]`. + This searches source maps indexed by service and version. + - **One debug ID:** provide `filter[debug_id]` with a UUID to look up the single + source map with that debug ID. Service and version are not required for this + JavaScript search. + - **Browse debug IDs:** set `search_by=debug_id` to list source maps indexed by + debug ID without specifying an ID. Do not send service, version, or filename + filters in this mode. + + **Pagination:** for JavaScript listings, omit `page[after]` and `page[number]` + to start at the first page. Copy `meta.page.next_cursor` into `page[after]` on + the next request, keeping the same search mode and filters. Continue until + `meta.page.has_more_results` is `false`. Do not decode or modify the cursor. + Debug-ID browsing requires cursor pagination; `page[number]` is not supported. + A specific `filter[debug_id]` lookup without `search_by=debug_id` does not support + `page[after]`. Other map kinds use `page[number]`, starting at 1. + + **Examples:** the following commands use the US1 API host. Replace the host with + the API host for your site, and the service, version, debug ID, and cursor with + values from your organization. Use `--get` so curl sends the filters in the query + string; `-X GET` with `--data-urlencode` sends them in the request body instead. + + **List by service and version** + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "filter[service]=my-web-service" \ + --data-urlencode "filter[version]=1.0.0" \ + --data-urlencode "page[size]=10" + ``` + + **Find a specific JavaScript debug ID** + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "filter[debug_id]=00000000-0000-4000-8000-000000000001" + ``` + + **Browse debug-ID source maps from the first page** + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "search_by=debug_id" \ + --data-urlencode "page[size]=10" + ``` + + **Get the next page of debug-ID source maps** + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "search_by=debug_id" \ + --data-urlencode "page[size]=10" \ + --data-urlencode "page[after]=" + ``` operationId: ListSourcemaps parameters: + - description: |- + Set to `debug_id` to browse JavaScript source maps indexed by debug ID. + Only supported for `mapkind=js`. Omit for service/version searches or a + specific `filter[debug_id]` lookup. In debug-ID browse mode, service, + version, and filename filters are not supported. + example: debug_id + in: query + name: search_by + schema: + $ref: "#/components/schemas/SourcemapSearchBy" + x-docs-curl-required: true - description: The type of source map. Defaults to `js`. in: query name: mapkind schema: $ref: "#/components/schemas/SourcemapMapKind" - - description: The number of results to return per page. Must be at least 1. + - description: |- + Cursor for the next page of a JavaScript listing. Use the value from + `meta.page.next_cursor` and keep the same search mode and filters. + Omit on the first request. Not supported for other map kinds or for + a specific `filter[debug_id]` lookup without `search_by=debug_id`. + in: query + name: page[after] + schema: + type: string + - description: The number of results per page. Defaults to 100. Must be at least 1; values above 1000 are capped at 1000. in: query name: page[size] schema: - default: 20 - example: 20 + default: 100 + example: 10 format: int64 + minimum: 1 type: integer - - description: The page number to retrieve, starting from 1. + - description: |- + Legacy page number, starting from 1. Prefer `page[after]` for JavaScript + listings. Not supported with `search_by=debug_id`. Other map kinds + default to page 1 when pagination parameters are omitted. in: query name: page[number] schema: - default: 1 example: 1 format: int64 + minimum: 1 type: integer - description: |- Filter by service names (multiple values allowed). Required for - `js`, `jvm`, `react`, and `flutter` map kinds. + `jvm`, `react`, and `flutter` map kinds. Also required for `js` unless + searching by `filter[debug_id]` or browsing with `search_by=debug_id`. explode: true in: query name: filter[service] @@ -231296,7 +231415,8 @@ paths: style: form - description: |- Filter by version values (multiple values allowed). Required for - `js`, `jvm`, `react`, and `flutter` map kinds. + `jvm`, `react`, and `flutter` map kinds. Also required for `js` unless + searching by `filter[debug_id]` or browsing with `search_by=debug_id`. explode: true in: query name: filter[version] @@ -231413,10 +231533,15 @@ paths: name: filter[filename] schema: type: string - - description: Filter by debug ID (single value). Supported for `react`. + - description: |- + Filter by a single debug ID in UUID format. Supported for `js` and `react`. + For `js`, a debug ID identifies exactly one source map, so the lookup returns + at most one result and does not require service/version filters. For `react`, + a debug ID can match multiple files, and service/version filters remain required. in: query name: filter[debug_id] schema: + format: uuid type: string - description: Filter by GNU build ID (single value). Supported for `elf`. in: query @@ -231438,6 +231563,22 @@ paths: content: application/json: examples: + debug_id_listing: + summary: Browse JavaScript source maps by debug ID + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00Z" + debug_id: 00000000-0000-4000-8000-000000000001 + mapkind: js + size: 1024 + id: "7" + type: sourcemaps + meta: + page: + has_more_results: true + next_cursor: opaque-debug-id-cursor + total_filtered_count: 0 default: value: data: diff --git a/api/datadogV2/api_rum.go b/api/datadogV2/api_rum.go index eda5eb69351..f341047254d 100644 --- a/api/datadogV2/api_rum.go +++ b/api/datadogV2/api_rum.go @@ -14,6 +14,7 @@ import ( "time" "github.com/DataDog/datadog-api-client-go/v2/api/datadog" + "github.com/google/uuid" ) // RUMApi service type @@ -1220,7 +1221,9 @@ func (a *RUMApi) ListRUMEventsWithPagination(ctx _context.Context, o ...ListRUME // ListSourcemapsOptionalParameters holds optional parameters for ListSourcemaps. type ListSourcemapsOptionalParameters struct { + SearchBy *SourcemapSearchBy Mapkind *SourcemapMapKind + PageAfter *string PageSize *int64 PageNumber *int64 FilterService *[]string @@ -1237,7 +1240,7 @@ type ListSourcemapsOptionalParameters struct { FilterOrigin *[]string FilterOriginVersion *[]string FilterFilename *string - FilterDebugId *string + FilterDebugId *uuid.UUID FilterGnuBuildId *string FilterGoBuildId *string FilterFileHash *string @@ -1249,12 +1252,24 @@ func NewListSourcemapsOptionalParameters() *ListSourcemapsOptionalParameters { return &this } +// WithSearchBy sets the corresponding parameter name and returns the struct. +func (r *ListSourcemapsOptionalParameters) WithSearchBy(searchBy SourcemapSearchBy) *ListSourcemapsOptionalParameters { + r.SearchBy = &searchBy + return r +} + // WithMapkind sets the corresponding parameter name and returns the struct. func (r *ListSourcemapsOptionalParameters) WithMapkind(mapkind SourcemapMapKind) *ListSourcemapsOptionalParameters { r.Mapkind = &mapkind return r } +// WithPageAfter sets the corresponding parameter name and returns the struct. +func (r *ListSourcemapsOptionalParameters) WithPageAfter(pageAfter string) *ListSourcemapsOptionalParameters { + r.PageAfter = &pageAfter + return r +} + // WithPageSize sets the corresponding parameter name and returns the struct. func (r *ListSourcemapsOptionalParameters) WithPageSize(pageSize int64) *ListSourcemapsOptionalParameters { r.PageSize = &pageSize @@ -1352,7 +1367,7 @@ func (r *ListSourcemapsOptionalParameters) WithFilterFilename(filterFilename str } // WithFilterDebugId sets the corresponding parameter name and returns the struct. -func (r *ListSourcemapsOptionalParameters) WithFilterDebugId(filterDebugId string) *ListSourcemapsOptionalParameters { +func (r *ListSourcemapsOptionalParameters) WithFilterDebugId(filterDebugId uuid.UUID) *ListSourcemapsOptionalParameters { r.FilterDebugId = &filterDebugId return r } @@ -1376,7 +1391,85 @@ func (r *ListSourcemapsOptionalParameters) WithFilterFileHash(filterFileHash str } // ListSourcemaps List source maps. -// Retrieves a paginated list of source maps matching the specified filter criteria. +// Retrieves a paginated list of source maps. Send filters as query parameters, +// not in a JSON request body. `mapkind` defaults to `js`. +// +// For JavaScript source maps, choose one of these searches: +// +// - **Service and version:** provide both `filter[service]` and `filter[version]`. +// This searches source maps indexed by service and version. +// - **One debug ID:** provide `filter[debug_id]` with a UUID to look up the single +// source map with that debug ID. Service and version are not required for this +// JavaScript search. +// - **Browse debug IDs:** set `search_by=debug_id` to list source maps indexed by +// debug ID without specifying an ID. Do not send service, version, or filename +// filters in this mode. +// +// **Pagination:** for JavaScript listings, omit `page[after]` and `page[number]` +// to start at the first page. Copy `meta.page.next_cursor` into `page[after]` on +// the next request, keeping the same search mode and filters. Continue until +// `meta.page.has_more_results` is `false`. Do not decode or modify the cursor. +// Debug-ID browsing requires cursor pagination; `page[number]` is not supported. +// A specific `filter[debug_id]` lookup without `search_by=debug_id` does not support +// `page[after]`. Other map kinds use `page[number]`, starting at 1. +// +// **Examples:** the following commands use the US1 API host. Replace the host with +// the API host for your site, and the service, version, debug ID, and cursor with +// values from your organization. Use `--get` so curl sends the filters in the query +// string; `-X GET` with `--data-urlencode` sends them in the request body instead. +// +// **List by service and version** +// +// ```bash +// +// curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ +// -H "Accept: application/json" \ +// -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ +// --data-urlencode "mapkind=js" \ +// --data-urlencode "filter[service]=my-web-service" \ +// --data-urlencode "filter[version]=1.0.0" \ +// --data-urlencode "page[size]=10" +// +// ``` +// +// **Find a specific JavaScript debug ID** +// +// ```bash +// +// curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ +// -H "Accept: application/json" \ +// -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ +// --data-urlencode "mapkind=js" \ +// --data-urlencode "filter[debug_id]=00000000-0000-4000-8000-000000000001" +// +// ``` +// +// **Browse debug-ID source maps from the first page** +// +// ```bash +// +// curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ +// -H "Accept: application/json" \ +// -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ +// --data-urlencode "mapkind=js" \ +// --data-urlencode "search_by=debug_id" \ +// --data-urlencode "page[size]=10" +// +// ``` +// +// **Get the next page of debug-ID source maps** +// +// ```bash +// +// curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ +// -H "Accept: application/json" \ +// -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ +// --data-urlencode "mapkind=js" \ +// --data-urlencode "search_by=debug_id" \ +// --data-urlencode "page[size]=10" \ +// --data-urlencode "page[after]=" +// +// ``` func (a *RUMApi) ListSourcemaps(ctx _context.Context, o ...ListSourcemapsOptionalParameters) (ListSourcemapsResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet @@ -1411,9 +1504,15 @@ func (a *RUMApi) ListSourcemaps(ctx _context.Context, o ...ListSourcemapsOptiona localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if optionalParams.SearchBy != nil { + localVarQueryParams.Add("search_by", datadog.ParameterToString(*optionalParams.SearchBy, "")) + } if optionalParams.Mapkind != nil { localVarQueryParams.Add("mapkind", datadog.ParameterToString(*optionalParams.Mapkind, "")) } + if optionalParams.PageAfter != nil { + localVarQueryParams.Add("page[after]", datadog.ParameterToString(*optionalParams.PageAfter, "")) + } if optionalParams.PageSize != nil { localVarQueryParams.Add("page[size]", datadog.ParameterToString(*optionalParams.PageSize, "")) } diff --git a/api/datadogV2/model_js_sourcemap_attributes.go b/api/datadogV2/model_js_sourcemap_attributes.go index 011c3f699c8..c6f62408718 100644 --- a/api/datadogV2/model_js_sourcemap_attributes.go +++ b/api/datadogV2/model_js_sourcemap_attributes.go @@ -21,6 +21,9 @@ type JSSourcemapAttributes struct { BuildId *string `json:"build_id,omitempty"` // The timestamp when the source map was created. CreatedAt time.Time `json:"created_at"` + // The debug identifier (UUID format) that uniquely identifies this + // JavaScript source map. Returned for source maps indexed by debug ID. + DebugId *string `json:"debug_id,omitempty"` // The domain associated with the source map. Domain *string `json:"domain,omitempty"` // The file name of the minified JavaScript file. @@ -169,6 +172,34 @@ func (o *JSSourcemapAttributes) SetCreatedAt(v time.Time) { o.CreatedAt = v } +// GetDebugId returns the DebugId field value if set, zero value otherwise. +func (o *JSSourcemapAttributes) GetDebugId() string { + if o == nil || o.DebugId == nil { + var ret string + return ret + } + return *o.DebugId +} + +// GetDebugIdOk returns a tuple with the DebugId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSSourcemapAttributes) GetDebugIdOk() (*string, bool) { + if o == nil || o.DebugId == nil { + return nil, false + } + return o.DebugId, true +} + +// HasDebugId returns a boolean if a field has been set. +func (o *JSSourcemapAttributes) HasDebugId() bool { + return o != nil && o.DebugId != nil +} + +// SetDebugId gets a reference to the given string and assigns it to the DebugId field. +func (o *JSSourcemapAttributes) SetDebugId(v string) { + o.DebugId = &v +} + // GetDomain returns the Domain field value if set, zero value otherwise. func (o *JSSourcemapAttributes) GetDomain() string { if o == nil || o.Domain == nil { @@ -403,6 +434,9 @@ func (o JSSourcemapAttributes) MarshalJSON() ([]byte, error) { } else { toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05.000Z07:00") } + if o.DebugId != nil { + toSerialize["debug_id"] = o.DebugId + } if o.Domain != nil { toSerialize["domain"] = o.Domain } @@ -437,6 +471,7 @@ func (o *JSSourcemapAttributes) UnmarshalJSON(bytes []byte) (err error) { BlobStorageSourcemapPath *string `json:"blob_storage_sourcemap_path,omitempty"` BuildId *string `json:"build_id,omitempty"` CreatedAt *time.Time `json:"created_at"` + DebugId *string `json:"debug_id,omitempty"` Domain *string `json:"domain,omitempty"` FileName *string `json:"file_name,omitempty"` Mapkind *string `json:"mapkind"` @@ -460,7 +495,7 @@ func (o *JSSourcemapAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.UnmarshalUseNumber(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"absolute_path", "blob_storage_sourcemap_path", "build_id", "created_at", "domain", "file_name", "mapkind", "service", "size", "variant", "version", "version_code"}) + datadog.DeleteKeys(additionalProperties, &[]string{"absolute_path", "blob_storage_sourcemap_path", "build_id", "created_at", "debug_id", "domain", "file_name", "mapkind", "service", "size", "variant", "version", "version_code"}) } else { return err } @@ -468,6 +503,7 @@ func (o *JSSourcemapAttributes) UnmarshalJSON(bytes []byte) (err error) { o.BlobStorageSourcemapPath = all.BlobStorageSourcemapPath o.BuildId = all.BuildId o.CreatedAt = *all.CreatedAt + o.DebugId = all.DebugId o.Domain = all.Domain o.FileName = all.FileName o.Mapkind = *all.Mapkind diff --git a/api/datadogV2/model_sourcemap_search_by.go b/api/datadogV2/model_sourcemap_search_by.go new file mode 100644 index 00000000000..0f736114c39 --- /dev/null +++ b/api/datadogV2/model_sourcemap_search_by.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SourcemapSearchBy The search mode for listing JavaScript source maps. +type SourcemapSearchBy string + +// List of SourcemapSearchBy. +const ( + SOURCEMAPSEARCHBY_DEBUG_ID SourcemapSearchBy = "debug_id" +) + +var allowedSourcemapSearchByEnumValues = []SourcemapSearchBy{ + SOURCEMAPSEARCHBY_DEBUG_ID, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SourcemapSearchBy) GetAllowedValues() []SourcemapSearchBy { + return allowedSourcemapSearchByEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SourcemapSearchBy) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SourcemapSearchBy(value) + return nil +} + +// NewSourcemapSearchByFromValue returns a pointer to a valid SourcemapSearchBy +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSourcemapSearchByFromValue(v string) (*SourcemapSearchBy, error) { + ev := SourcemapSearchBy(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SourcemapSearchBy: valid values are %v", v, allowedSourcemapSearchByEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SourcemapSearchBy) IsValid() bool { + for _, existing := range allowedSourcemapSearchByEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SourcemapSearchBy value. +func (v SourcemapSearchBy) Ptr() *SourcemapSearchBy { + return &v +} diff --git a/api/datadogV2/model_sourcemaps_list_meta_page.go b/api/datadogV2/model_sourcemaps_list_meta_page.go index cc8fd21768c..91bab0e969d 100644 --- a/api/datadogV2/model_sourcemaps_list_meta_page.go +++ b/api/datadogV2/model_sourcemaps_list_meta_page.go @@ -14,7 +14,13 @@ import ( type SourcemapsListMetaPage struct { // Whether there are more results available beyond the current page. HasMoreResults bool `json:"has_more_results"` - // Total number of source maps matching the filter criteria. + // Cursor for the next page of a JavaScript cursor-based listing. Pass + // this value as `page[after]` with the same search mode and filters. + // Only returned when another page is available. + NextCursor *string `json:"next_cursor,omitempty"` + // Total number of matching source maps for legacy page-number pagination. + // Cursor-based listings do not compute a total; this field may be zero + // even when records are returned. Use `has_more_results` to continue. TotalFilteredCount int64 `json:"total_filtered_count"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` @@ -63,6 +69,34 @@ func (o *SourcemapsListMetaPage) SetHasMoreResults(v bool) { o.HasMoreResults = v } +// GetNextCursor returns the NextCursor field value if set, zero value otherwise. +func (o *SourcemapsListMetaPage) GetNextCursor() string { + if o == nil || o.NextCursor == nil { + var ret string + return ret + } + return *o.NextCursor +} + +// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SourcemapsListMetaPage) GetNextCursorOk() (*string, bool) { + if o == nil || o.NextCursor == nil { + return nil, false + } + return o.NextCursor, true +} + +// HasNextCursor returns a boolean if a field has been set. +func (o *SourcemapsListMetaPage) HasNextCursor() bool { + return o != nil && o.NextCursor != nil +} + +// SetNextCursor gets a reference to the given string and assigns it to the NextCursor field. +func (o *SourcemapsListMetaPage) SetNextCursor(v string) { + o.NextCursor = &v +} + // GetTotalFilteredCount returns the TotalFilteredCount field value. func (o *SourcemapsListMetaPage) GetTotalFilteredCount() int64 { if o == nil { @@ -93,6 +127,9 @@ func (o SourcemapsListMetaPage) MarshalJSON() ([]byte, error) { return datadog.Marshal(o.UnparsedObject) } toSerialize["has_more_results"] = o.HasMoreResults + if o.NextCursor != nil { + toSerialize["next_cursor"] = o.NextCursor + } toSerialize["total_filtered_count"] = o.TotalFilteredCount for key, value := range o.AdditionalProperties { @@ -104,8 +141,9 @@ func (o SourcemapsListMetaPage) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *SourcemapsListMetaPage) UnmarshalJSON(bytes []byte) (err error) { all := struct { - HasMoreResults *bool `json:"has_more_results"` - TotalFilteredCount *int64 `json:"total_filtered_count"` + HasMoreResults *bool `json:"has_more_results"` + NextCursor *string `json:"next_cursor,omitempty"` + TotalFilteredCount *int64 `json:"total_filtered_count"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) @@ -118,11 +156,12 @@ func (o *SourcemapsListMetaPage) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.UnmarshalUseNumber(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"has_more_results", "total_filtered_count"}) + datadog.DeleteKeys(additionalProperties, &[]string{"has_more_results", "next_cursor", "total_filtered_count"}) } else { return err } o.HasMoreResults = *all.HasMoreResults + o.NextCursor = all.NextCursor o.TotalFilteredCount = *all.TotalFilteredCount if len(additionalProperties) > 0 {