Skip to content

Commit 9205705

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit dd1589d4 of spec repo
1 parent 06fc41d commit 9205705

12 files changed

Lines changed: 956 additions & 10 deletions

.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-06-19 12:11:23.953587",
8-
"spec_repo_commit": "a171e0a8"
7+
"regenerated": "2025-06-20 20:02:45.447259",
8+
"spec_repo_commit": "dd1589d4"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-19 12:11:23.969957",
13-
"spec_repo_commit": "a171e0a8"
12+
"regenerated": "2025-06-20 20:02:45.463721",
13+
"spec_repo_commit": "dd1589d4"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10586,6 +10586,7 @@ components:
1058610586
- $ref: '#/components/schemas/CustomDestinationForwardDestinationHttp'
1058710587
- $ref: '#/components/schemas/CustomDestinationForwardDestinationSplunk'
1058810588
- $ref: '#/components/schemas/CustomDestinationForwardDestinationElasticsearch'
10589+
- $ref: '#/components/schemas/CustomDestinationForwardDestinationMicrosoftSentinel'
1058910590
CustomDestinationForwardDestinationElasticsearch:
1059010591
description: The Elasticsearch destination.
1059110592
properties:
@@ -10670,6 +10671,49 @@ components:
1067010671
type: string
1067110672
x-enum-varnames:
1067210673
- HTTP
10674+
CustomDestinationForwardDestinationMicrosoftSentinel:
10675+
description: The Microsoft Sentinel destination.
10676+
properties:
10677+
client_id:
10678+
description: Client ID from the Datadog Azure integration.
10679+
example: 9a2f4d83-2b5e-429e-a35a-2b3c4182db71
10680+
type: string
10681+
data_collection_endpoint:
10682+
description: Azure data collection endpoint.
10683+
example: https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com
10684+
type: string
10685+
data_collection_rule_id:
10686+
description: Azure data collection rule ID.
10687+
example: dcr-000a00a000a00000a000000aa000a0aa
10688+
type: string
10689+
stream_name:
10690+
description: Azure stream name.
10691+
example: Custom-MyTable
10692+
type: string
10693+
writeOnly: true
10694+
tenant_id:
10695+
description: Tenant ID from the Datadog Azure integration.
10696+
example: f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2
10697+
type: string
10698+
type:
10699+
$ref: '#/components/schemas/CustomDestinationForwardDestinationMicrosoftSentinelType'
10700+
required:
10701+
- type
10702+
- tenant_id
10703+
- client_id
10704+
- data_collection_endpoint
10705+
- data_collection_rule_id
10706+
- stream_name
10707+
type: object
10708+
CustomDestinationForwardDestinationMicrosoftSentinelType:
10709+
default: microsoft_sentinel
10710+
description: Type of the Microsoft Sentinel destination.
10711+
enum:
10712+
- microsoft_sentinel
10713+
example: microsoft_sentinel
10714+
type: string
10715+
x-enum-varnames:
10716+
- MICROSOFT_SENTINEL
1067310717
CustomDestinationForwardDestinationSplunk:
1067410718
description: The Splunk HTTP Event Collector (HEC) destination.
1067510719
properties:
@@ -10845,6 +10889,7 @@ components:
1084510889
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationHttp'
1084610890
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationSplunk'
1084710891
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationElasticsearch'
10892+
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationMicrosoftSentinel'
1084810893
CustomDestinationResponseForwardDestinationElasticsearch:
1084910894
description: The Elasticsearch destination.
1085010895
properties:
@@ -10929,6 +10974,49 @@ components:
1092910974
type: string
1093010975
x-enum-varnames:
1093110976
- HTTP
10977+
CustomDestinationResponseForwardDestinationMicrosoftSentinel:
10978+
description: The Microsoft Sentinel destination.
10979+
properties:
10980+
client_id:
10981+
description: Client ID from the Datadog Azure integration.
10982+
example: 9a2f4d83-2b5e-429e-a35a-2b3c4182db71
10983+
type: string
10984+
data_collection_endpoint:
10985+
description: Azure data collection endpoint.
10986+
example: https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com
10987+
type: string
10988+
data_collection_rule_id:
10989+
description: Azure data collection rule ID.
10990+
example: dcr-000a00a000a00000a000000aa000a0aa
10991+
type: string
10992+
stream_name:
10993+
description: Azure stream name.
10994+
example: Custom-MyTable
10995+
type: string
10996+
writeOnly: true
10997+
tenant_id:
10998+
description: Tenant ID from the Datadog Azure integration.
10999+
example: f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2
11000+
type: string
11001+
type:
11002+
$ref: '#/components/schemas/CustomDestinationResponseForwardDestinationMicrosoftSentinelType'
11003+
required:
11004+
- type
11005+
- tenant_id
11006+
- client_id
11007+
- data_collection_endpoint
11008+
- data_collection_rule_id
11009+
- stream_name
11010+
type: object
11011+
CustomDestinationResponseForwardDestinationMicrosoftSentinelType:
11012+
default: microsoft_sentinel
11013+
description: Type of the Microsoft Sentinel destination.
11014+
enum:
11015+
- microsoft_sentinel
11016+
example: microsoft_sentinel
11017+
type: string
11018+
x-enum-varnames:
11019+
- MICROSOFT_SENTINEL
1093211020
CustomDestinationResponseForwardDestinationSplunk:
1093311021
description: The Splunk HTTP Event Collector (HEC) destination.
1093411022
properties:

