Skip to content

Commit

Permalink
Regenerate client from commit c588c56 of spec repo (#478)
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>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 12, 2021
1 parent b313551 commit d89f07e
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 22 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.5.1.dev2",
"regenerated": "2021-11-12 11:37:07.613790",
"spec_repo_commit": "fabbc01"
"regenerated": "2021-11-12 15:04:57.828741",
"spec_repo_commit": "c588c56"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-11-12 11:37:07.645024",
"spec_repo_commit": "fabbc01"
"regenerated": "2021-11-12 15:04:57.858848",
"spec_repo_commit": "c588c56"
}
}
}
14 changes: 14 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,12 @@ components:
$ref: '#/components/schemas/WidgetCompareTo'
event_query:
$ref: '#/components/schemas/LogQueryDefinition'
formulas:
description: List of formulas that operate on queries. **This feature is
currently in beta.**
items:
$ref: '#/components/schemas/WidgetFormula'
type: array
increase_good:
description: Whether to show increase as good.
type: boolean
Expand All @@ -754,6 +760,14 @@ components:
q:
description: Query definition.
type: string
queries:
description: List of queries that can be returned directly or used in formulas.
**This feature is currently in beta.**
items:
$ref: '#/components/schemas/FormulaAndFunctionQueryDefinition'
type: array
response_format:
$ref: '#/components/schemas/FormulaAndFunctionResponseFormat'
rum_query:
$ref: '#/components/schemas/LogQueryDefinition'
security_query:
Expand Down

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

40 changes: 23 additions & 17 deletions docs/v1/ChangeWidgetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@

## Properties

| Name | Type | Description | Notes |
| ------------------------- | ------------------------------------------------------- | ---------------------------------- | ---------- |
| **apm_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **change_type** | [**WidgetChangeType**](WidgetChangeType.md) | | [optional] |
| **compare_to** | [**WidgetCompareTo**](WidgetCompareTo.md) | | [optional] |
| **event_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **increase_good** | **Boolean** | Whether to show increase as good. | [optional] |
| **log_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **network_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **order_by** | [**WidgetOrderBy**](WidgetOrderBy.md) | | [optional] |
| **order_dir** | [**WidgetSort**](WidgetSort.md) | | [optional] |
| **process_query** | [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] |
| **profile_metrics_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **q** | **String** | Query definition. | [optional] |
| **rum_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **security_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **show_present** | **Boolean** | Whether to show the present value. | [optional] |
| Name | Type | Description | Notes |
| ------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- | ---------- |
| **apm_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **change_type** | [**WidgetChangeType**](WidgetChangeType.md) | | [optional] |
| **compare_to** | [**WidgetCompareTo**](WidgetCompareTo.md) | | [optional] |
| **event_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **formulas** | [**Array&lt;WidgetFormula&gt;**](WidgetFormula.md) | List of formulas that operate on queries. **This feature is currently in beta.** | [optional] |
| **increase_good** | **Boolean** | Whether to show increase as good. | [optional] |
| **log_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **network_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **order_by** | [**WidgetOrderBy**](WidgetOrderBy.md) | | [optional] |
| **order_dir** | [**WidgetSort**](WidgetSort.md) | | [optional] |
| **process_query** | [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] |
| **profile_metrics_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **q** | **String** | Query definition. | [optional] |
| **queries** | [**Array&lt;FormulaAndFunctionQueryDefinition&gt;**](FormulaAndFunctionQueryDefinition.md) | List of queries that can be returned directly or used in formulas. **This feature is currently in beta.** | [optional] |
| **response_format** | [**FormulaAndFunctionResponseFormat**](FormulaAndFunctionResponseFormat.md) | | [optional] |
| **rum_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **security_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] |
| **show_present** | **Boolean** | Whether to show the present value. | [optional] |

## Example

