Skip to content

Commit

Permalink
Regenerate client from commit 363bae4 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 20, 2021
1 parent e2267f5 commit 52ec1cb
Show file tree
Hide file tree
Showing 17 changed files with 917 additions and 20 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-09-15 13:20:32.964477",
"spec_repo_commit": "0ded40f"
"regenerated": "2021-09-20 06:56:25.513055",
"spec_repo_commit": "363bae4"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-09-15 13:21:11.612963",
"spec_repo_commit": "0ded40f"
"regenerated": "2021-09-20 06:57:08.873788",
"spec_repo_commit": "363bae4"
}
}
}

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

54 changes: 51 additions & 3 deletions data/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8295,13 +8295,12 @@ components:
y:
q: system.mem.used
properties:
table:
$ref: '#/components/schemas/ScatterplotTableRequest'
x:
$ref: '#/components/schemas/ScatterPlotRequest'
y:
$ref: '#/components/schemas/ScatterPlotRequest'
required:
- x
- y
type: object
time:
$ref: '#/components/schemas/WidgetTime'
Expand Down Expand Up @@ -8332,6 +8331,38 @@ components:
type: string
x-enum-varnames:
- SCATTERPLOT
ScatterplotDimension:
description: Dimension of the Scatterplot.
enum:
- x
- y
- radius
- color
example: radius
type: string
x-enum-varnames:
- X
- Y
- RADIUS
- COLOR
ScatterplotTableRequest:
description: Scatterplot request containing formulas and functions.
properties:
formulas:
description: List of Scatterplot formulas that operate on queries. **This
feature is currently in beta.**
items:
$ref: '#/components/schemas/ScatterplotWidgetFormula'
type: array
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'
type: object
ScatterplotWidgetAggregator:
description: Aggregator used for the request.
enum:
Expand All @@ -8347,6 +8378,23 @@ components:
- MAXIMUM
- MINIMUM
- SUM
ScatterplotWidgetFormula:
description: Formula to be used in a Scatterplot widget query.
properties:
alias:
description: Expression alias.
example: my-query
type: string
dimension:
$ref: '#/components/schemas/ScatterplotDimension'
formula:
description: String expression built from queries, formulas, and functions.
example: func(a) + b
type: string
required:
- formula
- dimension
type: object
Series:
description: 'A metric to submit to Datadog.

Expand Down
3 changes: 3 additions & 0 deletions docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,10 @@ Class | Method | HTTP request | Description
- [DatadogAPIClient::V1::ScatterPlotWidgetDefinition](ScatterPlotWidgetDefinition.md)
- [DatadogAPIClient::V1::ScatterPlotWidgetDefinitionRequests](ScatterPlotWidgetDefinitionRequests.md)
- [DatadogAPIClient::V1::ScatterPlotWidgetDefinitionType](ScatterPlotWidgetDefinitionType.md)
- [DatadogAPIClient::V1::ScatterplotDimension](ScatterplotDimension.md)
- [DatadogAPIClient::V1::ScatterplotTableRequest](ScatterplotTableRequest.md)
- [DatadogAPIClient::V1::ScatterplotWidgetAggregator](ScatterplotWidgetAggregator.md)
- [DatadogAPIClient::V1::ScatterplotWidgetFormula](ScatterplotWidgetFormula.md)
- [DatadogAPIClient::V1::Series](Series.md)
- [DatadogAPIClient::V1::ServiceCheck](ServiceCheck.md)
- [DatadogAPIClient::V1::ServiceCheckStatus](ServiceCheckStatus.md)
Expand Down
6 changes: 4 additions & 2 deletions docs/v1/ScatterPlotWidgetDefinitionRequests.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **x** | [**ScatterPlotRequest**](ScatterPlotRequest.md) | | |
| **y** | [**ScatterPlotRequest**](ScatterPlotRequest.md) | | |
| **table** | [**ScatterplotTableRequest**](ScatterplotTableRequest.md) | | [optional] |
| **x** | [**ScatterPlotRequest**](ScatterPlotRequest.md) | | [optional] |
| **y** | [**ScatterPlotRequest**](ScatterPlotRequest.md) | | [optional] |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::ScatterPlotWidgetDefinitionRequests.new(
table: null,
x: null,
y: null
)
Expand Down
15 changes: 15 additions & 0 deletions docs/v1/ScatterplotDimension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DatadogAPIClient::V1::ScatterplotDimension

## Properties

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

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::ScatterplotDimension.new()
```

22 changes: 22 additions & 0 deletions docs/v1/ScatterplotTableRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DatadogAPIClient::V1::ScatterplotTableRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **formulas** | [**Array<ScatterplotWidgetFormula>**](ScatterplotWidgetFormula.md) | List of Scatterplot formulas that operate on queries. **This feature is currently in beta.** | [optional] |
| **queries** | [**Array<FormulaAndFunctionQueryDefinition>**](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] |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::ScatterplotTableRequest.new(
formulas: null,
queries: null,
response_format: null
)
```

