Skip to content

Commit b879827

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add provider_name attribute to pipelines API (#2865)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent b8b861f commit b879827

16 files changed

+693
-8
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-17 21:03:23.618184",
8-
"spec_repo_commit": "617655da"
7+
"regenerated": "2025-01-21 14:16:33.980025",
8+
"spec_repo_commit": "0bbc13ae"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-17 21:03:23.634365",
13-
"spec_repo_commit": "617655da"
12+
"regenerated": "2025-01-21 14:16:33.995142",
13+
"spec_repo_commit": "0bbc13ae"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6784,6 +6784,62 @@ components:
67846784
- FIREFOX_LAPTOP_LARGE
67856785
- FIREFOX_TABLET
67866786
- FIREFOX_MOBILE_SMALL
6787+
MonitorFormulaAndFunctionCostAggregator:
6788+
description: Aggregation methods for metric queries.
6789+
enum:
6790+
- avg
6791+
- sum
6792+
- max
6793+
- min
6794+
- last
6795+
- area
6796+
- l2norm
6797+
- percentile
6798+
- stddev
6799+
example: avg
6800+
type: string
6801+
x-enum-varnames:
6802+
- AVG
6803+
- SUM
6804+
- MAX
6805+
- MIN
6806+
- LAST
6807+
- AREA
6808+
- L2NORM
6809+
- PERCENTILE
6810+
- STDDEV
6811+
MonitorFormulaAndFunctionCostDataSource:
6812+
description: Data source for cost queries.
6813+
enum:
6814+
- metrics
6815+
- cloud_cost
6816+
- datadog_usage
6817+
example: cloud_cost
6818+
type: string
6819+
x-enum-varnames:
6820+
- METRICS
6821+
- CLOUD_COST
6822+
- DATADOG_USAGE
6823+
MonitorFormulaAndFunctionCostQueryDefinition:
6824+
description: A formula and functions cost query.
6825+
properties:
6826+
aggregator:
6827+
$ref: '#/components/schemas/MonitorFormulaAndFunctionCostAggregator'
6828+
data_source:
6829+
$ref: '#/components/schemas/MonitorFormulaAndFunctionCostDataSource'
6830+
name:
6831+
description: Name of the query for use in formulas.
6832+
example: query1
6833+
type: string
6834+
query:
6835+
description: The monitor query.
6836+
example: sum:all.cost{*}.rollup(sum, 86400)
6837+
type: string
6838+
required:
6839+
- name
6840+
- data_source
6841+
- query
6842+
type: object
67876843
MonitorFormulaAndFunctionEventAggregation:
67886844
description: Aggregation methods for event platform queries.
67896845
enum:
@@ -6934,6 +6990,7 @@ components:
69346990
description: A formula and function query.
69356991
oneOf:
69366992
- $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryDefinition'
6993+
- $ref: '#/components/schemas/MonitorFormulaAndFunctionCostQueryDefinition'
69376994
MonitorGroupSearchResponse:
69386995
description: The response of a monitor group search.
69396996
example:

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,6 +3552,9 @@ components:
35523552
env:
35533553
description: The Datadog environment.
35543554
type: string
3555+
provider_name:
3556+
description: The name of the CI provider. By default, this is "custom".
3557+
type: string
35553558
resource:
35563559
$ref: '#/components/schemas/CIAppCreatePipelineEventRequestAttributesResource'
35573560
service:
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV1
6+
7+
import (
8+
"fmt"
9+
10+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
11+
)
12+
13+
// MonitorFormulaAndFunctionCostAggregator Aggregation methods for metric queries.
14+
type MonitorFormulaAndFunctionCostAggregator string
15+
16+
// List of MonitorFormulaAndFunctionCostAggregator.
17+
const (
18+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AVG MonitorFormulaAndFunctionCostAggregator = "avg"
19+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_SUM MonitorFormulaAndFunctionCostAggregator = "sum"
20+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MAX MonitorFormulaAndFunctionCostAggregator = "max"
21+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MIN MonitorFormulaAndFunctionCostAggregator = "min"
22+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_LAST MonitorFormulaAndFunctionCostAggregator = "last"
23+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AREA MonitorFormulaAndFunctionCostAggregator = "area"
24+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_L2NORM MonitorFormulaAndFunctionCostAggregator = "l2norm"
25+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_PERCENTILE MonitorFormulaAndFunctionCostAggregator = "percentile"
26+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_STDDEV MonitorFormulaAndFunctionCostAggregator = "stddev"
27+
)
28+
29+
var allowedMonitorFormulaAndFunctionCostAggregatorEnumValues = []MonitorFormulaAndFunctionCostAggregator{
30+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AVG,
31+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_SUM,
32+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MAX,
33+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MIN,
34+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_LAST,
35+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AREA,
36+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_L2NORM,
37+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_PERCENTILE,
38+
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_STDDEV,
39+
}
40+
41+
// GetAllowedValues reeturns the list of possible values.
42+
func (v *MonitorFormulaAndFunctionCostAggregator) GetAllowedValues() []MonitorFormulaAndFunctionCostAggregator {
43+
return allowedMonitorFormulaAndFunctionCostAggregatorEnumValues
44+
}
45+
46+
// UnmarshalJSON deserializes the given payload.
47+
func (v *MonitorFormulaAndFunctionCostAggregator) UnmarshalJSON(src []byte) error {
48+
var value string
49+
err := datadog.Unmarshal(src, &value)
50+
if err != nil {
51+
return err
52+
}
53+
*v = MonitorFormulaAndFunctionCostAggregator(value)
54+
return nil
55+
}
56+
57+
// NewMonitorFormulaAndFunctionCostAggregatorFromValue returns a pointer to a valid MonitorFormulaAndFunctionCostAggregator
58+
// for the value passed as argument, or an error if the value passed is not allowed by the enum.
59+
func NewMonitorFormulaAndFunctionCostAggregatorFromValue(v string) (*MonitorFormulaAndFunctionCostAggregator, error) {
60+
ev := MonitorFormulaAndFunctionCostAggregator(v)
61+
if ev.IsValid() {
62+
return &ev, nil
63+
}
64+
return nil, fmt.Errorf("invalid value '%v' for MonitorFormulaAndFunctionCostAggregator: valid values are %v", v, allowedMonitorFormulaAndFunctionCostAggregatorEnumValues)
65+
}
66+
67+
// IsValid return true if the value is valid for the enum, false otherwise.
68+
func (v MonitorFormulaAndFunctionCostAggregator) IsValid() bool {
69+
for _, existing := range allowedMonitorFormulaAndFunctionCostAggregatorEnumValues {
70+
if existing == v {
71+
return true
72+
}
73+
}
74+
return false
75+
}
76+
77+
// Ptr returns reference to MonitorFormulaAndFunctionCostAggregator value.
78+
func (v MonitorFormulaAndFunctionCostAggregator) Ptr() *MonitorFormulaAndFunctionCostAggregator {
79+
return &v
80+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV1
6+
7+
import (
8+
"fmt"
9+
10+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
11+
)
12+
13+
// MonitorFormulaAndFunctionCostDataSource Data source for cost queries.
14+
type MonitorFormulaAndFunctionCostDataSource string
15+
16+
// List of MonitorFormulaAndFunctionCostDataSource.
17+
const (
18+
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_METRICS MonitorFormulaAndFunctionCostDataSource = "metrics"
19+
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_CLOUD_COST MonitorFormulaAndFunctionCostDataSource = "cloud_cost"
20+
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_DATADOG_USAGE MonitorFormulaAndFunctionCostDataSource = "datadog_usage"
21+
)
22+
23+
var allowedMonitorFormulaAndFunctionCostDataSourceEnumValues = []MonitorFormulaAndFunctionCostDataSource{
24+
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_METRICS,
25+
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_CLOUD_COST,
26+
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_DATADOG_USAGE,
27+
}
28+
29+
// GetAllowedValues reeturns the list of possible values.
30+
func (v *MonitorFormulaAndFunctionCostDataSource) GetAllowedValues() []MonitorFormulaAndFunctionCostDataSource {
31+
return allowedMonitorFormulaAndFunctionCostDataSourceEnumValues
32+
}
33+
34+
// UnmarshalJSON deserializes the given payload.
35+
func (v *MonitorFormulaAndFunctionCostDataSource) UnmarshalJSON(src []byte) error {
36+
var value string
37+
err := datadog.Unmarshal(src, &value)
38+
if err != nil {
39+
return err
40+
}
41+
*v = MonitorFormulaAndFunctionCostDataSource(value)
42+
return nil
43+
}
44+
45+
// NewMonitorFormulaAndFunctionCostDataSourceFromValue returns a pointer to a valid MonitorFormulaAndFunctionCostDataSource
46+
// for the value passed as argument, or an error if the value passed is not allowed by the enum.
47+
func NewMonitorFormulaAndFunctionCostDataSourceFromValue(v string) (*MonitorFormulaAndFunctionCostDataSource, error) {
48+
ev := MonitorFormulaAndFunctionCostDataSource(v)
49+
if ev.IsValid() {
50+
return &ev, nil
51+
}
52+
return nil, fmt.Errorf("invalid value '%v' for MonitorFormulaAndFunctionCostDataSource: valid values are %v", v, allowedMonitorFormulaAndFunctionCostDataSourceEnumValues)
53+
}
54+
55+
// IsValid return true if the value is valid for the enum, false otherwise.
56+
func (v MonitorFormulaAndFunctionCostDataSource) IsValid() bool {
57+
for _, existing := range allowedMonitorFormulaAndFunctionCostDataSourceEnumValues {
58+
if existing == v {
59+
return true
60+
}
61+
}
62+
return false
63+
}
64+
65+
// Ptr returns reference to MonitorFormulaAndFunctionCostDataSource value.
66+
func (v MonitorFormulaAndFunctionCostDataSource) Ptr() *MonitorFormulaAndFunctionCostDataSource {
67+
return &v
68+
}

0 commit comments

Comments
 (0)