Skip to content

Commit

Permalink
Regenerate client from commit f7a95272 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 5, 2023
1 parent b96aa14 commit 2ec4f16
Show file tree
Hide file tree
Showing 22 changed files with 1,219 additions and 188 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.6",
"regenerated": "2023-10-05 18:58:08.893201",
"spec_repo_commit": "faa2c8d3"
"regenerated": "2023-10-05 20:05:27.468187",
"spec_repo_commit": "f7a95272"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-05 18:58:08.918484",
"spec_repo_commit": "faa2c8d3"
"regenerated": "2023-10-05 20:05:27.494649",
"spec_repo_commit": "f7a95272"
}
}
}
188 changes: 156 additions & 32 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5482,24 +5482,6 @@ components:
type: string
x-enum-varnames:
- GCP_SERVICE_ACCOUNT
GetAllPowerpacksResponse:
description: Response object which includes all powerpack configurations.
properties:
data:
description: List of powerpack definitions.
items:
$ref: '#/components/schemas/PowerpackData'
type: array
included:
description: Array of objects related to the users.
items:
$ref: '#/components/schemas/User'
type: array
links:
$ref: '#/components/schemas/PowerpackResponseLinks'
meta:
$ref: '#/components/schemas/PowerpacksResponseMeta'
type: object
GetFindingResponse:
description: The expected response schema when getting a finding.
properties:
Expand Down Expand Up @@ -7677,6 +7659,24 @@ components:
- data
- meta
type: object
ListPowerpacksResponse:
description: Response object which includes all powerpack configurations.
properties:
data:
description: List of powerpack definitions.
items:
$ref: '#/components/schemas/PowerpackData'
type: array
included:
description: Array of objects related to the users.
items:
$ref: '#/components/schemas/User'
type: array
links:
$ref: '#/components/schemas/PowerpackResponseLinks'
meta:
$ref: '#/components/schemas/PowerpacksResponseMeta'
type: object
ListTeamsInclude:
description: Included related resources optionally requested.
enum:
Expand Down Expand Up @@ -10596,18 +10596,7 @@ components:
example: Powerpack for ABC
type: string
group_widget:
additionalProperties: {}
description: Templated group of dashboard widgets for the powerpack.
example:
layout_type: ordered
tags:
- tag:foo1
type: group
widgets:
- definition:
content: example
type: note
type: object
$ref: '#/components/schemas/PowerpackGroupWidget'
name:
description: Name of the powerpack.
example: Sample Powerpack
Expand Down Expand Up @@ -10649,6 +10638,141 @@ components:
example: powerpack
type: string
type: object
PowerpackGroupWidget:
description: Powerpack group widget definition object.
properties:
definition:
$ref: '#/components/schemas/PowerpackGroupWidgetDefinition'
layout:
$ref: '#/components/schemas/PowerpackGroupWidgetLayout'
required:
- definition
type: object
PowerpackGroupWidgetDefinition:
description: Powerpack group widget object.
properties:
layout_type:
description: Layout type of widgets.
example: ordered
type: string
show_title:
description: Boolean indicating whether powerpack group title should be
visible or not.
example: true
type: boolean
title:
description: Name for the group widget.
example: Sample Powerpack
type: string
type:
description: Type of widget, must be group.
example: group
type: string
widgets:
description: Widgets inside the powerpack.
example:
- definition:
content: example
type: note
layout:
height: 5
width: 10
x: 0
y: 0
items:
$ref: '#/components/schemas/PowerpackInnerWidgets'
type: array
required:
- widgets
- layout_type
- type
type: object
PowerpackGroupWidgetLayout:
description: Powerpack group widget layout.
properties:
height:
description: The height of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
width:
description: The width of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
x:
description: The position of the widget on the x (horizontal) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
y:
description: The position of the widget on the y (vertical) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
required:
- x
- y
- width
- height
type: object
PowerpackInnerWidgetLayout:
description: Powerpack inner widget layout.
properties:
height:
description: The height of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
width:
description: The width of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
x:
description: The position of the widget on the x (horizontal) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
y:
description: The position of the widget on the y (vertical) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
required:
- x
- y
- width
- height
type: object
PowerpackInnerWidgets:
description: Powerpack group widget definition of individual widgets.
properties:
definition:
additionalProperties: {}
description: Information about widget.
example:
definition:
content: example
type: note
type: object
layout:
$ref: '#/components/schemas/PowerpackInnerWidgetLayout'
required:
- definition
type: object
PowerpackRelationships:
description: Powerpack relationship object.
properties:
Expand Down Expand Up @@ -23570,13 +23694,13 @@ paths:
/api/v2/powerpacks:
get:
description: Get a list of all powerpacks.
operationId: GetAllPowerpacks
operationId: ListPowerpacks
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetAllPowerpacksResponse'
$ref: '#/components/schemas/ListPowerpacksResponse'
description: OK
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
Expand Down
30 changes: 15 additions & 15 deletions api/datadogV2/api_powerpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,22 @@ func (a *PowerpackApi) DeletePowerpack(ctx _context.Context, powerpackId string)
return localVarHTTPResponse, nil
}

