Skip to content

Commit

Permalink
Regenerate client from commit 2ccd9d0a of spec repo (#2005)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
  • Loading branch information
3 people authored May 23, 2023
1 parent a99cd7f commit d23574a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 56 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.4",
"regenerated": "2023-05-22 14:41:00.939203",
"spec_repo_commit": "f75e7820"
"regenerated": "2023-05-23 13:54:22.420354",
"spec_repo_commit": "2ccd9d0a"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-22 14:41:00.955512",
"spec_repo_commit": "f75e7820"
"regenerated": "2023-05-23 13:54:22.432956",
"spec_repo_commit": "2ccd9d0a"
}
}
}
3 changes: 0 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2234,9 +2234,6 @@ components:
description: Query to filter the event stream with.
example: ''
type: string
show_year:
description: Option to display the year in the date column.
type: boolean
tags_execution:
description: The execution method for multi-value filters. Can be either
and or or.
Expand Down
37 changes: 1 addition & 36 deletions api/datadogV1/model_event_stream_widget_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ type EventStreamWidgetDefinition struct {
EventSize *WidgetEventSize `json:"event_size,omitempty"`
// Query to filter the event stream with.
Query string `json:"query"`
// Option to display the year in the date column.
ShowYear *bool `json:"show_year,omitempty"`
// The execution method for multi-value filters. Can be either and or or.
TagsExecution *string `json:"tags_execution,omitempty"`
// Time setting for the widget.
Expand Down Expand Up @@ -109,34 +107,6 @@ func (o *EventStreamWidgetDefinition) SetQuery(v string) {
o.Query = v
}

// GetShowYear returns the ShowYear field value if set, zero value otherwise.
func (o *EventStreamWidgetDefinition) GetShowYear() bool {
if o == nil || o.ShowYear == nil {
var ret bool
return ret
}
return *o.ShowYear
}

// GetShowYearOk returns a tuple with the ShowYear field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EventStreamWidgetDefinition) GetShowYearOk() (*bool, bool) {
if o == nil || o.ShowYear == nil {
return nil, false
}
return o.ShowYear, true
}

// HasShowYear returns a boolean if a field has been set.
func (o *EventStreamWidgetDefinition) HasShowYear() bool {
return o != nil && o.ShowYear != nil
}

// SetShowYear gets a reference to the given bool and assigns it to the ShowYear field.
func (o *EventStreamWidgetDefinition) SetShowYear(v bool) {
o.ShowYear = &v
}

// GetTagsExecution returns the TagsExecution field value if set, zero value otherwise.
func (o *EventStreamWidgetDefinition) GetTagsExecution() string {
if o == nil || o.TagsExecution == nil {
Expand Down Expand Up @@ -310,9 +280,6 @@ func (o EventStreamWidgetDefinition) MarshalJSON() ([]byte, error) {
toSerialize["event_size"] = o.EventSize
}
toSerialize["query"] = o.Query
if o.ShowYear != nil {
toSerialize["show_year"] = o.ShowYear
}
if o.TagsExecution != nil {
toSerialize["tags_execution"] = o.TagsExecution
}
Expand Down Expand Up @@ -346,7 +313,6 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
EventSize *WidgetEventSize `json:"event_size,omitempty"`
Query string `json:"query"`
ShowYear *bool `json:"show_year,omitempty"`
TagsExecution *string `json:"tags_execution,omitempty"`
Time *WidgetTime `json:"time,omitempty"`
Title *string `json:"title,omitempty"`
Expand Down Expand Up @@ -375,7 +341,7 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"event_size", "query", "show_year", "tags_execution", "time", "title", "title_align", "title_size", "type"})
datadog.DeleteKeys(additionalProperties, &[]string{"event_size", "query", "tags_execution", "time", "title", "title_align", "title_size", "type"})
} else {
return err
}
Expand Down Expand Up @@ -405,7 +371,6 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) {
}
o.EventSize = all.EventSize
o.Query = all.Query
o.ShowYear = all.ShowYear
o.TagsExecution = all.TagsExecution
if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil {
err = json.Unmarshal(bytes, &raw)
Expand Down
1 change: 0 additions & 1 deletion examples/v1/dashboards/CreateDashboard_2634813877.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func main() {
Query: "example-query",
TagsExecution: datadog.PtrString("and"),
EventSize: datadogV1.WIDGETEVENTSIZE_SMALL.Ptr(),
ShowYear: datadog.PtrBool(true),
}},
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-05-19T14:24:41.183Z
2022-01-06T00:50:30.857Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: |
{"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_event_stream_widget-1684506281","widgets":[{"definition":{"event_size":"s","query":"example-query","show_year":true,"tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0}}]}
{"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_event_stream_widget-1641430230","widgets":[{"definition":{"event_size":"s","query":"example-query","tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0}}]}
form: {}
headers:
Accept:
Expand All @@ -11,9 +11,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/dashboard
response:
body: '{"id":"6fx-j89-9ip","title":"Test-Create_a_new_dashboard_with_event_stream_widget-1684506281","description":"","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"free","url":"/dashboard/6fx-j89-9ip/test-createanewdashboardwitheventstreamwidget-1684506281","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"event_size":"s","query":"example-query","show_year":true,"tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0},"id":4666982916800865}],"notify_list":[],"created_at":"2023-05-19T14:24:41.495188+00:00","modified_at":"2023-05-19T14:24:41.495188+00:00","restricted_roles":[]}
'
body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"2dc-bzm-gzi","title":"Test-Create_a_new_dashboard_with_event_stream_widget-1641430230","url":"/dashboard/2dc-bzm-gzi/test-createanewdashboardwitheventstreamwidget-1641430230","created_at":"2022-01-06T00:50:31.037679+00:00","modified_at":"2022-01-06T00:50:31.037679+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","tags_execution":"and","query":"example-query","type":"event_stream","event_size":"s"},"layout":{"y":0,"width":47,"x":0,"height":38},"id":5676594590872385}],"layout_type":"free"}'
code: 200
duration: ''
headers:
Expand All @@ -27,11 +25,9 @@ interactions:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v1/dashboard/6fx-j89-9ip
url: https://api.datadoghq.com/api/v1/dashboard/2dc-bzm-gzi
response:
body: '{"deleted_dashboard_id":"6fx-j89-9ip"}
'
body: '{"deleted_dashboard_id":"2dc-bzm-gzi"}'
code: 200
duration: ''
headers:
Expand Down
1 change: 0 additions & 1 deletion tests/scenarios/features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ Feature: Dashboards
Then the response status is 200 OK
And the response "widgets[0].definition.type" is equal to "event_stream"
And the response "widgets[0].definition.query" is equal to "example-query"
And the response "widgets[0].definition.show_year" is equal to true

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with event_timeline widget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"type":"event_stream",
"query":"example-query",
"tags_execution":"and",
"event_size":"s",
"show_year": true
"event_size":"s"
}
}
],
Expand Down

0 comments on commit d23574a

Please sign in to comment.