From 200a827404298f819b0a4768266184f8246bf5a7 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 13 May 2026 08:28:34 +0000 Subject: [PATCH] Regenerate client from commit fcf3a22 of spec repo --- .generator/schemas/v1/openapi.yaml | 33 ++++ lib/datadog_api_client/inflector.rb | 2 + .../logs_exclude_attribute_processor.rb | 166 ++++++++++++++++++ .../logs_exclude_attribute_processor_type.rb | 26 +++ .../v1/models/logs_processor.rb | 3 +- 5 files changed, 229 insertions(+), 1 deletion(-) create mode 100644 lib/datadog_api_client/v1/models/logs_exclude_attribute_processor.rb create mode 100644 lib/datadog_api_client/v1/models/logs_exclude_attribute_processor_type.rb diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4707c147e8b2..612b0604bdb0 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -6212,6 +6212,38 @@ components: type: string x-enum-varnames: - DECODER_PROCESSOR + LogsExcludeAttributeProcessor: + description: |- + Use this processor to remove an attribute from a log during processing. + The processor strips the specified attribute from the log event, which is useful + when the attribute contains sensitive data or is no longer needed downstream. + properties: + attribute_to_exclude: + description: Name of the log attribute to remove from the log event. + example: foo + type: string + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + type: + $ref: "#/components/schemas/LogsExcludeAttributeProcessorType" + required: + - type + - attribute_to_exclude + type: object + LogsExcludeAttributeProcessorType: + default: exclude-attribute + description: Type of logs exclude attribute processor. + enum: + - exclude-attribute + example: exclude-attribute + type: string + x-enum-varnames: + - EXCLUDE_ATTRIBUTE LogsExclusion: description: Represents the index exclusion filter object from configuration API. properties: @@ -6819,6 +6851,7 @@ components: - $ref: "#/components/schemas/LogsArrayProcessor" - $ref: "#/components/schemas/LogsDecoderProcessor" - $ref: "#/components/schemas/LogsSchemaProcessor" + - $ref: "#/components/schemas/LogsExcludeAttributeProcessor" LogsQueryCompute: description: Define computation for a log query. properties: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c8a70ed3c2fc..a46ada599bec 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -292,6 +292,8 @@ def overrides "v1.logs_decoder_processor_binary_to_text_encoding" => "LogsDecoderProcessorBinaryToTextEncoding", "v1.logs_decoder_processor_input_representation" => "LogsDecoderProcessorInputRepresentation", "v1.logs_decoder_processor_type" => "LogsDecoderProcessorType", + "v1.logs_exclude_attribute_processor" => "LogsExcludeAttributeProcessor", + "v1.logs_exclude_attribute_processor_type" => "LogsExcludeAttributeProcessorType", "v1.logs_exclusion" => "LogsExclusion", "v1.logs_exclusion_filter" => "LogsExclusionFilter", "v1.logs_filter" => "LogsFilter", diff --git a/lib/datadog_api_client/v1/models/logs_exclude_attribute_processor.rb b/lib/datadog_api_client/v1/models/logs_exclude_attribute_processor.rb new file mode 100644 index 000000000000..4047dac582df --- /dev/null +++ b/lib/datadog_api_client/v1/models/logs_exclude_attribute_processor.rb @@ -0,0 +1,166 @@ +=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 + # Use this processor to remove an attribute from a log during processing. + # The processor strips the specified attribute from the log event, which is useful + # when the attribute contains sensitive data or is no longer needed downstream. + class LogsExcludeAttributeProcessor + include BaseGenericModel + + # Name of the log attribute to remove from the log event. + attr_reader :attribute_to_exclude + + # Whether or not the processor is enabled. + attr_accessor :is_enabled + + # Name of the processor. + attr_accessor :name + + # Type of logs exclude attribute processor. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attribute_to_exclude' => :'attribute_to_exclude', + :'is_enabled' => :'is_enabled', + :'name' => :'name', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attribute_to_exclude' => :'String', + :'is_enabled' => :'Boolean', + :'name' => :'String', + :'type' => :'LogsExcludeAttributeProcessorType' + } + 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::LogsExcludeAttributeProcessor` 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?(:'attribute_to_exclude') + self.attribute_to_exclude = attributes[:'attribute_to_exclude'] + end + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @attribute_to_exclude.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attribute_to_exclude [Object] Object to be assigned + # @!visibility private + def attribute_to_exclude=(attribute_to_exclude) + if attribute_to_exclude.nil? + fail ArgumentError, 'invalid value for "attribute_to_exclude", attribute_to_exclude cannot be nil.' + end + @attribute_to_exclude = attribute_to_exclude + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + 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 && + attribute_to_exclude == o.attribute_to_exclude && + is_enabled == o.is_enabled && + name == o.name && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attribute_to_exclude, is_enabled, name, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/logs_exclude_attribute_processor_type.rb b/lib/datadog_api_client/v1/models/logs_exclude_attribute_processor_type.rb new file mode 100644 index 000000000000..578c8b935c92 --- /dev/null +++ b/lib/datadog_api_client/v1/models/logs_exclude_attribute_processor_type.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 + # Type of logs exclude attribute processor. + class LogsExcludeAttributeProcessorType + include BaseEnumModel + + EXCLUDE_ATTRIBUTE = "exclude-attribute".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/logs_processor.rb b/lib/datadog_api_client/v1/models/logs_processor.rb index f3e8958851b3..156f2eae4d94 100644 --- a/lib/datadog_api_client/v1/models/logs_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_processor.rb @@ -45,7 +45,8 @@ def openapi_one_of :'LogsSpanRemapper', :'LogsArrayProcessor', :'LogsDecoderProcessor', - :'LogsSchemaProcessor' + :'LogsSchemaProcessor', + :'LogsExcludeAttributeProcessor' ] end # Builds the object