Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cross org uuids to timeseries query #2535

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "2024-07-01 12:39:38.860700",
"spec_repo_commit": "f54c0bf3"
"regenerated": "2024-07-01 17:39:16.927451",
"spec_repo_commit": "acfbfe3f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-01 12:39:38.879260",
"spec_repo_commit": "f54c0bf3"
"regenerated": "2024-07-01 17:39:16.945325",
"spec_repo_commit": "acfbfe3f"
}
}
}
25 changes: 25 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,17 @@ components:
type: string
readOnly: true
type: object
CrossOrgUuids:
description: The source organization UUID for cross organization queries. Feature
in Private Beta.
example:
- 6434abde-xxxx-yyyy-zzzz-da7ad0900001
items:
description: The source organization UUID.
example: 6434abde-xxxx-yyyy-zzzz-da7ad0900001
type: string
maxItems: 1
type: array
Dashboard:
description: "A dashboard is Datadog\u2019s tool for visually tracking, analyzing,
and displaying\nkey performance metrics, which enable you to monitor the health
Expand Down Expand Up @@ -2519,6 +2530,8 @@ components:
FormulaAndFunctionApmDependencyStatsQueryDefinition:
description: A formula and functions APM dependency stats query.
properties:
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionApmDependencyStatsDataSource'
env:
Expand Down Expand Up @@ -2606,6 +2619,8 @@ components:
FormulaAndFunctionApmResourceStatsQueryDefinition:
description: APM resource stats query using formulas and functions.
properties:
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionApmResourceStatsDataSource'
env:
Expand Down Expand Up @@ -2671,6 +2686,8 @@ components:
properties:
aggregator:
$ref: '#/components/schemas/WidgetAggregator'
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionCloudCostDataSource'
name:
Expand Down Expand Up @@ -2721,6 +2738,8 @@ components:
properties:
compute:
$ref: '#/components/schemas/FormulaAndFunctionEventQueryDefinitionCompute'
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionEventsDataSource'
group_by:
Expand Down Expand Up @@ -2877,6 +2896,8 @@ components:
properties:
aggregator:
$ref: '#/components/schemas/FormulaAndFunctionMetricAggregation'
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionMetricDataSource'
name:
Expand Down Expand Up @@ -2907,6 +2928,8 @@ components:
properties:
aggregator:
$ref: '#/components/schemas/FormulaAndFunctionMetricAggregation'
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionProcessQueryDataSource'
is_normalized_cpu:
Expand Down Expand Up @@ -3014,6 +3037,8 @@ components:
description: Additional filters applied to the SLO query.
example: host:host_a,env:prod
type: string
cross_org_uuids:
$ref: '#/components/schemas/CrossOrgUuids'
data_source:
$ref: '#/components/schemas/FormulaAndFunctionSLODataSource'
group_mode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

// FormulaAndFunctionApmDependencyStatsQueryDefinition A formula and functions APM dependency stats query.
type FormulaAndFunctionApmDependencyStatsQueryDefinition struct {
// The source organization UUID for cross organization queries. Feature in Private Beta.
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
// Data source for APM dependency stats queries.
DataSource FormulaAndFunctionApmDependencyStatsDataSource `json:"data_source"`
// APM environment.
Expand Down Expand Up @@ -61,6 +63,34 @@ func NewFormulaAndFunctionApmDependencyStatsQueryDefinitionWithDefaults() *Formu
return &this
}

// GetCrossOrgUuids returns the CrossOrgUuids field value if set, zero value otherwise.
func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) GetCrossOrgUuids() []string {
if o == nil || o.CrossOrgUuids == nil {
var ret []string
return ret
}
return o.CrossOrgUuids
}

// GetCrossOrgUuidsOk returns a tuple with the CrossOrgUuids field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) GetCrossOrgUuidsOk() (*[]string, bool) {
if o == nil || o.CrossOrgUuids == nil {
return nil, false
}
return &o.CrossOrgUuids, true
}

// HasCrossOrgUuids returns a boolean if a field has been set.
func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) HasCrossOrgUuids() bool {
return o != nil && o.CrossOrgUuids != nil
}

// SetCrossOrgUuids gets a reference to the given []string and assigns it to the CrossOrgUuids field.
func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) SetCrossOrgUuids(v []string) {
o.CrossOrgUuids = v
}

