From 5145b6fc55429cfa113b8f273d86575937f564ca Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Nov 2026 16:17:04 +0000 Subject: [PATCH] Regenerate client from commit 4f5731d of spec repo --- .generator/schemas/v2/openapi.yaml | 50 +++++- lib/datadog_api_client/inflector.rb | 2 + ...onitoring_batch_migration_publish_error.rb | 145 ++++++++++++++++++ ...ng_batch_migration_publish_error_detail.rb | 125 +++++++++++++++ ...migration_published_resource_attributes.rb | 2 +- 5 files changed, 320 insertions(+), 4 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error_detail.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7a9926c3d391..cf0b7463a120 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -126140,6 +126140,41 @@ components: - type - attributes type: object + SecurityMonitoringBatchMigrationPublishError: + description: The reason why the resource could not be published. + properties: + code: + description: The error code returned on rule creation. + example: InvalidArgument + type: string + details: + description: The rule validation errors returned on rule creation. + items: + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishErrorDetail" + type: array + message: + description: The error message. + example: Invalid rule configuration + type: string + required: + - message + type: object + SecurityMonitoringBatchMigrationPublishErrorDetail: + description: A rule validation error. + properties: + code: + description: The error code. + example: AlreadyExists + type: string + message: + description: The error message. + example: Rule name must be unique + type: string + target: + description: The rule field the error applies to. + example: name + type: string + type: object SecurityMonitoringBatchMigrationPublishRequest: description: Request to publish the resources of a batch migration. properties: @@ -126183,9 +126218,7 @@ components: description: Attributes of the publication outcome of a batch migration resource. properties: error: - description: The reason why the resource could not be published. - example: failed to create rule - type: string + $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishError" ruleId: description: The ID of the created Cloud SIEM detection rule. example: abc-def-ghi @@ -249749,6 +249782,17 @@ paths: status: published id: c968cf83-56c2-4d54-a993-6c86dfb83527 type: batchMigrationPublishedResource + - attributes: + error: + code: InvalidArgument + details: + - code: AlreadyExists + message: Rule name must be unique + target: name + message: Invalid rule configuration + status: failed + id: 0b9d3f3e-2a4c-4e8b-9f1a-6d2c7e5b8a41 + type: batchMigrationPublishedResource schema: $ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishResponse" description: OK diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index ff6d8495dc40..c2c28fd617cb 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -8564,6 +8564,8 @@ def overrides "v2.security_monitoring_batch_migration_published_resource_data" => "SecurityMonitoringBatchMigrationPublishedResourceData", "v2.security_monitoring_batch_migration_published_resource_status" => "SecurityMonitoringBatchMigrationPublishedResourceStatus", "v2.security_monitoring_batch_migration_published_resource_type" => "SecurityMonitoringBatchMigrationPublishedResourceType", + "v2.security_monitoring_batch_migration_publish_error" => "SecurityMonitoringBatchMigrationPublishError", + "v2.security_monitoring_batch_migration_publish_error_detail" => "SecurityMonitoringBatchMigrationPublishErrorDetail", "v2.security_monitoring_batch_migration_publish_request" => "SecurityMonitoringBatchMigrationPublishRequest", "v2.security_monitoring_batch_migration_publish_response" => "SecurityMonitoringBatchMigrationPublishResponse", "v2.security_monitoring_batch_migration_publish_type" => "SecurityMonitoringBatchMigrationPublishType", diff --git a/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error.rb b/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error.rb new file mode 100644 index 000000000000..d0f31c395a56 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error.rb @@ -0,0 +1,145 @@ +=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 reason why the resource could not be published. + class SecurityMonitoringBatchMigrationPublishError + include BaseGenericModel + + # The error code returned on rule creation. + attr_accessor :code + + # The rule validation errors returned on rule creation. + attr_accessor :details + + # The error message. + attr_reader :message + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'code' => :'code', + :'details' => :'details', + :'message' => :'message' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'code' => :'String', + :'details' => :'Array', + :'message' => :'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::SecurityMonitoringBatchMigrationPublishError` 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?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + 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 @message.nil? + true + end + + # Custom attribute writer method with validation + # @param message [Object] Object to be assigned + # @!visibility private + def message=(message) + if message.nil? + fail ArgumentError, 'invalid value for "message", message cannot be nil.' + end + @message = message + 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 && + code == o.code && + details == o.details && + message == o.message && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [code, details, message, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error_detail.rb b/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error_detail.rb new file mode 100644 index 000000000000..338cbc2c3138 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_publish_error_detail.rb @@ -0,0 +1,125 @@ +=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 rule validation error. + class SecurityMonitoringBatchMigrationPublishErrorDetail + include BaseGenericModel + + # The error code. + attr_accessor :code + + # The error message. + attr_accessor :message + + # The rule field the error applies to. + attr_accessor :target + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message', + :'target' => :'target' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'code' => :'String', + :'message' => :'String', + :'target' => :'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::SecurityMonitoringBatchMigrationPublishErrorDetail` 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?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + 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 && + code == o.code && + message == o.message && + target == o.target && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [code, message, target, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_published_resource_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_published_resource_attributes.rb index abb0fa631049..71be79f8543e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_published_resource_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_batch_migration_published_resource_attributes.rb @@ -46,7 +46,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'error' => :'String', + :'error' => :'SecurityMonitoringBatchMigrationPublishError', :'rule_id' => :'String', :'status' => :'SecurityMonitoringBatchMigrationPublishedResourceStatus' }