From 551a08396378c21e42b1490594b2304e7964b570 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 17 Feb 2026 12:38:43 +0000 Subject: [PATCH] Regenerate client from commit e1b11a7 of spec repo --- .generator/schemas/v2/openapi.yaml | 69 +++++++++ lib/datadog_api_client/inflector.rb | 3 + .../v2/models/rum_cross_product_sampling.rb | 140 +++++++++++++++++ .../rum_cross_product_sampling_create.rb | 141 ++++++++++++++++++ .../rum_cross_product_sampling_update.rb | 137 +++++++++++++++++ .../models/rum_retention_filter_attributes.rb | 14 +- .../rum_retention_filter_create_attributes.rb | 12 +- .../rum_retention_filter_update_attributes.rb | 12 +- 8 files changed, 525 insertions(+), 3 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/rum_cross_product_sampling.rb create mode 100644 lib/datadog_api_client/v2/models/rum_cross_product_sampling_create.rb create mode 100644 lib/datadog_api_client/v2/models/rum_cross_product_sampling_update.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 093a28a0b5be..fb10f21526ee 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50581,6 +50581,69 @@ components: type: string x-enum-varnames: - RULESET + RumCrossProductSampling: + description: 'Configuration for additional APM trace data retention for sessions + that match this retention filter. + + When a session matches the filter and is retained (based on `sample_rate`), + you can configure + + the percentage of retained sessions with ingested traces whose traces are + indexed.' + properties: + trace_enabled: + description: Indicates whether trace cross-product sampling is enabled. + If `false`, no traces are indexed regardless of `trace_sample_rate`. + example: true + type: boolean + trace_sample_rate: + description: 'The percentage (0-100) of retained sessions with ingested + traces whose traces are indexed. + + For example, 25.0 means 25% of retained sessions with ingested traces + have their traces indexed.' + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object + RumCrossProductSamplingCreate: + description: Configuration for cross-product sampling when creating a retention + filter. + properties: + trace_enabled: + description: Indicates whether trace cross-product sampling is enabled. + example: true + type: boolean + trace_sample_rate: + description: The percentage (0-100) of retained sessions with ingested traces + whose traces are indexed. + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + required: + - trace_sample_rate + type: object + RumCrossProductSamplingUpdate: + description: Configuration for cross-product sampling when updating a retention + filter. All fields are optional for partial updates. + properties: + trace_enabled: + description: Indicates whether trace cross-product sampling is enabled. + example: true + type: boolean + trace_sample_rate: + description: The percentage (0-100) of retained sessions with ingested traces + whose traces are indexed. + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object RumMetricCompute: description: The compute rule to compute the rum-based metric. properties: @@ -50868,6 +50931,8 @@ components: RumRetentionFilterAttributes: description: The object describing attributes of a RUM retention filter. properties: + cross_product_sampling: + $ref: '#/components/schemas/RumCrossProductSampling' enabled: $ref: '#/components/schemas/RumRetentionFilterEnabled' event_type: @@ -50882,6 +50947,8 @@ components: RumRetentionFilterCreateAttributes: description: The object describing attributes of a RUM retention filter to create. properties: + cross_product_sampling: + $ref: '#/components/schemas/RumCrossProductSamplingCreate' enabled: $ref: '#/components/schemas/RumRetentionFilterEnabled' event_type: @@ -50983,6 +51050,8 @@ components: RumRetentionFilterUpdateAttributes: description: The object describing attributes of a RUM retention filter to update. properties: + cross_product_sampling: + $ref: '#/components/schemas/RumCrossProductSamplingUpdate' enabled: $ref: '#/components/schemas/RumRetentionFilterEnabled' event_type: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4a0ac91fa81b..024accd11946 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4122,6 +4122,9 @@ def overrides "v2.rum_bucket_response" => "RUMBucketResponse", "v2.rum_compute" => "RUMCompute", "v2.rum_compute_type" => "RUMComputeType", + "v2.rum_cross_product_sampling" => "RumCrossProductSampling", + "v2.rum_cross_product_sampling_create" => "RumCrossProductSamplingCreate", + "v2.rum_cross_product_sampling_update" => "RumCrossProductSamplingUpdate", "v2.rum_event" => "RUMEvent", "v2.rum_event_attributes" => "RUMEventAttributes", "v2.rum_event_processing_scale" => "RUMEventProcessingScale", diff --git a/lib/datadog_api_client/v2/models/rum_cross_product_sampling.rb b/lib/datadog_api_client/v2/models/rum_cross_product_sampling.rb new file mode 100644 index 000000000000..1089c3fbbd13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_cross_product_sampling.rb @@ -0,0 +1,140 @@ +=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 + # Configuration for additional APM trace data retention for sessions that match this retention filter. + # When a session matches the filter and is retained (based on `sample_rate`), you can configure + # the percentage of retained sessions with ingested traces whose traces are indexed. + class RumCrossProductSampling + include BaseGenericModel + + # Indicates whether trace cross-product sampling is enabled. If `false`, no traces are indexed regardless of `trace_sample_rate`. + attr_accessor :trace_enabled + + # The percentage (0-100) of retained sessions with ingested traces whose traces are indexed. + # For example, 25.0 means 25% of retained sessions with ingested traces have their traces indexed. + attr_reader :trace_sample_rate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'trace_enabled' => :'trace_enabled', + :'trace_sample_rate' => :'trace_sample_rate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'trace_enabled' => :'Boolean', + :'trace_sample_rate' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RumCrossProductSampling` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'trace_enabled') + self.trace_enabled = attributes[:'trace_enabled'] + end + + if attributes.key?(:'trace_sample_rate') + self.trace_sample_rate = attributes[:'trace_sample_rate'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@trace_sample_rate.nil? && @trace_sample_rate > 100 + return false if !@trace_sample_rate.nil? && @trace_sample_rate < 0 + true + end + + # Custom attribute writer method with validation + # @param trace_sample_rate [Object] Object to be assigned + # @!visibility private + def trace_sample_rate=(trace_sample_rate) + if !trace_sample_rate.nil? && trace_sample_rate > 100 + fail ArgumentError, 'invalid value for "trace_sample_rate", must be smaller than or equal to 100.' + end + if !trace_sample_rate.nil? && trace_sample_rate < 0 + fail ArgumentError, 'invalid value for "trace_sample_rate", must be greater than or equal to 0.' + end + @trace_sample_rate = trace_sample_rate + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + trace_enabled == o.trace_enabled && + trace_sample_rate == o.trace_sample_rate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [trace_enabled, trace_sample_rate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_cross_product_sampling_create.rb b/lib/datadog_api_client/v2/models/rum_cross_product_sampling_create.rb new file mode 100644 index 000000000000..d549275f7638 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_cross_product_sampling_create.rb @@ -0,0 +1,141 @@ +=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 + # Configuration for cross-product sampling when creating a retention filter. + class RumCrossProductSamplingCreate + include BaseGenericModel + + # Indicates whether trace cross-product sampling is enabled. + attr_accessor :trace_enabled + + # The percentage (0-100) of retained sessions with ingested traces whose traces are indexed. + attr_reader :trace_sample_rate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'trace_enabled' => :'trace_enabled', + :'trace_sample_rate' => :'trace_sample_rate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'trace_enabled' => :'Boolean', + :'trace_sample_rate' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RumCrossProductSamplingCreate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'trace_enabled') + self.trace_enabled = attributes[:'trace_enabled'] + end + + if attributes.key?(:'trace_sample_rate') + self.trace_sample_rate = attributes[:'trace_sample_rate'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @trace_sample_rate.nil? + return false if @trace_sample_rate > 100 + return false if @trace_sample_rate < 0 + true + end + + # Custom attribute writer method with validation + # @param trace_sample_rate [Object] Object to be assigned + # @!visibility private + def trace_sample_rate=(trace_sample_rate) + if trace_sample_rate.nil? + fail ArgumentError, 'invalid value for "trace_sample_rate", trace_sample_rate cannot be nil.' + end + if trace_sample_rate > 100 + fail ArgumentError, 'invalid value for "trace_sample_rate", must be smaller than or equal to 100.' + end + if trace_sample_rate < 0 + fail ArgumentError, 'invalid value for "trace_sample_rate", must be greater than or equal to 0.' + end + @trace_sample_rate = trace_sample_rate + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + trace_enabled == o.trace_enabled && + trace_sample_rate == o.trace_sample_rate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [trace_enabled, trace_sample_rate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_cross_product_sampling_update.rb b/lib/datadog_api_client/v2/models/rum_cross_product_sampling_update.rb new file mode 100644 index 000000000000..af2e840aedb0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_cross_product_sampling_update.rb @@ -0,0 +1,137 @@ +=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 + # Configuration for cross-product sampling when updating a retention filter. All fields are optional for partial updates. + class RumCrossProductSamplingUpdate + include BaseGenericModel + + # Indicates whether trace cross-product sampling is enabled. + attr_accessor :trace_enabled + + # The percentage (0-100) of retained sessions with ingested traces whose traces are indexed. + attr_reader :trace_sample_rate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'trace_enabled' => :'trace_enabled', + :'trace_sample_rate' => :'trace_sample_rate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'trace_enabled' => :'Boolean', + :'trace_sample_rate' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RumCrossProductSamplingUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'trace_enabled') + self.trace_enabled = attributes[:'trace_enabled'] + end + + if attributes.key?(:'trace_sample_rate') + self.trace_sample_rate = attributes[:'trace_sample_rate'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@trace_sample_rate.nil? && @trace_sample_rate > 100 + return false if !@trace_sample_rate.nil? && @trace_sample_rate < 0 + true + end + + # Custom attribute writer method with validation + # @param trace_sample_rate [Object] Object to be assigned + # @!visibility private + def trace_sample_rate=(trace_sample_rate) + if !trace_sample_rate.nil? && trace_sample_rate > 100 + fail ArgumentError, 'invalid value for "trace_sample_rate", must be smaller than or equal to 100.' + end + if !trace_sample_rate.nil? && trace_sample_rate < 0 + fail ArgumentError, 'invalid value for "trace_sample_rate", must be greater than or equal to 0.' + end + @trace_sample_rate = trace_sample_rate + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + trace_enabled == o.trace_enabled && + trace_sample_rate == o.trace_sample_rate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [trace_enabled, trace_sample_rate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb index 312649e4c025..089c426d4fbe 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb @@ -21,6 +21,11 @@ module DatadogAPIClient::V2 class RumRetentionFilterAttributes include BaseGenericModel + # Configuration for additional APM trace data retention for sessions that match this retention filter. + # When a session matches the filter and is retained (based on `sample_rate`), you can configure + # the percentage of retained sessions with ingested traces whose traces are indexed. + attr_accessor :cross_product_sampling + # Whether the retention filter is enabled. attr_accessor :enabled @@ -42,6 +47,7 @@ class RumRetentionFilterAttributes # @!visibility private def self.attribute_map { + :'cross_product_sampling' => :'cross_product_sampling', :'enabled' => :'enabled', :'event_type' => :'event_type', :'name' => :'name', @@ -54,6 +60,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_product_sampling' => :'RumCrossProductSampling', :'enabled' => :'Boolean', :'event_type' => :'RumRetentionFilterEventType', :'name' => :'String', @@ -80,6 +87,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_product_sampling') + self.cross_product_sampling = attributes[:'cross_product_sampling'] + end + if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end @@ -149,6 +160,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_product_sampling == o.cross_product_sampling && enabled == o.enabled && event_type == o.event_type && name == o.name && @@ -161,7 +173,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [enabled, event_type, name, query, sample_rate, additional_properties].hash + [cross_product_sampling, enabled, event_type, name, query, sample_rate, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb index d9c472a19a67..64d8ea7d8537 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class RumRetentionFilterCreateAttributes include BaseGenericModel + # Configuration for cross-product sampling when creating a retention filter. + attr_accessor :cross_product_sampling + # Whether the retention filter is enabled. attr_accessor :enabled @@ -42,6 +45,7 @@ class RumRetentionFilterCreateAttributes # @!visibility private def self.attribute_map { + :'cross_product_sampling' => :'cross_product_sampling', :'enabled' => :'enabled', :'event_type' => :'event_type', :'name' => :'name', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_product_sampling' => :'RumCrossProductSamplingCreate', :'enabled' => :'Boolean', :'event_type' => :'RumRetentionFilterEventType', :'name' => :'String', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_product_sampling') + self.cross_product_sampling = attributes[:'cross_product_sampling'] + end + if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end @@ -175,6 +184,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_product_sampling == o.cross_product_sampling && enabled == o.enabled && event_type == o.event_type && name == o.name && @@ -187,7 +197,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [enabled, event_type, name, query, sample_rate, additional_properties].hash + [cross_product_sampling, enabled, event_type, name, query, sample_rate, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb index 5e9439392edf..d432c546348f 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class RumRetentionFilterUpdateAttributes include BaseGenericModel + # Configuration for cross-product sampling when updating a retention filter. All fields are optional for partial updates. + attr_accessor :cross_product_sampling + # Whether the retention filter is enabled. attr_accessor :enabled @@ -42,6 +45,7 @@ class RumRetentionFilterUpdateAttributes # @!visibility private def self.attribute_map { + :'cross_product_sampling' => :'cross_product_sampling', :'enabled' => :'enabled', :'event_type' => :'event_type', :'name' => :'name', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_product_sampling' => :'RumCrossProductSamplingUpdate', :'enabled' => :'Boolean', :'event_type' => :'RumRetentionFilterEventType', :'name' => :'String', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_product_sampling') + self.cross_product_sampling = attributes[:'cross_product_sampling'] + end + if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end @@ -149,6 +158,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_product_sampling == o.cross_product_sampling && enabled == o.enabled && event_type == o.event_type && name == o.name && @@ -161,7 +171,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [enabled, event_type, name, query, sample_rate, additional_properties].hash + [cross_product_sampling, enabled, event_type, name, query, sample_rate, additional_properties].hash end end end