// GetDataSource returns the DataSource field value.
func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) GetDataSource() FormulaAndFunctionApmDependencyStatsDataSource {
if o == nil {
Expand Down Expand Up @@ -312,6 +342,9 @@ func (o FormulaAndFunctionApmDependencyStatsQueryDefinition) MarshalJSON() ([]by
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.CrossOrgUuids != nil {
toSerialize["cross_org_uuids"] = o.CrossOrgUuids
}
toSerialize["data_source"] = o.DataSource
toSerialize["env"] = o.Env
if o.IsUpstream != nil {
Expand All @@ -338,6 +371,7 @@ func (o FormulaAndFunctionApmDependencyStatsQueryDefinition) MarshalJSON() ([]by
// UnmarshalJSON deserializes the given payload.
func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
DataSource *FormulaAndFunctionApmDependencyStatsDataSource `json:"data_source"`
Env *string `json:"env"`
IsUpstream *bool `json:"is_upstream,omitempty"`
Expand Down Expand Up @@ -375,12 +409,13 @@ func (o *FormulaAndFunctionApmDependencyStatsQueryDefinition) UnmarshalJSON(byte
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"data_source", "env", "is_upstream", "name", "operation_name", "primary_tag_name", "primary_tag_value", "resource_name", "service", "stat"})
datadog.DeleteKeys(additionalProperties, &[]string{"cross_org_uuids", "data_source", "env", "is_upstream", "name", "operation_name", "primary_tag_name", "primary_tag_value", "resource_name", "service", "stat"})
} else {
return err
}

hasInvalidField := false
o.CrossOrgUuids = all.CrossOrgUuids
if !all.DataSource.IsValid() {
hasInvalidField = true
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

// FormulaAndFunctionApmResourceStatsQueryDefinition APM resource stats query using formulas and functions.
type FormulaAndFunctionApmResourceStatsQueryDefinition struct {
// The source organization UUID for cross organization queries. Feature in Private Beta.
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
// Data source for APM resource stats queries.
DataSource FormulaAndFunctionApmResourceStatsDataSource `json:"data_source"`
// APM environment.
Expand Down Expand Up @@ -59,6 +61,34 @@ func NewFormulaAndFunctionApmResourceStatsQueryDefinitionWithDefaults() *Formula
return &this
}

// GetCrossOrgUuids returns the CrossOrgUuids field value if set, zero value otherwise.
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetCrossOrgUuids() []string {
if o == nil || o.CrossOrgUuids == nil {
var ret []string
return ret
}
return o.CrossOrgUuids
}

// GetCrossOrgUuidsOk returns a tuple with the CrossOrgUuids field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetCrossOrgUuidsOk() (*[]string, bool) {
if o == nil || o.CrossOrgUuids == nil {
return nil, false
}
return &o.CrossOrgUuids, true
}

// HasCrossOrgUuids returns a boolean if a field has been set.
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) HasCrossOrgUuids() bool {
return o != nil && o.CrossOrgUuids != nil
}

// SetCrossOrgUuids gets a reference to the given []string and assigns it to the CrossOrgUuids field.
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetCrossOrgUuids(v []string) {
o.CrossOrgUuids = v
}

// GetDataSource returns the DataSource field value.
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetDataSource() FormulaAndFunctionApmResourceStatsDataSource {
if o == nil {
Expand Down Expand Up @@ -320,6 +350,9 @@ func (o FormulaAndFunctionApmResourceStatsQueryDefinition) MarshalJSON() ([]byte
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.CrossOrgUuids != nil {
toSerialize["cross_org_uuids"] = o.CrossOrgUuids
}
toSerialize["data_source"] = o.DataSource
toSerialize["env"] = o.Env
if o.GroupBy != nil {
Expand Down Expand Up @@ -350,6 +383,7 @@ func (o FormulaAndFunctionApmResourceStatsQueryDefinition) MarshalJSON() ([]byte
// UnmarshalJSON deserializes the given payload.
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
DataSource *FormulaAndFunctionApmResourceStatsDataSource `json:"data_source"`
Env *string `json:"env"`
GroupBy []string `json:"group_by,omitempty"`
Expand Down Expand Up @@ -381,12 +415,13 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"data_source", "env", "group_by", "name", "operation_name", "primary_tag_name", "primary_tag_value", "resource_name", "service", "stat"})
datadog.DeleteKeys(additionalProperties, &[]string{"cross_org_uuids", "data_source", "env", "group_by", "name", "operation_name", "primary_tag_name", "primary_tag_value", "resource_name", "service", "stat"})
} else {
return err
}

hasInvalidField := false
o.CrossOrgUuids = all.CrossOrgUuids
if !all.DataSource.IsValid() {
hasInvalidField = true
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
type FormulaAndFunctionCloudCostQueryDefinition struct {
// Aggregator used for the request.
Aggregator *WidgetAggregator `json:"aggregator,omitempty"`
// The source organization UUID for cross organization queries. Feature in Private Beta.
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
// Data source for Cloud Cost queries.
DataSource FormulaAndFunctionCloudCostDataSource `json:"data_source"`
// Name of the query for use in formulas.
Expand Down Expand Up @@ -73,6 +75,34 @@ func (o *FormulaAndFunctionCloudCostQueryDefinition) SetAggregator(v WidgetAggre
o.Aggregator = &v
}

// GetCrossOrgUuids returns the CrossOrgUuids field value if set, zero value otherwise.
func (o *FormulaAndFunctionCloudCostQueryDefinition) GetCrossOrgUuids() []string {
if o == nil || o.CrossOrgUuids == nil {
var ret []string
return ret
}
return o.CrossOrgUuids
}

// GetCrossOrgUuidsOk returns a tuple with the CrossOrgUuids field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormulaAndFunctionCloudCostQueryDefinition) GetCrossOrgUuidsOk() (*[]string, bool) {
if o == nil || o.CrossOrgUuids == nil {
return nil, false
}
return &o.CrossOrgUuids, true
}

// HasCrossOrgUuids returns a boolean if a field has been set.
func (o *FormulaAndFunctionCloudCostQueryDefinition) HasCrossOrgUuids() bool {
return o != nil && o.CrossOrgUuids != nil
}

// SetCrossOrgUuids gets a reference to the given []string and assigns it to the CrossOrgUuids field.
func (o *FormulaAndFunctionCloudCostQueryDefinition) SetCrossOrgUuids(v []string) {
o.CrossOrgUuids = v
}

// GetDataSource returns the DataSource field value.
func (o *FormulaAndFunctionCloudCostQueryDefinition) GetDataSource() FormulaAndFunctionCloudCostDataSource {
if o == nil {
Expand Down Expand Up @@ -151,6 +181,9 @@ func (o FormulaAndFunctionCloudCostQueryDefinition) MarshalJSON() ([]byte, error
if o.Aggregator != nil {
toSerialize["aggregator"] = o.Aggregator
}
if o.CrossOrgUuids != nil {
toSerialize["cross_org_uuids"] = o.CrossOrgUuids
}
toSerialize["data_source"] = o.DataSource
toSerialize["name"] = o.Name
toSerialize["query"] = o.Query
Expand All @@ -164,10 +197,11 @@ func (o FormulaAndFunctionCloudCostQueryDefinition) MarshalJSON() ([]byte, error
// UnmarshalJSON deserializes the given payload.
func (o *FormulaAndFunctionCloudCostQueryDefinition) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Aggregator *WidgetAggregator `json:"aggregator,omitempty"`
DataSource *FormulaAndFunctionCloudCostDataSource `json:"data_source"`
Name *string `json:"name"`
Query *string `json:"query"`
Aggregator *WidgetAggregator `json:"aggregator,omitempty"`
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
DataSource *FormulaAndFunctionCloudCostDataSource `json:"data_source"`
Name *string `json:"name"`
Query *string `json:"query"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
Expand All @@ -183,7 +217,7 @@ func (o *FormulaAndFunctionCloudCostQueryDefinition) UnmarshalJSON(bytes []byte)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"aggregator", "data_source", "name", "query"})
datadog.DeleteKeys(additionalProperties, &[]string{"aggregator", "cross_org_uuids", "data_source", "name", "query"})
} else {
return err
}
Expand All @@ -194,6 +228,7 @@ func (o *FormulaAndFunctionCloudCostQueryDefinition) UnmarshalJSON(bytes []byte)
} else {
o.Aggregator = all.Aggregator
}
o.CrossOrgUuids = all.CrossOrgUuids
if !all.DataSource.IsValid() {
hasInvalidField = true
} else {
Expand Down
Loading
Loading