diff --git a/.apigentools-info b/.apigentools-info index 10a27198e35..d64b6f98728 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev11", - "regenerated": "2021-07-13 13:38:31.140949", - "spec_repo_commit": "beba4a1" + "regenerated": "2021-07-13 14:05:00.829993", + "spec_repo_commit": "6586890" }, "v2": { "apigentools_version": "1.4.1.dev11", - "regenerated": "2021-07-13 13:39:02.182025", - "spec_repo_commit": "beba4a1" + "regenerated": "2021-07-13 14:05:31.810546", + "spec_repo_commit": "6586890" } } } \ No newline at end of file diff --git a/api/v1/datadog/.openapi-generator/FILES b/api/v1/datadog/.openapi-generator/FILES index 88e11340d6f..065bb701eff 100644 --- a/api/v1/datadog/.openapi-generator/FILES +++ b/api/v1/datadog/.openapi-generator/FILES @@ -597,10 +597,6 @@ docs/UsageTimeseriesResponse.md docs/UsageTopAvgMetricsHour.md docs/UsageTopAvgMetricsMetadata.md docs/UsageTopAvgMetricsResponse.md -docs/UsageTraceHour.md -docs/UsageTraceResponse.md -docs/UsageTracingWithoutLimitsHour.md -docs/UsageTracingWithoutLimitsResponse.md docs/User.md docs/UserDisableResponse.md docs/UserListResponse.md @@ -1189,10 +1185,6 @@ model_usage_timeseries_response.go model_usage_top_avg_metrics_hour.go model_usage_top_avg_metrics_metadata.go model_usage_top_avg_metrics_response.go -model_usage_trace_hour.go -model_usage_trace_response.go -model_usage_tracing_without_limits_hour.go -model_usage_tracing_without_limits_response.go model_user.go model_user_disable_response.go model_user_list_response.go diff --git a/api/v1/datadog/README.md b/api/v1/datadog/README.md index 56f5f34b464..c77baa5138b 100644 --- a/api/v1/datadog/README.md +++ b/api/v1/datadog/README.md @@ -240,7 +240,6 @@ Class | Method | HTTP request | Description *UsageMeteringApi* | [**GetMonthlyCustomReports**](docs/UsageMeteringApi.md#getmonthlycustomreports) | **Get** /api/v1/monthly_custom_reports | Get the list of available monthly custom reports *UsageMeteringApi* | [**GetSpecifiedDailyCustomReports**](docs/UsageMeteringApi.md#getspecifieddailycustomreports) | **Get** /api/v1/daily_custom_reports/{report_id} | Get specified daily custom reports *UsageMeteringApi* | [**GetSpecifiedMonthlyCustomReports**](docs/UsageMeteringApi.md#getspecifiedmonthlycustomreports) | **Get** /api/v1/monthly_custom_reports/{report_id} | Get specified monthly custom reports -*UsageMeteringApi* | [**GetTracingWithoutLimits**](docs/UsageMeteringApi.md#gettracingwithoutlimits) | **Get** /api/v1/usage/tracing-without-limits | Get hourly usage for tracing without limits *UsageMeteringApi* | [**GetUsageAnalyzedLogs**](docs/UsageMeteringApi.md#getusageanalyzedlogs) | **Get** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs *UsageMeteringApi* | [**GetUsageAttribution**](docs/UsageMeteringApi.md#getusageattribution) | **Get** /api/v1/usage/attribution | Get Usage Attribution *UsageMeteringApi* | [**GetUsageAuditLogs**](docs/UsageMeteringApi.md#getusageauditlogs) | **Get** /api/v1/usage/audit_logs | Get hourly usage for audit logs @@ -266,7 +265,6 @@ Class | Method | HTTP request | Description *UsageMeteringApi* | [**GetUsageSyntheticsBrowser**](docs/UsageMeteringApi.md#getusagesyntheticsbrowser) | **Get** /api/v1/usage/synthetics_browser | Get hourly usage for Synthetics Browser Checks *UsageMeteringApi* | [**GetUsageTimeseries**](docs/UsageMeteringApi.md#getusagetimeseries) | **Get** /api/v1/usage/timeseries | Get hourly usage for custom metrics *UsageMeteringApi* | [**GetUsageTopAvgMetrics**](docs/UsageMeteringApi.md#getusagetopavgmetrics) | **Get** /api/v1/usage/top_avg_metrics | Get all custom metrics by hourly average -*UsageMeteringApi* | [**GetUsageTrace**](docs/UsageMeteringApi.md#getusagetrace) | **Get** /api/v1/usage/traces | Get hourly usage for Trace Search *UsersApi* | [**CreateUser**](docs/UsersApi.md#createuser) | **Post** /api/v1/user | Create a user *UsersApi* | [**DisableUser**](docs/UsersApi.md#disableuser) | **Delete** /api/v1/user/{user_handle} | Disable a user *UsersApi* | [**GetUser**](docs/UsersApi.md#getuser) | **Get** /api/v1/user/{user_handle} | Get user details @@ -811,10 +809,6 @@ Class | Method | HTTP request | Description - [UsageTopAvgMetricsHour](docs/UsageTopAvgMetricsHour.md) - [UsageTopAvgMetricsMetadata](docs/UsageTopAvgMetricsMetadata.md) - [UsageTopAvgMetricsResponse](docs/UsageTopAvgMetricsResponse.md) - - [UsageTraceHour](docs/UsageTraceHour.md) - - [UsageTraceResponse](docs/UsageTraceResponse.md) - - [UsageTracingWithoutLimitsHour](docs/UsageTracingWithoutLimitsHour.md) - - [UsageTracingWithoutLimitsResponse](docs/UsageTracingWithoutLimitsResponse.md) - [User](docs/User.md) - [UserDisableResponse](docs/UserDisableResponse.md) - [UserListResponse](docs/UserListResponse.md) diff --git a/api/v1/datadog/api/openapi.yaml b/api/v1/datadog/api/openapi.yaml index a5ba7c2a60b..fd8f5224cf1 100644 --- a/api/v1/datadog/api/openapi.yaml +++ b/api/v1/datadog/api/openapi.yaml @@ -9248,115 +9248,6 @@ paths: x-menu-order: 5 x-undo: type: safe - /api/v1/usage/traces: - get: - deprecated: true - description: |- - Get hourly usage for trace search. - - **Note** This endpoint has been renamed to `/api/v1/usage/indexed-spans`. - operationId: GetUsageTrace - parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - for usage beginning at this hour.' - explode: true - in: query - name: start_hr - required: true - schema: - format: date-time - type: string - style: form - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - for usage ending **before** this hour.' - explode: true - in: query - name: end_hr - required: false - schema: - format: date-time - type: string - style: form - responses: - "200": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/UsageTraceResponse' - 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 - summary: Get hourly usage for Trace Search - tags: - - Usage Metering - x-menu-order: 6 - x-undo: - type: safe - /api/v1/usage/tracing-without-limits: - get: - deprecated: true - description: |- - Get hourly usage for tracing without limits. - - **Note** This endpoint has been renamed to `/api/v1/usage/ingested-spans`. - operationId: GetTracingWithoutLimits - parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` - for usage beginning at this hour.' - explode: true - in: query - name: start_hr - required: true - schema: - format: date-time - type: string - style: form - - description: |- - Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending - **before** this hour. - explode: true - in: query - name: end_hr - required: false - schema: - format: date-time - type: string - style: form - responses: - "200": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/UsageTracingWithoutLimitsResponse' - 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 - summary: Get hourly usage for tracing without limits - tags: - - Usage Metering - x-menu-order: 25 - x-undo: - type: safe /api/v1/user: get: description: List all users for your organization. @@ -27449,70 +27340,6 @@ components: $ref: '#/components/schemas/UsageTopAvgMetricsHour' type: array type: object - UsageTraceHour: - description: The hours of trace usage. - example: - indexed_events_count: 0 - hour: 2000-01-23T04:56:07.000+00:00 - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - indexed_events_count: - description: Contains the number of Indexed Spans indexed. - format: int64 - type: integer - type: object - UsageTraceResponse: - description: A response containing trace usage. - example: - usage: - - indexed_events_count: 0 - hour: 2000-01-23T04:56:07.000+00:00 - - indexed_events_count: 0 - hour: 2000-01-23T04:56:07.000+00:00 - properties: - usage: - description: Array with the number of hourly traces indexed for a given - organization. - items: - $ref: '#/components/schemas/UsageTraceHour' - type: array - type: object - UsageTracingWithoutLimitsHour: - description: Tracing without limits usage for a given organization for a given - hour. - example: - hour: 2000-01-23T04:56:07.000+00:00 - ingested_events_bytes: 0 - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - ingested_events_bytes: - description: Contains the total number of bytes ingested during a given - hour. - format: int64 - type: integer - type: object - UsageTracingWithoutLimitsResponse: - description: Response containing the tracing without limits usage for each hour - for a given organization. - example: - usage: - - hour: 2000-01-23T04:56:07.000+00:00 - ingested_events_bytes: 0 - - hour: 2000-01-23T04:56:07.000+00:00 - ingested_events_bytes: 0 - properties: - usage: - description: Get hourly usage for tracing without limits. - items: - $ref: '#/components/schemas/UsageTracingWithoutLimitsHour' - type: array - type: object User: description: Create, edit, and disable users. example: diff --git a/api/v1/datadog/api_usage_metering.go b/api/v1/datadog/api_usage_metering.go index e42227dfe66..9eb0177c3ee 100644 --- a/api/v1/datadog/api_usage_metering.go +++ b/api/v1/datadog/api_usage_metering.go @@ -1117,188 +1117,6 @@ func (a *UsageMeteringApiService) getSpecifiedMonthlyCustomReportsExecute(r apiG return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetTracingWithoutLimitsRequest struct { - ctx _context.Context - ApiService *UsageMeteringApiService - startHr *time.Time - endHr *time.Time -} - -type GetTracingWithoutLimitsOptionalParameters struct { - EndHr *time.Time -} - -func NewGetTracingWithoutLimitsOptionalParameters() *GetTracingWithoutLimitsOptionalParameters { - this := GetTracingWithoutLimitsOptionalParameters{} - return &this -} -func (r *GetTracingWithoutLimitsOptionalParameters) WithEndHr(endHr time.Time) *GetTracingWithoutLimitsOptionalParameters { - r.EndHr = &endHr - return r -} - -/* - * GetTracingWithoutLimits Get hourly usage for tracing without limits - * Get hourly usage for tracing without limits. - -**Note** This endpoint has been renamed to `/api/v1/usage/ingested-spans`. -*/ -func (a *UsageMeteringApiService) GetTracingWithoutLimits(ctx _context.Context, startHr time.Time, o ...GetTracingWithoutLimitsOptionalParameters) (UsageTracingWithoutLimitsResponse, *_nethttp.Response, error) { - req := apiGetTracingWithoutLimitsRequest{ - ApiService: a, - ctx: ctx, - startHr: &startHr, - } - - if len(o) > 1 { - var localVarReturnValue UsageTracingWithoutLimitsResponse - return localVarReturnValue, nil, reportError("only one argument of type GetTracingWithoutLimitsOptionalParameters is allowed") - } - - if o != nil { - req.endHr = o[0].EndHr - } - - return req.ApiService.getTracingWithoutLimitsExecute(req) -} - -/* - * Execute executes the request - * @return UsageTracingWithoutLimitsResponse - */ -func (a *UsageMeteringApiService) getTracingWithoutLimitsExecute(r apiGetTracingWithoutLimitsRequest) (UsageTracingWithoutLimitsResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue UsageTracingWithoutLimitsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageMeteringApiService.GetTracingWithoutLimits") - if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/usage/tracing-without-limits" - - 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 - } - - // Set Operation-ID header for telemetry - localVarHeaderParams["DD-OPERATION-ID"] = "GetTracingWithoutLimits" - - 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 - } - - 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 apiGetUsageAnalyzedLogsRequest struct { ctx _context.Context ApiService *UsageMeteringApiService @@ -5895,185 +5713,3 @@ func (a *UsageMeteringApiService) getUsageTopAvgMetricsExecute(r apiGetUsageTopA return localVarReturnValue, localVarHTTPResponse, nil } - -type apiGetUsageTraceRequest struct { - ctx _context.Context - ApiService *UsageMeteringApiService - startHr *time.Time - endHr *time.Time -} - -type GetUsageTraceOptionalParameters struct { - EndHr *time.Time -} - -func NewGetUsageTraceOptionalParameters() *GetUsageTraceOptionalParameters { - this := GetUsageTraceOptionalParameters{} - return &this -} -func (r *GetUsageTraceOptionalParameters) WithEndHr(endHr time.Time) *GetUsageTraceOptionalParameters { - r.EndHr = &endHr - return r -} - -/* - * GetUsageTrace Get hourly usage for Trace Search - * Get hourly usage for trace search. - -**Note** This endpoint has been renamed to `/api/v1/usage/indexed-spans`. -*/ -func (a *UsageMeteringApiService) GetUsageTrace(ctx _context.Context, startHr time.Time, o ...GetUsageTraceOptionalParameters) (UsageTraceResponse, *_nethttp.Response, error) { - req := apiGetUsageTraceRequest{ - ApiService: a, - ctx: ctx, - startHr: &startHr, - } - - if len(o) > 1 { - var localVarReturnValue UsageTraceResponse - return localVarReturnValue, nil, reportError("only one argument of type GetUsageTraceOptionalParameters is allowed") - } - - if o != nil { - req.endHr = o[0].EndHr - } - - return req.ApiService.getUsageTraceExecute(req) -} - -/* - * Execute executes the request - * @return UsageTraceResponse - */ -func (a *UsageMeteringApiService) getUsageTraceExecute(r apiGetUsageTraceRequest) (UsageTraceResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue UsageTraceResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageMeteringApiService.GetUsageTrace") - if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/usage/traces" - - 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 - } - - // Set Operation-ID header for telemetry - localVarHeaderParams["DD-OPERATION-ID"] = "GetUsageTrace" - - 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 - } - - 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 -} diff --git a/api/v1/datadog/docs/UsageMeteringApi.md b/api/v1/datadog/docs/UsageMeteringApi.md index 66289f38c87..2327b9810bf 100644 --- a/api/v1/datadog/docs/UsageMeteringApi.md +++ b/api/v1/datadog/docs/UsageMeteringApi.md @@ -10,7 +10,6 @@ Method | HTTP request | Description [**GetMonthlyCustomReports**](UsageMeteringApi.md#GetMonthlyCustomReports) | **Get** /api/v1/monthly_custom_reports | Get the list of available monthly custom reports [**GetSpecifiedDailyCustomReports**](UsageMeteringApi.md#GetSpecifiedDailyCustomReports) | **Get** /api/v1/daily_custom_reports/{report_id} | Get specified daily custom reports [**GetSpecifiedMonthlyCustomReports**](UsageMeteringApi.md#GetSpecifiedMonthlyCustomReports) | **Get** /api/v1/monthly_custom_reports/{report_id} | Get specified monthly custom reports -[**GetTracingWithoutLimits**](UsageMeteringApi.md#GetTracingWithoutLimits) | **Get** /api/v1/usage/tracing-without-limits | Get hourly usage for tracing without limits [**GetUsageAnalyzedLogs**](UsageMeteringApi.md#GetUsageAnalyzedLogs) | **Get** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs [**GetUsageAttribution**](UsageMeteringApi.md#GetUsageAttribution) | **Get** /api/v1/usage/attribution | Get Usage Attribution [**GetUsageAuditLogs**](UsageMeteringApi.md#GetUsageAuditLogs) | **Get** /api/v1/usage/audit_logs | Get hourly usage for audit logs @@ -36,7 +35,6 @@ Method | HTTP request | Description [**GetUsageSyntheticsBrowser**](UsageMeteringApi.md#GetUsageSyntheticsBrowser) | **Get** /api/v1/usage/synthetics_browser | Get hourly usage for Synthetics Browser Checks [**GetUsageTimeseries**](UsageMeteringApi.md#GetUsageTimeseries) | **Get** /api/v1/usage/timeseries | Get hourly usage for custom metrics [**GetUsageTopAvgMetrics**](UsageMeteringApi.md#GetUsageTopAvgMetrics) | **Get** /api/v1/usage/top_avg_metrics | Get all custom metrics by hourly average -[**GetUsageTrace**](UsageMeteringApi.md#GetUsageTrace) | **Get** /api/v1/usage/traces | Get hourly usage for Trace Search @@ -510,88 +508,6 @@ This endpoint does not have optional parameters. [[Back to README]](../README.md) -## GetTracingWithoutLimits - -> UsageTracingWithoutLimitsResponse GetTracingWithoutLimits(ctx, startHr, datadog.GetTracingWithoutLimitsOptionalParameters{}) - -Get hourly usage for tracing without limits. - -**Note** This endpoint has been renamed to `/api/v1/usage/ingested-spans`. - -### 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.GetTracingWithoutLimitsOptionalParameters{ - EndHr: &endHr, - } - - configuration := datadog.NewConfiguration() - - apiClient := datadog.NewAPIClient(configuration) - resp, r, err := apiClient.UsageMeteringApi.GetTracingWithoutLimits(ctx, startHr, optionalParams) - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetTracingWithoutLimits`: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTracingWithoutLimits`: UsageTracingWithoutLimitsResponse - responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from UsageMeteringApi.GetTracingWithoutLimits:\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 GetTracingWithoutLimitsOptionalParameters 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 - -[**UsageTracingWithoutLimitsResponse**](UsageTracingWithoutLimitsResponse.md) - -### Authorization - -[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) - - ## GetUsageAnalyzedLogs > UsageAnalyzedLogsResponse GetUsageAnalyzedLogs(ctx, startHr, datadog.GetUsageAnalyzedLogsOptionalParameters{}) @@ -2611,85 +2527,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## GetUsageTrace - -> UsageTraceResponse GetUsageTrace(ctx, startHr, datadog.GetUsageTraceOptionalParameters{}) - -Get hourly usage for trace search. - -**Note** This endpoint has been renamed to `/api/v1/usage/indexed-spans`. - -### 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.GetUsageTraceOptionalParameters{ - EndHr: &endHr, - } - - configuration := datadog.NewConfiguration() - - apiClient := datadog.NewAPIClient(configuration) - resp, r, err := apiClient.UsageMeteringApi.GetUsageTrace(ctx, startHr, optionalParams) - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageTrace`: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUsageTrace`: UsageTraceResponse - responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from UsageMeteringApi.GetUsageTrace:\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 GetUsageTraceOptionalParameters 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 - -[**UsageTraceResponse**](UsageTraceResponse.md) - -### Authorization - -[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) - diff --git a/api/v1/datadog/docs/UsageTraceHour.md b/api/v1/datadog/docs/UsageTraceHour.md deleted file mode 100644 index 0ec5b054f1a..00000000000 --- a/api/v1/datadog/docs/UsageTraceHour.md +++ /dev/null @@ -1,82 +0,0 @@ -# UsageTraceHour - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ------ -**Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] -**IndexedEventsCount** | Pointer to **int64** | Contains the number of Indexed Spans indexed. | [optional] - -## Methods - -### NewUsageTraceHour - -`func NewUsageTraceHour() *UsageTraceHour` - -NewUsageTraceHour instantiates a new UsageTraceHour 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. - -### NewUsageTraceHourWithDefaults - -`func NewUsageTraceHourWithDefaults() *UsageTraceHour` - -NewUsageTraceHourWithDefaults instantiates a new UsageTraceHour 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 *UsageTraceHour) GetHour() time.Time` - -GetHour returns the Hour field if non-nil, zero value otherwise. - -### GetHourOk - -`func (o *UsageTraceHour) 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 *UsageTraceHour) SetHour(v time.Time)` - -SetHour sets Hour field to given value. - -### HasHour - -`func (o *UsageTraceHour) HasHour() bool` - -HasHour returns a boolean if a field has been set. - -### GetIndexedEventsCount - -`func (o *UsageTraceHour) GetIndexedEventsCount() int64` - -GetIndexedEventsCount returns the IndexedEventsCount field if non-nil, zero value otherwise. - -### GetIndexedEventsCountOk - -`func (o *UsageTraceHour) GetIndexedEventsCountOk() (*int64, bool)` - -GetIndexedEventsCountOk returns a tuple with the IndexedEventsCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndexedEventsCount - -`func (o *UsageTraceHour) SetIndexedEventsCount(v int64)` - -SetIndexedEventsCount sets IndexedEventsCount field to given value. - -### HasIndexedEventsCount - -`func (o *UsageTraceHour) HasIndexedEventsCount() bool` - -HasIndexedEventsCount 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/UsageTraceResponse.md b/api/v1/datadog/docs/UsageTraceResponse.md deleted file mode 100644 index 16c938265a2..00000000000 --- a/api/v1/datadog/docs/UsageTraceResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# UsageTraceResponse - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ------ -**Usage** | Pointer to [**[]UsageTraceHour**](UsageTraceHour.md) | Array with the number of hourly traces indexed for a given organization. | [optional] - -## Methods - -### NewUsageTraceResponse - -`func NewUsageTraceResponse() *UsageTraceResponse` - -NewUsageTraceResponse instantiates a new UsageTraceResponse 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. - -### NewUsageTraceResponseWithDefaults - -`func NewUsageTraceResponseWithDefaults() *UsageTraceResponse` - -NewUsageTraceResponseWithDefaults instantiates a new UsageTraceResponse 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 *UsageTraceResponse) GetUsage() []UsageTraceHour` - -GetUsage returns the Usage field if non-nil, zero value otherwise. - -### GetUsageOk - -`func (o *UsageTraceResponse) GetUsageOk() (*[]UsageTraceHour, 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 *UsageTraceResponse) SetUsage(v []UsageTraceHour)` - -SetUsage sets Usage field to given value. - -### HasUsage - -`func (o *UsageTraceResponse) 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/UsageTracingWithoutLimitsHour.md b/api/v1/datadog/docs/UsageTracingWithoutLimitsHour.md deleted file mode 100644 index f7ec55b464c..00000000000 --- a/api/v1/datadog/docs/UsageTracingWithoutLimitsHour.md +++ /dev/null @@ -1,82 +0,0 @@ -# UsageTracingWithoutLimitsHour - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ------ -**Hour** | Pointer to **time.Time** | The hour for the usage. | [optional] -**IngestedEventsBytes** | Pointer to **int64** | Contains the total number of bytes ingested during a given hour. | [optional] - -## Methods - -### NewUsageTracingWithoutLimitsHour - -`func NewUsageTracingWithoutLimitsHour() *UsageTracingWithoutLimitsHour` - -NewUsageTracingWithoutLimitsHour instantiates a new UsageTracingWithoutLimitsHour 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. - -### NewUsageTracingWithoutLimitsHourWithDefaults - -`func NewUsageTracingWithoutLimitsHourWithDefaults() *UsageTracingWithoutLimitsHour` - -NewUsageTracingWithoutLimitsHourWithDefaults instantiates a new UsageTracingWithoutLimitsHour 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 *UsageTracingWithoutLimitsHour) GetHour() time.Time` - -GetHour returns the Hour field if non-nil, zero value otherwise. - -### GetHourOk - -`func (o *UsageTracingWithoutLimitsHour) 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 *UsageTracingWithoutLimitsHour) SetHour(v time.Time)` - -SetHour sets Hour field to given value. - -### HasHour - -`func (o *UsageTracingWithoutLimitsHour) HasHour() bool` - -HasHour returns a boolean if a field has been set. - -### GetIngestedEventsBytes - -`func (o *UsageTracingWithoutLimitsHour) GetIngestedEventsBytes() int64` - -GetIngestedEventsBytes returns the IngestedEventsBytes field if non-nil, zero value otherwise. - -### GetIngestedEventsBytesOk - -`func (o *UsageTracingWithoutLimitsHour) GetIngestedEventsBytesOk() (*int64, bool)` - -GetIngestedEventsBytesOk returns a tuple with the IngestedEventsBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIngestedEventsBytes - -`func (o *UsageTracingWithoutLimitsHour) SetIngestedEventsBytes(v int64)` - -SetIngestedEventsBytes sets IngestedEventsBytes field to given value. - -### HasIngestedEventsBytes - -`func (o *UsageTracingWithoutLimitsHour) HasIngestedEventsBytes() bool` - -HasIngestedEventsBytes 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/UsageTracingWithoutLimitsResponse.md b/api/v1/datadog/docs/UsageTracingWithoutLimitsResponse.md deleted file mode 100644 index 038a9280cd0..00000000000 --- a/api/v1/datadog/docs/UsageTracingWithoutLimitsResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# UsageTracingWithoutLimitsResponse - -## Properties - -Name | Type | Description | Notes ----- | ---- | ----------- | ------ -**Usage** | Pointer to [**[]UsageTracingWithoutLimitsHour**](UsageTracingWithoutLimitsHour.md) | Get hourly usage for tracing without limits. | [optional] - -## Methods - -### NewUsageTracingWithoutLimitsResponse - -`func NewUsageTracingWithoutLimitsResponse() *UsageTracingWithoutLimitsResponse` - -NewUsageTracingWithoutLimitsResponse instantiates a new UsageTracingWithoutLimitsResponse 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. - -### NewUsageTracingWithoutLimitsResponseWithDefaults - -`func NewUsageTracingWithoutLimitsResponseWithDefaults() *UsageTracingWithoutLimitsResponse` - -NewUsageTracingWithoutLimitsResponseWithDefaults instantiates a new UsageTracingWithoutLimitsResponse 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 *UsageTracingWithoutLimitsResponse) GetUsage() []UsageTracingWithoutLimitsHour` - -GetUsage returns the Usage field if non-nil, zero value otherwise. - -### GetUsageOk - -`func (o *UsageTracingWithoutLimitsResponse) GetUsageOk() (*[]UsageTracingWithoutLimitsHour, 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 *UsageTracingWithoutLimitsResponse) SetUsage(v []UsageTracingWithoutLimitsHour)` - -SetUsage sets Usage field to given value. - -### HasUsage - -`func (o *UsageTracingWithoutLimitsResponse) 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/model_usage_trace_hour.go b/api/v1/datadog/model_usage_trace_hour.go deleted file mode 100644 index 8c0bb35d81c..00000000000 --- a/api/v1/datadog/model_usage_trace_hour.go +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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" -) - -// UsageTraceHour The hours of trace usage. -type UsageTraceHour struct { - // The hour for the usage. - Hour *time.Time `json:"hour,omitempty"` - // Contains the number of Indexed Spans indexed. - IndexedEventsCount *int64 `json:"indexed_events_count,omitempty"` -} - -// NewUsageTraceHour instantiates a new UsageTraceHour 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 NewUsageTraceHour() *UsageTraceHour { - this := UsageTraceHour{} - return &this -} - -// NewUsageTraceHourWithDefaults instantiates a new UsageTraceHour 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 NewUsageTraceHourWithDefaults() *UsageTraceHour { - this := UsageTraceHour{} - return &this -} - -// GetHour returns the Hour field value if set, zero value otherwise. -func (o *UsageTraceHour) 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 *UsageTraceHour) 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 *UsageTraceHour) 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 *UsageTraceHour) SetHour(v time.Time) { - o.Hour = &v -} - -// GetIndexedEventsCount returns the IndexedEventsCount field value if set, zero value otherwise. -func (o *UsageTraceHour) GetIndexedEventsCount() int64 { - if o == nil || o.IndexedEventsCount == nil { - var ret int64 - return ret - } - return *o.IndexedEventsCount -} - -// GetIndexedEventsCountOk returns a tuple with the IndexedEventsCount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageTraceHour) GetIndexedEventsCountOk() (*int64, bool) { - if o == nil || o.IndexedEventsCount == nil { - return nil, false - } - return o.IndexedEventsCount, true -} - -// HasIndexedEventsCount returns a boolean if a field has been set. -func (o *UsageTraceHour) HasIndexedEventsCount() bool { - if o != nil && o.IndexedEventsCount != nil { - return true - } - - return false -} - -// SetIndexedEventsCount gets a reference to the given int64 and assigns it to the IndexedEventsCount field. -func (o *UsageTraceHour) SetIndexedEventsCount(v int64) { - o.IndexedEventsCount = &v -} - -func (o UsageTraceHour) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Hour != nil { - toSerialize["hour"] = o.Hour - } - if o.IndexedEventsCount != nil { - toSerialize["indexed_events_count"] = o.IndexedEventsCount - } - return json.Marshal(toSerialize) -} - -type NullableUsageTraceHour struct { - value *UsageTraceHour - isSet bool -} - -func (v NullableUsageTraceHour) Get() *UsageTraceHour { - return v.value -} - -func (v *NullableUsageTraceHour) Set(val *UsageTraceHour) { - v.value = val - v.isSet = true -} - -func (v NullableUsageTraceHour) IsSet() bool { - return v.isSet -} - -func (v *NullableUsageTraceHour) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsageTraceHour(val *UsageTraceHour) *NullableUsageTraceHour { - return &NullableUsageTraceHour{value: val, isSet: true} -} - -func (v NullableUsageTraceHour) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsageTraceHour) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/api/v1/datadog/model_usage_trace_response.go b/api/v1/datadog/model_usage_trace_response.go deleted file mode 100644 index 6f05e7291ca..00000000000 --- a/api/v1/datadog/model_usage_trace_response.go +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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" -) - -// UsageTraceResponse A response containing trace usage. -type UsageTraceResponse struct { - // Array with the number of hourly traces indexed for a given organization. - Usage *[]UsageTraceHour `json:"usage,omitempty"` -} - -// NewUsageTraceResponse instantiates a new UsageTraceResponse 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 NewUsageTraceResponse() *UsageTraceResponse { - this := UsageTraceResponse{} - return &this -} - -// NewUsageTraceResponseWithDefaults instantiates a new UsageTraceResponse 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 NewUsageTraceResponseWithDefaults() *UsageTraceResponse { - this := UsageTraceResponse{} - return &this -} - -// GetUsage returns the Usage field value if set, zero value otherwise. -func (o *UsageTraceResponse) GetUsage() []UsageTraceHour { - if o == nil || o.Usage == nil { - var ret []UsageTraceHour - 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 *UsageTraceResponse) GetUsageOk() (*[]UsageTraceHour, 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 *UsageTraceResponse) HasUsage() bool { - if o != nil && o.Usage != nil { - return true - } - - return false -} - -// SetUsage gets a reference to the given []UsageTraceHour and assigns it to the Usage field. -func (o *UsageTraceResponse) SetUsage(v []UsageTraceHour) { - o.Usage = &v -} - -func (o UsageTraceResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Usage != nil { - toSerialize["usage"] = o.Usage - } - return json.Marshal(toSerialize) -} - -type NullableUsageTraceResponse struct { - value *UsageTraceResponse - isSet bool -} - -func (v NullableUsageTraceResponse) Get() *UsageTraceResponse { - return v.value -} - -func (v *NullableUsageTraceResponse) Set(val *UsageTraceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUsageTraceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUsageTraceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsageTraceResponse(val *UsageTraceResponse) *NullableUsageTraceResponse { - return &NullableUsageTraceResponse{value: val, isSet: true} -} - -func (v NullableUsageTraceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsageTraceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/api/v1/datadog/model_usage_tracing_without_limits_hour.go b/api/v1/datadog/model_usage_tracing_without_limits_hour.go deleted file mode 100644 index c543cf96375..00000000000 --- a/api/v1/datadog/model_usage_tracing_without_limits_hour.go +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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" -) - -// UsageTracingWithoutLimitsHour Tracing without limits usage for a given organization for a given hour. -type UsageTracingWithoutLimitsHour struct { - // The hour for the usage. - Hour *time.Time `json:"hour,omitempty"` - // Contains the total number of bytes ingested during a given hour. - IngestedEventsBytes *int64 `json:"ingested_events_bytes,omitempty"` -} - -// NewUsageTracingWithoutLimitsHour instantiates a new UsageTracingWithoutLimitsHour 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 NewUsageTracingWithoutLimitsHour() *UsageTracingWithoutLimitsHour { - this := UsageTracingWithoutLimitsHour{} - return &this -} - -// NewUsageTracingWithoutLimitsHourWithDefaults instantiates a new UsageTracingWithoutLimitsHour 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 NewUsageTracingWithoutLimitsHourWithDefaults() *UsageTracingWithoutLimitsHour { - this := UsageTracingWithoutLimitsHour{} - return &this -} - -// GetHour returns the Hour field value if set, zero value otherwise. -func (o *UsageTracingWithoutLimitsHour) 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 *UsageTracingWithoutLimitsHour) 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 *UsageTracingWithoutLimitsHour) 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 *UsageTracingWithoutLimitsHour) SetHour(v time.Time) { - o.Hour = &v -} - -// GetIngestedEventsBytes returns the IngestedEventsBytes field value if set, zero value otherwise. -func (o *UsageTracingWithoutLimitsHour) GetIngestedEventsBytes() int64 { - if o == nil || o.IngestedEventsBytes == nil { - var ret int64 - return ret - } - return *o.IngestedEventsBytes -} - -// GetIngestedEventsBytesOk returns a tuple with the IngestedEventsBytes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageTracingWithoutLimitsHour) GetIngestedEventsBytesOk() (*int64, bool) { - if o == nil || o.IngestedEventsBytes == nil { - return nil, false - } - return o.IngestedEventsBytes, true -} - -// HasIngestedEventsBytes returns a boolean if a field has been set. -func (o *UsageTracingWithoutLimitsHour) HasIngestedEventsBytes() bool { - if o != nil && o.IngestedEventsBytes != nil { - return true - } - - return false -} - -// SetIngestedEventsBytes gets a reference to the given int64 and assigns it to the IngestedEventsBytes field. -func (o *UsageTracingWithoutLimitsHour) SetIngestedEventsBytes(v int64) { - o.IngestedEventsBytes = &v -} - -func (o UsageTracingWithoutLimitsHour) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Hour != nil { - toSerialize["hour"] = o.Hour - } - if o.IngestedEventsBytes != nil { - toSerialize["ingested_events_bytes"] = o.IngestedEventsBytes - } - return json.Marshal(toSerialize) -} - -type NullableUsageTracingWithoutLimitsHour struct { - value *UsageTracingWithoutLimitsHour - isSet bool -} - -func (v NullableUsageTracingWithoutLimitsHour) Get() *UsageTracingWithoutLimitsHour { - return v.value -} - -func (v *NullableUsageTracingWithoutLimitsHour) Set(val *UsageTracingWithoutLimitsHour) { - v.value = val - v.isSet = true -} - -func (v NullableUsageTracingWithoutLimitsHour) IsSet() bool { - return v.isSet -} - -func (v *NullableUsageTracingWithoutLimitsHour) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsageTracingWithoutLimitsHour(val *UsageTracingWithoutLimitsHour) *NullableUsageTracingWithoutLimitsHour { - return &NullableUsageTracingWithoutLimitsHour{value: val, isSet: true} -} - -func (v NullableUsageTracingWithoutLimitsHour) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsageTracingWithoutLimitsHour) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/api/v1/datadog/model_usage_tracing_without_limits_response.go b/api/v1/datadog/model_usage_tracing_without_limits_response.go deleted file mode 100644 index 055c0c54633..00000000000 --- a/api/v1/datadog/model_usage_tracing_without_limits_response.go +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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" -) - -// UsageTracingWithoutLimitsResponse Response containing the tracing without limits usage for each hour for a given organization. -type UsageTracingWithoutLimitsResponse struct { - // Get hourly usage for tracing without limits. - Usage *[]UsageTracingWithoutLimitsHour `json:"usage,omitempty"` -} - -// NewUsageTracingWithoutLimitsResponse instantiates a new UsageTracingWithoutLimitsResponse 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 NewUsageTracingWithoutLimitsResponse() *UsageTracingWithoutLimitsResponse { - this := UsageTracingWithoutLimitsResponse{} - return &this -} - -// NewUsageTracingWithoutLimitsResponseWithDefaults instantiates a new UsageTracingWithoutLimitsResponse 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 NewUsageTracingWithoutLimitsResponseWithDefaults() *UsageTracingWithoutLimitsResponse { - this := UsageTracingWithoutLimitsResponse{} - return &this -} - -// GetUsage returns the Usage field value if set, zero value otherwise. -func (o *UsageTracingWithoutLimitsResponse) GetUsage() []UsageTracingWithoutLimitsHour { - if o == nil || o.Usage == nil { - var ret []UsageTracingWithoutLimitsHour - 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 *UsageTracingWithoutLimitsResponse) GetUsageOk() (*[]UsageTracingWithoutLimitsHour, 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 *UsageTracingWithoutLimitsResponse) HasUsage() bool { - if o != nil && o.Usage != nil { - return true - } - - return false -} - -// SetUsage gets a reference to the given []UsageTracingWithoutLimitsHour and assigns it to the Usage field. -func (o *UsageTracingWithoutLimitsResponse) SetUsage(v []UsageTracingWithoutLimitsHour) { - o.Usage = &v -} - -func (o UsageTracingWithoutLimitsResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Usage != nil { - toSerialize["usage"] = o.Usage - } - return json.Marshal(toSerialize) -} - -type NullableUsageTracingWithoutLimitsResponse struct { - value *UsageTracingWithoutLimitsResponse - isSet bool -} - -func (v NullableUsageTracingWithoutLimitsResponse) Get() *UsageTracingWithoutLimitsResponse { - return v.value -} - -func (v *NullableUsageTracingWithoutLimitsResponse) Set(val *UsageTracingWithoutLimitsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUsageTracingWithoutLimitsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUsageTracingWithoutLimitsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsageTracingWithoutLimitsResponse(val *UsageTracingWithoutLimitsResponse) *NullableUsageTracingWithoutLimitsResponse { - return &NullableUsageTracingWithoutLimitsResponse{value: val, isSet: true} -} - -func (v NullableUsageTracingWithoutLimitsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsageTracingWithoutLimitsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/tests/api/v1/datadog/features/undo.json b/tests/api/v1/datadog/features/undo.json index 215091e7aef..38b7a2e3266 100644 --- a/tests/api/v1/datadog/features/undo.json +++ b/tests/api/v1/datadog/features/undo.json @@ -1224,18 +1224,6 @@ "type": "safe" } }, - "GetUsageTrace": { - "tag": "Usage Metering", - "undo": { - "type": "safe" - } - }, - "GetTracingWithoutLimits": { - "tag": "Usage Metering", - "undo": { - "type": "safe" - } - }, "ListUsers": { "tag": "Users", "undo": { diff --git a/tests/api/v1/datadog/features/usage_metering.feature b/tests/api/v1/datadog/features/usage_metering.feature index 4fc14c75831..d05722168f6 100644 --- a/tests/api/v1/datadog/features/usage_metering.feature +++ b/tests/api/v1/datadog/features/usage_metering.feature @@ -223,18 +223,6 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip - Scenario: Get hourly usage for Trace Search returns "Bad Request" response - Given new "GetUsageTrace" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip - Scenario: Get hourly usage for Trace Search returns "OK" response - Given new "GetUsageTrace" request - When the request is sent - Then the response status is 200 OK - @generated @skip Scenario: Get hourly usage for analyzed logs returns "Bad Request" response Given new "GetUsageAnalyzedLogs" request @@ -331,18 +319,6 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip - Scenario: Get hourly usage for tracing without limits returns "Bad Request" response - Given new "GetTracingWithoutLimits" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip - Scenario: Get hourly usage for tracing without limits returns "OK" response - Given new "GetTracingWithoutLimits" request - When the request is sent - Then the response status is 200 OK - @generated @skip Scenario: Get specified daily custom reports returns "Not Found" response Given operation "GetSpecifiedDailyCustomReports" enabled