From 61024431ab7bb2cbe81e6f4e6f10a929741c7fb4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 1 May 2026 14:47:39 +0000 Subject: [PATCH] Regenerate client from commit 0e6d1c2 of spec repo --- .generator/schemas/v2/openapi.yaml | 17 ++++++++++++ .../v2/logs-archives/CreateLogsArchive.rb | 1 + .../v2/logs-archives/UpdateLogsArchive.rb | 1 + features/v2/logs_archives.feature | 10 +++---- lib/datadog_api_client/inflector.rb | 1 + .../v2/models/logs_archive_attributes.rb | 12 ++++++++- ...s_archive_attributes_compression_method.rb | 27 +++++++++++++++++++ .../logs_archive_create_request_attributes.rb | 12 ++++++++- 8 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/logs_archive_attributes_compression_method.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 382c9233aa58..e1e1f1984db5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -41379,6 +41379,8 @@ components: LogsArchiveAttributes: description: The attributes associated with the archive. properties: + compression_method: + $ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod" destination: $ref: "#/components/schemas/LogsArchiveDestination" include_tags: @@ -41416,6 +41418,17 @@ components: - query - destination type: object + LogsArchiveAttributesCompressionMethod: + default: GZIP + description: The type of compression for the archive. + enum: + - GZIP + - ZSTD + example: GZIP + type: string + x-enum-varnames: + - GZIP + - ZSTD LogsArchiveCreateRequest: description: The logs archive. properties: @@ -41425,6 +41438,8 @@ components: LogsArchiveCreateRequestAttributes: description: The attributes associated with the archive. properties: + compression_method: + $ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod" destination: $ref: "#/components/schemas/LogsArchiveCreateRequestDestination" include_tags: @@ -106036,6 +106051,7 @@ paths: value: data: attributes: + compression_method: GZIP destination: container: container-name storage_account: account-name @@ -106175,6 +106191,7 @@ paths: value: data: attributes: + compression_method: GZIP destination: container: container-name storage_account: account-name diff --git a/examples/v2/logs-archives/CreateLogsArchive.rb b/examples/v2/logs-archives/CreateLogsArchive.rb index f864b7613e5e..91dce9063744 100644 --- a/examples/v2/logs-archives/CreateLogsArchive.rb +++ b/examples/v2/logs-archives/CreateLogsArchive.rb @@ -6,6 +6,7 @@ body = DatadogAPIClient::V2::LogsArchiveCreateRequest.new({ data: DatadogAPIClient::V2::LogsArchiveCreateRequestDefinition.new({ attributes: DatadogAPIClient::V2::LogsArchiveCreateRequestAttributes.new({ + compression_method: DatadogAPIClient::V2::LogsArchiveAttributesCompressionMethod::GZIP, destination: DatadogAPIClient::V2::LogsArchiveDestinationAzure.new({ container: "container-name", integration: DatadogAPIClient::V2::LogsArchiveIntegrationAzure.new({ diff --git a/examples/v2/logs-archives/UpdateLogsArchive.rb b/examples/v2/logs-archives/UpdateLogsArchive.rb index 9ed5b18c72da..e4b68a52615b 100644 --- a/examples/v2/logs-archives/UpdateLogsArchive.rb +++ b/examples/v2/logs-archives/UpdateLogsArchive.rb @@ -6,6 +6,7 @@ body = DatadogAPIClient::V2::LogsArchiveCreateRequest.new({ data: DatadogAPIClient::V2::LogsArchiveCreateRequestDefinition.new({ attributes: DatadogAPIClient::V2::LogsArchiveCreateRequestAttributes.new({ + compression_method: DatadogAPIClient::V2::LogsArchiveAttributesCompressionMethod::GZIP, destination: DatadogAPIClient::V2::LogsArchiveDestinationAzure.new({ container: "container-name", integration: DatadogAPIClient::V2::LogsArchiveIntegrationAzure.new({ diff --git a/features/v2/logs_archives.feature b/features/v2/logs_archives.feature index a6de8c72d4bd..4b58769df54e 100644 --- a/features/v2/logs_archives.feature +++ b/features/v2/logs_archives.feature @@ -12,14 +12,14 @@ Feature: Logs Archives @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "Bad Request" response Given new "CreateLogsArchive" request - And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "OK" response Given new "CreateLogsArchive" request - And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 200 OK @@ -150,7 +150,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Bad Request" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 400 Bad Request @@ -158,7 +158,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Not found" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 404 Not found @@ -166,7 +166,7 @@ Feature: Logs Archives Scenario: Update an archive returns "OK" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 200 OK diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4ae62f21a88a..c0e09cd2f774 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3625,6 +3625,7 @@ def overrides "v2.logs_aggregation_function" => "LogsAggregationFunction", "v2.logs_archive" => "LogsArchive", "v2.logs_archive_attributes" => "LogsArchiveAttributes", + "v2.logs_archive_attributes_compression_method" => "LogsArchiveAttributesCompressionMethod", "v2.logs_archive_create_request" => "LogsArchiveCreateRequest", "v2.logs_archive_create_request_attributes" => "LogsArchiveCreateRequestAttributes", "v2.logs_archive_create_request_definition" => "LogsArchiveCreateRequestDefinition", diff --git a/lib/datadog_api_client/v2/models/logs_archive_attributes.rb b/lib/datadog_api_client/v2/models/logs_archive_attributes.rb index adc373a51c04..fae8383c62db 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_attributes.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class LogsArchiveAttributes include BaseGenericModel + # The type of compression for the archive. + attr_accessor :compression_method + # An archive's destination. attr_accessor :destination @@ -49,6 +52,7 @@ class LogsArchiveAttributes # @!visibility private def self.attribute_map { + :'compression_method' => :'compression_method', :'destination' => :'destination', :'include_tags' => :'include_tags', :'name' => :'name', @@ -63,6 +67,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'compression_method' => :'LogsArchiveAttributesCompressionMethod', :'destination' => :'LogsArchiveDestination', :'include_tags' => :'Boolean', :'name' => :'String', @@ -100,6 +105,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'compression_method') + self.compression_method = attributes[:'compression_method'] + end + if attributes.key?(:'destination') self.destination = attributes[:'destination'] end @@ -186,6 +195,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + compression_method == o.compression_method && destination == o.destination && include_tags == o.include_tags && name == o.name && @@ -200,7 +210,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [destination, include_tags, name, query, rehydration_max_scan_size_in_gb, rehydration_tags, state, additional_properties].hash + [compression_method, destination, include_tags, name, query, rehydration_max_scan_size_in_gb, rehydration_tags, state, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/logs_archive_attributes_compression_method.rb b/lib/datadog_api_client/v2/models/logs_archive_attributes_compression_method.rb new file mode 100644 index 000000000000..e8a478bab769 --- /dev/null +++ b/lib/datadog_api_client/v2/models/logs_archive_attributes_compression_method.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of compression for the archive. + class LogsArchiveAttributesCompressionMethod + include BaseEnumModel + + GZIP = "GZIP".freeze + ZSTD = "ZSTD".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb b/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb index d4d8e0341c5e..4cbd5ae4ddaa 100644 --- a/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class LogsArchiveCreateRequestAttributes include BaseGenericModel + # The type of compression for the archive. + attr_accessor :compression_method + # An archive's destination. attr_reader :destination @@ -46,6 +49,7 @@ class LogsArchiveCreateRequestAttributes # @!visibility private def self.attribute_map { + :'compression_method' => :'compression_method', :'destination' => :'destination', :'include_tags' => :'include_tags', :'name' => :'name', @@ -59,6 +63,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'compression_method' => :'LogsArchiveAttributesCompressionMethod', :'destination' => :'LogsArchiveCreateRequestDestination', :'include_tags' => :'Boolean', :'name' => :'String', @@ -94,6 +99,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'compression_method') + self.compression_method = attributes[:'compression_method'] + end + if attributes.key?(:'destination') self.destination = attributes[:'destination'] end @@ -187,6 +196,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + compression_method == o.compression_method && destination == o.destination && include_tags == o.include_tags && name == o.name && @@ -200,7 +210,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [destination, include_tags, name, query, rehydration_max_scan_size_in_gb, rehydration_tags, additional_properties].hash + [compression_method, destination, include_tags, name, query, rehydration_max_scan_size_in_gb, rehydration_tags, additional_properties].hash end end end