From 2f31be0b0bb73e151878a287e3d3f19455872c16 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 13 May 2026 16:08:37 +0000 Subject: [PATCH] Regenerate client from commit e680476 of spec repo --- .generator/schemas/v1/openapi.yaml | 18 +++ lib/datadog_api_client/inflector.rb | 2 + .../timeseries_widget_anomaly_detection.rb | 123 ++++++++++++++++++ ...es_widget_anomaly_detection_sensitivity.rb | 26 ++++ .../v1/models/timeseries_widget_definition.rb | 12 +- 5 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection.rb create mode 100644 lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection_sensitivity.rb diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 9466f691bd40..9421afa3c8b2 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -20118,9 +20118,27 @@ components: description: Color palette to apply to the widget. type: string type: object + TimeseriesWidgetAnomalyDetection: + description: Anomaly detection configuration for a timeseries widget. + properties: + detection_sensitivity: + $ref: "#/components/schemas/TimeseriesWidgetAnomalyDetectionSensitivity" + required: + - detection_sensitivity + type: object + TimeseriesWidgetAnomalyDetectionSensitivity: + description: Sensitivity level for anomaly detection. Use `never_detect` to disable anomaly detection. + enum: + - never_detect + example: never_detect + type: string + x-enum-varnames: + - NEVER_DETECT TimeseriesWidgetDefinition: description: The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time. properties: + anomaly_detection: + $ref: "#/components/schemas/TimeseriesWidgetAnomalyDetection" custom_links: description: List of custom links. items: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c8a70ed3c2fc..4ef69d82db44 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -909,6 +909,8 @@ def overrides "v1.timeseries_background" => "TimeseriesBackground", "v1.timeseries_background_type" => "TimeseriesBackgroundType", "v1.timeseries_request_style" => "TimeseriesRequestStyle", + "v1.timeseries_widget_anomaly_detection" => "TimeseriesWidgetAnomalyDetection", + "v1.timeseries_widget_anomaly_detection_sensitivity" => "TimeseriesWidgetAnomalyDetectionSensitivity", "v1.timeseries_widget_definition" => "TimeseriesWidgetDefinition", "v1.timeseries_widget_definition_type" => "TimeseriesWidgetDefinitionType", "v1.timeseries_widget_expression_alias" => "TimeseriesWidgetExpressionAlias", diff --git a/lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection.rb b/lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection.rb new file mode 100644 index 000000000000..fa2ab19425c4 --- /dev/null +++ b/lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V1 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::V1 + # Anomaly detection configuration for a timeseries widget. + class TimeseriesWidgetAnomalyDetection + include BaseGenericModel + + # Sensitivity level for anomaly detection. Use `never_detect` to disable anomaly detection. + attr_reader :detection_sensitivity + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'detection_sensitivity' => :'detection_sensitivity' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'detection_sensitivity' => :'TimeseriesWidgetAnomalyDetectionSensitivity' + } + 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::V1::TimeseriesWidgetAnomalyDetection` 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?(:'detection_sensitivity') + self.detection_sensitivity = attributes[:'detection_sensitivity'] + 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 @detection_sensitivity.nil? + true + end + + # Custom attribute writer method with validation + # @param detection_sensitivity [Object] Object to be assigned + # @!visibility private + def detection_sensitivity=(detection_sensitivity) + if detection_sensitivity.nil? + fail ArgumentError, 'invalid value for "detection_sensitivity", detection_sensitivity cannot be nil.' + end + @detection_sensitivity = detection_sensitivity + 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 && + detection_sensitivity == o.detection_sensitivity && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [detection_sensitivity, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection_sensitivity.rb b/lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection_sensitivity.rb new file mode 100644 index 000000000000..755e48630d59 --- /dev/null +++ b/lib/datadog_api_client/v1/models/timeseries_widget_anomaly_detection_sensitivity.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Sensitivity level for anomaly detection. Use `never_detect` to disable anomaly detection. + class TimeseriesWidgetAnomalyDetectionSensitivity + include BaseEnumModel + + NEVER_DETECT = "never_detect".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb b/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb index 4adbf95c26c0..4eb1f44b9a49 100644 --- a/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/timeseries_widget_definition.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V1 class TimeseriesWidgetDefinition include BaseGenericModel + # Anomaly detection configuration for a timeseries widget. + attr_accessor :anomaly_detection + # List of custom links. attr_accessor :custom_links @@ -75,6 +78,7 @@ class TimeseriesWidgetDefinition # @!visibility private def self.attribute_map { + :'anomaly_detection' => :'anomaly_detection', :'custom_links' => :'custom_links', :'description' => :'description', :'events' => :'events', @@ -98,6 +102,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'anomaly_detection' => :'TimeseriesWidgetAnomalyDetection', :'custom_links' => :'Array', :'description' => :'String', :'events' => :'Array', @@ -135,6 +140,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'anomaly_detection') + self.anomaly_detection = attributes[:'anomaly_detection'] + end + if attributes.key?(:'custom_links') if (value = attributes[:'custom_links']).is_a?(Array) self.custom_links = value @@ -269,6 +278,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + anomaly_detection == o.anomaly_detection && custom_links == o.custom_links && description == o.description && events == o.events && @@ -292,7 +302,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [custom_links, description, events, legend_columns, legend_layout, legend_size, markers, requests, right_yaxis, show_legend, time, title, title_align, title_size, type, yaxis, additional_properties].hash + [anomaly_detection, custom_links, description, events, legend_columns, legend_layout, legend_size, markers, requests, right_yaxis, show_legend, time, title, title_align, title_size, type, yaxis, additional_properties].hash end end end