Skip to content

Commit 9766fdb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a18fdf5e of spec repo
1 parent 1a578a0 commit 9766fdb

10 files changed

Lines changed: 913 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-17 18:22:00.647030",
8-
"spec_repo_commit": "b1a1c000"
7+
"regenerated": "2025-06-18 09:01:47.825675",
8+
"spec_repo_commit": "a18fdf5e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-17 18:22:00.662709",
13-
"spec_repo_commit": "b1a1c000"
12+
"regenerated": "2025-06-18 09:01:47.841420",
13+
"spec_repo_commit": "a18fdf5e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10468,6 +10468,7 @@ components:
1046810468
- $ref: '#/components/schemas/CustomDestinationForwardDestinationHttp'
1046910469
- $ref: '#/components/schemas/CustomDestinationForwardDestinationSplunk'
1047010470
- $ref: '#/components/schemas/CustomDestinationForwardDestinationElasticsearch'
10471+
- $ref: '#/components/schemas/CustomDestinationForwardDestinationMicrosoftSentinel'
1047110472
CustomDestinationForwardDestinationElasticsearch:
1047210473
description: The Elasticsearch destination.
1047310474
properties:
@@ -10552,6 +10553,49 @@ components:
1055210553
type: string
1055310554
x-enum-varnames:
1055410555
- HTTP
10556+
CustomDestinationForwardDestinationMicrosoftSentinel:
10557+
description: The Microsoft Sentinel destination.
10558+
properties:
10559+
client_id:
10560+
description: Client ID from the Datadog Azure Integration.
10561+
example: 9a2f4d83-2b5e-429e-a35a-2b3c4182db71
10562+
type: string
10563+
data_collection_endpoint:
10564+
description: Azure Data Collection Endpoint.
10565+
example: https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com
10566+
type: string
10567+
data_collection_rule_id:
10568+
description: Azure Data Collection Rule ID.
10569+
example: dcr-000a00a000a00000a000000aa000a0aa
10570+
type: string
10571+
stream_name:
10572+
description: Azure stream name.
10573+
example: Custom-MyTable
10574+
type: string
10575+
writeOnly: true
10576+
tenant_id:
10577+
description: Tenant ID from the Datadog Azure Integration.
10578+
example: f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2
10579+
type: string
10580+
type:
10581+
$ref: '#/components/schemas/CustomDestinationForwardDestinationMicrosoftSentinelType'
10582+
required:
10583+
- type
10584+
- tenant_id
10585+
- client_id
10586+
- data_collection_endpoint
10587+
- data_collection_rule_id
10588+
- stream_name
10589+
type: object
10590+
CustomDestinationForwardDestinationMicrosoftSentinelType:
10591+
default: microsoft_sentinel
10592+
description: Type of the Microsoft Sentinel destination.
10593+
enum:
10594+
- microsoft_sentinel
10595+
example: microsoft_sentinel
10596+
type: string
10597+
x-enum-varnames:
10598+
- MICROSOFT_SENTINEL
1055510599
CustomDestinationForwardDestinationSplunk:
1055610600
description: The Splunk HTTP Event Collector (HEC) destination.
1055710601
properties:
@@ -10727,6 +10771,7 @@ components:
1072710771
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationHttp'
1072810772
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationSplunk'
1072910773
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationElasticsearch'
10774+
- $ref: '#/components/schemas/CustomDestinationResponseForwardDestinationMicrosoftSentinel'
1073010775
CustomDestinationResponseForwardDestinationElasticsearch:
1073110776
description: The Elasticsearch destination.
1073210777
properties:
@@ -10811,6 +10856,49 @@ components:
1081110856
type: string
1081210857
x-enum-varnames:
1081310858
- HTTP
10859+
CustomDestinationResponseForwardDestinationMicrosoftSentinel:
10860+
description: The Microsoft Sentinel destination.
10861+
properties:
10862+
client_id:
10863+
description: Client ID from the Datadog Azure Integration.
10864+
example: 9a2f4d83-2b5e-429e-a35a-2b3c4182db71
10865+
type: string
10866+
data_collection_endpoint:
10867+
description: Azure Data Collection Endpoint.
10868+
example: https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com
10869+
type: string
10870+
data_collection_rule_id:
10871+
description: Azure Data Collection Rule ID.
10872+
example: dcr-000a00a000a00000a000000aa000a0aa
10873+
type: string
10874+
stream_name:
10875+
description: Azure stream name.
10876+
example: Custom-MyTable
10877+
type: string
10878+
writeOnly: true
10879+
tenant_id:
10880+
description: Tenant ID from the Datadog Azure Integration.
10881+
example: f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2
10882+
type: string
10883+
type:
10884+
$ref: '#/components/schemas/CustomDestinationResponseForwardDestinationMicrosoftSentinelType'
10885+
required:
10886+
- type
10887+
- tenant_id
10888+
- client_id
10889+
- data_collection_endpoint
10890+
- data_collection_rule_id
10891+
- stream_name
10892+
type: object
10893+
CustomDestinationResponseForwardDestinationMicrosoftSentinelType:
10894+
default: microsoft_sentinel
10895+
description: Type of the Microsoft Sentinel destination.
10896+
enum:
10897+
- microsoft_sentinel
10898+
example: microsoft_sentinel
10899+
type: string
10900+
x-enum-varnames:
10901+
- MICROSOFT_SENTINEL
1081410902
CustomDestinationResponseForwardDestinationSplunk:
1081510903
description: The Splunk HTTP Event Collector (HEC) destination.
1081610904
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)