-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 27e609f7 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Jan 17, 2025
1 parent
b8b861f
commit 6b8c0ba
Showing
10 changed files
with
566 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
api/datadogV1/model_monitor_formula_and_function_cost_aggregator.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
68 changes: 68 additions & 0 deletions
68
api/datadogV1/model_monitor_formula_and_function_cost_data_source.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.