diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6ed4b42368e..93ec43887f9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -33063,6 +33063,10 @@ components: description: The `add_env_vars` processor adds environment variable values to log events. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this processor in the pipeline. @@ -33074,8 +33078,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the input for - this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -33092,7 +33097,6 @@ components: - id - type - include - - inputs - variables type: object ObservabilityPipelineAddEnvVarsProcessorType: @@ -33122,6 +33126,10 @@ components: ObservabilityPipelineAddFieldsProcessor: description: The `add_fields` processor adds static key-value fields to logs. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of static fields (key-value pairs) that is added to each log event processed by this component. @@ -33140,8 +33148,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -33154,7 +33163,6 @@ components: - type - include - fields - - inputs type: object ObservabilityPipelineAddFieldsProcessorType: default: add_fields @@ -33457,16 +33465,7 @@ components: $ref: '#/components/schemas/ObservabilityPipelineConfigDestinationItem' type: array processors: - description: A list of processors that transform or enrich log data. - example: - - id: filter-processor - include: service:my-service - inputs: - - datadog-agent-source - type: filter - items: - $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorItem' - type: array + $ref: '#/components/schemas/ObservabilityPipelineConfigProcessors' sources: description: A list of configured data sources for the pipeline. example: @@ -33501,6 +33500,72 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination' - $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination' - $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestination' + ObservabilityPipelineConfigProcessorGroup: + description: A group of processors. + example: + id: my-processor-group + include: service:my-service + inputs: + - datadog-agent-source + processors: + - fields: + - name: env + value: prod + id: add-fields-processor + include: '*' + type: add_fields + - id: filter-processor + include: status:error + type: filter + properties: + enabled: + description: Whether this processor group is enabled. + example: true + type: boolean + id: + description: The unique identifier for the processor group. + example: grouped-processors + type: string + include: + description: Conditional expression for when this processor group should + execute. + example: service:my-service + type: string + inputs: + description: A list of component IDs whose output is used as the input for + this processor group. + example: + - datadog-agent-source + items: + type: string + type: array + processors: + description: Processors applied sequentially within this group. No `inputs` + fields required - events flow through each processor in order. + example: + - fields: + - name: env + value: prod + id: add-fields-processor + include: '*' + type: add_fields + - id: filter-processor + include: status:error + type: filter + items: + $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorItem' + type: array + required: + - id + - include + - inputs + - processors + type: object + ObservabilityPipelineConfigProcessorGroups: + description: A list of processor groups. + items: + $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorGroup' + type: array ObservabilityPipelineConfigProcessorItem: description: A processor for the pipeline. oneOf: @@ -33522,6 +33587,23 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineThrottleProcessor' - $ref: '#/components/schemas/ObservabilityPipelineCustomProcessor' - $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessor' + ObservabilityPipelineConfigProcessors: + description: A list of processors that transform or enrich log data, or a list + of grouped processor configurations. + oneOf: + - $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorsList' + - $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorGroups' + ObservabilityPipelineConfigProcessorsList: + description: A list of standalone processors that transform or enrich log data. + example: + - id: filter-processor + include: service:my-service + inputs: + - datadog-agent-source + type: filter + items: + $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorItem' + type: array ObservabilityPipelineConfigSourceItem: description: A data source for the pipeline. oneOf: @@ -33618,6 +33700,10 @@ components: Remap Language (VRL)](https://vector.dev/docs/reference/vrl/) scripts with advanced filtering capabilities. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this processor. example: remap-vrl-processor @@ -33630,8 +33716,9 @@ components: example: '*' type: string inputs: - description: A list of component IDs whose output is used as the input for - this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -33650,7 +33737,6 @@ components: - type - include - remaps - - inputs type: object ObservabilityPipelineCustomProcessorRemap: description: Defines a single VRL remap rule with its own filtering and transformation @@ -33790,6 +33876,10 @@ components: properties: action: $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorAction' + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -33802,8 +33892,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -33829,7 +33920,6 @@ components: - mode - action - keys - - inputs type: object ObservabilityPipelineDatadogTagsProcessorAction: description: The action to take on tags with matching keys. @@ -33875,6 +33965,10 @@ components: ObservabilityPipelineDedupeProcessor: description: The `dedupe` processor removes duplicate fields in log events. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of log field paths to check for duplicates. example: @@ -33893,8 +33987,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the input for - this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - parse-json-processor items: @@ -33908,7 +34003,6 @@ components: - id - type - include - - inputs - fields - mode type: object @@ -34116,6 +34210,10 @@ components: description: The `enrichment_table` processor enriches logs using a static CSV file or GeoIP database. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean file: $ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableFile' geoip: @@ -34130,8 +34228,9 @@ components: example: source:my-source type: string inputs: - description: A list of component IDs whose output is used as the input for - this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - add-fields-processor items: @@ -34147,7 +34246,6 @@ components: - id - type - include - - inputs - target type: object ObservabilityPipelineEnrichmentTableProcessorType: @@ -34179,6 +34277,10 @@ components: on a Datadog search query. Logs that match the `include` query are passed through; others are discarded. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -34192,8 +34294,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -34205,7 +34308,6 @@ components: - id - type - include - - inputs type: object ObservabilityPipelineFilterProcessorType: default: filter @@ -34285,6 +34387,10 @@ components: Metrics can be counters, gauges, or distributions and optionally grouped by log fields.' properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline. @@ -34296,8 +34402,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - source-id items: @@ -34313,9 +34420,6 @@ components: required: - id - type - - inputs - - include - - metrics type: object ObservabilityPipelineGenerateMetricsProcessorType: default: generate_datadog_metrics @@ -34916,6 +35020,10 @@ components: description: The `ocsf_mapper` processor transforms logs into the OCSF schema using a predefined mapping configuration. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline. @@ -34927,8 +35035,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - filter-processor items: @@ -34945,7 +35054,6 @@ components: - id - type - include - - inputs - mappings type: object ObservabilityPipelineOcsfMapperProcessorMapping: @@ -35051,6 +35159,10 @@ components: by Datadog. example: true type: boolean + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: A unique identifier for this processor. example: parse-grok-processor @@ -35061,8 +35173,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -35081,7 +35194,6 @@ components: - id - type - include - - inputs - rules type: object ObservabilityPipelineParseGrokProcessorRule: @@ -35167,6 +35279,10 @@ components: and flattens it into the event. This is useful when logs contain embedded JSON as a string. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean field: description: The name of the log field that contains a JSON string. example: message @@ -35183,8 +35299,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -35197,7 +35314,6 @@ components: - type - include - field - - inputs type: object ObservabilityPipelineParseJSONProcessorType: default: parse_json @@ -35230,6 +35346,10 @@ components: the filter query continue through the pipeline. example: false type: boolean + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -35246,8 +35366,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -35284,7 +35405,6 @@ components: - name - drop_events - limit - - inputs type: object ObservabilityPipelineQuotaProcessorLimit: description: The maximum amount of data or number of events allowed before the @@ -35360,6 +35480,10 @@ components: description: The `reduce` processor aggregates and merges logs based on matching keys and merge strategies. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean group_by: description: A list of fields used to group log events for merging. example: @@ -35378,8 +35502,9 @@ components: example: env:prod type: string inputs: - description: A list of component IDs whose output is used as the input for - this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - parse-json-processor items: @@ -35397,7 +35522,6 @@ components: - id - type - include - - inputs - group_by - merge_strategies type: object @@ -35456,6 +35580,10 @@ components: ObservabilityPipelineRemoveFieldsProcessor: description: The `remove_fields` processor deletes specified fields from logs. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of field names to be removed from each log event. example: @@ -35476,7 +35604,9 @@ components: example: service:my-service type: string inputs: - description: The `PipelineRemoveFieldsProcessor` `inputs`. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -35489,7 +35619,6 @@ components: - type - include - fields - - inputs type: object ObservabilityPipelineRemoveFieldsProcessorType: default: remove_fields @@ -35503,6 +35632,10 @@ components: ObservabilityPipelineRenameFieldsProcessor: description: The `rename_fields` processor changes field names. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of rename rules specifying which fields to rename in the event, what to rename them to, and whether to preserve the original @@ -35522,8 +35655,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -35536,7 +35670,6 @@ components: - type - include - fields - - inputs type: object ObservabilityPipelineRenameFieldsProcessorField: description: Defines how to rename a field in log events. @@ -35642,6 +35775,10 @@ components: description: The `sample` processor allows probabilistic sampling of logs at a fixed rate. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -35654,8 +35791,9 @@ components: example: service:my-service type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -35678,7 +35816,6 @@ components: - id - type - include - - inputs type: object ObservabilityPipelineSampleProcessorType: default: sample @@ -35693,6 +35830,10 @@ components: description: The `sensitive_data_scanner` processor detects and optionally redacts sensitive data in log events. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream @@ -35705,8 +35846,9 @@ components: example: source:prod type: string inputs: - description: A list of component IDs whose output is used as the `input` - for this component. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - parse-json-processor items: @@ -35724,7 +35866,6 @@ components: - id - type - include - - inputs - rules type: object ObservabilityPipelineSensitiveDataScannerProcessorAction: @@ -36686,6 +36827,10 @@ components: description: The `throttle` processor limits the number of events that pass through over a given time window. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean group_by: description: Optional list of fields used to group events before the threshold has been reached. @@ -36704,8 +36849,9 @@ components: example: env:prod type: string inputs: - description: A list of component IDs whose output is used as the input for - this processor. + description: A list of component IDs whose output is used as input for this + processor. Required when used as a standalone processor, omit when used + within a processor group. example: - datadog-agent-source items: @@ -36728,7 +36874,6 @@ components: - id - type - include - - inputs - threshold - window type: object diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 32cc933e844..f6c5c802260 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3025,7 +3025,9 @@ def overrides "v2.observability_pipeline_aws_auth" => "ObservabilityPipelineAwsAuth", "v2.observability_pipeline_config" => "ObservabilityPipelineConfig", "v2.observability_pipeline_config_destination_item" => "ObservabilityPipelineConfigDestinationItem", + "v2.observability_pipeline_config_processor_group" => "ObservabilityPipelineConfigProcessorGroup", "v2.observability_pipeline_config_processor_item" => "ObservabilityPipelineConfigProcessorItem", + "v2.observability_pipeline_config_processors" => "ObservabilityPipelineConfigProcessors", "v2.observability_pipeline_config_source_item" => "ObservabilityPipelineConfigSourceItem", "v2.observability_pipeline_crowd_strike_next_gen_siem_destination" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestination", "v2.observability_pipeline_crowd_strike_next_gen_siem_destination_compression" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression", diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb index 6943c679f4f..fee778bc602 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb @@ -21,14 +21,17 @@ module DatadogAPIClient::V2 class ObservabilityPipelineAddEnvVarsProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this processor in the pipeline. attr_reader :id # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the input for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The processor type. The value should always be `add_env_vars`. attr_reader :type @@ -42,6 +45,7 @@ class ObservabilityPipelineAddEnvVarsProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -111,7 +120,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @type.nil? return false if @variables.nil? true @@ -137,16 +145,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -193,6 +191,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -205,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, type, variables, additional_properties].hash + [enabled, id, include, inputs, type, variables, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb index 0a1a2a6b19a..0ffa86e649b 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineAddFieldsProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # A list of static fields (key-value pairs) that is added to each log event processed by this component. attr_reader :fields @@ -30,8 +33,8 @@ class ObservabilityPipelineAddFieldsProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The processor type. The value should always be `add_fields`. attr_reader :type @@ -42,6 +45,7 @@ class ObservabilityPipelineAddFieldsProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'fields' => :'fields', :'id' => :'id', :'include' => :'include', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'fields' => :'Array', :'id' => :'String', :'include' => :'String', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'fields') if (value = attributes[:'fields']).is_a?(Array) self.fields = value @@ -112,7 +121,6 @@ def valid? return false if @fields.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @type.nil? true end @@ -147,16 +155,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -193,6 +191,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && fields == o.fields && id == o.id && include == o.include && @@ -205,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [fields, id, include, inputs, type, additional_properties].hash + [enabled, fields, id, include, inputs, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config.rb index 5f34d5e2da9..d4ff9a37b90 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config.rb @@ -24,7 +24,7 @@ class ObservabilityPipelineConfig # A list of destination components where processed logs are sent. attr_reader :destinations - # A list of processors that transform or enrich log data. + # A list of processors that transform or enrich log data, or a list of grouped processor configurations. attr_accessor :processors # A list of configured data sources for the pipeline. @@ -47,7 +47,7 @@ def self.attribute_map def self.openapi_types { :'destinations' => :'Array', - :'processors' => :'Array', + :'processors' => :'ObservabilityPipelineConfigProcessors', :'sources' => :'Array' } end @@ -77,9 +77,7 @@ def initialize(attributes = {}) end if attributes.key?(:'processors') - if (value = attributes[:'processors']).is_a?(Array) - self.processors = value - end + self.processors = attributes[:'processors'] end if attributes.key?(:'sources') diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb new file mode 100644 index 00000000000..10bc94b9d78 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb @@ -0,0 +1,200 @@ +=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 group of processors. + class ObservabilityPipelineConfigProcessorGroup + include BaseGenericModel + + # Whether this processor group is enabled. + attr_accessor :enabled + + # The unique identifier for the processor group. + attr_reader :id + + # Conditional expression for when this processor group should execute. + attr_reader :include + + # A list of component IDs whose output is used as the input for this processor group. + attr_reader :inputs + + # Processors applied sequentially within this group. No `inputs` fields required - events flow through each processor in order. + attr_reader :processors + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'id' => :'id', + :'include' => :'include', + :'inputs' => :'inputs', + :'processors' => :'processors' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'id' => :'String', + :'include' => :'String', + :'inputs' => :'Array', + :'processors' => :'Array' + } + 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::ObservabilityPipelineConfigProcessorGroup` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'inputs') + if (value = attributes[:'inputs']).is_a?(Array) + self.inputs = value + end + end + + if attributes.key?(:'processors') + if (value = attributes[:'processors']).is_a?(Array) + self.processors = value + end + 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 @id.nil? + return false if @include.nil? + return false if @inputs.nil? + return false if @processors.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param inputs [Object] Object to be assigned + # @!visibility private + def inputs=(inputs) + if inputs.nil? + fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' + end + @inputs = inputs + end + + # Custom attribute writer method with validation + # @param processors [Object] Object to be assigned + # @!visibility private + def processors=(processors) + if processors.nil? + fail ArgumentError, 'invalid value for "processors", processors cannot be nil.' + end + @processors = processors + 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 && + enabled == o.enabled && + id == o.id && + include == o.include && + inputs == o.inputs && + processors == o.processors && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, id, include, inputs, processors, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_processors.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_processors.rb new file mode 100644 index 00000000000..673dbee4568 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_processors.rb @@ -0,0 +1,63 @@ +=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 list of processors that transform or enrich log data, or a list of grouped processor configurations. + module ObservabilityPipelineConfigProcessors + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Array', + :'Array' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb index e0d50f74d5c..deea4b8bd0b 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb @@ -21,14 +21,17 @@ module DatadogAPIClient::V2 class ObservabilityPipelineCustomProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this processor. attr_reader :id # A Datadog search query used to determine which logs this processor targets. This field should always be set to `*` for the custom_processor processor. attr_reader :include - # A list of component IDs whose output is used as the input for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # Array of VRL remap rules. attr_reader :remaps @@ -42,6 +45,7 @@ class ObservabilityPipelineCustomProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -111,7 +120,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @remaps.nil? return false if @remaps.length < 1 return false if @type.nil? @@ -138,16 +146,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param remaps [Object] Object to be assigned # @!visibility private @@ -197,6 +195,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -209,7 +208,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, remaps, type, additional_properties].hash + [enabled, id, include, inputs, remaps, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb index 4b3ae3a6e07..b1be20f88cd 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb @@ -24,14 +24,17 @@ class ObservabilityPipelineDatadogTagsProcessor # The action to take on tags with matching keys. attr_reader :action + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). attr_reader :id # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # A list of tag keys. attr_reader :keys @@ -49,6 +52,7 @@ class ObservabilityPipelineDatadogTagsProcessor def self.attribute_map { :'action' => :'action', + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -63,6 +67,7 @@ def self.attribute_map def self.openapi_types { :'action' => :'ObservabilityPipelineDatadogTagsProcessorAction', + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -94,6 +99,10 @@ def initialize(attributes = {}) self.action = attributes[:'action'] end + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -130,7 +139,6 @@ def valid? return false if @action.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @keys.nil? return false if @mode.nil? return false if @type.nil? @@ -167,16 +175,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param keys [Object] Object to be assigned # @!visibility private @@ -234,6 +232,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && action == o.action && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -247,7 +246,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [action, id, include, inputs, keys, mode, type, additional_properties].hash + [action, enabled, id, include, inputs, keys, mode, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb index 23b20920ed1..5b097dec808 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineDedupeProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # A list of log field paths to check for duplicates. attr_reader :fields @@ -30,8 +33,8 @@ class ObservabilityPipelineDedupeProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the input for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The deduplication mode to apply to the fields. attr_reader :mode @@ -45,6 +48,7 @@ class ObservabilityPipelineDedupeProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'fields' => :'fields', :'id' => :'id', :'include' => :'include', @@ -58,6 +62,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'fields' => :'Array', :'id' => :'String', :'include' => :'String', @@ -85,6 +90,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'fields') if (value = attributes[:'fields']).is_a?(Array) self.fields = value @@ -121,7 +130,6 @@ def valid? return false if @fields.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @mode.nil? return false if @type.nil? true @@ -157,16 +165,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param mode [Object] Object to be assigned # @!visibility private @@ -213,6 +211,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && fields == o.fields && id == o.id && include == o.include && @@ -226,7 +225,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [fields, id, include, inputs, mode, type, additional_properties].hash + [enabled, fields, id, include, inputs, mode, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb index eedfd442c2d..df589314ddd 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineEnrichmentTableProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # Defines a static enrichment table loaded from a CSV file. attr_accessor :file @@ -33,8 +36,8 @@ class ObservabilityPipelineEnrichmentTableProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the input for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # Path where enrichment results should be stored in the log. attr_reader :target @@ -48,6 +51,7 @@ class ObservabilityPipelineEnrichmentTableProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'file' => :'file', :'geoip' => :'geoip', :'id' => :'id', @@ -62,6 +66,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'file' => :'ObservabilityPipelineEnrichmentTableFile', :'geoip' => :'ObservabilityPipelineEnrichmentTableGeoIp', :'id' => :'String', @@ -90,6 +95,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'file') self.file = attributes[:'file'] end @@ -127,7 +136,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @target.nil? return false if @type.nil? true @@ -153,16 +161,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param target [Object] Object to be assigned # @!visibility private @@ -209,6 +207,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && file == o.file && geoip == o.geoip && id == o.id && @@ -223,7 +222,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [file, geoip, id, include, inputs, target, type, additional_properties].hash + [enabled, file, geoip, id, include, inputs, target, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb index 66dd3a9d58a..fbe102a9e83 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb @@ -21,14 +21,17 @@ module DatadogAPIClient::V2 class ObservabilityPipelineFilterProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). attr_reader :id # A Datadog search query used to determine which logs should pass through the filter. Logs that match this query continue to downstream components; others are dropped. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The processor type. The value should always be `filter`. attr_reader :type @@ -39,6 +42,7 @@ class ObservabilityPipelineFilterProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -50,6 +54,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -75,6 +80,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -100,7 +109,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @type.nil? true end @@ -125,16 +133,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -171,6 +169,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -182,7 +181,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, type, additional_properties].hash + [enabled, id, include, inputs, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb index 1b5de81f58c..51a863d6c10 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb @@ -22,17 +22,20 @@ module DatadogAPIClient::V2 class ObservabilityPipelineGenerateMetricsProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline. attr_reader :id # A Datadog search query used to determine which logs this processor targets. - attr_reader :include + attr_accessor :include - # A list of component IDs whose output is used as the `input` for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # Configuration for generating individual metrics. - attr_reader :metrics + attr_accessor :metrics # The processor type. Always `generate_datadog_metrics`. attr_reader :type @@ -43,6 +46,7 @@ class ObservabilityPipelineGenerateMetricsProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -55,6 +59,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -81,6 +86,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -111,9 +120,6 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @id.nil? - return false if @include.nil? - return false if @inputs.nil? - return false if @metrics.nil? return false if @type.nil? true end @@ -128,36 +134,6 @@ def id=(id) @id = id end - # Custom attribute writer method with validation - # @param include [Object] Object to be assigned - # @!visibility private - def include=(include) - if include.nil? - fail ArgumentError, 'invalid value for "include", include cannot be nil.' - end - @include = include - end - - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - - # Custom attribute writer method with validation - # @param metrics [Object] Object to be assigned - # @!visibility private - def metrics=(metrics) - if metrics.nil? - fail ArgumentError, 'invalid value for "metrics", metrics cannot be nil.' - end - @metrics = metrics - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -194,6 +170,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -206,7 +183,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, metrics, type, additional_properties].hash + [enabled, id, include, inputs, metrics, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb index 5f245ff6273..6f6cda31cc1 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb @@ -21,14 +21,17 @@ module DatadogAPIClient::V2 class ObservabilityPipelineOcsfMapperProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline. attr_reader :id # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # A list of mapping rules to convert events to the OCSF format. attr_reader :mappings @@ -42,6 +45,7 @@ class ObservabilityPipelineOcsfMapperProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -111,7 +120,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @mappings.nil? return false if @type.nil? true @@ -137,16 +145,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param mappings [Object] Object to be assigned # @!visibility private @@ -193,6 +191,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -205,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, mappings, type, additional_properties].hash + [enabled, id, include, inputs, mappings, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb index 2b39ee4555d..725a716c4bf 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb @@ -24,14 +24,17 @@ class ObservabilityPipelineParseGrokProcessor # If set to `true`, disables the default Grok rules provided by Datadog. attr_accessor :disable_library_rules + # Whether this processor is enabled. + attr_accessor :enabled + # A unique identifier for this processor. attr_reader :id # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The list of Grok parsing rules. If multiple matching rules are provided, they are evaluated in order. The first successful match is applied. attr_reader :rules @@ -46,6 +49,7 @@ class ObservabilityPipelineParseGrokProcessor def self.attribute_map { :'disable_library_rules' => :'disable_library_rules', + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -59,6 +63,7 @@ def self.attribute_map def self.openapi_types { :'disable_library_rules' => :'Boolean', + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -89,6 +94,10 @@ def initialize(attributes = {}) self.disable_library_rules = attributes[:'disable_library_rules'] end + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -120,7 +129,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @rules.nil? return false if @type.nil? true @@ -146,16 +154,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param rules [Object] Object to be assigned # @!visibility private @@ -203,6 +201,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && disable_library_rules == o.disable_library_rules && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -215,7 +214,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [disable_library_rules, id, include, inputs, rules, type, additional_properties].hash + [disable_library_rules, enabled, id, include, inputs, rules, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb index 7080c8c17de..4c87e2b653f 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineParseJSONProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The name of the log field that contains a JSON string. attr_reader :field @@ -30,8 +33,8 @@ class ObservabilityPipelineParseJSONProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The processor type. The value should always be `parse_json`. attr_reader :type @@ -42,6 +45,7 @@ class ObservabilityPipelineParseJSONProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'field' => :'field', :'id' => :'id', :'include' => :'include', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'field' => :'String', :'id' => :'String', :'include' => :'String', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'field') self.field = attributes[:'field'] end @@ -110,7 +119,6 @@ def valid? return false if @field.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @type.nil? true end @@ -145,16 +153,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -191,6 +189,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && field == o.field && id == o.id && include == o.include && @@ -203,7 +202,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [field, id, include, inputs, type, additional_properties].hash + [enabled, field, id, include, inputs, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb index 173607241a6..9262bf7ef3a 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb @@ -24,6 +24,9 @@ class ObservabilityPipelineQuotaProcessor # If set to `true`, logs that matched the quota filter and sent after the quota has been met are dropped; only logs that did not match the filter query continue through the pipeline. attr_reader :drop_events + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). attr_reader :id @@ -33,8 +36,8 @@ class ObservabilityPipelineQuotaProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The maximum amount of data or number of events allowed before the quota is enforced. Can be specified in bytes or events. attr_reader :limit @@ -64,6 +67,7 @@ class ObservabilityPipelineQuotaProcessor def self.attribute_map { :'drop_events' => :'drop_events', + :'enabled' => :'enabled', :'id' => :'id', :'ignore_when_missing_partitions' => :'ignore_when_missing_partitions', :'include' => :'include', @@ -82,6 +86,7 @@ def self.attribute_map def self.openapi_types { :'drop_events' => :'Boolean', + :'enabled' => :'Boolean', :'id' => :'String', :'ignore_when_missing_partitions' => :'Boolean', :'include' => :'String', @@ -117,6 +122,10 @@ def initialize(attributes = {}) self.drop_events = attributes[:'drop_events'] end + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -171,7 +180,6 @@ def valid? return false if @drop_events.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @limit.nil? return false if @name.nil? return false if @type.nil? @@ -208,16 +216,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param limit [Object] Object to be assigned # @!visibility private @@ -275,6 +273,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && drop_events == o.drop_events && + enabled == o.enabled && id == o.id && ignore_when_missing_partitions == o.ignore_when_missing_partitions && include == o.include && @@ -292,7 +291,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [drop_events, id, ignore_when_missing_partitions, include, inputs, limit, name, overflow_action, overrides, partition_fields, type, additional_properties].hash + [drop_events, enabled, id, ignore_when_missing_partitions, include, inputs, limit, name, overflow_action, overrides, partition_fields, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb index d920ebf9b5c..68285387a48 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineReduceProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # A list of fields used to group log events for merging. attr_reader :group_by @@ -30,8 +33,8 @@ class ObservabilityPipelineReduceProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the input for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # List of merge strategies defining how values from grouped events should be combined. attr_reader :merge_strategies @@ -45,6 +48,7 @@ class ObservabilityPipelineReduceProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'group_by' => :'group_by', :'id' => :'id', :'include' => :'include', @@ -58,6 +62,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'group_by' => :'Array', :'id' => :'String', :'include' => :'String', @@ -85,6 +90,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'group_by') if (value = attributes[:'group_by']).is_a?(Array) self.group_by = value @@ -123,7 +132,6 @@ def valid? return false if @group_by.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @merge_strategies.nil? return false if @type.nil? true @@ -159,16 +167,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param merge_strategies [Object] Object to be assigned # @!visibility private @@ -215,6 +213,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && group_by == o.group_by && id == o.id && include == o.include && @@ -228,7 +227,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [group_by, id, include, inputs, merge_strategies, type, additional_properties].hash + [enabled, group_by, id, include, inputs, merge_strategies, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb index e57683adc75..6322cd61ed4 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineRemoveFieldsProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # A list of field names to be removed from each log event. attr_reader :fields @@ -30,8 +33,8 @@ class ObservabilityPipelineRemoveFieldsProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # The `PipelineRemoveFieldsProcessor` `inputs`. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The processor type. The value should always be `remove_fields`. attr_reader :type @@ -42,6 +45,7 @@ class ObservabilityPipelineRemoveFieldsProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'fields' => :'fields', :'id' => :'id', :'include' => :'include', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'fields' => :'Array', :'id' => :'String', :'include' => :'String', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'fields') if (value = attributes[:'fields']).is_a?(Array) self.fields = value @@ -112,7 +121,6 @@ def valid? return false if @fields.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @type.nil? true end @@ -147,16 +155,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -193,6 +191,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && fields == o.fields && id == o.id && include == o.include && @@ -205,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [fields, id, include, inputs, type, additional_properties].hash + [enabled, fields, id, include, inputs, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb index c8e37f1787d..872395213c7 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineRenameFieldsProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # A list of rename rules specifying which fields to rename in the event, what to rename them to, and whether to preserve the original fields. attr_reader :fields @@ -30,8 +33,8 @@ class ObservabilityPipelineRenameFieldsProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The processor type. The value should always be `rename_fields`. attr_reader :type @@ -42,6 +45,7 @@ class ObservabilityPipelineRenameFieldsProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'fields' => :'fields', :'id' => :'id', :'include' => :'include', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'fields' => :'Array', :'id' => :'String', :'include' => :'String', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'fields') if (value = attributes[:'fields']).is_a?(Array) self.fields = value @@ -112,7 +121,6 @@ def valid? return false if @fields.nil? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @type.nil? true end @@ -147,16 +155,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -193,6 +191,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && fields == o.fields && id == o.id && include == o.include && @@ -205,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [fields, id, include, inputs, type, additional_properties].hash + [enabled, fields, id, include, inputs, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb index 32229c4bad5..6e4bade0408 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb @@ -21,14 +21,17 @@ module DatadogAPIClient::V2 class ObservabilityPipelineSampleProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). attr_reader :id # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # The percentage of logs to sample. attr_accessor :percentage @@ -45,6 +48,7 @@ class ObservabilityPipelineSampleProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -58,6 +62,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -85,6 +90,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -118,7 +127,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if !@rate.nil? && @rate < 1 return false if @type.nil? true @@ -144,16 +152,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param rate [Object] Object to be assigned # @!visibility private @@ -200,6 +198,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -213,7 +212,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, percentage, rate, type, additional_properties].hash + [enabled, id, include, inputs, percentage, rate, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb index eaaac37f8c0..e634d08c24d 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb @@ -21,14 +21,17 @@ module DatadogAPIClient::V2 class ObservabilityPipelineSensitiveDataScannerProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components). attr_reader :id # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # A list of rules for identifying and acting on sensitive data patterns. attr_reader :rules @@ -42,6 +45,7 @@ class ObservabilityPipelineSensitiveDataScannerProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -54,6 +58,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -80,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -111,7 +120,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @rules.nil? return false if @type.nil? true @@ -137,16 +145,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param rules [Object] Object to be assigned # @!visibility private @@ -193,6 +191,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && id == o.id && include == o.include && inputs == o.inputs && @@ -205,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, rules, type, additional_properties].hash + [enabled, id, include, inputs, rules, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb index 7e68c940bda..989a318dff1 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineThrottleProcessor include BaseGenericModel + # Whether this processor is enabled. + attr_accessor :enabled + # Optional list of fields used to group events before the threshold has been reached. attr_accessor :group_by @@ -30,8 +33,8 @@ class ObservabilityPipelineThrottleProcessor # A Datadog search query used to determine which logs this processor targets. attr_reader :include - # A list of component IDs whose output is used as the input for this processor. - attr_reader :inputs + # A list of component IDs whose output is used as input for this processor. Required when used as a standalone processor, omit when used within a processor group. + attr_accessor :inputs # the number of events allowed in a given time window. Events sent after the threshold has been reached, are dropped. attr_reader :threshold @@ -48,6 +51,7 @@ class ObservabilityPipelineThrottleProcessor # @!visibility private def self.attribute_map { + :'enabled' => :'enabled', :'group_by' => :'group_by', :'id' => :'id', :'include' => :'include', @@ -62,6 +66,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled' => :'Boolean', :'group_by' => :'Array', :'id' => :'String', :'include' => :'String', @@ -90,6 +95,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + if attributes.key?(:'group_by') if (value = attributes[:'group_by']).is_a?(Array) self.group_by = value @@ -129,7 +138,6 @@ def initialize(attributes = {}) def valid? return false if @id.nil? return false if @include.nil? - return false if @inputs.nil? return false if @threshold.nil? return false if @type.nil? return false if @window.nil? @@ -156,16 +164,6 @@ def include=(include) @include = include end - # Custom attribute writer method with validation - # @param inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - end - # Custom attribute writer method with validation # @param threshold [Object] Object to be assigned # @!visibility private @@ -222,6 +220,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled == o.enabled && group_by == o.group_by && id == o.id && include == o.include && @@ -236,7 +235,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [group_by, id, include, inputs, threshold, type, window, additional_properties].hash + [enabled, group_by, id, include, inputs, threshold, type, window, additional_properties].hash end end end