Skip to content

Commit

Permalink
Regenerate client from commit 27e609f7 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 17, 2025
1 parent b8b861f commit 6b8c0ba
Show file tree
Hide file tree
Showing 10 changed files with 566 additions and 4 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.6",
"regenerated": "2025-01-17 21:03:23.618184",
"spec_repo_commit": "617655da"
"regenerated": "2025-01-17 21:41:17.843758",
"spec_repo_commit": "27e609f7"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-17 21:03:23.634365",
"spec_repo_commit": "617655da"
"regenerated": "2025-01-17 21:41:17.859150",
"spec_repo_commit": "27e609f7"
}
}
}
57 changes: 57 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6784,6 +6784,62 @@ components:
- FIREFOX_LAPTOP_LARGE
- FIREFOX_TABLET
- FIREFOX_MOBILE_SMALL
MonitorFormulaAndFunctionCostAggregator:
description: Aggregation methods for metric queries.
enum:
- avg
- sum
- max
- min
- last
- area
- l2norm
- percentile
- stddev
example: avg
type: string
x-enum-varnames:
- AVG
- SUM
- MAX
- MIN
- LAST
- AREA
- L2NORM
- PERCENTILE
- STDDEV
MonitorFormulaAndFunctionCostDataSource:
description: Data source for cost queries.
enum:
- metrics
- cloud_cost
- datadog_usage
example: cloud_cost
type: string
x-enum-varnames:
- METRICS
- CLOUD_COST
- DATADOG_USAGE
MonitorFormulaAndFunctionCostQueryDefinition:
description: A formula and functions cost query.
properties:
aggregator:
$ref: '#/components/schemas/MonitorFormulaAndFunctionCostAggregator'
data_source:
$ref: '#/components/schemas/MonitorFormulaAndFunctionCostDataSource'
name:
description: Name of the query for use in formulas.
example: query1
type: string
query:
description: The monitor query.
example: sum:all.cost{*}.rollup(sum, 86400)
type: string
required:
- name
- data_source
- query
type: object
MonitorFormulaAndFunctionEventAggregation:
description: Aggregation methods for event platform queries.
enum:
Expand Down Expand Up @@ -6934,6 +6990,7 @@ components:
description: A formula and function query.
oneOf:
- $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryDefinition'
- $ref: '#/components/schemas/MonitorFormulaAndFunctionCostQueryDefinition'
MonitorGroupSearchResponse:
description: The response of a monitor group search.
example:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.

package datadogV1

