From 0958a78e06fb80f0a423ec5687be965b0f1d905c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 3 Apr 2026 12:55:17 +0000 Subject: [PATCH] Regenerate client from commit b9e35a4 of spec repo --- .generator/schemas/v2/openapi.yaml | 20 +++ ...null-sourcetype-returns-OK-response.frozen | 1 + ...-a-null-sourcetype-returns-OK-response.yml | 46 +++++++ ...th-a-sourcetype-returns-OK-response.frozen | 1 + ...-with-a-sourcetype-returns-OK-response.yml | 46 +++++++ ...ring-sourcetype-returns-OK-response.frozen | 1 + ...-string-sourcetype-returns-OK-response.yml | 46 +++++++ ...cetype-returns-Bad-Request-response.frozen | 1 + ...ourcetype-returns-Bad-Request-response.yml | 28 ++++ ...ut-a-sourcetype-returns-OK-response.frozen | 1 + ...thout-a-sourcetype-returns-OK-response.yml | 46 +++++++ ...sent-sourcetype-returns-OK-response.frozen | 1 + ...-absent-sourcetype-returns-OK-response.yml | 69 ++++++++++ ...null-sourcetype-returns-OK-response.frozen | 1 + ...he-null-sourcetype-returns-OK-response.yml | 68 ++++++++++ ...-the-sourcetype-returns-OK-response.frozen | 1 + ...ves-the-sourcetype-returns-OK-response.yml | 68 ++++++++++ ...null-sourcetype-returns-OK-response.frozen | 1 + ...-a-null-sourcetype-returns-OK-response.yml | 68 ++++++++++ ...th-a-sourcetype-returns-OK-response.frozen | 1 + ...-with-a-sourcetype-returns-OK-response.yml | 68 ++++++++++ .../CreateLogsCustomDestination_140188544.rb | 23 ++++ .../CreateLogsCustomDestination_1718754520.rb | 22 +++ .../CreateLogsCustomDestination_2534546779.rb | 23 ++++ .../CreateLogsCustomDestination_3120242932.rb | 23 ++++ .../UpdateLogsCustomDestination_2034509257.rb | 22 +++ .../UpdateLogsCustomDestination_213195663.rb | 23 ++++ .../UpdateLogsCustomDestination_2612469098.rb | 23 ++++ .../UpdateLogsCustomDestination_2701272624.rb | 18 +++ .../UpdateLogsCustomDestination_3227001838.rb | 22 +++ features/v2/given.json | 36 +++++ features/v2/logs_custom_destinations.feature | 127 ++++++++++++++++++ ..._destination_forward_destination_splunk.rb | 24 +++- ...ion_response_forward_destination_splunk.rb | 24 +++- 34 files changed, 991 insertions(+), 2 deletions(-) create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen create mode 100644 cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml create mode 100644 examples/v2/logs-custom-destinations/CreateLogsCustomDestination_140188544.rb create mode 100644 examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1718754520.rb create mode 100644 examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2534546779.rb create mode 100644 examples/v2/logs-custom-destinations/CreateLogsCustomDestination_3120242932.rb create mode 100644 examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2034509257.rb create mode 100644 examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_213195663.rb create mode 100644 examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2612469098.rb create mode 100644 examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2701272624.rb create mode 100644 examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_3227001838.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 45672b441bd8..b2d75ef44df0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17420,6 +17420,16 @@ components: Must have HTTPS scheme and forwarding back to Datadog is not allowed. example: https://example.com type: string + sourcetype: + description: |- + The Splunk sourcetype for the events sent to this Splunk destination. + + If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype` + field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string + value is used as the sourcetype. + example: my-source + nullable: true + type: string type: $ref: "#/components/schemas/CustomDestinationForwardDestinationSplunkType" required: @@ -17695,6 +17705,16 @@ components: Must have HTTPS scheme and forwarding back to Datadog is not allowed. example: https://example.com type: string + sourcetype: + description: |- + The Splunk sourcetype for the events sent to this Splunk destination. + + If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype` + field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string + value is used as the sourcetype. + example: my-source + nullable: true + type: string type: $ref: "#/components/schemas/CustomDestinationResponseForwardDestinationSplunkType" required: diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..47253f50af87 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:47.455Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..919ef621b442 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml @@ -0,0 +1,46 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:47 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":null,"type":"splunk_hec"},"name":"Nginx + logs","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d328c779-9b3b-41c7-a952-20a7446eb7d1","attributes":{"name":"Nginx + logs","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":null},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:47 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/d328c779-9b3b-41c7-a952-20a7446eb7d1 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..a1c69fc5518f --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:49.008Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..b883cff2b3ad --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml @@ -0,0 +1,46 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:49 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":"my-sourcetype","type":"splunk_hec"},"name":"Nginx + logs","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"429e154f-5cf5-41ce-ae15-4bc41563f46f","attributes":{"name":"Nginx + logs","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":"my-sourcetype"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:49 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/429e154f-5cf5-41ce-ae15-4bc41563f46f + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..da14a342ca60 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:50.210Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..2fe3a77f7fc7 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-empty-string-sourcetype-returns-OK-response.yml @@ -0,0 +1,46 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:50 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":"","type":"splunk_hec"},"name":"Nginx + logs","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"cb6c24f4-f420-42dd-bc86-ce51e03f7968","attributes":{"name":"Nginx + logs","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":""},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:50 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/cb6c24f4-f420-42dd-bc86-ce51e03f7968 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.frozen b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..fd52717727a4 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:51.766Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.yml b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..7ce4d9103ff8 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-with-an-invalid-sourcetype-returns-Bad-Request-response.yml @@ -0,0 +1,28 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:51 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":123,"type":"splunk_hec"},"name":"Nginx + logs","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid custom destination configuration","Sourcetype must + be a string or null"]} + + ' + headers: + Content-Type: + - application/json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..d66033d53046 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:52.120Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..d84fd24ebc75 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Create-a-Splunk-custom-destination-without-a-sourcetype-returns-OK-response.yml @@ -0,0 +1,46 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:52 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","type":"splunk_hec"},"name":"Nginx + logs","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"c475e180-758a-4503-a2ab-3ff1779c738a","attributes":{"name":"Nginx + logs","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:52 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/c475e180-758a-4503-a2ab-3ff1779c738a + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..81e7c7387581 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:55.981Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..7531265cbd7b --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-attributes-preserves-the-absent-sourcetype-returns-OK-response.yml @@ -0,0 +1,69 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:55 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","type":"splunk_hec"},"name":"Test-Update_a_Splunk_custom_destination_s_attributes_preserves_the_absent_sourcetype_returns_OK_response-1774455835","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"9ac57fd5-857f-4082-badc-463ecd1e990d","attributes":{"name":"Test-Update_a_Splunk_custom_destination_s_attributes_preserves_the_absent_sourcetype_returns_OK_response-1774455835","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:55 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Nginx logs (Updated)"},"id":"9ac57fd5-857f-4082-badc-463ecd1e990d","type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/9ac57fd5-857f-4082-badc-463ecd1e990d + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"9ac57fd5-857f-4082-badc-463ecd1e990d","attributes":{"name":"Nginx + logs (Updated)","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:55 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/9ac57fd5-857f-4082-badc-463ecd1e990d + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..1bb65534b86a --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:59.087Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..b718350dfa55 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-null-sourcetype-returns-OK-response.yml @@ -0,0 +1,68 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:59 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":null,"type":"splunk_hec"},"name":"Test-Update_a_Splunk_custom_destination_s_destination_preserves_the_null_sourcetype_returns_OK_response-1774455839","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"1cf9102b-169d-4a5c-a82b-aa5b3a12d6c5","attributes":{"name":"Test-Update_a_Splunk_custom_destination_s_destination_preserves_the_null_sourcetype_returns_OK_response-1774455839","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":null},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:59 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://updated-example.com","type":"splunk_hec"}},"id":"1cf9102b-169d-4a5c-a82b-aa5b3a12d6c5","type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/1cf9102b-169d-4a5c-a82b-aa5b3a12d6c5 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"1cf9102b-169d-4a5c-a82b-aa5b3a12d6c5","attributes":{"name":"Test-Update_a_Splunk_custom_destination_s_destination_preserves_the_null_sourcetype_returns_OK_response-1774455839","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://updated-example.com","type":"splunk_hec","sourcetype":null},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:59 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/1cf9102b-169d-4a5c-a82b-aa5b3a12d6c5 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..788849b08477 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:24:00.500Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..f2fe06b48018 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-s-destination-preserves-the-sourcetype-returns-OK-response.yml @@ -0,0 +1,68 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:24:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":"my-sourcetype","type":"splunk_hec"},"name":"Test-Update_a_Splunk_custom_destination_s_destination_preserves_the_sourcetype_returns_OK_response-1774455840","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fa416048-c8e1-4b5a-a3e1-b6c2538d5903","attributes":{"name":"Test-Update_a_Splunk_custom_destination_s_destination_preserves_the_sourcetype_returns_OK_response-1774455840","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":"my-sourcetype"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:24:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://updated-example.com","type":"splunk_hec"}},"id":"fa416048-c8e1-4b5a-a3e1-b6c2538d5903","type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/fa416048-c8e1-4b5a-a3e1-b6c2538d5903 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fa416048-c8e1-4b5a-a3e1-b6c2538d5903","attributes":{"name":"Test-Update_a_Splunk_custom_destination_s_destination_preserves_the_sourcetype_returns_OK_response-1774455840","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://updated-example.com","type":"splunk_hec","sourcetype":"my-sourcetype"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:24:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/fa416048-c8e1-4b5a-a3e1-b6c2538d5903 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..43ba7b8a91f3 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:53.183Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..86b38d59206e --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-null-sourcetype-returns-OK-response.yml @@ -0,0 +1,68 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:53 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":"my-sourcetype","type":"splunk_hec"},"name":"Test-Update_a_Splunk_custom_destination_with_a_null_sourcetype_returns_OK_response-1774455833","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"f718e9ba-6676-46f9-ae62-1e63b0348dbc","attributes":{"name":"Test-Update_a_Splunk_custom_destination_with_a_null_sourcetype_returns_OK_response-1774455833","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":"my-sourcetype"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:53 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":null,"type":"splunk_hec"}},"id":"f718e9ba-6676-46f9-ae62-1e63b0348dbc","type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/f718e9ba-6676-46f9-ae62-1e63b0348dbc + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"f718e9ba-6676-46f9-ae62-1e63b0348dbc","attributes":{"name":"Test-Update_a_Splunk_custom_destination_with_a_null_sourcetype_returns_OK_response-1774455833","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":null},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:53 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/f718e9ba-6676-46f9-ae62-1e63b0348dbc + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen new file mode 100644 index 000000000000..a2f5a72828ed --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T16:23:54.709Z \ No newline at end of file diff --git a/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml new file mode 100644 index 000000000000..ffe9d4cc5e53 --- /dev/null +++ b/cassettes/features/v2/logs_custom_destinations/Update-a-Splunk-custom-destination-with-a-sourcetype-returns-OK-response.yml @@ -0,0 +1,68 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 16:23:54 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":false,"forward_tags":false,"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","type":"splunk_hec"},"name":"Test-Update_a_Splunk_custom_destination_with_a_sourcetype_returns_OK_response-1774455834","query":"source:nginx"},"type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"12f30686-f946-4eb1-8988-643d55ad0cb9","attributes":{"name":"Test-Update_a_Splunk_custom_destination_with_a_sourcetype_returns_OK_response-1774455834","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:54 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"forwarder_destination":{"access_token":"my-access-token","endpoint":"https://example.com","sourcetype":"new-sourcetype","type":"splunk_hec"}},"id":"12f30686-f946-4eb1-8988-643d55ad0cb9","type":"custom_destination"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/12f30686-f946-4eb1-8988-643d55ad0cb9 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"12f30686-f946-4eb1-8988-643d55ad0cb9","attributes":{"name":"Test-Update_a_Splunk_custom_destination_with_a_sourcetype_returns_OK_response-1774455834","query":"source:nginx","enabled":false,"forwarder_destination":{"endpoint":"https://example.com","type":"splunk_hec","sourcetype":"new-sourcetype"},"forward_tags_restriction_list_type":"ALLOW_LIST","forward_tags_restriction_list":[],"forward_tags":false},"type":"custom_destination"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 16:23:54 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/logs/config/custom-destinations/12f30686-f946-4eb1-8988-643d55ad0cb9 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_140188544.rb b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_140188544.rb new file mode 100644 index 000000000000..e99b7fa20244 --- /dev/null +++ b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_140188544.rb @@ -0,0 +1,23 @@ +# Create a Splunk custom destination with a sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({ + enabled: false, + forward_tags: false, + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + access_token: "my-access-token", + endpoint: "https://example.com", + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + sourcetype: "my-sourcetype", + }), + name: "Nginx logs", + query: "source:nginx", + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + }), +}) +p api_instance.create_logs_custom_destination(body) diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1718754520.rb b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1718754520.rb new file mode 100644 index 000000000000..5d82302ab6c5 --- /dev/null +++ b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1718754520.rb @@ -0,0 +1,22 @@ +# Create a Splunk custom destination without a sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({ + enabled: false, + forward_tags: false, + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + access_token: "my-access-token", + endpoint: "https://example.com", + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + }), + name: "Nginx logs", + query: "source:nginx", + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + }), +}) +p api_instance.create_logs_custom_destination(body) diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2534546779.rb b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2534546779.rb new file mode 100644 index 000000000000..7cc9e2b3873b --- /dev/null +++ b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2534546779.rb @@ -0,0 +1,23 @@ +# Create a Splunk custom destination with a null sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({ + enabled: false, + forward_tags: false, + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + access_token: "my-access-token", + endpoint: "https://example.com", + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + sourcetype: nil, + }), + name: "Nginx logs", + query: "source:nginx", + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + }), +}) +p api_instance.create_logs_custom_destination(body) diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_3120242932.rb b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_3120242932.rb new file mode 100644 index 000000000000..19ea5d2d19c2 --- /dev/null +++ b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_3120242932.rb @@ -0,0 +1,23 @@ +# Create a Splunk custom destination with an empty string sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({ + enabled: false, + forward_tags: false, + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + access_token: "my-access-token", + endpoint: "https://example.com", + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + sourcetype: "", + }), + name: "Nginx logs", + query: "source:nginx", + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + }), +}) +p api_instance.create_logs_custom_destination(body) diff --git a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2034509257.rb b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2034509257.rb new file mode 100644 index 000000000000..c67a5652895c --- /dev/null +++ b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2034509257.rb @@ -0,0 +1,22 @@ +# Update a Splunk custom destination's destination preserves the null sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +# there is a valid "custom_destination_splunk_with_null_sourcetype" in the system +CUSTOM_DESTINATION_SPLUNK_WITH_NULL_SOURCETYPE_DATA_ID = ENV["CUSTOM_DESTINATION_SPLUNK_WITH_NULL_SOURCETYPE_DATA_ID"] + +body = DatadogAPIClient::V2::CustomDestinationUpdateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes.new({ + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + endpoint: "https://updated-example.com", + access_token: "my-access-token", + }), + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + id: CUSTOM_DESTINATION_SPLUNK_WITH_NULL_SOURCETYPE_DATA_ID, + }), +}) +p api_instance.update_logs_custom_destination(CUSTOM_DESTINATION_SPLUNK_WITH_NULL_SOURCETYPE_DATA_ID, body) diff --git a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_213195663.rb b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_213195663.rb new file mode 100644 index 000000000000..f3083f8d39d9 --- /dev/null +++ b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_213195663.rb @@ -0,0 +1,23 @@ +# Update a Splunk custom destination with a sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +# there is a valid "custom_destination_splunk" in the system +CUSTOM_DESTINATION_SPLUNK_DATA_ID = ENV["CUSTOM_DESTINATION_SPLUNK_DATA_ID"] + +body = DatadogAPIClient::V2::CustomDestinationUpdateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes.new({ + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + endpoint: "https://example.com", + access_token: "my-access-token", + sourcetype: "new-sourcetype", + }), + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + id: CUSTOM_DESTINATION_SPLUNK_DATA_ID, + }), +}) +p api_instance.update_logs_custom_destination(CUSTOM_DESTINATION_SPLUNK_DATA_ID, body) diff --git a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2612469098.rb b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2612469098.rb new file mode 100644 index 000000000000..ab7ec0c1f543 --- /dev/null +++ b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2612469098.rb @@ -0,0 +1,23 @@ +# Update a Splunk custom destination with a null sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +# there is a valid "custom_destination_splunk_with_sourcetype" in the system +CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID = ENV["CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID"] + +body = DatadogAPIClient::V2::CustomDestinationUpdateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes.new({ + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + endpoint: "https://example.com", + access_token: "my-access-token", + sourcetype: nil, + }), + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + id: CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID, + }), +}) +p api_instance.update_logs_custom_destination(CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID, body) diff --git a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2701272624.rb b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2701272624.rb new file mode 100644 index 000000000000..fce9aea81f4b --- /dev/null +++ b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_2701272624.rb @@ -0,0 +1,18 @@ +# Update a Splunk custom destination's attributes preserves the absent sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +# there is a valid "custom_destination_splunk" in the system +CUSTOM_DESTINATION_SPLUNK_DATA_ID = ENV["CUSTOM_DESTINATION_SPLUNK_DATA_ID"] + +body = DatadogAPIClient::V2::CustomDestinationUpdateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes.new({ + name: "Nginx logs (Updated)", + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + id: CUSTOM_DESTINATION_SPLUNK_DATA_ID, + }), +}) +p api_instance.update_logs_custom_destination(CUSTOM_DESTINATION_SPLUNK_DATA_ID, body) diff --git a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_3227001838.rb b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_3227001838.rb new file mode 100644 index 000000000000..e55e1ebbe207 --- /dev/null +++ b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination_3227001838.rb @@ -0,0 +1,22 @@ +# Update a Splunk custom destination's destination preserves the sourcetype returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new + +# there is a valid "custom_destination_splunk_with_sourcetype" in the system +CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID = ENV["CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID"] + +body = DatadogAPIClient::V2::CustomDestinationUpdateRequest.new({ + data: DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition.new({ + attributes: DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes.new({ + forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({ + type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC, + endpoint: "https://updated-example.com", + access_token: "my-access-token", + }), + }), + type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION, + id: CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID, + }), +}) +p api_instance.update_logs_custom_destination(CUSTOM_DESTINATION_SPLUNK_WITH_SOURCETYPE_DATA_ID, body) diff --git a/features/v2/given.json b/features/v2/given.json index 8413be265af8..11013dcb01ed 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -737,6 +737,42 @@ "tag": "Logs Custom Destinations", "operationId": "CreateLogsCustomDestination" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"query\": \"source:nginx\",\n \"enabled\": false,\n \"forwarder_destination\": {\n \"type\": \"splunk_hec\",\n \"endpoint\": \"https://example.com\",\n \"access_token\": \"my-access-token\"\n },\n \"forward_tags\": false\n },\n \"type\": \"custom_destination\"\n }\n}" + } + ], + "step": "there is a valid \"custom_destination_splunk\" in the system", + "key": "custom_destination_splunk", + "tag": "Logs Custom Destinations", + "operationId": "CreateLogsCustomDestination" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"query\": \"source:nginx\",\n \"enabled\": false,\n \"forwarder_destination\": {\n \"type\": \"splunk_hec\",\n \"endpoint\": \"https://example.com\",\n \"access_token\": \"my-access-token\",\n \"sourcetype\": null\n },\n \"forward_tags\": false\n },\n \"type\": \"custom_destination\"\n }\n}" + } + ], + "step": "there is a valid \"custom_destination_splunk_with_null_sourcetype\" in the system", + "key": "custom_destination_splunk_with_null_sourcetype", + "tag": "Logs Custom Destinations", + "operationId": "CreateLogsCustomDestination" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"query\": \"source:nginx\",\n \"enabled\": false,\n \"forwarder_destination\": {\n \"type\": \"splunk_hec\",\n \"endpoint\": \"https://example.com\",\n \"access_token\": \"my-access-token\",\n \"sourcetype\": \"my-sourcetype\"\n },\n \"forward_tags\": false\n },\n \"type\": \"custom_destination\"\n }\n}" + } + ], + "step": "there is a valid \"custom_destination_splunk_with_sourcetype\" in the system", + "key": "custom_destination_splunk_with_sourcetype", + "tag": "Logs Custom Destinations", + "operationId": "CreateLogsCustomDestination" + }, { "parameters": [ { diff --git a/features/v2/logs_custom_destinations.feature b/features/v2/logs_custom_destinations.feature index 44b85404852f..e9aa22909977 100644 --- a/features/v2/logs_custom_destinations.feature +++ b/features/v2/logs_custom_destinations.feature @@ -93,6 +93,7 @@ Feature: Logs Custom Destinations And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination" does not have field "sourcetype" And the response "data.attributes.enabled" is false And the response "data.attributes.forward_tags" is false And the response "data.attributes.forward_tags_restriction_list" has length 2 @@ -100,6 +101,58 @@ Feature: Logs Custom Destinations And the response "data.attributes.forward_tags_restriction_list" array contains value "host" And the response "data.attributes.forward_tags_restriction_list_type" is equal to "ALLOW_LIST" + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Create a Splunk custom destination with a null sourcetype returns "OK" response + Given new "CreateLogsCustomDestination" request + And body with value {"data": {"attributes": {"enabled": false, "forward_tags": false, "forwarder_destination": {"access_token": "my-access-token", "endpoint": "https://example.com", "type": "splunk_hec", "sourcetype": null}, "name": "Nginx logs", "query": "source:nginx"}, "type": "custom_destination"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data" has field "id" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to null + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Create a Splunk custom destination with a sourcetype returns "OK" response + Given new "CreateLogsCustomDestination" request + And body with value {"data": {"attributes": {"enabled": false, "forward_tags": false, "forwarder_destination": {"access_token": "my-access-token", "endpoint": "https://example.com", "type": "splunk_hec", "sourcetype": "my-sourcetype"}, "name": "Nginx logs", "query": "source:nginx"}, "type": "custom_destination"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data" has field "id" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to "my-sourcetype" + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Create a Splunk custom destination with an empty string sourcetype returns "OK" response + Given new "CreateLogsCustomDestination" request + And body with value {"data": {"attributes": {"enabled": false, "forward_tags": false, "forwarder_destination": {"access_token": "my-access-token", "endpoint": "https://example.com", "type": "splunk_hec", "sourcetype": ""}, "name": "Nginx logs", "query": "source:nginx"}, "type": "custom_destination"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data" has field "id" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to "" + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Create a Splunk custom destination without a sourcetype returns "OK" response + Given new "CreateLogsCustomDestination" request + And body with value {"data": {"attributes": {"enabled": false, "forward_tags": false, "forwarder_destination": {"access_token": "my-access-token", "endpoint": "https://example.com", "type": "splunk_hec"}, "name": "Nginx logs", "query": "source:nginx"}, "type": "custom_destination"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data" has field "id" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination" does not have field "sourcetype" + @skip-java @skip-python @skip-rust @skip-typescript @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create a custom destination returns "Bad Request" response Given new "CreateLogsCustomDestination" request @@ -219,6 +272,80 @@ Feature: Logs Custom Destinations And the response "data" has item with field "attributes.forward_tags" with value false And the response "data" has item with field "attributes.forward_tags_restriction_list_type" with value "{{ custom_destination.data.attributes.forward_tags_restriction_list_type }}" + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Update a Splunk custom destination with a null sourcetype returns "OK" response + Given new "UpdateLogsCustomDestination" request + And there is a valid "custom_destination_splunk_with_sourcetype" in the system + And request contains "custom_destination_id" parameter from "custom_destination_splunk_with_sourcetype.data.id" + And body with value {"data": {"attributes": {"forwarder_destination": {"type": "splunk_hec", "endpoint": "https://example.com", "access_token": "my-access-token", "sourcetype": null}}, "type": "custom_destination", "id": "{{ custom_destination_splunk_with_sourcetype.data.id }}"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data.id" is equal to "{{ custom_destination_splunk_with_sourcetype.data.id }}" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to null + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Update a Splunk custom destination with a sourcetype returns "OK" response + Given new "UpdateLogsCustomDestination" request + And there is a valid "custom_destination_splunk" in the system + And request contains "custom_destination_id" parameter from "custom_destination_splunk.data.id" + And body with value {"data": {"attributes": {"forwarder_destination": {"type": "splunk_hec", "endpoint": "https://example.com", "access_token": "my-access-token", "sourcetype": "new-sourcetype"}}, "type": "custom_destination", "id": "{{ custom_destination_splunk.data.id }}"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data.id" is equal to "{{ custom_destination_splunk.data.id }}" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to "new-sourcetype" + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Update a Splunk custom destination's attributes preserves the absent sourcetype returns "OK" response + Given new "UpdateLogsCustomDestination" request + And there is a valid "custom_destination_splunk" in the system + And request contains "custom_destination_id" parameter from "custom_destination_splunk.data.id" + And body with value {"data": {"attributes": {"name": "Nginx logs (Updated)"}, "type": "custom_destination", "id": "{{ custom_destination_splunk.data.id }}"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data.id" is equal to "{{ custom_destination_splunk.data.id }}" + And the response "data.attributes.name" is equal to "Nginx logs (Updated)" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination" does not have field "sourcetype" + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Update a Splunk custom destination's destination preserves the null sourcetype returns "OK" response + Given new "UpdateLogsCustomDestination" request + And there is a valid "custom_destination_splunk_with_null_sourcetype" in the system + And request contains "custom_destination_id" parameter from "custom_destination_splunk_with_null_sourcetype.data.id" + And body with value {"data": {"attributes": {"forwarder_destination": {"type": "splunk_hec", "endpoint": "https://updated-example.com", "access_token": "my-access-token"}}, "type": "custom_destination", "id": "{{ custom_destination_splunk_with_null_sourcetype.data.id }}"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data.id" is equal to "{{ custom_destination_splunk_with_null_sourcetype.data.id }}" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://updated-example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to null + + @team:DataDog/logs-backend @team:DataDog/logs-forwarding + Scenario: Update a Splunk custom destination's destination preserves the sourcetype returns "OK" response + Given new "UpdateLogsCustomDestination" request + And there is a valid "custom_destination_splunk_with_sourcetype" in the system + And request contains "custom_destination_id" parameter from "custom_destination_splunk_with_sourcetype.data.id" + And body with value {"data": {"attributes": {"forwarder_destination": {"type": "splunk_hec", "endpoint": "https://updated-example.com", "access_token": "my-access-token"}}, "type": "custom_destination", "id": "{{ custom_destination_splunk_with_sourcetype.data.id }}"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "custom_destination" + And the response "data.id" is equal to "{{ custom_destination_splunk_with_sourcetype.data.id }}" + And the response "data.attributes.forwarder_destination.type" is equal to "splunk_hec" + And the response "data.attributes.forwarder_destination.endpoint" is equal to "https://updated-example.com" + And the response "data.attributes.forwarder_destination" does not have field "access_token" + And the response "data.attributes.forwarder_destination.sourcetype" is equal to "my-sourcetype" + @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Update a custom destination returns "Bad Request" response Given new "UpdateLogsCustomDestination" request diff --git a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb index 2ded03f8ed16..3b62893c3623 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb @@ -28,6 +28,13 @@ class CustomDestinationForwardDestinationSplunk # Must have HTTPS scheme and forwarding back to Datadog is not allowed. attr_reader :endpoint + # The Splunk sourcetype for the events sent to this Splunk destination. + # + # If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype` + # field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string + # value is used as the sourcetype. + attr_accessor :sourcetype + # Type of the Splunk HTTP Event Collector (HEC) destination. attr_reader :type @@ -39,6 +46,7 @@ def self.attribute_map { :'access_token' => :'access_token', :'endpoint' => :'endpoint', + :'sourcetype' => :'sourcetype', :'type' => :'type' } end @@ -49,10 +57,19 @@ def self.openapi_types { :'access_token' => :'String', :'endpoint' => :'String', + :'sourcetype' => :'String', :'type' => :'CustomDestinationForwardDestinationSplunkType' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'sourcetype', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private @@ -79,6 +96,10 @@ def initialize(attributes = {}) self.endpoint = attributes[:'endpoint'] end + if attributes.key?(:'sourcetype') + self.sourcetype = attributes[:'sourcetype'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -152,6 +173,7 @@ def ==(o) self.class == o.class && access_token == o.access_token && endpoint == o.endpoint && + sourcetype == o.sourcetype && type == o.type && additional_properties == o.additional_properties end @@ -160,7 +182,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [access_token, endpoint, type, additional_properties].hash + [access_token, endpoint, sourcetype, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb index 47c7c6e553da..2aabaa0478c7 100644 --- a/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +++ b/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb @@ -25,6 +25,13 @@ class CustomDestinationResponseForwardDestinationSplunk # Must have HTTPS scheme and forwarding back to Datadog is not allowed. attr_reader :endpoint + # The Splunk sourcetype for the events sent to this Splunk destination. + # + # If absent, the default sourcetype `_json` is used. If set to null, the `sourcetype` + # field is omitted from the Splunk HEC payload entirely. Otherwise, the provided string + # value is used as the sourcetype. + attr_accessor :sourcetype + # Type of the Splunk HTTP Event Collector (HEC) destination. attr_reader :type @@ -35,6 +42,7 @@ class CustomDestinationResponseForwardDestinationSplunk def self.attribute_map { :'endpoint' => :'endpoint', + :'sourcetype' => :'sourcetype', :'type' => :'type' } end @@ -44,10 +52,19 @@ def self.attribute_map def self.openapi_types { :'endpoint' => :'String', + :'sourcetype' => :'String', :'type' => :'CustomDestinationResponseForwardDestinationSplunkType' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'sourcetype', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private @@ -70,6 +87,10 @@ def initialize(attributes = {}) self.endpoint = attributes[:'endpoint'] end + if attributes.key?(:'sourcetype') + self.sourcetype = attributes[:'sourcetype'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -131,6 +152,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && endpoint == o.endpoint && + sourcetype == o.sourcetype && type == o.type && additional_properties == o.additional_properties end @@ -139,7 +161,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [endpoint, type, additional_properties].hash + [endpoint, sourcetype, type, additional_properties].hash end end end