Skip to content

Commit

Permalink
Fix enums (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent 44e7713 commit 964e00d
Show file tree
Hide file tree
Showing 15 changed files with 350 additions and 221 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.2.0",
"regenerated": "2020-05-29 07:37:38.359191",
"spec_repo_commit": "c23ab12"
"regenerated": "2020-06-03 07:12:44.642879",
"spec_repo_commit": "80b557a"
},
"v2": {
"apigentools_version": "1.2.0",
"regenerated": "2020-05-29 07:37:43.691613",
"spec_repo_commit": "c23ab12"
"regenerated": "2020-06-03 07:12:49.322758",
"spec_repo_commit": "80b557a"
}
}
}
2 changes: 2 additions & 0 deletions api/v1/datadog/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ docs/WidgetMargin.md
docs/WidgetMarker.md
docs/WidgetMessageDisplay.md
docs/WidgetMonitorSummaryDisplayFormat.md
docs/WidgetMonitorSummarySort.md
docs/WidgetNodeType.md
docs/WidgetOrderBy.md
docs/WidgetPalette.md
Expand Down Expand Up @@ -785,6 +786,7 @@ model_widget_margin.go
model_widget_marker.go
model_widget_message_display.go
model_widget_monitor_summary_display_format.go
model_widget_monitor_summary_sort.go
model_widget_node_type.go
model_widget_order_by.go
model_widget_palette.go
Expand Down
1 change: 1 addition & 0 deletions api/v1/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ Class | Method | HTTP request | Description
- [WidgetMarker](docs/WidgetMarker.md)
- [WidgetMessageDisplay](docs/WidgetMessageDisplay.md)
- [WidgetMonitorSummaryDisplayFormat](docs/WidgetMonitorSummaryDisplayFormat.md)
- [WidgetMonitorSummarySort](docs/WidgetMonitorSummarySort.md)
- [WidgetNodeType](docs/WidgetNodeType.md)
- [WidgetOrderBy](docs/WidgetOrderBy.md)
- [WidgetPalette](docs/WidgetPalette.md)
Expand Down
43 changes: 41 additions & 2 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,8 @@ paths:
get:
description: |-
This endpoint allows searching for hosts by name, alias, or tag.
Hosts live within the past 3 hours are included.
Hosts live within the past 3 hours are included by default.
Retention is 7 days.
Results are paginated with a max of 1000 results at a time.
operationId: ListHosts
parameters:
Expand Down Expand Up @@ -10415,7 +10416,7 @@ components:
triggered.
type: boolean
sort:
$ref: '#/components/schemas/WidgetSort'
$ref: '#/components/schemas/WidgetMonitorSummarySort'
start:
deprecated: true
description: The start of the list. Typically 0.
Expand Down Expand Up @@ -15856,6 +15857,42 @@ components:
- COUNTS
- COUNTS_AND_LIST
- LIST
WidgetMonitorSummarySort:
description: Widget sorting methods.
enum:
- name
- group
- status
- tags
- triggered
- group,asc
- group,desc
- name,asc
- name,desc
- status,asc
- status,desc
- tags,asc
- tags,desc
- triggered,asc
- triggered,desc
example: name,asc
type: string
x-enum-varnames:
- NAME
- GROUP
- STATUS
- TAGS
- TRIGGERED
- GROUP_ASCENDING
- GROUP_DESCENDING
- NAME_ASCENDING
- NAME_DESCENDING
- STATUS_ASCENDING
- STATUS_DESCENDING
- TAGS_ASCENDING
- TAGS_DESCENDING
- TRIGGERED_ASCENDING
- TRIGGERED_DESCENDING
WidgetNodeType:
description: Which type of node to use in the map.
enum:
Expand Down Expand Up @@ -15931,10 +15968,12 @@ components:
enum:
- one_column
- two_column
- three_column
type: string
x-enum-varnames:
- ONE_COLUMN
- TWO_COLUMN
- THREE_COLUMN
WidgetSizeFormat:
description: Size of the widget.
enum:
Expand Down
3 changes: 2 additions & 1 deletion api/v1/datadog/api_hosts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1/datadog/docs/DashboardsApi.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions api/v1/datadog/docs/MonitorSummaryWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**HideZeroCounts** | Pointer to **bool** | Whether to show counts of 0 or not. | [optional]
**Query** | Pointer to **string** | Query to filter the monitors with. |
**ShowLastTriggered** | Pointer to **bool** | Whether to show the time that has elapsed since the monitor/group triggered. | [optional]
**Sort** | Pointer to [**WidgetSort**](WidgetSort.md) | | [optional]
**Sort** | Pointer to [**WidgetMonitorSummarySort**](WidgetMonitorSummarySort.md) | | [optional]
**Start** | Pointer to **int64** | The start of the list. Typically 0. | [optional]
**SummaryType** | Pointer to [**WidgetSummaryType**](WidgetSummaryType.md) | | [optional]
**Title** | Pointer to **string** | Title of the widget. | [optional]
Expand Down Expand Up @@ -184,20 +184,20 @@ HasShowLastTriggered returns a boolean if a field has been set.