api/datadogV2/model_custom_destination_forward_destination.go

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import (
1010

1111
// CustomDestinationForwardDestination - A custom destination's location to forward logs.
1212
type CustomDestinationForwardDestination struct {
13-
CustomDestinationForwardDestinationHttp *CustomDestinationForwardDestinationHttp
14-
CustomDestinationForwardDestinationSplunk *CustomDestinationForwardDestinationSplunk
15-
CustomDestinationForwardDestinationElasticsearch *CustomDestinationForwardDestinationElasticsearch
13+
CustomDestinationForwardDestinationHttp *CustomDestinationForwardDestinationHttp
14+
CustomDestinationForwardDestinationSplunk *CustomDestinationForwardDestinationSplunk
15+
CustomDestinationForwardDestinationElasticsearch *CustomDestinationForwardDestinationElasticsearch
16+
CustomDestinationForwardDestinationMicrosoftSentinel *CustomDestinationForwardDestinationMicrosoftSentinel
1617

1718
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1819
UnparsedObject interface{}
@@ -33,6 +34,11 @@ func CustomDestinationForwardDestinationElasticsearchAsCustomDestinationForwardD
3334
return CustomDestinationForwardDestination{CustomDestinationForwardDestinationElasticsearch: v}
3435
}
3536

37+
// CustomDestinationForwardDestinationMicrosoftSentinelAsCustomDestinationForwardDestination is a convenience function that returns CustomDestinationForwardDestinationMicrosoftSentinel wrapped in CustomDestinationForwardDestination.
38+
func CustomDestinationForwardDestinationMicrosoftSentinelAsCustomDestinationForwardDestination(v *CustomDestinationForwardDestinationMicrosoftSentinel) CustomDestinationForwardDestination {
39+
return CustomDestinationForwardDestination{CustomDestinationForwardDestinationMicrosoftSentinel: v}
40+
}
41+
3642
// UnmarshalJSON turns data into one of the pointers in the struct.
3743
func (obj *CustomDestinationForwardDestination) UnmarshalJSON(data []byte) error {
3844
var err error
@@ -88,11 +94,29 @@ func (obj *CustomDestinationForwardDestination) UnmarshalJSON(data []byte) error
8894
obj.CustomDestinationForwardDestinationElasticsearch = nil
8995
}
9096

97+
// try to unmarshal data into CustomDestinationForwardDestinationMicrosoftSentinel
98+
err = datadog.Unmarshal(data, &obj.CustomDestinationForwardDestinationMicrosoftSentinel)
99+
if err == nil {
100+
if obj.CustomDestinationForwardDestinationMicrosoftSentinel != nil && obj.CustomDestinationForwardDestinationMicrosoftSentinel.UnparsedObject == nil {
101+
jsonCustomDestinationForwardDestinationMicrosoftSentinel, _ := datadog.Marshal(obj.CustomDestinationForwardDestinationMicrosoftSentinel)
102+
if string(jsonCustomDestinationForwardDestinationMicrosoftSentinel) == "{}" { // empty struct
103+
obj.CustomDestinationForwardDestinationMicrosoftSentinel = nil
104+
} else {
105+
match++
106+
}
107+
} else {
108+
obj.CustomDestinationForwardDestinationMicrosoftSentinel = nil
109+
}
110+
} else {
111+
obj.CustomDestinationForwardDestinationMicrosoftSentinel = nil
112+
}
113+
91114
if match != 1 { // more than 1 match
92115
// reset to nil
93116
obj.CustomDestinationForwardDestinationHttp = nil
94117
obj.CustomDestinationForwardDestinationSplunk = nil
95118
obj.CustomDestinationForwardDestinationElasticsearch = nil
119+
obj.CustomDestinationForwardDestinationMicrosoftSentinel = nil
96120
return datadog.Unmarshal(data, &obj.UnparsedObject)
97121
}
98122
return nil // exactly one match
@@ -112,6 +136,10 @@ func (obj CustomDestinationForwardDestination) MarshalJSON() ([]byte, error) {
112136
return datadog.Marshal(&obj.CustomDestinationForwardDestinationElasticsearch)
113137
}
114138

139+
if obj.CustomDestinationForwardDestinationMicrosoftSentinel != nil {
140+
return datadog.Marshal(&obj.CustomDestinationForwardDestinationMicrosoftSentinel)
141+
}
142+
115143
if obj.UnparsedObject != nil {
116144
return datadog.Marshal(obj.UnparsedObject)
117145
}
@@ -132,6 +160,10 @@ func (obj *CustomDestinationForwardDestination) GetActualInstance() interface{}
132160
return obj.CustomDestinationForwardDestinationElasticsearch
133161
}
134162

163+
if obj.CustomDestinationForwardDestinationMicrosoftSentinel != nil {
164+
return obj.CustomDestinationForwardDestinationMicrosoftSentinel
165+
}
166+
135167
// all schemas are nil
136168
return nil
137169
}

0 commit comments

Comments
 (0)