From f332fad17dadca3fd38bcb37a747c1f919fe52fc Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 30 Dec 2025 14:15:46 +0000 Subject: [PATCH] Regenerate client from commit 7dc20ad of spec repo --- .generator/schemas/v2/openapi.yaml | 217 +++++++++-- lib/datadog_api_client/inflector.rb | 12 +- ...ability_pipeline_cloud_prem_destination.rb | 167 ++++++++ ...ty_pipeline_cloud_prem_destination_type.rb | 26 ++ ...bility_pipeline_config_destination_item.rb | 4 +- ...bservability_pipeline_kafka_destination.rb | 359 ++++++++++++++++++ ..._pipeline_kafka_destination_compression.rb | 30 ++ ...ity_pipeline_kafka_destination_encoding.rb | 27 ++ ...ability_pipeline_kafka_destination_type.rb | 26 ++ ...ility_pipeline_kafka_librdkafka_option.rb} | 6 +- ...b => observability_pipeline_kafka_sasl.rb} | 6 +- ...vability_pipeline_kafka_sasl_mechanism.rb} | 2 +- .../observability_pipeline_kafka_source.rb | 4 +- 13 files changed, 836 insertions(+), 50 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination_type.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_compression.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_encoding.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_type.rb rename lib/datadog_api_client/v2/models/{observability_pipeline_kafka_source_librdkafka_option.rb => observability_pipeline_kafka_librdkafka_option.rb} (95%) rename lib/datadog_api_client/v2/models/{observability_pipeline_kafka_source_sasl.rb => observability_pipeline_kafka_sasl.rb} (95%) rename lib/datadog_api_client/v2/models/{observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb => observability_pipeline_kafka_sasl_mechanism.rb} (92%) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d2192b74841f..f81d82c0f21e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -35455,6 +35455,37 @@ components: role session. type: string type: object + ObservabilityPipelineCloudPremDestination: + description: The `cloud_prem` destination sends logs to Datadog CloudPrem. + properties: + id: + description: The unique identifier for this component. + example: cloud-prem-destination + type: string + inputs: + description: A list of component IDs whose output is used as the `input` + for this component. + example: + - filter-processor + items: + type: string + type: array + type: + $ref: '#/components/schemas/ObservabilityPipelineCloudPremDestinationType' + required: + - id + - type + - inputs + type: object + ObservabilityPipelineCloudPremDestinationType: + default: cloud_prem + description: The destination type. The value should always be `cloud_prem`. + enum: + - cloud_prem + example: cloud_prem + type: string + x-enum-varnames: + - CLOUD_PREM ObservabilityPipelineComponentDisplayName: description: The display name for a component. example: my component @@ -35510,6 +35541,7 @@ components: description: A destination for the pipeline. oneOf: - $ref: '#/components/schemas/ObservabilityPipelineDatadogLogsDestination' + - $ref: '#/components/schemas/ObservabilityPipelineCloudPremDestination' - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3Destination' - $ref: '#/components/schemas/ObservabilityPipelineGoogleCloudStorageDestination' - $ref: '#/components/schemas/ObservabilityPipelineSplunkHecDestination' @@ -35528,6 +35560,7 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination' - $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination' - $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestination' + - $ref: '#/components/schemas/ObservabilityPipelineKafkaDestination' ObservabilityPipelineConfigProcessorGroup: description: A group of processors. example: @@ -36826,6 +36859,151 @@ components: type: string x-enum-varnames: - HTTP_SERVER + ObservabilityPipelineKafkaDestination: + description: The `kafka` destination sends logs to Apache Kafka topics. + properties: + compression: + $ref: '#/components/schemas/ObservabilityPipelineKafkaDestinationCompression' + encoding: + $ref: '#/components/schemas/ObservabilityPipelineKafkaDestinationEncoding' + headers_key: + description: The field name to use for Kafka message headers. + example: headers + type: string + id: + description: The unique identifier for this component. + example: kafka-destination + type: string + inputs: + description: A list of component IDs whose output is used as the `input` + for this component. + example: + - filter-processor + items: + type: string + type: array + key_field: + description: The field name to use as the Kafka message key. + example: message_id + type: string + librdkafka_options: + description: Optional list of advanced Kafka producer configuration options, + defined as key-value pairs. + items: + $ref: '#/components/schemas/ObservabilityPipelineKafkaLibrdkafkaOption' + type: array + message_timeout_ms: + description: Maximum time in milliseconds to wait for message delivery confirmation. + example: 300000 + format: int64 + minimum: 1 + type: integer + rate_limit_duration_secs: + description: Duration in seconds for the rate limit window. + example: 1 + format: int64 + minimum: 1 + type: integer + rate_limit_num: + description: Maximum number of messages allowed per rate limit duration. + example: 1000 + format: int64 + minimum: 1 + type: integer + sasl: + $ref: '#/components/schemas/ObservabilityPipelineKafkaSasl' + socket_timeout_ms: + description: Socket timeout in milliseconds for network requests. + example: 60000 + format: int64 + maximum: 300000 + minimum: 10 + type: integer + tls: + $ref: '#/components/schemas/ObservabilityPipelineTls' + topic: + description: The Kafka topic name to publish logs to. + example: logs-topic + type: string + type: + $ref: '#/components/schemas/ObservabilityPipelineKafkaDestinationType' + required: + - id + - type + - inputs + - topic + - encoding + type: object + ObservabilityPipelineKafkaDestinationCompression: + description: Compression codec for Kafka messages. + enum: + - none + - gzip + - snappy + - lz4 + - zstd + example: gzip + type: string + x-enum-varnames: + - NONE + - GZIP + - SNAPPY + - LZ4 + - ZSTD + ObservabilityPipelineKafkaDestinationEncoding: + description: Encoding format for log events. + enum: + - json + - raw_message + example: json + type: string + x-enum-varnames: + - JSON + - RAW_MESSAGE + ObservabilityPipelineKafkaDestinationType: + default: kafka + description: The destination type. The value should always be `kafka`. + enum: + - kafka + example: kafka + type: string + x-enum-varnames: + - KAFKA + ObservabilityPipelineKafkaLibrdkafkaOption: + description: Represents a key-value pair used to configure low-level `librdkafka` + client options for Kafka source and destination, such as timeouts, buffer + sizes, and security settings. + properties: + name: + description: The name of the `librdkafka` configuration option to set. + example: fetch.message.max.bytes + type: string + value: + description: The value assigned to the specified `librdkafka` configuration + option. + example: '1048576' + type: string + required: + - name + - value + type: object + ObservabilityPipelineKafkaSasl: + description: Specifies the SASL mechanism for authenticating with a Kafka cluster. + properties: + mechanism: + $ref: '#/components/schemas/ObservabilityPipelineKafkaSaslMechanism' + type: object + ObservabilityPipelineKafkaSaslMechanism: + description: SASL mechanism used for Kafka authentication. + enum: + - PLAIN + - SCRAM-SHA-256 + - SCRAM-SHA-512 + type: string + x-enum-varnames: + - PLAIN + - SCRAMNOT_SHANOT_256 + - SCRAMNOT_SHANOT_512 ObservabilityPipelineKafkaSource: description: The `kafka` source ingests data from Apache Kafka topics. properties: @@ -36843,10 +37021,10 @@ components: description: Optional list of advanced Kafka client configuration options, defined as key-value pairs. items: - $ref: '#/components/schemas/ObservabilityPipelineKafkaSourceLibrdkafkaOption' + $ref: '#/components/schemas/ObservabilityPipelineKafkaLibrdkafkaOption' type: array sasl: - $ref: '#/components/schemas/ObservabilityPipelineKafkaSourceSasl' + $ref: '#/components/schemas/ObservabilityPipelineKafkaSasl' tls: $ref: '#/components/schemas/ObservabilityPipelineTls' topics: @@ -36866,30 +37044,6 @@ components: - group_id - topics type: object - ObservabilityPipelineKafkaSourceLibrdkafkaOption: - description: Represents a key-value pair used to configure low-level `librdkafka` - client options for Kafka sources, such as timeouts, buffer sizes, and security - settings. - properties: - name: - description: The name of the `librdkafka` configuration option to set. - example: fetch.message.max.bytes - type: string - value: - description: The value assigned to the specified `librdkafka` configuration - option. - example: '1048576' - type: string - required: - - name - - value - type: object - ObservabilityPipelineKafkaSourceSasl: - description: Specifies the SASL mechanism for authenticating with a Kafka cluster. - properties: - mechanism: - $ref: '#/components/schemas/ObservabilityPipelinePipelineKafkaSourceSaslMechanism' - type: object ObservabilityPipelineKafkaSourceType: default: kafka description: The source type. The value should always be `kafka`. @@ -37279,17 +37433,6 @@ components: type: string x-enum-varnames: - PARSE_JSON - ObservabilityPipelinePipelineKafkaSourceSaslMechanism: - description: SASL mechanism used for Kafka authentication. - enum: - - PLAIN - - SCRAM-SHA-256 - - SCRAM-SHA-512 - type: string - x-enum-varnames: - - PLAIN - - SCRAMNOT_SHANOT_256 - - SCRAMNOT_SHANOT_512 ObservabilityPipelineQuotaProcessor: description: The Quota Processor measures logging traffic for logs that match a specified filter. When the configured daily quota is met, the processor diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 022391df7878..fff32bf0f1f1 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3153,6 +3153,8 @@ def overrides "v2.observability_pipeline_amazon_security_lake_destination" => "ObservabilityPipelineAmazonSecurityLakeDestination", "v2.observability_pipeline_amazon_security_lake_destination_type" => "ObservabilityPipelineAmazonSecurityLakeDestinationType", "v2.observability_pipeline_aws_auth" => "ObservabilityPipelineAwsAuth", + "v2.observability_pipeline_cloud_prem_destination" => "ObservabilityPipelineCloudPremDestination", + "v2.observability_pipeline_cloud_prem_destination_type" => "ObservabilityPipelineCloudPremDestinationType", "v2.observability_pipeline_config" => "ObservabilityPipelineConfig", "v2.observability_pipeline_config_destination_item" => "ObservabilityPipelineConfigDestinationItem", "v2.observability_pipeline_config_processor_group" => "ObservabilityPipelineConfigProcessorGroup", @@ -3227,9 +3229,14 @@ def overrides "v2.observability_pipeline_http_server_source" => "ObservabilityPipelineHttpServerSource", "v2.observability_pipeline_http_server_source_auth_strategy" => "ObservabilityPipelineHttpServerSourceAuthStrategy", "v2.observability_pipeline_http_server_source_type" => "ObservabilityPipelineHttpServerSourceType", + "v2.observability_pipeline_kafka_destination" => "ObservabilityPipelineKafkaDestination", + "v2.observability_pipeline_kafka_destination_compression" => "ObservabilityPipelineKafkaDestinationCompression", + "v2.observability_pipeline_kafka_destination_encoding" => "ObservabilityPipelineKafkaDestinationEncoding", + "v2.observability_pipeline_kafka_destination_type" => "ObservabilityPipelineKafkaDestinationType", + "v2.observability_pipeline_kafka_librdkafka_option" => "ObservabilityPipelineKafkaLibrdkafkaOption", + "v2.observability_pipeline_kafka_sasl" => "ObservabilityPipelineKafkaSasl", + "v2.observability_pipeline_kafka_sasl_mechanism" => "ObservabilityPipelineKafkaSaslMechanism", "v2.observability_pipeline_kafka_source" => "ObservabilityPipelineKafkaSource", - "v2.observability_pipeline_kafka_source_librdkafka_option" => "ObservabilityPipelineKafkaSourceLibrdkafkaOption", - "v2.observability_pipeline_kafka_source_sasl" => "ObservabilityPipelineKafkaSourceSasl", "v2.observability_pipeline_kafka_source_type" => "ObservabilityPipelineKafkaSourceType", "v2.observability_pipeline_logstash_source" => "ObservabilityPipelineLogstashSource", "v2.observability_pipeline_logstash_source_type" => "ObservabilityPipelineLogstashSourceType", @@ -3252,7 +3259,6 @@ def overrides "v2.observability_pipeline_parse_grok_processor_type" => "ObservabilityPipelineParseGrokProcessorType", "v2.observability_pipeline_parse_json_processor" => "ObservabilityPipelineParseJSONProcessor", "v2.observability_pipeline_parse_json_processor_type" => "ObservabilityPipelineParseJSONProcessorType", - "v2.observability_pipeline_pipeline_kafka_source_sasl_mechanism" => "ObservabilityPipelinePipelineKafkaSourceSaslMechanism", "v2.observability_pipeline_quota_processor" => "ObservabilityPipelineQuotaProcessor", "v2.observability_pipeline_quota_processor_limit" => "ObservabilityPipelineQuotaProcessorLimit", "v2.observability_pipeline_quota_processor_limit_enforce_type" => "ObservabilityPipelineQuotaProcessorLimitEnforceType", diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination.rb new file mode 100644 index 000000000000..05a04dc34b81 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The `cloud_prem` destination sends logs to Datadog CloudPrem. + class ObservabilityPipelineCloudPremDestination + include BaseGenericModel + + # The unique identifier for this component. + attr_reader :id + + # A list of component IDs whose output is used as the `input` for this component. + attr_reader :inputs + + # The destination type. The value should always be `cloud_prem`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'inputs' => :'inputs', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'inputs' => :'Array', + :'type' => :'ObservabilityPipelineCloudPremDestinationType' + } + 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::ObservabilityPipelineCloudPremDestination` 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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'inputs') + if (value = attributes[:'inputs']).is_a?(Array) + self.inputs = value + end + 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 @id.nil? + return false if @inputs.nil? + return false if @type.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 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 + 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 && + id == o.id && + inputs == o.inputs && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, inputs, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination_type.rb new file mode 100644 index 000000000000..8f235942f08e --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_cloud_prem_destination_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The destination type. The value should always be `cloud_prem`. + class ObservabilityPipelineCloudPremDestinationType + include BaseEnumModel + + CLOUD_PREM = "cloud_prem".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb index 00386a1aa190..4b7114df2f5a 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb @@ -27,6 +27,7 @@ class << self def openapi_one_of [ :'ObservabilityPipelineDatadogLogsDestination', + :'ObservabilityPipelineCloudPremDestination', :'ObservabilityPipelineAmazonS3Destination', :'ObservabilityPipelineGoogleCloudStorageDestination', :'ObservabilityPipelineSplunkHecDestination', @@ -44,7 +45,8 @@ def openapi_one_of :'ObservabilityPipelineSocketDestination', :'ObservabilityPipelineAmazonSecurityLakeDestination', :'ObservabilityPipelineCrowdStrikeNextGenSiemDestination', - :'ObservabilityPipelineGooglePubSubDestination' + :'ObservabilityPipelineGooglePubSubDestination', + :'ObservabilityPipelineKafkaDestination' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination.rb new file mode 100644 index 000000000000..8e164742f96a --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination.rb @@ -0,0 +1,359 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The `kafka` destination sends logs to Apache Kafka topics. + class ObservabilityPipelineKafkaDestination + include BaseGenericModel + + # Compression codec for Kafka messages. + attr_accessor :compression + + # Encoding format for log events. + attr_reader :encoding + + # The field name to use for Kafka message headers. + attr_accessor :headers_key + + # The unique identifier for this component. + attr_reader :id + + # A list of component IDs whose output is used as the `input` for this component. + attr_reader :inputs + + # The field name to use as the Kafka message key. + attr_accessor :key_field + + # Optional list of advanced Kafka producer configuration options, defined as key-value pairs. + attr_accessor :librdkafka_options + + # Maximum time in milliseconds to wait for message delivery confirmation. + attr_reader :message_timeout_ms + + # Duration in seconds for the rate limit window. + attr_reader :rate_limit_duration_secs + + # Maximum number of messages allowed per rate limit duration. + attr_reader :rate_limit_num + + # Specifies the SASL mechanism for authenticating with a Kafka cluster. + attr_accessor :sasl + + # Socket timeout in milliseconds for network requests. + attr_reader :socket_timeout_ms + + # Configuration for enabling TLS encryption between the pipeline component and external services. + attr_accessor :tls + + # The Kafka topic name to publish logs to. + attr_reader :topic + + # The destination type. The value should always be `kafka`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compression' => :'compression', + :'encoding' => :'encoding', + :'headers_key' => :'headers_key', + :'id' => :'id', + :'inputs' => :'inputs', + :'key_field' => :'key_field', + :'librdkafka_options' => :'librdkafka_options', + :'message_timeout_ms' => :'message_timeout_ms', + :'rate_limit_duration_secs' => :'rate_limit_duration_secs', + :'rate_limit_num' => :'rate_limit_num', + :'sasl' => :'sasl', + :'socket_timeout_ms' => :'socket_timeout_ms', + :'tls' => :'tls', + :'topic' => :'topic', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compression' => :'ObservabilityPipelineKafkaDestinationCompression', + :'encoding' => :'ObservabilityPipelineKafkaDestinationEncoding', + :'headers_key' => :'String', + :'id' => :'String', + :'inputs' => :'Array', + :'key_field' => :'String', + :'librdkafka_options' => :'Array', + :'message_timeout_ms' => :'Integer', + :'rate_limit_duration_secs' => :'Integer', + :'rate_limit_num' => :'Integer', + :'sasl' => :'ObservabilityPipelineKafkaSasl', + :'socket_timeout_ms' => :'Integer', + :'tls' => :'ObservabilityPipelineTls', + :'topic' => :'String', + :'type' => :'ObservabilityPipelineKafkaDestinationType' + } + 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::ObservabilityPipelineKafkaDestination` 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?(:'compression') + self.compression = attributes[:'compression'] + end + + if attributes.key?(:'encoding') + self.encoding = attributes[:'encoding'] + end + + if attributes.key?(:'headers_key') + self.headers_key = attributes[:'headers_key'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'inputs') + if (value = attributes[:'inputs']).is_a?(Array) + self.inputs = value + end + end + + if attributes.key?(:'key_field') + self.key_field = attributes[:'key_field'] + end + + if attributes.key?(:'librdkafka_options') + if (value = attributes[:'librdkafka_options']).is_a?(Array) + self.librdkafka_options = value + end + end + + if attributes.key?(:'message_timeout_ms') + self.message_timeout_ms = attributes[:'message_timeout_ms'] + end + + if attributes.key?(:'rate_limit_duration_secs') + self.rate_limit_duration_secs = attributes[:'rate_limit_duration_secs'] + end + + if attributes.key?(:'rate_limit_num') + self.rate_limit_num = attributes[:'rate_limit_num'] + end + + if attributes.key?(:'sasl') + self.sasl = attributes[:'sasl'] + end + + if attributes.key?(:'socket_timeout_ms') + self.socket_timeout_ms = attributes[:'socket_timeout_ms'] + end + + if attributes.key?(:'tls') + self.tls = attributes[:'tls'] + end + + if attributes.key?(:'topic') + self.topic = attributes[:'topic'] + 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 @encoding.nil? + return false if @id.nil? + return false if @inputs.nil? + return false if !@message_timeout_ms.nil? && @message_timeout_ms < 1 + return false if !@rate_limit_duration_secs.nil? && @rate_limit_duration_secs < 1 + return false if !@rate_limit_num.nil? && @rate_limit_num < 1 + return false if !@socket_timeout_ms.nil? && @socket_timeout_ms > 300000 + return false if !@socket_timeout_ms.nil? && @socket_timeout_ms < 10 + return false if @topic.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param encoding [Object] Object to be assigned + # @!visibility private + def encoding=(encoding) + if encoding.nil? + fail ArgumentError, 'invalid value for "encoding", encoding cannot be nil.' + end + @encoding = encoding + 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 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 message_timeout_ms [Object] Object to be assigned + # @!visibility private + def message_timeout_ms=(message_timeout_ms) + if !message_timeout_ms.nil? && message_timeout_ms < 1 + fail ArgumentError, 'invalid value for "message_timeout_ms", must be greater than or equal to 1.' + end + @message_timeout_ms = message_timeout_ms + end + + # Custom attribute writer method with validation + # @param rate_limit_duration_secs [Object] Object to be assigned + # @!visibility private + def rate_limit_duration_secs=(rate_limit_duration_secs) + if !rate_limit_duration_secs.nil? && rate_limit_duration_secs < 1 + fail ArgumentError, 'invalid value for "rate_limit_duration_secs", must be greater than or equal to 1.' + end + @rate_limit_duration_secs = rate_limit_duration_secs + end + + # Custom attribute writer method with validation + # @param rate_limit_num [Object] Object to be assigned + # @!visibility private + def rate_limit_num=(rate_limit_num) + if !rate_limit_num.nil? && rate_limit_num < 1 + fail ArgumentError, 'invalid value for "rate_limit_num", must be greater than or equal to 1.' + end + @rate_limit_num = rate_limit_num + end + + # Custom attribute writer method with validation + # @param socket_timeout_ms [Object] Object to be assigned + # @!visibility private + def socket_timeout_ms=(socket_timeout_ms) + if !socket_timeout_ms.nil? && socket_timeout_ms > 300000 + fail ArgumentError, 'invalid value for "socket_timeout_ms", must be smaller than or equal to 300000.' + end + if !socket_timeout_ms.nil? && socket_timeout_ms < 10 + fail ArgumentError, 'invalid value for "socket_timeout_ms", must be greater than or equal to 10.' + end + @socket_timeout_ms = socket_timeout_ms + end + + # Custom attribute writer method with validation + # @param topic [Object] Object to be assigned + # @!visibility private + def topic=(topic) + if topic.nil? + fail ArgumentError, 'invalid value for "topic", topic cannot be nil.' + end + @topic = topic + 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 && + compression == o.compression && + encoding == o.encoding && + headers_key == o.headers_key && + id == o.id && + inputs == o.inputs && + key_field == o.key_field && + librdkafka_options == o.librdkafka_options && + message_timeout_ms == o.message_timeout_ms && + rate_limit_duration_secs == o.rate_limit_duration_secs && + rate_limit_num == o.rate_limit_num && + sasl == o.sasl && + socket_timeout_ms == o.socket_timeout_ms && + tls == o.tls && + topic == o.topic && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compression, encoding, headers_key, id, inputs, key_field, librdkafka_options, message_timeout_ms, rate_limit_duration_secs, rate_limit_num, sasl, socket_timeout_ms, tls, topic, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_compression.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_compression.rb new file mode 100644 index 000000000000..ccb074bfdb21 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_compression.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Compression codec for Kafka messages. + class ObservabilityPipelineKafkaDestinationCompression + include BaseEnumModel + + NONE = "none".freeze + GZIP = "gzip".freeze + SNAPPY = "snappy".freeze + LZ4 = "lz4".freeze + ZSTD = "zstd".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_encoding.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_encoding.rb new file mode 100644 index 000000000000..34209b47273c --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_encoding.rb @@ -0,0 +1,27 @@ +=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 + # Encoding format for log events. + class ObservabilityPipelineKafkaDestinationEncoding + include BaseEnumModel + + JSON = "json".freeze + RAW_MESSAGE = "raw_message".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_type.rb new file mode 100644 index 000000000000..0b2f5afbda5f --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_destination_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The destination type. The value should always be `kafka`. + class ObservabilityPipelineKafkaDestinationType + include BaseEnumModel + + KAFKA = "kafka".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_librdkafka_option.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_librdkafka_option.rb similarity index 95% rename from lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_librdkafka_option.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_kafka_librdkafka_option.rb index b911c8aaf19a..bf29a784d49c 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_librdkafka_option.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_librdkafka_option.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # Represents a key-value pair used to configure low-level `librdkafka` client options for Kafka sources, such as timeouts, buffer sizes, and security settings. - class ObservabilityPipelineKafkaSourceLibrdkafkaOption + # Represents a key-value pair used to configure low-level `librdkafka` client options for Kafka source and destination, such as timeouts, buffer sizes, and security settings. + class ObservabilityPipelineKafkaLibrdkafkaOption include BaseGenericModel # The name of the `librdkafka` configuration option to set. @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineKafkaSourceLibrdkafkaOption` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineKafkaLibrdkafkaOption` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_sasl.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_sasl.rb similarity index 95% rename from lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_sasl.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_kafka_sasl.rb index 886923a1868f..88fb7915b9da 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_sasl.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_sasl.rb @@ -18,7 +18,7 @@ module DatadogAPIClient::V2 # Specifies the SASL mechanism for authenticating with a Kafka cluster. - class ObservabilityPipelineKafkaSourceSasl + class ObservabilityPipelineKafkaSasl include BaseGenericModel # SASL mechanism used for Kafka authentication. @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'mechanism' => :'ObservabilityPipelinePipelineKafkaSourceSaslMechanism' + :'mechanism' => :'ObservabilityPipelineKafkaSaslMechanism' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineKafkaSourceSasl` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineKafkaSasl` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_sasl_mechanism.rb similarity index 92% rename from lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_kafka_sasl_mechanism.rb index 64187c5011f0..64cdb527b7ab 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_sasl_mechanism.rb @@ -18,7 +18,7 @@ module DatadogAPIClient::V2 # SASL mechanism used for Kafka authentication. - class ObservabilityPipelinePipelineKafkaSourceSaslMechanism + class ObservabilityPipelineKafkaSaslMechanism include BaseEnumModel PLAIN = "PLAIN".freeze diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb index 33c4b1649b15..c81abd61932c 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb @@ -64,8 +64,8 @@ def self.openapi_types { :'group_id' => :'String', :'id' => :'String', - :'librdkafka_options' => :'Array', - :'sasl' => :'ObservabilityPipelineKafkaSourceSasl', + :'librdkafka_options' => :'Array', + :'sasl' => :'ObservabilityPipelineKafkaSasl', :'tls' => :'ObservabilityPipelineTls', :'topics' => :'Array', :'type' => :'ObservabilityPipelineKafkaSourceType'