Expand All @@ -30,6 +33,7 @@ instance = DatadogAPIClient::V1::ChangeWidgetRequest.new(
change_type: null,
compare_to: null,
event_query: null,
formulas: null,
increase_good: null,
log_query: null,
network_query: null,
Expand All @@ -38,6 +42,8 @@ instance = DatadogAPIClient::V1::ChangeWidgetRequest.new(
process_query: null,
profile_metrics_query: null,
q: null,
queries: null,
response_format: null,
rum_query: null,
security_query: null,
show_present: null
Expand Down
17 changes: 17 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ Feature: Dashboards
When the request is sent
Then the response status is 200 OK

Scenario: Create a new dashboard with a formulas and functions change widget
Given new "CreateDashboard" request
And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" }
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar"
And the response "widgets[0].definition.requests[0].compare_to" is equal to "hour_before"
And the response "widgets[0].definition.requests[0].increase_good" is equal to true
And the response "widgets[0].definition.requests[0].order_by" is equal to "change"
And the response "widgets[0].definition.requests[0].change_type" is equal to "absolute"
And the response "widgets[0].definition.requests[0].order_dir" is equal to "desc"
And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "logs"
And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1"
And the response "widgets[0].definition.requests[0].queries[0].compute.aggregation" is equal to "count"
And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "hour_before(query1)"
And the response "widgets[0].definition.requests[0].formulas[1].formula" is equal to "query1"

Scenario: Create a new dashboard with a profile metric query
Given new "CreateDashboard" request
And body from file "dashboard_payload.json"
Expand Down
35 changes: 34 additions & 1 deletion lib/datadog_api_client/v1/models/change_widget_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class ChangeWidgetRequest

attr_accessor :event_query

# List of formulas that operate on queries. **This feature is currently in beta.**
attr_accessor :formulas

# Whether to show increase as good.
attr_accessor :increase_good

Expand All @@ -48,6 +51,11 @@ class ChangeWidgetRequest
# Query definition.
attr_accessor :q

# List of queries that can be returned directly or used in formulas. **This feature is currently in beta.**
attr_accessor :queries

attr_accessor :response_format

attr_accessor :rum_query

attr_accessor :security_query
Expand All @@ -62,6 +70,7 @@ def self.attribute_map
:'change_type' => :'change_type',
:'compare_to' => :'compare_to',
:'event_query' => :'event_query',
:'formulas' => :'formulas',
:'increase_good' => :'increase_good',
:'log_query' => :'log_query',
:'network_query' => :'network_query',
Expand All @@ -70,6 +79,8 @@ def self.attribute_map
:'process_query' => :'process_query',
:'profile_metrics_query' => :'profile_metrics_query',
:'q' => :'q',
:'queries' => :'queries',
:'response_format' => :'response_format',
:'rum_query' => :'rum_query',
:'security_query' => :'security_query',
:'show_present' => :'show_present'
Expand All @@ -88,6 +99,7 @@ def self.openapi_types
:'change_type' => :'WidgetChangeType',
:'compare_to' => :'WidgetCompareTo',
:'event_query' => :'LogQueryDefinition',
:'formulas' => :'Array<WidgetFormula>',
:'increase_good' => :'Boolean',
:'log_query' => :'LogQueryDefinition',
:'network_query' => :'LogQueryDefinition',
Expand All @@ -96,6 +108,8 @@ def self.openapi_types
:'process_query' => :'ProcessQueryDefinition',
:'profile_metrics_query' => :'LogQueryDefinition',
:'q' => :'String',
:'queries' => :'Array<FormulaAndFunctionQueryDefinition>',
:'response_format' => :'FormulaAndFunctionResponseFormat',
:'rum_query' => :'LogQueryDefinition',
:'security_query' => :'LogQueryDefinition',
:'show_present' => :'Boolean'
Expand Down Expand Up @@ -139,6 +153,12 @@ def initialize(attributes = {})
self.event_query = attributes[:'event_query']
end

if attributes.key?(:'formulas')
if (value = attributes[:'formulas']).is_a?(Array)
self.formulas = value
end
end

if attributes.key?(:'increase_good')
self.increase_good = attributes[:'increase_good']
end
Expand Down Expand Up @@ -171,6 +191,16 @@ def initialize(attributes = {})
self.q = attributes[:'q']
end

if attributes.key?(:'queries')
if (value = attributes[:'queries']).is_a?(Array)
self.queries = value
end
end

if attributes.key?(:'response_format')
self.response_format = attributes[:'response_format']
end

if attributes.key?(:'rum_query')
self.rum_query = attributes[:'rum_query']
end
Expand Down Expand Up @@ -206,6 +236,7 @@ def ==(o)
change_type == o.change_type &&
compare_to == o.compare_to &&
event_query == o.event_query &&
formulas == o.formulas &&
increase_good == o.increase_good &&
log_query == o.log_query &&
network_query == o.network_query &&
Expand All @@ -214,6 +245,8 @@ def ==(o)
process_query == o.process_query &&
profile_metrics_query == o.profile_metrics_query &&
q == o.q &&
queries == o.queries &&
response_format == o.response_format &&
rum_query == o.rum_query &&
security_query == o.security_query &&
show_present == o.show_present
Expand All @@ -228,7 +261,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[apm_query, change_type, compare_to, event_query, increase_good, log_query, network_query, order_by, order_dir, process_query, profile_metrics_query, q, rum_query, security_query, show_present].hash
[apm_query, change_type, compare_to, event_query, formulas, increase_good, log_query, network_query, order_by, order_dir, process_query, profile_metrics_query, q, queries, response_format, rum_query, security_query, show_present].hash
end

# Builds the object from hash
Expand Down

0 comments on commit d89f07e

Please sign in to comment.