Skip to content

Commit

Permalink
Regenerate client from commit a957cd49 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Aug 17, 2022
1 parent 7d813d1 commit 9f8c60c
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 107 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
50 changes: 30 additions & 20 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]`.
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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].`
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]`
Expand Down Expand Up @@ -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.
Expand Down
45 changes: 20 additions & 25 deletions api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 10 additions & 37 deletions api/datadogV1/api_usage_metering.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ package datadogV1
import (
"bytes"
_context "context"
_fmt "fmt"
_ioutil "io/ioutil"
_log "log"
_nethttp "net/http"
_neturl "net/url"
"reflect"
Expand Down Expand Up @@ -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 {
Expand All @@ -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()}
Expand Down Expand Up @@ -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 {
Expand All @@ -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()}
Expand Down Expand Up @@ -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 {
Expand All @@ -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()}
Expand Down Expand Up @@ -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 {
Expand All @@ -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()}
Expand Down Expand Up @@ -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 {
Expand All @@ -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()}
Expand Down
1 change: 0 additions & 1 deletion examples/v1/usage-metering/GetDailyCustomReports.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
1 change: 0 additions & 1 deletion examples/v1/usage-metering/GetMonthlyCustomReports.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion examples/v1/usage-metering/GetUsageAttribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading

0 comments on commit 9f8c60c

Please sign in to comment.