import (
"fmt"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MonitorFormulaAndFunctionCostAggregator Aggregation methods for metric queries.
type MonitorFormulaAndFunctionCostAggregator string

// List of MonitorFormulaAndFunctionCostAggregator.
const (
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AVG MonitorFormulaAndFunctionCostAggregator = "avg"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_SUM MonitorFormulaAndFunctionCostAggregator = "sum"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MAX MonitorFormulaAndFunctionCostAggregator = "max"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MIN MonitorFormulaAndFunctionCostAggregator = "min"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_LAST MonitorFormulaAndFunctionCostAggregator = "last"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AREA MonitorFormulaAndFunctionCostAggregator = "area"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_L2NORM MonitorFormulaAndFunctionCostAggregator = "l2norm"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_PERCENTILE MonitorFormulaAndFunctionCostAggregator = "percentile"
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_STDDEV MonitorFormulaAndFunctionCostAggregator = "stddev"
)

var allowedMonitorFormulaAndFunctionCostAggregatorEnumValues = []MonitorFormulaAndFunctionCostAggregator{
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AVG,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_SUM,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MAX,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_MIN,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_LAST,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_AREA,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_L2NORM,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_PERCENTILE,
MONITORFORMULAANDFUNCTIONCOSTAGGREGATOR_STDDEV,
}

// GetAllowedValues reeturns the list of possible values.
func (v *MonitorFormulaAndFunctionCostAggregator) GetAllowedValues() []MonitorFormulaAndFunctionCostAggregator {
return allowedMonitorFormulaAndFunctionCostAggregatorEnumValues
}

// UnmarshalJSON deserializes the given payload.
func (v *MonitorFormulaAndFunctionCostAggregator) UnmarshalJSON(src []byte) error {
var value string
err := datadog.Unmarshal(src, &value)
if err != nil {
return err
}
*v = MonitorFormulaAndFunctionCostAggregator(value)
return nil
}

// NewMonitorFormulaAndFunctionCostAggregatorFromValue returns a pointer to a valid MonitorFormulaAndFunctionCostAggregator
// for the value passed as argument, or an error if the value passed is not allowed by the enum.
func NewMonitorFormulaAndFunctionCostAggregatorFromValue(v string) (*MonitorFormulaAndFunctionCostAggregator, error) {
ev := MonitorFormulaAndFunctionCostAggregator(v)
if ev.IsValid() {
return &ev, nil
}
return nil, fmt.Errorf("invalid value '%v' for MonitorFormulaAndFunctionCostAggregator: valid values are %v", v, allowedMonitorFormulaAndFunctionCostAggregatorEnumValues)
}

// IsValid return true if the value is valid for the enum, false otherwise.
func (v MonitorFormulaAndFunctionCostAggregator) IsValid() bool {
for _, existing := range allowedMonitorFormulaAndFunctionCostAggregatorEnumValues {
if existing == v {
return true
}
}
return false
}

// Ptr returns reference to MonitorFormulaAndFunctionCostAggregator value.
func (v MonitorFormulaAndFunctionCostAggregator) Ptr() *MonitorFormulaAndFunctionCostAggregator {
return &v
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.

package datadogV1

import (
"fmt"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MonitorFormulaAndFunctionCostDataSource Data source for cost queries.
type MonitorFormulaAndFunctionCostDataSource string

// List of MonitorFormulaAndFunctionCostDataSource.
const (
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_METRICS MonitorFormulaAndFunctionCostDataSource = "metrics"
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_CLOUD_COST MonitorFormulaAndFunctionCostDataSource = "cloud_cost"
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_DATADOG_USAGE MonitorFormulaAndFunctionCostDataSource = "datadog_usage"
)

var allowedMonitorFormulaAndFunctionCostDataSourceEnumValues = []MonitorFormulaAndFunctionCostDataSource{
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_METRICS,
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_CLOUD_COST,
MONITORFORMULAANDFUNCTIONCOSTDATASOURCE_DATADOG_USAGE,
}

// GetAllowedValues reeturns the list of possible values.
func (v *MonitorFormulaAndFunctionCostDataSource) GetAllowedValues() []MonitorFormulaAndFunctionCostDataSource {
return allowedMonitorFormulaAndFunctionCostDataSourceEnumValues
}

// UnmarshalJSON deserializes the given payload.
func (v *MonitorFormulaAndFunctionCostDataSource) UnmarshalJSON(src []byte) error {
var value string
err := datadog.Unmarshal(src, &value)
if err != nil {
return err
}
*v = MonitorFormulaAndFunctionCostDataSource(value)
return nil
}

// NewMonitorFormulaAndFunctionCostDataSourceFromValue returns a pointer to a valid MonitorFormulaAndFunctionCostDataSource
// for the value passed as argument, or an error if the value passed is not allowed by the enum.
func NewMonitorFormulaAndFunctionCostDataSourceFromValue(v string) (*MonitorFormulaAndFunctionCostDataSource, error) {
ev := MonitorFormulaAndFunctionCostDataSource(v)
if ev.IsValid() {
return &ev, nil
}
return nil, fmt.Errorf("invalid value '%v' for MonitorFormulaAndFunctionCostDataSource: valid values are %v", v, allowedMonitorFormulaAndFunctionCostDataSourceEnumValues)
}

// IsValid return true if the value is valid for the enum, false otherwise.
func (v MonitorFormulaAndFunctionCostDataSource) IsValid() bool {
for _, existing := range allowedMonitorFormulaAndFunctionCostDataSourceEnumValues {
if existing == v {
return true
}
}
return false
}

// Ptr returns reference to MonitorFormulaAndFunctionCostDataSource value.
func (v MonitorFormulaAndFunctionCostDataSource) Ptr() *MonitorFormulaAndFunctionCostDataSource {
return &v
}
Loading

0 comments on commit 6b8c0ba

Please sign in to comment.