Skip to content

Commit

Permalink
Merge master into datadog-api-spec/test/therve/metrics-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
2 parents 4edec02 + c79bd96 commit ba780a1
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 47 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.4.1.dev8",
"regenerated": "2021-06-15 15:14:59.121472",
"spec_repo_commit": "67742c8"
"regenerated": "2021-06-17 09:50:48.299099",
"spec_repo_commit": "4951cff"
},
"v2": {
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-06-15 15:15:30.259602",
"spec_repo_commit": "67742c8"
"regenerated": "2021-06-17 09:51:19.053739",
"spec_repo_commit": "4951cff"
}
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 1.1.0 / 2021-06-16

* [Added] Add missing fields `hasExtendedTitle`, `type`, `version` and `updateAuthorId` for Security Monitoring Rule endpoints. See [#998](https://github.com/DataDog/datadog-api-client-go/pull/998).
* [Added] Dashboard RBAC role support. See [#993](https://github.com/DataDog/datadog-api-client-go/pull/993).
* [Fixed] Fix go JSON struct. See [#992](https://github.com/DataDog/datadog-api-client-go/pull/992).

## 1.0.0 / 2021-06-10

* [Added] Add missing fields in usage billable summary keys. See [#987](https://github.com/DataDog/datadog-api-client-go/pull/987).
Expand Down
82 changes: 53 additions & 29 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6157,8 +6157,8 @@ paths:
"data": {
"attributes": {
"slo_id": "{{ slo.data[0].id }}",
"start": {{ now_ts }},
"end": {{ hour_later_ts }},
"start": {{ timestamp("now") }},
"end": {{ timestamp("now + 1h") }},
"category": "Other",
"timezone": "UTC",
"description": "Test Correction"
Expand Down Expand Up @@ -15105,6 +15105,19 @@ components:
description: Object containing all metric names returned and their associated
metadata.
example:
expression: system.cpu.idle{host:foo,env:test}
pointlist:
- - 1575317847
- 0.5
- - 1575317847
- 0.5
length: 5
start: 2
query_index: 5
display_name: system.cpu.idle
tag_set:
- tag_set
- tag_set
unit:
- plural: minutes
name: minute
Expand All @@ -15116,20 +15129,11 @@ components:
short_name: min
family: time
scale_factor: 60.0
expression: system.cpu.idle{host:foo,env:test}
metric: system.cpu.idle
pointlist:
- - 1575317847
- 0.5
- - 1575317847
- 0.5
scope: host:foo,env:test
length: 5
start: 5
end: 6
interval: 1
aggr: avg
display_name: system.cpu.idle
properties:
aggr:
description: Aggregation type.
Expand Down Expand Up @@ -15172,6 +15176,11 @@ components:
$ref: '#/components/schemas/Point'
readOnly: true
type: array
query_index:
description: The index of the series' query within the request.
format: int64
readOnly: true
type: integer
scope:
description: Metric scope, comma separated list of tags.
example: host:foo,env:test
Expand All @@ -15182,6 +15191,13 @@ components:
format: int64
readOnly: true
type: integer
tag_set:
description: Unique tags identifying this series.
items:
description: Unique tags identifying this series.
type: string
readOnly: true
type: array
unit:
description: |-
Detailed information about the metric unit.
Expand All @@ -15200,9 +15216,22 @@ components:
example:
res_type: time_series
from_date: 0
to_date: 2
to_date: 7
series:
- unit:
- expression: system.cpu.idle{host:foo,env:test}
pointlist:
- - 1575317847
- 0.5
- - 1575317847
- 0.5
length: 5
start: 2
query_index: 5
display_name: system.cpu.idle
tag_set:
- tag_set
- tag_set
unit:
- plural: minutes
name: minute
short_name: min
Expand All @@ -15213,21 +15242,25 @@ components:
short_name: min
family: time
scale_factor: 60.0
expression: system.cpu.idle{host:foo,env:test}
metric: system.cpu.idle
scope: host:foo,env:test
end: 6
interval: 1
aggr: avg
- expression: system.cpu.idle{host:foo,env:test}
pointlist:
- - 1575317847
- 0.5
- - 1575317847
- 0.5
scope: host:foo,env:test
length: 5
start: 5
end: 6
interval: 1
aggr: avg
start: 2
query_index: 5
display_name: system.cpu.idle
- unit:
tag_set:
- tag_set
- tag_set
unit:
- plural: minutes
name: minute
short_name: min
Expand All @@ -15238,20 +15271,11 @@ components:
short_name: min
family: time
scale_factor: 60.0
expression: system.cpu.idle{host:foo,env:test}
metric: system.cpu.idle
pointlist:
- - 1575317847
- 0.5
- - 1575317847
- 0.5
scope: host:foo,env:test
length: 5
start: 5
end: 6
interval: 1
aggr: avg
display_name: system.cpu.idle
query: query
group_by:
- group_by
Expand Down
52 changes: 52 additions & 0 deletions api/v1/datadog/docs/MetricsQueryMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Name | Type | Description | Notes
**Length** | Pointer to **int64** | Number of data samples. | [optional] [readonly]
**Metric** | Pointer to **string** | Metric name. | [optional] [readonly]
**Pointlist** | Pointer to **[][]float64** | List of points of the time series. | [optional] [readonly]
**QueryIndex** | Pointer to **int64** | The index of the series' query within the request. | [optional] [readonly]
**Scope** | Pointer to **string** | Metric scope, comma separated list of tags. | [optional] [readonly]
**Start** | Pointer to **int64** | Start of the time window, milliseconds since Unix epoch. | [optional] [readonly]
**TagSet** | Pointer to **[]string** | Unique tags identifying this series. | [optional] [readonly]
**Unit** | Pointer to [**[]MetricsQueryUnit**](MetricsQueryUnit.md) | Detailed information about the metric unit. First element describes the \"primary unit\" (for example, `bytes` in `bytes per second`), second describes the \"per unit\" (for example, `second` in `bytes per second`). | [optional] [readonly]

## Methods
Expand Down Expand Up @@ -235,6 +237,31 @@ SetPointlist sets Pointlist field to given value.

HasPointlist returns a boolean if a field has been set.

### GetQueryIndex

`func (o *MetricsQueryMetadata) GetQueryIndex() int64`

GetQueryIndex returns the QueryIndex field if non-nil, zero value otherwise.

### GetQueryIndexOk

`func (o *MetricsQueryMetadata) GetQueryIndexOk() (*int64, bool)`

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

### SetQueryIndex

`func (o *MetricsQueryMetadata) SetQueryIndex(v int64)`

SetQueryIndex sets QueryIndex field to given value.

### HasQueryIndex

`func (o *MetricsQueryMetadata) HasQueryIndex() bool`

HasQueryIndex returns a boolean if a field has been set.

### GetScope

`func (o *MetricsQueryMetadata) GetScope() string`
Expand Down Expand Up @@ -285,6 +312,31 @@ SetStart sets Start field to given value.

HasStart returns a boolean if a field has been set.

### GetTagSet

`func (o *MetricsQueryMetadata) GetTagSet() []string`

GetTagSet returns the TagSet field if non-nil, zero value otherwise.

### GetTagSetOk

`func (o *MetricsQueryMetadata) GetTagSetOk() (*[]string, bool)`

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

### SetTagSet

`func (o *MetricsQueryMetadata) SetTagSet(v []string)`

SetTagSet sets TagSet field to given value.

### HasTagSet

`func (o *MetricsQueryMetadata) HasTagSet() bool`

HasTagSet returns a boolean if a field has been set.

### GetUnit

`func (o *MetricsQueryMetadata) GetUnit() []MetricsQueryUnit`
Expand Down
74 changes: 74 additions & 0 deletions api/v1/datadog/model_metrics_query_metadata.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/features/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"parameters": [
{
"name": "body",
"value": "{\n \"data\": {\n \"attributes\": {\n \"slo_id\": \"{{ slo.data[0].id }}\",\n \"start\": {{ now_ts }},\n \"end\": {{ hour_later_ts }},\n \"category\": \"Other\",\n \"timezone\": \"UTC\",\n \"description\": \"Test Correction\"\n },\n \"type\": \"correction\"\n }\n}"
"value": "{\n \"data\": {\n \"attributes\": {\n \"slo_id\": \"{{ slo.data[0].id }}\",\n \"start\": {{ timestamp(\"now\") }},\n \"end\": {{ timestamp(\"now + 1h\") }},\n \"category\": \"Other\",\n \"timezone\": \"UTC\",\n \"description\": \"Test Correction\"\n },\n \"type\": \"correction\"\n }\n}"
}
],
"step": "there is a valid \"correction\" for \"slo\"",
Expand Down
Loading

0 comments on commit ba780a1

Please sign in to comment.