22 changes: 22 additions & 0 deletions docs/v1/ScatterplotWidgetFormula.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DatadogAPIClient::V1::ScatterplotWidgetFormula

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **_alias** | **String** | Expression alias. | [optional] |
| **dimension** | [**ScatterplotDimension**](ScatterplotDimension.md) | | |
| **formula** | **String** | String expression built from queries, formulas, and functions. | |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::ScatterplotWidgetFormula.new(
_alias: my-query,
dimension: null,
formula: func(a) + b
)
```

21 changes: 21 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ Feature: Dashboards
And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter"
And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query"

Scenario: Create a new dashboard with formulas and functions scatterplot widget
Given new "CreateDashboard" request
And body with value { "title": "{{ unique }}", "widgets": [ { "id": 5346764334358972, "definition": { "title": "", "title_size": "16", "title_align": "left", "type": "scatterplot", "requests": { "table": { "formulas": [ { "formula": "query1", "dimension": "x", "alias": "my-query1" }, { "formula": "query2", "dimension": "y", "alias": "my-query2" } ], "queries": [ { "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {service}", "aggregator": "avg" }, { "data_source": "metrics", "name": "query2", "query": "avg:system.mem.used{*} by {service}", "aggregator": "avg" } ], "response_format": "scalar" } } }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" }
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.requests.table.formulas[0].formula" is equal to "query1"
And the response "widgets[0].definition.requests.table.formulas[0].dimension" is equal to "x"
And the response "widgets[0].definition.requests.table.formulas[0].alias" is equal to "my-query1"
And the response "widgets[0].definition.requests.table.formulas[1].formula" is equal to "query2"
And the response "widgets[0].definition.requests.table.formulas[1].dimension" is equal to "y"
And the response "widgets[0].definition.requests.table.formulas[1].alias" is equal to "my-query2"
And the response "widgets[0].definition.requests.table.queries[0].data_source" is equal to "metrics"
And the response "widgets[0].definition.requests.table.queries[0].name" is equal to "query1"
And the response "widgets[0].definition.requests.table.queries[0].query" is equal to "avg:system.cpu.user{*} by {service}"
And the response "widgets[0].definition.requests.table.queries[0].aggregator" is equal to "avg"
And the response "widgets[0].definition.requests.table.queries[1].data_source" is equal to "metrics"
And the response "widgets[0].definition.requests.table.queries[1].name" is equal to "query2"
And the response "widgets[0].definition.requests.table.queries[1].query" is equal to "avg:system.mem.used{*} by {service}"
And the response "widgets[0].definition.requests.table.queries[1].aggregator" is equal to "avg"
And the response "widgets[0].definition.requests.table.response_format" is equal to "scalar"

Scenario: Create a new dashboard with list_stream widget
Given new "CreateDashboard" request
And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"issue_stream","query_string":""},"response_format":"event_list"}]}}]}
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,10 @@
require 'datadog_api_client/v1/models/scatter_plot_widget_definition'
require 'datadog_api_client/v1/models/scatter_plot_widget_definition_requests'
require 'datadog_api_client/v1/models/scatter_plot_widget_definition_type'
require 'datadog_api_client/v1/models/scatterplot_dimension'
require 'datadog_api_client/v1/models/scatterplot_table_request'
require 'datadog_api_client/v1/models/scatterplot_widget_aggregator'
require 'datadog_api_client/v1/models/scatterplot_widget_formula'
require 'datadog_api_client/v1/models/series'
require 'datadog_api_client/v1/models/service_check'
require 'datadog_api_client/v1/models/service_check_status'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ class ScatterPlotWidgetDefinitionRequests
# whether the object has unparsed attributes
attr_accessor :_unparsed

attr_accessor :table

attr_accessor :x

attr_accessor :y

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'table' => :'table',
:'x' => :'x',
:'y' => :'y'
}
Expand All @@ -42,6 +45,7 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'table' => :'ScatterplotTableRequest',
:'x' => :'ScatterPlotRequest',
:'y' => :'ScatterPlotRequest'
}
Expand All @@ -68,6 +72,10 @@ def initialize(attributes = {})
h[k.to_sym] = v
}

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

if attributes.key?(:'x')
self.x = attributes[:'x']
end
Expand All @@ -81,22 +89,12 @@ def initialize(attributes = {})
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @x.nil?
invalid_properties.push('invalid value for "x", x cannot be nil.')
end

if @y.nil?
invalid_properties.push('invalid value for "y", y cannot be nil.')
end

invalid_properties
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @x.nil?
return false if @y.nil?
true
end

Expand All @@ -105,6 +103,7 @@ def valid?
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
table == o.table &&
x == o.x &&
y == o.y
end
Expand All @@ -118,7 +117,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[x, y].hash
[table, x, y].hash
end

# Builds the object from hash
Expand Down
Loading

0 comments on commit 52ec1cb

Please sign in to comment.