diff --git a/.apigentools-info b/.apigentools-info index cfffc0355aa..a274610b4a7 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.2", - "regenerated": "2022-03-04 10:55:06.340610", - "spec_repo_commit": "9717e6d" + "regenerated": "2022-03-07 15:38:07.822107", + "spec_repo_commit": "0caba3e" }, "v2": { "apigentools_version": "1.6.2", - "regenerated": "2022-03-04 10:55:06.351932", - "spec_repo_commit": "9717e6d" + "regenerated": "2022-03-07 15:38:07.834603", + "spec_repo_commit": "0caba3e" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e4fab3f4987..09a5ae0367e 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13371,6 +13371,10 @@ components: current month. A committer is active if they commit at least 3 times in a given month. type: integer + hour: + description: The hour for the usage. + format: date-time + type: string org_name: description: The organization name. type: string @@ -14060,6 +14064,32 @@ components: $ref: '#/components/schemas/UsageNetworkHostsHour' type: array type: object + UsageOnlineArchiveHour: + description: Online Archive usage in a given hour. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + online_archive_events_count: + description: Total count of online archived events within the hour. + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageOnlineArchiveResponse: + description: Online Archive usage response. + properties: + usage: + description: Response containing Online Archive usage. + items: + $ref: '#/components/schemas/UsageOnlineArchiveHour' + type: array + type: object UsageProfilingHour: description: The number of profiled hosts for each hour for a given organization. properties: @@ -14565,6 +14595,11 @@ components: all hours in the current date for all organizations. format: int64 type: integer + online_archive_events_count_sum: + description: Sum of all online archived events over all hours in the current + date for all organizations. + format: int64 + type: integer opentelemetry_host_top99p: description: Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current @@ -14712,8 +14747,8 @@ components: format: int64 type: integer ci_test_indexed_spans_sum: - description: Shows the sum of all CI test indexed spans over all hours in - the current date for the given org. + description: Sum of all CI test indexed spans over all hours in the current + date for the given org. format: int64 type: integer ci_visibility_pipeline_committers_hwm: @@ -14877,6 +14912,11 @@ components: all hours in the current date for the given org. format: int64 type: integer + online_archive_events_count_sum: + description: Sum of all online archived events over all hours in the current + date for the given org. + format: int64 + type: integer opentelemetry_host_top99p: description: Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current @@ -15213,6 +15253,11 @@ components: all hours in the current months for all organizations. format: int64 type: integer + online_archive_events_count_agg_sum: + description: Sum of all online archived events over all hours in the current + months for all organizations. + format: int64 + type: integer opentelemetry_host_top99p_sum: description: Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current @@ -26780,6 +26825,65 @@ paths: x-menu-order: 14 x-undo: type: safe + /api/v1/usage/online-archive: + get: + description: Get hourly usage for Online Archive. + operationId: GetUsageOnlineArchive + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage beginning at this hour.' + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage ending + + **before** this hour.' + in: query + name: end_hr + required: false + schema: + format: date-time + type: string + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageOnlineArchiveResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage for Online Archive + tags: + - Usage Metering + x-menu-order: 38 + x-undo: + type: safe /api/v1/usage/profiling: get: description: Get hourly usage for profiled hosts. diff --git a/api/v1/datadog/.openapi-generator/FILES b/api/v1/datadog/.openapi-generator/FILES index f0adce0cde7..1a1e82bd965 100644 --- a/api/v1/datadog/.openapi-generator/FILES +++ b/api/v1/datadog/.openapi-generator/FILES @@ -659,6 +659,8 @@ docs/UsageNetworkFlowsHour.md docs/UsageNetworkFlowsResponse.md docs/UsageNetworkHostsHour.md docs/UsageNetworkHostsResponse.md +docs/UsageOnlineArchiveHour.md +docs/UsageOnlineArchiveResponse.md docs/UsageProfilingHour.md docs/UsageProfilingResponse.md docs/UsageReportsType.md @@ -1347,6 +1349,8 @@ model_usage_network_flows_hour.go model_usage_network_flows_response.go model_usage_network_hosts_hour.go model_usage_network_hosts_response.go +model_usage_online_archive_hour.go +model_usage_online_archive_response.go model_usage_profiling_hour.go model_usage_profiling_response.go model_usage_reports_type.go diff --git a/api/v1/datadog/README.md b/api/v1/datadog/README.md index 2bfe8f8b0df..08809233fcd 100644 --- a/api/v1/datadog/README.md +++ b/api/v1/datadog/README.md @@ -266,6 +266,7 @@ All URIs are relative to *https://api.datadoghq.com* | _UsageMeteringApi_ | [**GetUsageLogsByRetention**](docs/UsageMeteringApi.md#getusagelogsbyretention) | **Get** /api/v1/usage/logs-by-retention | Get hourly logs usage by retention | | _UsageMeteringApi_ | [**GetUsageNetworkFlows**](docs/UsageMeteringApi.md#getusagenetworkflows) | **Get** /api/v1/usage/network_flows | Get hourly usage for Network Flows | | _UsageMeteringApi_ | [**GetUsageNetworkHosts**](docs/UsageMeteringApi.md#getusagenetworkhosts) | **Get** /api/v1/usage/network_hosts | Get hourly usage for Network Hosts | +| _UsageMeteringApi_ | [**GetUsageOnlineArchive**](docs/UsageMeteringApi.md#getusageonlinearchive) | **Get** /api/v1/usage/online-archive | Get hourly usage for Online Archive | | _UsageMeteringApi_ | [**GetUsageProfiling**](docs/UsageMeteringApi.md#getusageprofiling) | **Get** /api/v1/usage/profiling | Get hourly usage for profiled hosts | | _UsageMeteringApi_ | [**GetUsageRumSessions**](docs/UsageMeteringApi.md#getusagerumsessions) | **Get** /api/v1/usage/rum_sessions | Get hourly usage for RUM Sessions | | _UsageMeteringApi_ | [**GetUsageRumUnits**](docs/UsageMeteringApi.md#getusagerumunits) | **Get** /api/v1/usage/rum | Get hourly usage for RUM Units | @@ -889,6 +890,8 @@ All URIs are relative to *https://api.datadoghq.com* - [UsageNetworkFlowsResponse](docs/UsageNetworkFlowsResponse.md) - [UsageNetworkHostsHour](docs/UsageNetworkHostsHour.md) - [UsageNetworkHostsResponse](docs/UsageNetworkHostsResponse.md) +- [UsageOnlineArchiveHour](docs/UsageOnlineArchiveHour.md) +- [UsageOnlineArchiveResponse](docs/UsageOnlineArchiveResponse.md) - [UsageProfilingHour](docs/UsageProfilingHour.md) - [UsageProfilingResponse](docs/UsageProfilingResponse.md) - [UsageReportsType](docs/UsageReportsType.md) diff --git a/api/v1/datadog/api_usage_metering.go b/api/v1/datadog/api_usage_metering.go index 67aafa887ac..63a9aa15cae 100644 --- a/api/v1/datadog/api_usage_metering.go +++ b/api/v1/datadog/api_usage_metering.go @@ -5030,6 +5030,193 @@ func (a *UsageMeteringApiService) getUsageNetworkHostsExecute(r apiGetUsageNetwo return localVarReturnValue, localVarHTTPResponse, nil } +type apiGetUsageOnlineArchiveRequest struct { + ctx _context.Context + ApiService *UsageMeteringApiService + startHr *time.Time + endHr *time.Time +} + +type GetUsageOnlineArchiveOptionalParameters struct { + EndHr *time.Time +} + +func NewGetUsageOnlineArchiveOptionalParameters() *GetUsageOnlineArchiveOptionalParameters { + this := GetUsageOnlineArchiveOptionalParameters{} + return &this +} +func (r *GetUsageOnlineArchiveOptionalParameters) WithEndHr(endHr time.Time) *GetUsageOnlineArchiveOptionalParameters { + r.EndHr = &endHr + return r +} + +/* + * GetUsageOnlineArchive Get hourly usage for Online Archive + * Get hourly usage for Online Archive. + */ +func (a *UsageMeteringApiService) GetUsageOnlineArchive(ctx _context.Context, startHr time.Time, o ...GetUsageOnlineArchiveOptionalParameters) (UsageOnlineArchiveResponse, *_nethttp.Response, error) { + req := apiGetUsageOnlineArchiveRequest{ + ApiService: a, + ctx: ctx, + startHr: &startHr, + } + + if len(o) > 1 { + var localVarReturnValue UsageOnlineArchiveResponse + return localVarReturnValue, nil, reportError("only one argument of type GetUsageOnlineArchiveOptionalParameters is allowed") + } + + if o != nil { + req.endHr = o[0].EndHr + } + + return req.ApiService.getUsageOnlineArchiveExecute(req) +} + +/* + * Execute executes the request + * @return UsageOnlineArchiveResponse + */ +func (a *UsageMeteringApiService) getUsageOnlineArchiveExecute(r apiGetUsageOnlineArchiveRequest) (UsageOnlineArchiveResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue UsageOnlineArchiveResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageMeteringApiService.GetUsageOnlineArchive") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/usage/online-archive" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.startHr == nil { + return localVarReturnValue, nil, reportError("startHr is required and must be specified") + } + + localVarQueryParams.Add("start_hr", parameterToString(*r.startHr, "")) + if r.endHr != nil { + localVarQueryParams.Add("end_hr", parameterToString(*r.endHr, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json;datetime-format=rfc3339"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-API-KEY"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["appKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-APPLICATION-KEY"] = key + } + } + } + req, err := a.client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type apiGetUsageProfilingRequest struct { ctx _context.Context ApiService *UsageMeteringApiService diff --git a/api/v1/datadog/docs/UsageCIVisibilityHour.md b/api/v1/datadog/docs/UsageCIVisibilityHour.md index 8675ad1adf5..c1127c68411 100644 --- a/api/v1/datadog/docs/UsageCIVisibilityHour.md +++ b/api/v1/datadog/docs/UsageCIVisibilityHour.md @@ -2,14 +2,15 @@ ## Properties -| Name | Type | Description | Notes | -| ---------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -| **CiPipelineIndexedSpans** | Pointer to **int32** | The number of spans for pipelines in the queried hour. | [optional] | -| **CiTestIndexedSpans** | Pointer to **int32** | The number of spans for tests in the queried hour. | [optional] | -| **CiVisibilityPipelineCommitters** | Pointer to **int32** | Shows the total count of all active Git committers for Pipelines in the current month. A committer is active if they commit at least 3 times in a given month. | [optional] | -| **CiVisibilityTestCommitters** | Pointer to **int32** | The total count of all active Git committers for tests in the current month. A committer is active if they commit at least 3 times in a given month. | [optional] | -| **OrgName** | Pointer to **string** | The organization name. | [optional] | -| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | +| Name | Type | Description | Notes | +| ---------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **CiPipelineIndexedSpans** | Pointer to **int32** | The number of spans for pipelines in the queried hour. | [optional] | +| **CiTestIndexedSpans** | Pointer to **int32** | The number of spans for tests in the queried hour. | [optional] | +| **CiVisibilityPipelineCommitters** | Pointer to **int32** | Shows the total count of all active Git committers for Pipelines in the current month. A committer is active if they commit at least 3 times in a given month. | [optional] | +| **CiVisibilityTestCommitters** | Pointer to **int32** | The total count of all active Git committers for tests in the current month. A committer is active if they commit at least 3 times in a given month. | [optional] | +| **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | ## Methods @@ -130,6 +131,31 @@ SetCiVisibilityTestCommitters sets CiVisibilityTestCommitters field to given val HasCiVisibilityTestCommitters returns a boolean if a field has been set. +### GetHour + +`func (o *UsageCIVisibilityHour) GetHour() time.Time` + +GetHour returns the Hour field if non-nil, zero value otherwise. + +### GetHourOk + +`func (o *UsageCIVisibilityHour) GetHourOk() (*time.Time, bool)` + +GetHourOk returns a tuple with the Hour field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHour + +`func (o *UsageCIVisibilityHour) SetHour(v time.Time)` + +SetHour sets Hour field to given value. + +### HasHour + +`func (o *UsageCIVisibilityHour) HasHour() bool` + +HasHour returns a boolean if a field has been set. + ### GetOrgName `func (o *UsageCIVisibilityHour) GetOrgName() string` diff --git a/api/v1/datadog/docs/UsageMeteringApi.md b/api/v1/datadog/docs/UsageMeteringApi.md index 99bace2eecb..8ccad0770bc 100644 --- a/api/v1/datadog/docs/UsageMeteringApi.md +++ b/api/v1/datadog/docs/UsageMeteringApi.md @@ -30,6 +30,7 @@ All URIs are relative to *https://api.datadoghq.com* | [**GetUsageLogsByRetention**](UsageMeteringApi.md#GetUsageLogsByRetention) | **Get** /api/v1/usage/logs-by-retention | Get hourly logs usage by retention | | [**GetUsageNetworkFlows**](UsageMeteringApi.md#GetUsageNetworkFlows) | **Get** /api/v1/usage/network_flows | Get hourly usage for Network Flows | | [**GetUsageNetworkHosts**](UsageMeteringApi.md#GetUsageNetworkHosts) | **Get** /api/v1/usage/network_hosts | Get hourly usage for Network Hosts | +| [**GetUsageOnlineArchive**](UsageMeteringApi.md#GetUsageOnlineArchive) | **Get** /api/v1/usage/online-archive | Get hourly usage for Online Archive | | [**GetUsageProfiling**](UsageMeteringApi.md#GetUsageProfiling) | **Get** /api/v1/usage/profiling | Get hourly usage for profiled hosts | | [**GetUsageRumSessions**](UsageMeteringApi.md#GetUsageRumSessions) | **Get** /api/v1/usage/rum_sessions | Get hourly usage for RUM Sessions | | [**GetUsageRumUnits**](UsageMeteringApi.md#GetUsageRumUnits) | **Get** /api/v1/usage/rum | Get hourly usage for RUM Units | @@ -2021,6 +2022,81 @@ Other parameters are passed through a pointer to a GetUsageNetworkHostsOptionalP [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## GetUsageOnlineArchive + +> UsageOnlineArchiveResponse GetUsageOnlineArchive(ctx, startHr, datadog.GetUsageOnlineArchiveOptionalParameters{}) + +Get hourly usage for Online Archive. + +### Example + +```go +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + + startHr := time.Now() // time.Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. + endHr := time.Now() // time.Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional) + optionalParams := datadog.GetUsageOnlineArchiveOptionalParameters{ + EndHr: &endHr, + } + + configuration := datadog.NewConfiguration() + + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageOnlineArchive(ctx, startHr, optionalParams) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageOnlineArchive`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUsageOnlineArchive`: UsageOnlineArchiveResponse + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from UsageMeteringApi.GetUsageOnlineArchive:\n%s\n", responseContent) +} +``` + +### Required Parameters + +| Name | Type | Description | Notes | +| ----------- | ------------------- | ---------------------------------------------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | Context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **startHr** | **time.Time** | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. | + +### Optional Parameters + +Other parameters are passed through a pointer to a GetUsageOnlineArchiveOptionalParameters struct. + +| Name | Type | Description | Notes | +| --------- | ------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | +| **endHr** | **time.Time** | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. | + +### Return type + +[**UsageOnlineArchiveResponse**](UsageOnlineArchiveResponse.md) + +### Authorization + +[AuthZ](../README.md#AuthZ), [apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json;datetime-format=rfc3339 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + ## GetUsageProfiling > UsageProfilingResponse GetUsageProfiling(ctx, startHr, datadog.GetUsageProfilingOptionalParameters{}) diff --git a/api/v1/datadog/docs/UsageOnlineArchiveHour.md b/api/v1/datadog/docs/UsageOnlineArchiveHour.md new file mode 100644 index 00000000000..cb0968e4de9 --- /dev/null +++ b/api/v1/datadog/docs/UsageOnlineArchiveHour.md @@ -0,0 +1,131 @@ +# UsageOnlineArchiveHour + +## Properties + +| Name | Type | Description | Notes | +| ---------------------------- | ------------------------ | ------------------------------------------------------ | ---------- | +| **Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] | +| **OnlineArchiveEventsCount** | Pointer to **int32** | Total count of online archived events within the hour. | [optional] | +| **OrgName** | Pointer to **string** | The organization name. | [optional] | +| **PublicId** | Pointer to **string** | The organization public ID. | [optional] | + +## Methods + +### NewUsageOnlineArchiveHour + +`func NewUsageOnlineArchiveHour() *UsageOnlineArchiveHour` + +NewUsageOnlineArchiveHour instantiates a new UsageOnlineArchiveHour object. +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed. + +### NewUsageOnlineArchiveHourWithDefaults + +`func NewUsageOnlineArchiveHourWithDefaults() *UsageOnlineArchiveHour` + +NewUsageOnlineArchiveHourWithDefaults instantiates a new UsageOnlineArchiveHour object. +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set. + +### GetHour + +`func (o *UsageOnlineArchiveHour) GetHour() time.Time` + +GetHour returns the Hour field if non-nil, zero value otherwise. + +### GetHourOk + +`func (o *UsageOnlineArchiveHour) GetHourOk() (*time.Time, bool)` + +GetHourOk returns a tuple with the Hour field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHour + +`func (o *UsageOnlineArchiveHour) SetHour(v time.Time)` + +SetHour sets Hour field to given value. + +### HasHour + +`func (o *UsageOnlineArchiveHour) HasHour() bool` + +HasHour returns a boolean if a field has been set. + +### GetOnlineArchiveEventsCount + +`func (o *UsageOnlineArchiveHour) GetOnlineArchiveEventsCount() int32` + +GetOnlineArchiveEventsCount returns the OnlineArchiveEventsCount field if non-nil, zero value otherwise. + +### GetOnlineArchiveEventsCountOk + +`func (o *UsageOnlineArchiveHour) GetOnlineArchiveEventsCountOk() (*int32, bool)` + +GetOnlineArchiveEventsCountOk returns a tuple with the OnlineArchiveEventsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnlineArchiveEventsCount + +`func (o *UsageOnlineArchiveHour) SetOnlineArchiveEventsCount(v int32)` + +SetOnlineArchiveEventsCount sets OnlineArchiveEventsCount field to given value. + +### HasOnlineArchiveEventsCount + +`func (o *UsageOnlineArchiveHour) HasOnlineArchiveEventsCount() bool` + +HasOnlineArchiveEventsCount returns a boolean if a field has been set. + +### GetOrgName + +`func (o *UsageOnlineArchiveHour) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *UsageOnlineArchiveHour) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *UsageOnlineArchiveHour) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *UsageOnlineArchiveHour) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + +### GetPublicId + +`func (o *UsageOnlineArchiveHour) GetPublicId() string` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *UsageOnlineArchiveHour) GetPublicIdOk() (*string, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *UsageOnlineArchiveHour) SetPublicId(v string)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *UsageOnlineArchiveHour) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageOnlineArchiveResponse.md b/api/v1/datadog/docs/UsageOnlineArchiveResponse.md new file mode 100644 index 00000000000..feb62a09f1a --- /dev/null +++ b/api/v1/datadog/docs/UsageOnlineArchiveResponse.md @@ -0,0 +1,53 @@ +# UsageOnlineArchiveResponse + +## Properties + +| Name | Type | Description | Notes | +| --------- | -------------------------------------------------------------------- | ----------------------------------------- | ---------- | +| **Usage** | Pointer to [**[]UsageOnlineArchiveHour**](UsageOnlineArchiveHour.md) | Response containing Online Archive usage. | [optional] | + +## Methods + +### NewUsageOnlineArchiveResponse + +`func NewUsageOnlineArchiveResponse() *UsageOnlineArchiveResponse` + +NewUsageOnlineArchiveResponse instantiates a new UsageOnlineArchiveResponse object. +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed. + +### NewUsageOnlineArchiveResponseWithDefaults + +`func NewUsageOnlineArchiveResponseWithDefaults() *UsageOnlineArchiveResponse` + +NewUsageOnlineArchiveResponseWithDefaults instantiates a new UsageOnlineArchiveResponse object. +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set. + +### GetUsage + +`func (o *UsageOnlineArchiveResponse) GetUsage() []UsageOnlineArchiveHour` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *UsageOnlineArchiveResponse) GetUsageOk() (*[]UsageOnlineArchiveHour, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *UsageOnlineArchiveResponse) SetUsage(v []UsageOnlineArchiveHour)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *UsageOnlineArchiveResponse) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/api/v1/datadog/docs/UsageSummaryDate.md b/api/v1/datadog/docs/UsageSummaryDate.md index 0801c5cf2cf..fa2f75b5a8c 100644 --- a/api/v1/datadog/docs/UsageSummaryDate.md +++ b/api/v1/datadog/docs/UsageSummaryDate.md @@ -51,6 +51,7 @@ | **MobileRumUnitsSum** | Pointer to **int64** | Shows the sum of all mobile RUM units over all hours in the current date for all organizations. | [optional] | | **NetflowIndexedEventsCountSum** | Pointer to **int64** | Shows the sum of all Network flows indexed over all hours in the current date for all organizations. | [optional] | | **NpmHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for all organizations. | [optional] | +| **OnlineArchiveEventsCountSum** | Pointer to **int64** | Sum of all online archived events over all hours in the current date for all organizations. | [optional] | | **OpentelemetryHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for all organizations. | [optional] | | **Orgs** | Pointer to [**[]UsageSummaryDateOrg**](UsageSummaryDateOrg.md) | Organizations associated with a user. | [optional] | | **ProfilingHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all profiled hosts over all hours in the current date for all organizations. | [optional] | @@ -1260,6 +1261,31 @@ SetNpmHostTop99p sets NpmHostTop99p field to given value. HasNpmHostTop99p returns a boolean if a field has been set. +### GetOnlineArchiveEventsCountSum + +`func (o *UsageSummaryDate) GetOnlineArchiveEventsCountSum() int64` + +GetOnlineArchiveEventsCountSum returns the OnlineArchiveEventsCountSum field if non-nil, zero value otherwise. + +### GetOnlineArchiveEventsCountSumOk + +`func (o *UsageSummaryDate) GetOnlineArchiveEventsCountSumOk() (*int64, bool)` + +GetOnlineArchiveEventsCountSumOk returns a tuple with the OnlineArchiveEventsCountSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnlineArchiveEventsCountSum + +`func (o *UsageSummaryDate) SetOnlineArchiveEventsCountSum(v int64)` + +SetOnlineArchiveEventsCountSum sets OnlineArchiveEventsCountSum field to given value. + +### HasOnlineArchiveEventsCountSum + +`func (o *UsageSummaryDate) HasOnlineArchiveEventsCountSum() bool` + +HasOnlineArchiveEventsCountSum returns a boolean if a field has been set. + ### GetOpentelemetryHostTop99p `func (o *UsageSummaryDate) GetOpentelemetryHostTop99p() int64` diff --git a/api/v1/datadog/docs/UsageSummaryDateOrg.md b/api/v1/datadog/docs/UsageSummaryDateOrg.md index 2f287f58cc2..90293f4ae03 100644 --- a/api/v1/datadog/docs/UsageSummaryDateOrg.md +++ b/api/v1/datadog/docs/UsageSummaryDateOrg.md @@ -18,7 +18,7 @@ | **BrowserRumReplaySessionCountSum** | Pointer to **int64** | Shows the sum of all browser replay sessions over all hours in the current date for the given org. | [optional] | | **BrowserRumUnitsSum** | Pointer to **int64** | Shows the sum of all browser RUM units over all hours in the current date for the given org. | [optional] | | **CiPipelineIndexedSpansSum** | Pointer to **int64** | Shows the sum of all CI pipeline indexed spans over all hours in the current date for the given org. | [optional] | -| **CiTestIndexedSpansSum** | Pointer to **int64** | Shows the sum of all CI test indexed spans over all hours in the current date for the given org. | [optional] | +| **CiTestIndexedSpansSum** | Pointer to **int64** | Sum of all CI test indexed spans over all hours in the current date for the given org. | [optional] | | **CiVisibilityPipelineCommittersHwm** | Pointer to **int64** | Shows the high-water mark of all CI visibility pipeline committers over all hours in the current date for the given org. | [optional] | | **CiVisibilityTestCommittersHwm** | Pointer to **int64** | Shows the high-water mark of all CI visibility test committers over all hours in the current date for the given org. | [optional] | | **ContainerAvg** | Pointer to **int64** | Shows the average of all distinct containers over all hours in the current date for the given org. | [optional] | @@ -52,6 +52,7 @@ | **Name** | Pointer to **string** | The organization name. | [optional] | | **NetflowIndexedEventsCountSum** | Pointer to **int64** | Shows the sum of all Network flows indexed over all hours in the current date for the given org. | [optional] | | **NpmHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for the given org. | [optional] | +| **OnlineArchiveEventsCountSum** | Pointer to **int64** | Sum of all online archived events over all hours in the current date for the given org. | [optional] | | **OpentelemetryHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for the given org. | [optional] | | **ProfilingHostTop99p** | Pointer to **int64** | Shows the 99th percentile of all profiled hosts over all hours in the current date for the given org. | [optional] | | **PublicId** | Pointer to **string** | The organization public id. | [optional] | @@ -1286,6 +1287,31 @@ SetNpmHostTop99p sets NpmHostTop99p field to given value. HasNpmHostTop99p returns a boolean if a field has been set. +### GetOnlineArchiveEventsCountSum + +`func (o *UsageSummaryDateOrg) GetOnlineArchiveEventsCountSum() int64` + +GetOnlineArchiveEventsCountSum returns the OnlineArchiveEventsCountSum field if non-nil, zero value otherwise. + +### GetOnlineArchiveEventsCountSumOk + +`func (o *UsageSummaryDateOrg) GetOnlineArchiveEventsCountSumOk() (*int64, bool)` + +GetOnlineArchiveEventsCountSumOk returns a tuple with the OnlineArchiveEventsCountSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnlineArchiveEventsCountSum + +`func (o *UsageSummaryDateOrg) SetOnlineArchiveEventsCountSum(v int64)` + +SetOnlineArchiveEventsCountSum sets OnlineArchiveEventsCountSum field to given value. + +### HasOnlineArchiveEventsCountSum + +`func (o *UsageSummaryDateOrg) HasOnlineArchiveEventsCountSum() bool` + +HasOnlineArchiveEventsCountSum returns a boolean if a field has been set. + ### GetOpentelemetryHostTop99p `func (o *UsageSummaryDateOrg) GetOpentelemetryHostTop99p() int64` diff --git a/api/v1/datadog/docs/UsageSummaryResponse.md b/api/v1/datadog/docs/UsageSummaryResponse.md index e4159523281..95d5ccb8a89 100644 --- a/api/v1/datadog/docs/UsageSummaryResponse.md +++ b/api/v1/datadog/docs/UsageSummaryResponse.md @@ -56,6 +56,7 @@ | **MobileRumUnitsAggSum** | Pointer to **int64** | Shows the sum of all mobile RUM units over all hours in the current months for all organizations. | [optional] | | **NetflowIndexedEventsCountAggSum** | Pointer to **int64** | Shows the sum of all Network flows indexed over all hours in the current months for all organizations. | [optional] | | **NpmHostTop99pSum** | Pointer to **int64** | Shows the 99th percentile of all distinct Networks hosts over all hours in the current months for all organizations. | [optional] | +| **OnlineArchiveEventsCountAggSum** | Pointer to **int64** | Sum of all online archived events over all hours in the current months for all organizations. | [optional] | | **OpentelemetryHostTop99pSum** | Pointer to **int64** | Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current months for all organizations. | [optional] | | **ProfilingContainerAgentCountAvg** | Pointer to **int64** | Shows the average number of profiled containers over all hours in the current months for all organizations. | [optional] | | **ProfilingHostCountTop99pSum** | Pointer to **int64** | Shows the 99th percentile of all profiled hosts over all hours in the current months for all organizations. | [optional] | @@ -1394,6 +1395,31 @@ SetNpmHostTop99pSum sets NpmHostTop99pSum field to given value. HasNpmHostTop99pSum returns a boolean if a field has been set. +### GetOnlineArchiveEventsCountAggSum + +`func (o *UsageSummaryResponse) GetOnlineArchiveEventsCountAggSum() int64` + +GetOnlineArchiveEventsCountAggSum returns the OnlineArchiveEventsCountAggSum field if non-nil, zero value otherwise. + +### GetOnlineArchiveEventsCountAggSumOk + +`func (o *UsageSummaryResponse) GetOnlineArchiveEventsCountAggSumOk() (*int64, bool)` + +GetOnlineArchiveEventsCountAggSumOk returns a tuple with the OnlineArchiveEventsCountAggSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOnlineArchiveEventsCountAggSum + +`func (o *UsageSummaryResponse) SetOnlineArchiveEventsCountAggSum(v int64)` + +SetOnlineArchiveEventsCountAggSum sets OnlineArchiveEventsCountAggSum field to given value. + +### HasOnlineArchiveEventsCountAggSum + +`func (o *UsageSummaryResponse) HasOnlineArchiveEventsCountAggSum() bool` + +HasOnlineArchiveEventsCountAggSum returns a boolean if a field has been set. + ### GetOpentelemetryHostTop99pSum `func (o *UsageSummaryResponse) GetOpentelemetryHostTop99pSum() int64` diff --git a/api/v1/datadog/model_usage_ci_visibility_hour.go b/api/v1/datadog/model_usage_ci_visibility_hour.go index 50c149e0b41..eddfe244b2a 100644 --- a/api/v1/datadog/model_usage_ci_visibility_hour.go +++ b/api/v1/datadog/model_usage_ci_visibility_hour.go @@ -10,6 +10,7 @@ package datadog import ( "encoding/json" + "time" ) // UsageCIVisibilityHour CI visibility usage in a given hour. @@ -22,6 +23,8 @@ type UsageCIVisibilityHour struct { CiVisibilityPipelineCommitters *int32 `json:"ci_visibility_pipeline_committers,omitempty"` // The total count of all active Git committers for tests in the current month. A committer is active if they commit at least 3 times in a given month. CiVisibilityTestCommitters *int32 `json:"ci_visibility_test_committers,omitempty"` + // The hour for the usage. + Hour *time.Time `json:"hour,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -175,6 +178,38 @@ func (o *UsageCIVisibilityHour) SetCiVisibilityTestCommitters(v int32) { o.CiVisibilityTestCommitters = &v } +// GetHour returns the Hour field value if set, zero value otherwise. +func (o *UsageCIVisibilityHour) GetHour() time.Time { + if o == nil || o.Hour == nil { + var ret time.Time + return ret + } + return *o.Hour +} + +// GetHourOk returns a tuple with the Hour field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageCIVisibilityHour) GetHourOk() (*time.Time, bool) { + if o == nil || o.Hour == nil { + return nil, false + } + return o.Hour, true +} + +// HasHour returns a boolean if a field has been set. +func (o *UsageCIVisibilityHour) HasHour() bool { + if o != nil && o.Hour != nil { + return true + } + + return false +} + +// SetHour gets a reference to the given time.Time and assigns it to the Hour field. +func (o *UsageCIVisibilityHour) SetHour(v time.Time) { + o.Hour = &v +} + // GetOrgName returns the OrgName field value if set, zero value otherwise. func (o *UsageCIVisibilityHour) GetOrgName() string { if o == nil || o.OrgName == nil { @@ -256,6 +291,9 @@ func (o UsageCIVisibilityHour) MarshalJSON() ([]byte, error) { if o.CiVisibilityTestCommitters != nil { toSerialize["ci_visibility_test_committers"] = o.CiVisibilityTestCommitters } + if o.Hour != nil { + toSerialize["hour"] = o.Hour + } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName } @@ -268,12 +306,13 @@ func (o UsageCIVisibilityHour) MarshalJSON() ([]byte, error) { func (o *UsageCIVisibilityHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - CiPipelineIndexedSpans *int32 `json:"ci_pipeline_indexed_spans,omitempty"` - CiTestIndexedSpans *int32 `json:"ci_test_indexed_spans,omitempty"` - CiVisibilityPipelineCommitters *int32 `json:"ci_visibility_pipeline_committers,omitempty"` - CiVisibilityTestCommitters *int32 `json:"ci_visibility_test_committers,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + CiPipelineIndexedSpans *int32 `json:"ci_pipeline_indexed_spans,omitempty"` + CiTestIndexedSpans *int32 `json:"ci_test_indexed_spans,omitempty"` + CiVisibilityPipelineCommitters *int32 `json:"ci_visibility_pipeline_committers,omitempty"` + CiVisibilityTestCommitters *int32 `json:"ci_visibility_test_committers,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { @@ -288,6 +327,7 @@ func (o *UsageCIVisibilityHour) UnmarshalJSON(bytes []byte) (err error) { o.CiTestIndexedSpans = all.CiTestIndexedSpans o.CiVisibilityPipelineCommitters = all.CiVisibilityPipelineCommitters o.CiVisibilityTestCommitters = all.CiVisibilityTestCommitters + o.Hour = all.Hour o.OrgName = all.OrgName o.PublicId = all.PublicId return nil diff --git a/api/v1/datadog/model_usage_online_archive_hour.go b/api/v1/datadog/model_usage_online_archive_hour.go new file mode 100644 index 00000000000..4834969ea91 --- /dev/null +++ b/api/v1/datadog/model_usage_online_archive_hour.go @@ -0,0 +1,217 @@ +/* + * 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. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "time" +) + +// UsageOnlineArchiveHour Online Archive usage in a given hour. +type UsageOnlineArchiveHour struct { + // The hour for the usage. + Hour *time.Time `json:"hour,omitempty"` + // Total count of online archived events within the hour. + OnlineArchiveEventsCount *int32 `json:"online_archive_events_count,omitempty"` + // The organization name. + OrgName *string `json:"org_name,omitempty"` + // The organization public ID. + PublicId *string `json:"public_id,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:-` +} + +// NewUsageOnlineArchiveHour instantiates a new UsageOnlineArchiveHour object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUsageOnlineArchiveHour() *UsageOnlineArchiveHour { + this := UsageOnlineArchiveHour{} + return &this +} + +// NewUsageOnlineArchiveHourWithDefaults instantiates a new UsageOnlineArchiveHour object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUsageOnlineArchiveHourWithDefaults() *UsageOnlineArchiveHour { + this := UsageOnlineArchiveHour{} + return &this +} + +// GetHour returns the Hour field value if set, zero value otherwise. +func (o *UsageOnlineArchiveHour) GetHour() time.Time { + if o == nil || o.Hour == nil { + var ret time.Time + return ret + } + return *o.Hour +} + +// GetHourOk returns a tuple with the Hour field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageOnlineArchiveHour) GetHourOk() (*time.Time, bool) { + if o == nil || o.Hour == nil { + return nil, false + } + return o.Hour, true +} + +// HasHour returns a boolean if a field has been set. +func (o *UsageOnlineArchiveHour) HasHour() bool { + if o != nil && o.Hour != nil { + return true + } + + return false +} + +// SetHour gets a reference to the given time.Time and assigns it to the Hour field. +func (o *UsageOnlineArchiveHour) SetHour(v time.Time) { + o.Hour = &v +} + +// GetOnlineArchiveEventsCount returns the OnlineArchiveEventsCount field value if set, zero value otherwise. +func (o *UsageOnlineArchiveHour) GetOnlineArchiveEventsCount() int32 { + if o == nil || o.OnlineArchiveEventsCount == nil { + var ret int32 + return ret + } + return *o.OnlineArchiveEventsCount +} + +// GetOnlineArchiveEventsCountOk returns a tuple with the OnlineArchiveEventsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageOnlineArchiveHour) GetOnlineArchiveEventsCountOk() (*int32, bool) { + if o == nil || o.OnlineArchiveEventsCount == nil { + return nil, false + } + return o.OnlineArchiveEventsCount, true +} + +// HasOnlineArchiveEventsCount returns a boolean if a field has been set. +func (o *UsageOnlineArchiveHour) HasOnlineArchiveEventsCount() bool { + if o != nil && o.OnlineArchiveEventsCount != nil { + return true + } + + return false +} + +// SetOnlineArchiveEventsCount gets a reference to the given int32 and assigns it to the OnlineArchiveEventsCount field. +func (o *UsageOnlineArchiveHour) SetOnlineArchiveEventsCount(v int32) { + o.OnlineArchiveEventsCount = &v +} + +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *UsageOnlineArchiveHour) GetOrgName() string { + if o == nil || o.OrgName == nil { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageOnlineArchiveHour) GetOrgNameOk() (*string, bool) { + if o == nil || o.OrgName == nil { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *UsageOnlineArchiveHour) HasOrgName() bool { + if o != nil && o.OrgName != nil { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *UsageOnlineArchiveHour) SetOrgName(v string) { + o.OrgName = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *UsageOnlineArchiveHour) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageOnlineArchiveHour) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *UsageOnlineArchiveHour) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *UsageOnlineArchiveHour) SetPublicId(v string) { + o.PublicId = &v +} + +func (o UsageOnlineArchiveHour) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return json.Marshal(o.UnparsedObject) + } + if o.Hour != nil { + toSerialize["hour"] = o.Hour + } + if o.OnlineArchiveEventsCount != nil { + toSerialize["online_archive_events_count"] = o.OnlineArchiveEventsCount + } + if o.OrgName != nil { + toSerialize["org_name"] = o.OrgName + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } + return json.Marshal(toSerialize) +} + +func (o *UsageOnlineArchiveHour) UnmarshalJSON(bytes []byte) (err error) { + raw := map[string]interface{}{} + all := struct { + Hour *time.Time `json:"hour,omitempty"` + OnlineArchiveEventsCount *int32 `json:"online_archive_events_count,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` + }{} + err = json.Unmarshal(bytes, &all) + if err != nil { + err = json.Unmarshal(bytes, &raw) + if err != nil { + return err + } + o.UnparsedObject = raw + return nil + } + o.Hour = all.Hour + o.OnlineArchiveEventsCount = all.OnlineArchiveEventsCount + o.OrgName = all.OrgName + o.PublicId = all.PublicId + return nil +} diff --git a/api/v1/datadog/model_usage_online_archive_response.go b/api/v1/datadog/model_usage_online_archive_response.go new file mode 100644 index 00000000000..1ece58c3ef8 --- /dev/null +++ b/api/v1/datadog/model_usage_online_archive_response.go @@ -0,0 +1,99 @@ +/* + * 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. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// UsageOnlineArchiveResponse Online Archive usage response. +type UsageOnlineArchiveResponse struct { + // Response containing Online Archive usage. + Usage *[]UsageOnlineArchiveHour `json:"usage,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:-` +} + +// NewUsageOnlineArchiveResponse instantiates a new UsageOnlineArchiveResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUsageOnlineArchiveResponse() *UsageOnlineArchiveResponse { + this := UsageOnlineArchiveResponse{} + return &this +} + +// NewUsageOnlineArchiveResponseWithDefaults instantiates a new UsageOnlineArchiveResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUsageOnlineArchiveResponseWithDefaults() *UsageOnlineArchiveResponse { + this := UsageOnlineArchiveResponse{} + return &this +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *UsageOnlineArchiveResponse) GetUsage() []UsageOnlineArchiveHour { + if o == nil || o.Usage == nil { + var ret []UsageOnlineArchiveHour + return ret + } + return *o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageOnlineArchiveResponse) GetUsageOk() (*[]UsageOnlineArchiveHour, bool) { + if o == nil || o.Usage == nil { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *UsageOnlineArchiveResponse) HasUsage() bool { + if o != nil && o.Usage != nil { + return true + } + + return false +} + +// SetUsage gets a reference to the given []UsageOnlineArchiveHour and assigns it to the Usage field. +func (o *UsageOnlineArchiveResponse) SetUsage(v []UsageOnlineArchiveHour) { + o.Usage = &v +} + +func (o UsageOnlineArchiveResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return json.Marshal(o.UnparsedObject) + } + if o.Usage != nil { + toSerialize["usage"] = o.Usage + } + return json.Marshal(toSerialize) +} + +func (o *UsageOnlineArchiveResponse) UnmarshalJSON(bytes []byte) (err error) { + raw := map[string]interface{}{} + all := struct { + Usage *[]UsageOnlineArchiveHour `json:"usage,omitempty"` + }{} + err = json.Unmarshal(bytes, &all) + if err != nil { + err = json.Unmarshal(bytes, &raw) + if err != nil { + return err + } + o.UnparsedObject = raw + return nil + } + o.Usage = all.Usage + return nil +} diff --git a/api/v1/datadog/model_usage_summary_date.go b/api/v1/datadog/model_usage_summary_date.go index 01df94e8f03..6f7cba82db0 100644 --- a/api/v1/datadog/model_usage_summary_date.go +++ b/api/v1/datadog/model_usage_summary_date.go @@ -109,6 +109,8 @@ type UsageSummaryDate struct { NetflowIndexedEventsCountSum *int64 `json:"netflow_indexed_events_count_sum,omitempty"` // Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for all organizations. NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` + // Sum of all online archived events over all hours in the current date for all organizations. + OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` // Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for all organizations. OpentelemetryHostTop99p *int64 `json:"opentelemetry_host_top99p,omitempty"` // Organizations associated with a user. @@ -1662,6 +1664,38 @@ func (o *UsageSummaryDate) SetNpmHostTop99p(v int64) { o.NpmHostTop99p = &v } +// GetOnlineArchiveEventsCountSum returns the OnlineArchiveEventsCountSum field value if set, zero value otherwise. +func (o *UsageSummaryDate) GetOnlineArchiveEventsCountSum() int64 { + if o == nil || o.OnlineArchiveEventsCountSum == nil { + var ret int64 + return ret + } + return *o.OnlineArchiveEventsCountSum +} + +// GetOnlineArchiveEventsCountSumOk returns a tuple with the OnlineArchiveEventsCountSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDate) GetOnlineArchiveEventsCountSumOk() (*int64, bool) { + if o == nil || o.OnlineArchiveEventsCountSum == nil { + return nil, false + } + return o.OnlineArchiveEventsCountSum, true +} + +// HasOnlineArchiveEventsCountSum returns a boolean if a field has been set. +func (o *UsageSummaryDate) HasOnlineArchiveEventsCountSum() bool { + if o != nil && o.OnlineArchiveEventsCountSum != nil { + return true + } + + return false +} + +// SetOnlineArchiveEventsCountSum gets a reference to the given int64 and assigns it to the OnlineArchiveEventsCountSum field. +func (o *UsageSummaryDate) SetOnlineArchiveEventsCountSum(v int64) { + o.OnlineArchiveEventsCountSum = &v +} + // GetOpentelemetryHostTop99p returns the OpentelemetryHostTop99p field value if set, zero value otherwise. func (o *UsageSummaryDate) GetOpentelemetryHostTop99p() int64 { if o == nil || o.OpentelemetryHostTop99p == nil { @@ -2256,6 +2290,9 @@ func (o UsageSummaryDate) MarshalJSON() ([]byte, error) { if o.NpmHostTop99p != nil { toSerialize["npm_host_top99p"] = o.NpmHostTop99p } + if o.OnlineArchiveEventsCountSum != nil { + toSerialize["online_archive_events_count_sum"] = o.OnlineArchiveEventsCountSum + } if o.OpentelemetryHostTop99p != nil { toSerialize["opentelemetry_host_top99p"] = o.OpentelemetryHostTop99p } @@ -2351,6 +2388,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { MobileRumUnitsSum *int64 `json:"mobile_rum_units_sum,omitempty"` NetflowIndexedEventsCountSum *int64 `json:"netflow_indexed_events_count_sum,omitempty"` NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` + OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` OpentelemetryHostTop99p *int64 `json:"opentelemetry_host_top99p,omitempty"` Orgs *[]UsageSummaryDateOrg `json:"orgs,omitempty"` ProfilingHostTop99p *int64 `json:"profiling_host_top99p,omitempty"` @@ -2422,6 +2460,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { o.MobileRumUnitsSum = all.MobileRumUnitsSum o.NetflowIndexedEventsCountSum = all.NetflowIndexedEventsCountSum o.NpmHostTop99p = all.NpmHostTop99p + o.OnlineArchiveEventsCountSum = all.OnlineArchiveEventsCountSum o.OpentelemetryHostTop99p = all.OpentelemetryHostTop99p o.Orgs = all.Orgs o.ProfilingHostTop99p = all.ProfilingHostTop99p diff --git a/api/v1/datadog/model_usage_summary_date_org.go b/api/v1/datadog/model_usage_summary_date_org.go index 63f8cdb5687..f0722fb01eb 100644 --- a/api/v1/datadog/model_usage_summary_date_org.go +++ b/api/v1/datadog/model_usage_summary_date_org.go @@ -42,7 +42,7 @@ type UsageSummaryDateOrg struct { BrowserRumUnitsSum *int64 `json:"browser_rum_units_sum,omitempty"` // Shows the sum of all CI pipeline indexed spans over all hours in the current date for the given org. CiPipelineIndexedSpansSum *int64 `json:"ci_pipeline_indexed_spans_sum,omitempty"` - // Shows the sum of all CI test indexed spans over all hours in the current date for the given org. + // Sum of all CI test indexed spans over all hours in the current date for the given org. CiTestIndexedSpansSum *int64 `json:"ci_test_indexed_spans_sum,omitempty"` // Shows the high-water mark of all CI visibility pipeline committers over all hours in the current date for the given org. CiVisibilityPipelineCommittersHwm *int64 `json:"ci_visibility_pipeline_committers_hwm,omitempty"` @@ -110,6 +110,8 @@ type UsageSummaryDateOrg struct { NetflowIndexedEventsCountSum *int64 `json:"netflow_indexed_events_count_sum,omitempty"` // Shows the 99th percentile of all distinct Networks hosts over all hours in the current date for the given org. NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` + // Sum of all online archived events over all hours in the current date for the given org. + OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` // Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for the given org. OpentelemetryHostTop99p *int64 `json:"opentelemetry_host_top99p,omitempty"` // Shows the 99th percentile of all profiled hosts over all hours in the current date for the given org. @@ -1695,6 +1697,38 @@ func (o *UsageSummaryDateOrg) SetNpmHostTop99p(v int64) { o.NpmHostTop99p = &v } +// GetOnlineArchiveEventsCountSum returns the OnlineArchiveEventsCountSum field value if set, zero value otherwise. +func (o *UsageSummaryDateOrg) GetOnlineArchiveEventsCountSum() int64 { + if o == nil || o.OnlineArchiveEventsCountSum == nil { + var ret int64 + return ret + } + return *o.OnlineArchiveEventsCountSum +} + +// GetOnlineArchiveEventsCountSumOk returns a tuple with the OnlineArchiveEventsCountSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDateOrg) GetOnlineArchiveEventsCountSumOk() (*int64, bool) { + if o == nil || o.OnlineArchiveEventsCountSum == nil { + return nil, false + } + return o.OnlineArchiveEventsCountSum, true +} + +// HasOnlineArchiveEventsCountSum returns a boolean if a field has been set. +func (o *UsageSummaryDateOrg) HasOnlineArchiveEventsCountSum() bool { + if o != nil && o.OnlineArchiveEventsCountSum != nil { + return true + } + + return false +} + +// SetOnlineArchiveEventsCountSum gets a reference to the given int64 and assigns it to the OnlineArchiveEventsCountSum field. +func (o *UsageSummaryDateOrg) SetOnlineArchiveEventsCountSum(v int64) { + o.OnlineArchiveEventsCountSum = &v +} + // GetOpentelemetryHostTop99p returns the OpentelemetryHostTop99p field value if set, zero value otherwise. func (o *UsageSummaryDateOrg) GetOpentelemetryHostTop99p() int64 { if o == nil || o.OpentelemetryHostTop99p == nil { @@ -2292,6 +2326,9 @@ func (o UsageSummaryDateOrg) MarshalJSON() ([]byte, error) { if o.NpmHostTop99p != nil { toSerialize["npm_host_top99p"] = o.NpmHostTop99p } + if o.OnlineArchiveEventsCountSum != nil { + toSerialize["online_archive_events_count_sum"] = o.OnlineArchiveEventsCountSum + } if o.OpentelemetryHostTop99p != nil { toSerialize["opentelemetry_host_top99p"] = o.OpentelemetryHostTop99p } @@ -2388,6 +2425,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { Name *string `json:"name,omitempty"` NetflowIndexedEventsCountSum *int64 `json:"netflow_indexed_events_count_sum,omitempty"` NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` + OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` OpentelemetryHostTop99p *int64 `json:"opentelemetry_host_top99p,omitempty"` ProfilingHostTop99p *int64 `json:"profiling_host_top99p,omitempty"` PublicId *string `json:"public_id,omitempty"` @@ -2460,6 +2498,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { o.Name = all.Name o.NetflowIndexedEventsCountSum = all.NetflowIndexedEventsCountSum o.NpmHostTop99p = all.NpmHostTop99p + o.OnlineArchiveEventsCountSum = all.OnlineArchiveEventsCountSum o.OpentelemetryHostTop99p = all.OpentelemetryHostTop99p o.ProfilingHostTop99p = all.ProfilingHostTop99p o.PublicId = all.PublicId diff --git a/api/v1/datadog/model_usage_summary_response.go b/api/v1/datadog/model_usage_summary_response.go index 6556abd2a0e..324da542c03 100644 --- a/api/v1/datadog/model_usage_summary_response.go +++ b/api/v1/datadog/model_usage_summary_response.go @@ -118,6 +118,8 @@ type UsageSummaryResponse struct { NetflowIndexedEventsCountAggSum *int64 `json:"netflow_indexed_events_count_agg_sum,omitempty"` // Shows the 99th percentile of all distinct Networks hosts over all hours in the current months for all organizations. NpmHostTop99pSum *int64 `json:"npm_host_top99p_sum,omitempty"` + // Sum of all online archived events over all hours in the current months for all organizations. + OnlineArchiveEventsCountAggSum *int64 `json:"online_archive_events_count_agg_sum,omitempty"` // Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current months for all organizations. OpentelemetryHostTop99pSum *int64 `json:"opentelemetry_host_top99p_sum,omitempty"` // Shows the average number of profiled containers over all hours in the current months for all organizations. @@ -1839,6 +1841,38 @@ func (o *UsageSummaryResponse) SetNpmHostTop99pSum(v int64) { o.NpmHostTop99pSum = &v } +// GetOnlineArchiveEventsCountAggSum returns the OnlineArchiveEventsCountAggSum field value if set, zero value otherwise. +func (o *UsageSummaryResponse) GetOnlineArchiveEventsCountAggSum() int64 { + if o == nil || o.OnlineArchiveEventsCountAggSum == nil { + var ret int64 + return ret + } + return *o.OnlineArchiveEventsCountAggSum +} + +// GetOnlineArchiveEventsCountAggSumOk returns a tuple with the OnlineArchiveEventsCountAggSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryResponse) GetOnlineArchiveEventsCountAggSumOk() (*int64, bool) { + if o == nil || o.OnlineArchiveEventsCountAggSum == nil { + return nil, false + } + return o.OnlineArchiveEventsCountAggSum, true +} + +// HasOnlineArchiveEventsCountAggSum returns a boolean if a field has been set. +func (o *UsageSummaryResponse) HasOnlineArchiveEventsCountAggSum() bool { + if o != nil && o.OnlineArchiveEventsCountAggSum != nil { + return true + } + + return false +} + +// SetOnlineArchiveEventsCountAggSum gets a reference to the given int64 and assigns it to the OnlineArchiveEventsCountAggSum field. +func (o *UsageSummaryResponse) SetOnlineArchiveEventsCountAggSum(v int64) { + o.OnlineArchiveEventsCountAggSum = &v +} + // GetOpentelemetryHostTop99pSum returns the OpentelemetryHostTop99pSum field value if set, zero value otherwise. func (o *UsageSummaryResponse) GetOpentelemetryHostTop99pSum() int64 { if o == nil || o.OpentelemetryHostTop99pSum == nil { @@ -2576,6 +2610,9 @@ func (o UsageSummaryResponse) MarshalJSON() ([]byte, error) { if o.NpmHostTop99pSum != nil { toSerialize["npm_host_top99p_sum"] = o.NpmHostTop99pSum } + if o.OnlineArchiveEventsCountAggSum != nil { + toSerialize["online_archive_events_count_agg_sum"] = o.OnlineArchiveEventsCountAggSum + } if o.OpentelemetryHostTop99pSum != nil { toSerialize["opentelemetry_host_top99p_sum"] = o.OpentelemetryHostTop99pSum } @@ -2688,6 +2725,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { MobileRumUnitsAggSum *int64 `json:"mobile_rum_units_agg_sum,omitempty"` NetflowIndexedEventsCountAggSum *int64 `json:"netflow_indexed_events_count_agg_sum,omitempty"` NpmHostTop99pSum *int64 `json:"npm_host_top99p_sum,omitempty"` + OnlineArchiveEventsCountAggSum *int64 `json:"online_archive_events_count_agg_sum,omitempty"` OpentelemetryHostTop99pSum *int64 `json:"opentelemetry_host_top99p_sum,omitempty"` ProfilingContainerAgentCountAvg *int64 `json:"profiling_container_agent_count_avg,omitempty"` ProfilingHostCountTop99pSum *int64 `json:"profiling_host_count_top99p_sum,omitempty"` @@ -2768,6 +2806,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { o.MobileRumUnitsAggSum = all.MobileRumUnitsAggSum o.NetflowIndexedEventsCountAggSum = all.NetflowIndexedEventsCountAggSum o.NpmHostTop99pSum = all.NpmHostTop99pSum + o.OnlineArchiveEventsCountAggSum = all.OnlineArchiveEventsCountAggSum o.OpentelemetryHostTop99pSum = all.OpentelemetryHostTop99pSum o.ProfilingContainerAgentCountAvg = all.ProfilingContainerAgentCountAvg o.ProfilingHostCountTop99pSum = all.ProfilingHostCountTop99pSum diff --git a/examples/v1/usage-metering/GetUsageOnlineArchive.go b/examples/v1/usage-metering/GetUsageOnlineArchive.go new file mode 100644 index 00000000000..34d3182cc27 --- /dev/null +++ b/examples/v1/usage-metering/GetUsageOnlineArchive.go @@ -0,0 +1,28 @@ +// Get hourly usage for Online Archive returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.UsageMeteringApi.GetUsageOnlineArchive(ctx, time.Now().AddDate(0, 0, -5), *datadog.NewGetUsageOnlineArchiveOptionalParameters().WithEndHr(time.Now().AddDate(0, 0, -3))) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageOnlineArchive`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageOnlineArchive`:\n%s\n", responseContent) +} diff --git a/tests/scenarios/features/v1/undo.json b/tests/scenarios/features/v1/undo.json index 1bdcd37f9dd..33d5823521b 100644 --- a/tests/scenarios/features/v1/undo.json +++ b/tests/scenarios/features/v1/undo.json @@ -1296,6 +1296,12 @@ "type": "safe" } }, + "GetUsageOnlineArchive": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "GetUsageProfiling": { "tag": "Usage Metering", "undo": { diff --git a/tests/scenarios/features/v1/usage_metering.feature b/tests/scenarios/features/v1/usage_metering.feature index ac6b947425f..68b5954dc5e 100644 --- a/tests/scenarios/features/v1/usage_metering.feature +++ b/tests/scenarios/features/v1/usage_metering.feature @@ -238,6 +238,22 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK + @team:DataDog/red-zone-revenue-query + Scenario: Get hourly usage for Online Archive returns "Bad Request" response + Given new "GetUsageOnlineArchive" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/red-zone-revenue-query + Scenario: Get hourly usage for Online Archive returns "OK" response + Given new "GetUsageOnlineArchive" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for RUM Sessions returns "Bad Request" response Given new "GetUsageRumSessions" request