From 9f8c60c6229b50ff64a2335558cfc3fe41ef8e71 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 17 Aug 2022 14:33:27 +0000 Subject: [PATCH] Regenerate client from commit a957cd49 of spec repo --- .apigentools-info | 8 +-- .generator/schemas/v1/openapi.yaml | 50 +++++++++++-------- api/datadog/configuration.go | 45 ++++++++--------- api/datadogV1/api_usage_metering.go | 47 ++++------------- .../usage-metering/GetDailyCustomReports.go | 1 - .../usage-metering/GetMonthlyCustomReports.go | 1 - .../GetSpecifiedDailyCustomReports.go | 1 - .../GetSpecifiedMonthlyCustomReports.go | 1 - .../v1/usage-metering/GetUsageAttribution.go | 1 - .../features/v1/usage_metering.feature | 24 +++------ 10 files changed, 72 insertions(+), 107 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index e6faca11755..fb56fa5f7e1 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.2", - "regenerated": "2022-08-16 17:55:53.781831", - "spec_repo_commit": "56625080" + "regenerated": "2022-08-17 14:32:18.570797", + "spec_repo_commit": "a957cd49" }, "v2": { "apigentools_version": "1.6.2", - "regenerated": "2022-08-16 17:55:53.794942", - "spec_repo_commit": "56625080" + "regenerated": "2022-08-17 14:32:18.586483", + "spec_repo_commit": "a957cd49" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bdf3365608f..4b7b6e4cc8b 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -17919,7 +17919,12 @@ paths: /api/v1/daily_custom_reports: get: deprecated: true - description: Get daily custom reports. + description: 'Get daily custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetDailyCustomReports parameters: - description: The number of files to return in the response. `[default=60]`. @@ -17979,13 +17984,15 @@ paths: x-menu-order: 41 x-undo: type: safe - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/daily_custom_reports/{report_id}: get: deprecated: true - description: Get specified daily custom reports. + description: 'Get specified daily custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetSpecifiedDailyCustomReports parameters: - description: Date of the report in the format `YYYY-MM-DD`. @@ -18030,9 +18037,6 @@ paths: x-menu-order: 42 x-undo: type: safe - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/dashboard: delete: description: Delete dashboards using the specified IDs. If there are any failures, @@ -23175,7 +23179,12 @@ paths: /api/v1/monthly_custom_reports: get: deprecated: true - description: Get monthly custom reports. + description: 'Get monthly custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetMonthlyCustomReports parameters: - description: The number of files to return in the response `[default=60].` @@ -23235,13 +23244,15 @@ paths: x-menu-order: 43 x-undo: type: safe - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/monthly_custom_reports/{report_id}: get: deprecated: true - description: Get specified monthly custom reports. + description: 'Get specified monthly custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetSpecifiedMonthlyCustomReports parameters: - description: Date of the report in the format `YYYY-MM-DD`. @@ -23292,9 +23303,6 @@ paths: x-menu-order: 44 x-undo: type: safe - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/notebooks: get: description: 'Get all notebooks. This can also be used to search for notebooks @@ -26820,7 +26828,12 @@ paths: /api/v1/usage/attribution: get: deprecated: true - description: Get usage attribution. + description: 'Get usage attribution. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetUsageAttribution parameters: - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` @@ -26909,9 +26922,6 @@ paths: x-menu-order: 40 x-undo: type: safe - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/usage/audit_logs: get: description: 'Get hourly usage for audit logs. diff --git a/api/datadog/configuration.go b/api/datadog/configuration.go index 5af26589bb5..40f1f8f8671 100644 --- a/api/datadog/configuration.go +++ b/api/datadog/configuration.go @@ -358,31 +358,26 @@ func NewConfiguration() *Configuration { }, }, unstableOperations: map[string]bool{ - "v1.GetDailyCustomReports": false, - "v1.GetMonthlyCustomReports": false, - "v1.GetSpecifiedDailyCustomReports": false, - "v1.GetSpecifiedMonthlyCustomReports": false, - "v1.GetUsageAttribution": false, - "v1.GetSLOHistory": false, - "v1.SearchSLO": false, - "v2.ListEvents": false, - "v2.SearchEvents": false, - "v2.CreateIncident": false, - "v2.DeleteIncident": false, - "v2.GetIncident": false, - "v2.ListIncidents": false, - "v2.UpdateIncident": false, - "v2.CreateIncidentService": false, - "v2.DeleteIncidentService": false, - "v2.GetIncidentService": false, - "v2.ListIncidentServices": false, - "v2.UpdateIncidentService": false, - "v2.CreateIncidentTeam": false, - "v2.DeleteIncidentTeam": false, - "v2.GetIncidentTeam": false, - "v2.ListIncidentTeams": false, - "v2.UpdateIncidentTeam": false, - "v2.GetEstimatedCostByOrg": false, + "v1.GetSLOHistory": false, + "v1.SearchSLO": false, + "v2.ListEvents": false, + "v2.SearchEvents": false, + "v2.CreateIncident": false, + "v2.DeleteIncident": false, + "v2.GetIncident": false, + "v2.ListIncidents": false, + "v2.UpdateIncident": false, + "v2.CreateIncidentService": false, + "v2.DeleteIncidentService": false, + "v2.GetIncidentService": false, + "v2.ListIncidentServices": false, + "v2.UpdateIncidentService": false, + "v2.CreateIncidentTeam": false, + "v2.DeleteIncidentTeam": false, + "v2.GetIncidentTeam": false, + "v2.ListIncidentTeams": false, + "v2.UpdateIncidentTeam": false, + "v2.GetEstimatedCostByOrg": false, }, } return cfg diff --git a/api/datadogV1/api_usage_metering.go b/api/datadogV1/api_usage_metering.go index 54a994afd15..ee74463ae5c 100644 --- a/api/datadogV1/api_usage_metering.go +++ b/api/datadogV1/api_usage_metering.go @@ -7,9 +7,7 @@ package datadogV1 import ( "bytes" _context "context" - _fmt "fmt" _ioutil "io/ioutil" - _log "log" _nethttp "net/http" _neturl "net/url" "reflect" @@ -88,6 +86,8 @@ func (a *UsageMeteringApi) buildGetDailyCustomReportsRequest(ctx _context.Contex // GetDailyCustomReports Get the list of available daily custom reports. // Get daily custom reports. +// **Note:** This endpoint will be fully deprecated on December 1, 2022. +// Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. func (a *UsageMeteringApi) GetDailyCustomReports(ctx _context.Context, o ...GetDailyCustomReportsOptionalParameters) (UsageCustomReportsResponse, *_nethttp.Response, error) { req, err := a.buildGetDailyCustomReportsRequest(ctx, o...) if err != nil { @@ -106,13 +106,6 @@ func (a *UsageMeteringApi) getDailyCustomReportsExecute(r apiGetDailyCustomRepor localVarReturnValue UsageCustomReportsResponse ) - operationId := "v1.GetDailyCustomReports" - if a.Client.Cfg.IsUnstableOperationEnabled(operationId) { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } else { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "v1.UsageMeteringApi.GetDailyCustomReports") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} @@ -841,6 +834,8 @@ func (a *UsageMeteringApi) buildGetMonthlyCustomReportsRequest(ctx _context.Cont // GetMonthlyCustomReports Get the list of available monthly custom reports. // Get monthly custom reports. +// **Note:** This endpoint will be fully deprecated on December 1, 2022. +// Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. func (a *UsageMeteringApi) GetMonthlyCustomReports(ctx _context.Context, o ...GetMonthlyCustomReportsOptionalParameters) (UsageCustomReportsResponse, *_nethttp.Response, error) { req, err := a.buildGetMonthlyCustomReportsRequest(ctx, o...) if err != nil { @@ -859,13 +854,6 @@ func (a *UsageMeteringApi) getMonthlyCustomReportsExecute(r apiGetMonthlyCustomR localVarReturnValue UsageCustomReportsResponse ) - operationId := "v1.GetMonthlyCustomReports" - if a.Client.Cfg.IsUnstableOperationEnabled(operationId) { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } else { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "v1.UsageMeteringApi.GetMonthlyCustomReports") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} @@ -1227,6 +1215,8 @@ func (a *UsageMeteringApi) buildGetSpecifiedDailyCustomReportsRequest(ctx _conte // GetSpecifiedDailyCustomReports Get specified daily custom reports. // Get specified daily custom reports. +// **Note:** This endpoint will be fully deprecated on December 1, 2022. +// Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. func (a *UsageMeteringApi) GetSpecifiedDailyCustomReports(ctx _context.Context, reportId string) (UsageSpecifiedCustomReportsResponse, *_nethttp.Response, error) { req, err := a.buildGetSpecifiedDailyCustomReportsRequest(ctx, reportId) if err != nil { @@ -1245,13 +1235,6 @@ func (a *UsageMeteringApi) getSpecifiedDailyCustomReportsExecute(r apiGetSpecifi localVarReturnValue UsageSpecifiedCustomReportsResponse ) - operationId := "v1.GetSpecifiedDailyCustomReports" - if a.Client.Cfg.IsUnstableOperationEnabled(operationId) { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } else { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "v1.UsageMeteringApi.GetSpecifiedDailyCustomReports") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} @@ -1371,6 +1354,8 @@ func (a *UsageMeteringApi) buildGetSpecifiedMonthlyCustomReportsRequest(ctx _con // GetSpecifiedMonthlyCustomReports Get specified monthly custom reports. // Get specified monthly custom reports. +// **Note:** This endpoint will be fully deprecated on December 1, 2022. +// Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. func (a *UsageMeteringApi) GetSpecifiedMonthlyCustomReports(ctx _context.Context, reportId string) (UsageSpecifiedCustomReportsResponse, *_nethttp.Response, error) { req, err := a.buildGetSpecifiedMonthlyCustomReportsRequest(ctx, reportId) if err != nil { @@ -1389,13 +1374,6 @@ func (a *UsageMeteringApi) getSpecifiedMonthlyCustomReportsExecute(r apiGetSpeci localVarReturnValue UsageSpecifiedCustomReportsResponse ) - operationId := "v1.GetSpecifiedMonthlyCustomReports" - if a.Client.Cfg.IsUnstableOperationEnabled(operationId) { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } else { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "v1.UsageMeteringApi.GetSpecifiedMonthlyCustomReports") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} @@ -1767,6 +1745,8 @@ func (a *UsageMeteringApi) buildGetUsageAttributionRequest(ctx _context.Context, // GetUsageAttribution Get usage attribution. // Get usage attribution. +// **Note:** This endpoint will be fully deprecated on December 1, 2022. +// Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. func (a *UsageMeteringApi) GetUsageAttribution(ctx _context.Context, startMonth time.Time, fields UsageAttributionSupportedMetrics, o ...GetUsageAttributionOptionalParameters) (UsageAttributionResponse, *_nethttp.Response, error) { req, err := a.buildGetUsageAttributionRequest(ctx, startMonth, fields, o...) if err != nil { @@ -1785,13 +1765,6 @@ func (a *UsageMeteringApi) getUsageAttributionExecute(r apiGetUsageAttributionRe localVarReturnValue UsageAttributionResponse ) - operationId := "v1.GetUsageAttribution" - if a.Client.Cfg.IsUnstableOperationEnabled(operationId) { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } else { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "v1.UsageMeteringApi.GetUsageAttribution") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} diff --git a/examples/v1/usage-metering/GetDailyCustomReports.go b/examples/v1/usage-metering/GetDailyCustomReports.go index 3adcc242c64..d36f0970d1a 100644 --- a/examples/v1/usage-metering/GetDailyCustomReports.go +++ b/examples/v1/usage-metering/GetDailyCustomReports.go @@ -15,7 +15,6 @@ import ( func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v1.GetDailyCustomReports", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV1.NewUsageMeteringApi(apiClient) resp, r, err := api.GetDailyCustomReports(ctx, *datadogV1.NewGetDailyCustomReportsOptionalParameters()) diff --git a/examples/v1/usage-metering/GetMonthlyCustomReports.go b/examples/v1/usage-metering/GetMonthlyCustomReports.go index b7ff0789d94..51175bdc8b9 100644 --- a/examples/v1/usage-metering/GetMonthlyCustomReports.go +++ b/examples/v1/usage-metering/GetMonthlyCustomReports.go @@ -15,7 +15,6 @@ import ( func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v1.GetMonthlyCustomReports", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV1.NewUsageMeteringApi(apiClient) resp, r, err := api.GetMonthlyCustomReports(ctx, *datadogV1.NewGetMonthlyCustomReportsOptionalParameters()) diff --git a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.go b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.go index 90575b28168..c0d30f5ac21 100644 --- a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.go +++ b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.go @@ -15,7 +15,6 @@ import ( func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v1.GetSpecifiedDailyCustomReports", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV1.NewUsageMeteringApi(apiClient) resp, r, err := api.GetSpecifiedDailyCustomReports(ctx, "2022-03-20") diff --git a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.go b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.go index 12b3f51c4f9..34c14029bf4 100644 --- a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.go +++ b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.go @@ -15,7 +15,6 @@ import ( func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v1.GetSpecifiedMonthlyCustomReports", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV1.NewUsageMeteringApi(apiClient) resp, r, err := api.GetSpecifiedMonthlyCustomReports(ctx, "2021-05-01") diff --git a/examples/v1/usage-metering/GetUsageAttribution.go b/examples/v1/usage-metering/GetUsageAttribution.go index 8941e2bed6e..3cdfeb74f94 100644 --- a/examples/v1/usage-metering/GetUsageAttribution.go +++ b/examples/v1/usage-metering/GetUsageAttribution.go @@ -16,7 +16,6 @@ import ( func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v1.GetUsageAttribution", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV1.NewUsageMeteringApi(apiClient) resp, r, err := api.GetUsageAttribution(ctx, time.Now().AddDate(0, 0, -3), datadogV1.USAGEATTRIBUTIONSUPPORTEDMETRICS_ALL, *datadogV1.NewGetUsageAttributionOptionalParameters().WithOffset(0).WithLimit(1)) diff --git a/tests/scenarios/features/v1/usage_metering.feature b/tests/scenarios/features/v1/usage_metering.feature index b542fbafbf3..ef53ffa7284 100644 --- a/tests/scenarios/features/v1/usage_metering.feature +++ b/tests/scenarios/features/v1/usage_metering.feature @@ -675,55 +675,48 @@ Feature: Usage Metering @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get specified daily custom reports returns "Not Found" response - Given operation "GetSpecifiedDailyCustomReports" enabled - And new "GetSpecifiedDailyCustomReports" request + Given new "GetSpecifiedDailyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @replay-only @team:DataDog/red-zone-revenue-query Scenario: Get specified daily custom reports returns "OK" response - Given operation "GetSpecifiedDailyCustomReports" enabled - And new "GetSpecifiedDailyCustomReports" request + Given new "GetSpecifiedDailyCustomReports" request And request contains "report_id" parameter with value "2022-03-20" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get specified monthly custom reports returns "Bad Request" response - Given operation "GetSpecifiedMonthlyCustomReports" enabled - And new "GetSpecifiedMonthlyCustomReports" request + Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get specified monthly custom reports returns "Not Found" response - Given operation "GetSpecifiedMonthlyCustomReports" enabled - And new "GetSpecifiedMonthlyCustomReports" request + Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @replay-only @team:DataDog/red-zone-revenue-query Scenario: Get specified monthly custom reports returns "OK" response - Given operation "GetSpecifiedMonthlyCustomReports" enabled - And new "GetSpecifiedMonthlyCustomReports" request + Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter with value "2021-05-01" When the request is sent Then the response status is 200 OK @team:DataDog/red-zone-revenue-query Scenario: Get the list of available daily custom reports returns "OK" response - Given operation "GetDailyCustomReports" enabled - And new "GetDailyCustomReports" request + Given new "GetDailyCustomReports" request When the request is sent Then the response status is 200 OK @team:DataDog/red-zone-revenue-query Scenario: Get the list of available monthly custom reports returns "OK" response - Given operation "GetMonthlyCustomReports" enabled - And new "GetMonthlyCustomReports" request + Given new "GetMonthlyCustomReports" request When the request is sent Then the response status is 200 OK @@ -743,8 +736,7 @@ Feature: Usage Metering @team:DataDog/red-zone-revenue-query Scenario: Get usage attribution returns "OK" response - Given operation "GetUsageAttribution" enabled - And new "GetUsageAttribution" request + Given new "GetUsageAttribution" request And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}" And request contains "fields" parameter with value "*" And request contains "offset" parameter with value 0