From e6b72bf979c43f9565713af07c05e52999eba7d0 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 28 Oct 2026 20:11:34 +0000 Subject: [PATCH] Regenerate client from commit a73a445 of spec repo --- .generator/schemas/v2/openapi.yaml | 89 ++++++ lib/datadog_api_client/inflector.rb | 2 + ...data_observability_monitor_group_status.rb | 30 ++ .../data_observability_monitor_run_group.rb | 278 ++++++++++++++++++ ..._monitor_run_status_response_attributes.rb | 35 ++- 5 files changed, 433 insertions(+), 1 deletion(-) create mode 100644 lib/datadog_api_client/v2/models/data_observability_monitor_group_status.rb create mode 100644 lib/datadog_api_client/v2/models/data_observability_monitor_run_group.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 28f6789e0cba..72af2185fd6a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32587,6 +32587,80 @@ components: - bucket_name - bucket_region type: object + DataObservabilityMonitorGroupByValues: + additionalProperties: + type: string + description: The values of the monitor's group-by columns for this group. `N/A` means the column had no value. + example: + region: us + type: object + DataObservabilityMonitorGroupStatus: + description: The state of a monitor group, from the alerting engine. + enum: + - ok + - warn + - alert + - no_data + - unknown + example: alert + type: string + x-enum-varnames: + - OK + - WARN + - ALERT + - NO_DATA + - UNKNOWN + DataObservabilityMonitorRunGroup: + description: A monitor group that is not ok after a run. + properties: + account: + description: The account of the entity, when the platform has one. + example: acme + type: string + column: + description: The column of the entity, when it is a column. + example: AMOUNT + type: string + database: + description: The database of the entity. + example: ANALYTICS + type: string + entity_id: + description: The ID of the table or column the group checks. + example: "84a88e0d362ce9fc" + type: string + entity_type: + description: The type of the entity, such as table or column. + example: table + type: string + group: + description: The group's name in Datadog monitors, as the monitor API and UI show it. Pass it as `filter[group]` to list the group's evaluations. + example: "database:analytics,entity_id:84a88e0d362ce9fc,schema:public,table:orders" + type: string + group_by_values: + $ref: "#/components/schemas/DataObservabilityMonitorGroupByValues" + platform: + description: The data platform of the entity. + example: snowflake + type: string + schema: + description: The schema of the entity, when it has one. + example: PUBLIC + type: string + status: + $ref: "#/components/schemas/DataObservabilityMonitorGroupStatus" + table: + description: The table of the entity, when it is a table or column. + example: ORDERS + type: string + required: + - group + - entity_id + - entity_type + - platform + - database + - status + type: object DataObservabilityMonitorRunStatus: description: The status of a data observability monitor run. enum: @@ -55909,6 +55983,21 @@ components: description: Error message describing why the monitor run failed. Only present when status is error. example: "run completed but produced no metric data" type: string + group_counts: + additionalProperties: + format: int64 + type: integer + description: The number of the monitor's groups in each state, once the run has finished. + example: + alert: 1 + ok: 12 + type: object + groups: + description: The first 1,000 of the monitor's groups that are not ok, once the run has finished. List the monitor's groups for all of them. + items: + $ref: "#/components/schemas/DataObservabilityMonitorRunGroup" + maxItems: 1000 + type: array status: $ref: "#/components/schemas/DataObservabilityMonitorRunStatus" required: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 3cd8ab6ff4c3..b3b10bdc52bc 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2979,6 +2979,8 @@ def overrides "v2.datadog_integration_type" => "DatadogIntegrationType", "v2.datadog_integration_update" => "DatadogIntegrationUpdate", "v2.data_export_config" => "DataExportConfig", + "v2.data_observability_monitor_group_status" => "DataObservabilityMonitorGroupStatus", + "v2.data_observability_monitor_run_group" => "DataObservabilityMonitorRunGroup", "v2.data_observability_monitor_run_status" => "DataObservabilityMonitorRunStatus", "v2.data_observability_monitor_run_type" => "DataObservabilityMonitorRunType", "v2.data_relationships_teams" => "DataRelationshipsTeams", diff --git a/lib/datadog_api_client/v2/models/data_observability_monitor_group_status.rb b/lib/datadog_api_client/v2/models/data_observability_monitor_group_status.rb new file mode 100644 index 000000000000..328d8cc1a861 --- /dev/null +++ b/lib/datadog_api_client/v2/models/data_observability_monitor_group_status.rb @@ -0,0 +1,30 @@ +=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 state of a monitor group, from the alerting engine. + class DataObservabilityMonitorGroupStatus + include BaseEnumModel + + OK = "ok".freeze + WARN = "warn".freeze + ALERT = "alert".freeze + NO_DATA = "no_data".freeze + UNKNOWN = "unknown".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/data_observability_monitor_run_group.rb b/lib/datadog_api_client/v2/models/data_observability_monitor_run_group.rb new file mode 100644 index 000000000000..e2b67fe91bf1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/data_observability_monitor_run_group.rb @@ -0,0 +1,278 @@ +=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 + # A monitor group that is not ok after a run. + class DataObservabilityMonitorRunGroup + include BaseGenericModel + + # The account of the entity, when the platform has one. + attr_accessor :account + + # The column of the entity, when it is a column. + attr_accessor :column + + # The database of the entity. + attr_reader :database + + # The ID of the table or column the group checks. + attr_reader :entity_id + + # The type of the entity, such as table or column. + attr_reader :entity_type + + # The group's name in Datadog monitors, as the monitor API and UI show it. Pass it as `filter[group]` to list the group's evaluations. + attr_reader :group + + # The values of the monitor's group-by columns for this group. `N/A` means the column had no value. + attr_accessor :group_by_values + + # The data platform of the entity. + attr_reader :platform + + # The schema of the entity, when it has one. + attr_accessor :schema + + # The state of a monitor group, from the alerting engine. + attr_reader :status + + # The table of the entity, when it is a table or column. + attr_accessor :table + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account' => :'account', + :'column' => :'column', + :'database' => :'database', + :'entity_id' => :'entity_id', + :'entity_type' => :'entity_type', + :'group' => :'group', + :'group_by_values' => :'group_by_values', + :'platform' => :'platform', + :'schema' => :'schema', + :'status' => :'status', + :'table' => :'table' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account' => :'String', + :'column' => :'String', + :'database' => :'String', + :'entity_id' => :'String', + :'entity_type' => :'String', + :'group' => :'String', + :'group_by_values' => :'Hash', + :'platform' => :'String', + :'schema' => :'String', + :'status' => :'DataObservabilityMonitorGroupStatus', + :'table' => :'String' + } + 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::DataObservabilityMonitorRunGroup` 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?(:'account') + self.account = attributes[:'account'] + end + + if attributes.key?(:'column') + self.column = attributes[:'column'] + end + + if attributes.key?(:'database') + self.database = attributes[:'database'] + end + + if attributes.key?(:'entity_id') + self.entity_id = attributes[:'entity_id'] + end + + if attributes.key?(:'entity_type') + self.entity_type = attributes[:'entity_type'] + end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end + + if attributes.key?(:'group_by_values') + self.group_by_values = attributes[:'group_by_values'] + end + + if attributes.key?(:'platform') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'schema') + self.schema = attributes[:'schema'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'table') + self.table = attributes[:'table'] + 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 @database.nil? + return false if @entity_id.nil? + return false if @entity_type.nil? + return false if @group.nil? + return false if @platform.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param database [Object] Object to be assigned + # @!visibility private + def database=(database) + if database.nil? + fail ArgumentError, 'invalid value for "database", database cannot be nil.' + end + @database = database + end + + # Custom attribute writer method with validation + # @param entity_id [Object] Object to be assigned + # @!visibility private + def entity_id=(entity_id) + if entity_id.nil? + fail ArgumentError, 'invalid value for "entity_id", entity_id cannot be nil.' + end + @entity_id = entity_id + end + + # Custom attribute writer method with validation + # @param entity_type [Object] Object to be assigned + # @!visibility private + def entity_type=(entity_type) + if entity_type.nil? + fail ArgumentError, 'invalid value for "entity_type", entity_type cannot be nil.' + end + @entity_type = entity_type + end + + # Custom attribute writer method with validation + # @param group [Object] Object to be assigned + # @!visibility private + def group=(group) + if group.nil? + fail ArgumentError, 'invalid value for "group", group cannot be nil.' + end + @group = group + end + + # Custom attribute writer method with validation + # @param platform [Object] Object to be assigned + # @!visibility private + def platform=(platform) + if platform.nil? + fail ArgumentError, 'invalid value for "platform", platform cannot be nil.' + end + @platform = platform + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + 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 && + account == o.account && + column == o.column && + database == o.database && + entity_id == o.entity_id && + entity_type == o.entity_type && + group == o.group && + group_by_values == o.group_by_values && + platform == o.platform && + schema == o.schema && + status == o.status && + table == o.table && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account, column, database, entity_id, entity_type, group, group_by_values, platform, schema, status, table, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_data_observability_monitor_run_status_response_attributes.rb b/lib/datadog_api_client/v2/models/get_data_observability_monitor_run_status_response_attributes.rb index f67a23fcb326..7cc430889884 100644 --- a/lib/datadog_api_client/v2/models/get_data_observability_monitor_run_status_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/get_data_observability_monitor_run_status_response_attributes.rb @@ -24,6 +24,12 @@ class GetDataObservabilityMonitorRunStatusResponseAttributes # Error message describing why the monitor run failed. Only present when status is error. attr_accessor :error_message + # The number of the monitor's groups in each state, once the run has finished. + attr_accessor :group_counts + + # The first 1,000 of the monitor's groups that are not ok, once the run has finished. List the monitor's groups for all of them. + attr_reader :groups + # The status of a data observability monitor run. attr_reader :status @@ -34,6 +40,8 @@ class GetDataObservabilityMonitorRunStatusResponseAttributes def self.attribute_map { :'error_message' => :'error_message', + :'group_counts' => :'group_counts', + :'groups' => :'groups', :'status' => :'status' } end @@ -43,6 +51,8 @@ def self.attribute_map def self.openapi_types { :'error_message' => :'String', + :'group_counts' => :'Hash', + :'groups' => :'Array', :'status' => :'DataObservabilityMonitorRunStatus' } end @@ -69,6 +79,16 @@ def initialize(attributes = {}) self.error_message = attributes[:'error_message'] end + if attributes.key?(:'group_counts') + self.group_counts = attributes[:'group_counts'] + end + + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + if attributes.key?(:'status') self.status = attributes[:'status'] end @@ -78,10 +98,21 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@groups.nil? && @groups.length > 1000 return false if @status.nil? true end + # Custom attribute writer method with validation + # @param groups [Object] Object to be assigned + # @!visibility private + def groups=(groups) + if !groups.nil? && groups.length > 1000 + fail ArgumentError, 'invalid value for "groups", number of items must be less than or equal to 1000.' + end + @groups = groups + end + # Custom attribute writer method with validation # @param status [Object] Object to be assigned # @!visibility private @@ -119,6 +150,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && error_message == o.error_message && + group_counts == o.group_counts && + groups == o.groups && status == o.status && additional_properties == o.additional_properties end @@ -127,7 +160,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [error_message, status, additional_properties].hash + [error_message, group_counts, groups, status, additional_properties].hash end end end