### GetSort

`func (o *MonitorSummaryWidgetDefinition) GetSort() WidgetSort`
`func (o *MonitorSummaryWidgetDefinition) GetSort() WidgetMonitorSummarySort`

GetSort returns the Sort field if non-nil, zero value otherwise.

### GetSortOk

`func (o *MonitorSummaryWidgetDefinition) GetSortOk() (*WidgetSort, bool)`
`func (o *MonitorSummaryWidgetDefinition) GetSortOk() (*WidgetMonitorSummarySort, bool)`

GetSortOk returns a tuple with the Sort field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetSort

`func (o *MonitorSummaryWidgetDefinition) SetSort(v WidgetSort)`
`func (o *MonitorSummaryWidgetDefinition) SetSort(v WidgetMonitorSummarySort)`

SetSort sets Sort field to given value.

Expand Down
8 changes: 4 additions & 4 deletions api/v1/datadog/docs/WidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Name | Type | Description | Notes
**MessageDisplay** | Pointer to [**WidgetMessageDisplay**](WidgetMessageDisplay.md) | | [optional]
**ShowDateColumn** | Pointer to **bool** | Whether to show the date column or not | [optional]
**ShowMessageColumn** | Pointer to **bool** | Whether to show the message column or not | [optional]
**Sort** | Pointer to [**WidgetSort**](WidgetSort.md) | | [optional]
**Sort** | Pointer to [**WidgetMonitorSummarySort**](WidgetMonitorSummarySort.md) | | [optional]
**ColorPreference** | Pointer to [**WidgetColorPreference**](WidgetColorPreference.md) | | [optional]
**Count** | Pointer to **int64** | The number of monitors to display. | [optional]
**DisplayFormat** | Pointer to [**WidgetServiceSummaryDisplayFormat**](WidgetServiceSummaryDisplayFormat.md) | | [optional]
Expand Down Expand Up @@ -1123,20 +1123,20 @@ HasShowMessageColumn returns a boolean if a field has been set.

### GetSort

`func (o *WidgetDefinition) GetSort() WidgetSort`
`func (o *WidgetDefinition) GetSort() WidgetMonitorSummarySort`

GetSort returns the Sort field if non-nil, zero value otherwise.

### GetSortOk

`func (o *WidgetDefinition) GetSortOk() (*WidgetSort, bool)`
`func (o *WidgetDefinition) GetSortOk() (*WidgetMonitorSummarySort, bool)`

GetSortOk returns a tuple with the Sort field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetSort

`func (o *WidgetDefinition) SetSort(v WidgetSort)`
`func (o *WidgetDefinition) SetSort(v WidgetMonitorSummarySort)`

SetSort sets Sort field to given value.

Expand Down
11 changes: 11 additions & 0 deletions api/v1/datadog/docs/WidgetMonitorSummarySort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# WidgetMonitorSummarySort

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 7 additions & 7 deletions api/v1/datadog/model_monitor_summary_widget_definition.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 94 additions & 0 deletions api/v1/datadog/model_widget_monitor_summary_sort.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions api/v1/datadog/model_widget_service_summary_display_format.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/api/v1/datadog/api_dashboards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func TestDashboardLifecycle(t *testing.T) {
monitorSummaryWidgetDefiniton := datadog.NewMonitorSummaryWidgetDefinitionWithDefaults()
monitorSummaryWidgetDefiniton.SetQuery("Errors are increasing")
monitorSummaryWidgetDefiniton.SetSummaryType(datadog.WIDGETSUMMARYTYPE_COMBINED)
monitorSummaryWidgetDefiniton.SetSort(datadog.WIDGETSORT_ASCENDING)
monitorSummaryWidgetDefiniton.SetSort(datadog.WIDGETMONITORSUMMARYSORT_NAME_ASCENDING)
monitorSummaryWidgetDefiniton.SetDisplayFormat(datadog.WIDGETMONITORSUMMARYDISPLAYFORMAT_COUNTS)
monitorSummaryWidgetDefiniton.SetColorPreference(datadog.WIDGETCOLORPREFERENCE_BACKGROUND)
monitorSummaryWidgetDefiniton.SetHideZeroCounts(false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2020-05-12T15:30:22.282339+02:00
2020-06-02T19:51:47.798354+02:00
Loading

0 comments on commit 964e00d

Please sign in to comment.