// GetAllPowerpacks Get all powerpacks.
// Get a list of all powerpacks.
func (a *PowerpackApi) GetAllPowerpacks(ctx _context.Context) (GetAllPowerpacksResponse, *_nethttp.Response, error) {
// GetPowerpack Get a Powerpack.
// Get a powerpack.
func (a *PowerpackApi) GetPowerpack(ctx _context.Context, powerpackId string) (PowerpackResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarReturnValue GetAllPowerpacksResponse
localVarReturnValue PowerpackResponse
)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.PowerpackApi.GetAllPowerpacks")
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.PowerpackApi.GetPowerpack")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
}

localVarPath := localBasePath + "/api/v2/powerpacks"
localVarPath := localBasePath + "/api/v2/powerpacks/{powerpack_id}"
localVarPath = strings.Replace(localVarPath, "{"+"powerpack_id"+"}", _neturl.PathEscape(datadog.ParameterToString(powerpackId, "")), -1)

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -197,7 +198,7 @@ func (a *PowerpackApi) GetAllPowerpacks(ctx _context.Context) (GetAllPowerpacksR
ErrorBody: localVarBody,
ErrorMessage: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 429 {
if localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 {
var v APIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
Expand All @@ -220,22 +221,21 @@ func (a *PowerpackApi) GetAllPowerpacks(ctx _context.Context) (GetAllPowerpacksR
return localVarReturnValue, localVarHTTPResponse, nil
}

// GetPowerpack Get a Powerpack.
// Get a powerpack.
func (a *PowerpackApi) GetPowerpack(ctx _context.Context, powerpackId string) (PowerpackResponse, *_nethttp.Response, error) {
// ListPowerpacks Get all powerpacks.
// Get a list of all powerpacks.
func (a *PowerpackApi) ListPowerpacks(ctx _context.Context) (ListPowerpacksResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarReturnValue PowerpackResponse
localVarReturnValue ListPowerpacksResponse
)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.PowerpackApi.GetPowerpack")
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.PowerpackApi.ListPowerpacks")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
}

localVarPath := localBasePath + "/api/v2/powerpacks/{powerpack_id}"
localVarPath = strings.Replace(localVarPath, "{"+"powerpack_id"+"}", _neturl.PathEscape(datadog.ParameterToString(powerpackId, "")), -1)
localVarPath := localBasePath + "/api/v2/powerpacks"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -268,7 +268,7 @@ func (a *PowerpackApi) GetPowerpack(ctx _context.Context, powerpackId string) (P
ErrorBody: localVarBody,
ErrorMessage: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 {
if localVarHTTPResponse.StatusCode == 429 {
var v APIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@
// - [OrganizationsApi.UploadIdPMetadata]
// - [PowerpackApi.CreatePowerpack]
// - [PowerpackApi.DeletePowerpack]
// - [PowerpackApi.GetAllPowerpacks]
// - [PowerpackApi.GetPowerpack]
// - [PowerpackApi.ListPowerpacks]
// - [PowerpackApi.UpdatePowerpack]
// - [ProcessesApi.ListProcesses]
// - [RUMApi.AggregateRUMEvents]
Expand Down
Loading

0 comments on commit 2ec4f16

Please sign in to comment.