diff --git a/.apigentools-info b/.apigentools-info index 4c6ecf85a0e..a74297182e6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-06-23 20:34:45.845147", - "spec_repo_commit": "837c2656" + "regenerated": "2025-06-24 13:22:22.769874", + "spec_repo_commit": "a11e9377" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-06-23 20:34:45.862297", - "spec_repo_commit": "837c2656" + "regenerated": "2025-06-24 13:22:22.785605", + "spec_repo_commit": "a11e9377" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 115918b18dc..8de42f67bd6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -24267,6 +24267,7 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineSentinelOneDestination' - $ref: '#/components/schemas/ObservabilityPipelineOpenSearchDestination' - $ref: '#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination' + - $ref: '#/components/schemas/ObservabilityPipelineSocketDestination' ObservabilityPipelineConfigProcessorItem: description: A processor for the pipeline. oneOf: @@ -24304,6 +24305,7 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubSource' - $ref: '#/components/schemas/ObservabilityPipelineHttpClientSource' - $ref: '#/components/schemas/ObservabilityPipelineLogstashSource' + - $ref: '#/components/schemas/ObservabilityPipelineSocketSource' ObservabilityPipelineData: description: "Contains the pipeline\u2019s ID, type, and configuration attributes." properties: @@ -26587,6 +26589,278 @@ components: type: string x-enum-varnames: - SENTINEL_ONE + ObservabilityPipelineSocketDestination: + description: 'The `socket` destination sends logs over TCP or UDP to a remote + server. + + ' + properties: + encoding: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationEncoding' + framing: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFraming' + id: + description: The unique identifier for this component. + example: socket-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 + mode: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationMode' + tls: + $ref: '#/components/schemas/ObservabilityPipelineTls' + description: TLS configuration. Relevant only when `mode` is `tcp`. + type: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationType' + required: + - id + - type + - inputs + - encoding + - framing + - mode + type: object + ObservabilityPipelineSocketDestinationEncoding: + description: Encoding format for log events. + enum: + - json + - raw_message + example: json + type: string + x-enum-varnames: + - JSON + - RAW_MESSAGE + ObservabilityPipelineSocketDestinationFraming: + description: Framing method configuration. + oneOf: + - $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFramingNewlineDelimited' + - $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFramingBytes' + - $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFramingCharacterDelimited' + ObservabilityPipelineSocketDestinationFramingBytes: + description: Event data is not delimited at all. + properties: + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFramingBytesMethod' + required: + - method + type: object + ObservabilityPipelineSocketDestinationFramingBytesMethod: + description: The definition of `ObservabilityPipelineSocketDestinationFramingBytesMethod` + object. + enum: + - bytes + example: bytes + type: string + x-enum-varnames: + - BYTES + ObservabilityPipelineSocketDestinationFramingCharacterDelimited: + description: Each log event is separated using the specified delimiter character. + properties: + delimiter: + description: A single ASCII character used as a delimiter. + example: '|' + maxLength: 1 + minLength: 1 + type: string + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod' + required: + - method + - delimiter + type: object + ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod: + description: The definition of `ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod` + object. + enum: + - character_delimited + example: character_delimited + type: string + x-enum-varnames: + - CHARACTER_DELIMITED + ObservabilityPipelineSocketDestinationFramingNewlineDelimited: + description: Each log event is delimited by a newline character. + properties: + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod' + required: + - method + type: object + ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod: + description: The definition of `ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod` + object. + enum: + - newline_delimited + example: newline_delimited + type: string + x-enum-varnames: + - NEWLINE_DELIMITED + ObservabilityPipelineSocketDestinationMode: + description: Protocol used to send logs. + enum: + - tcp + - udp + example: tcp + type: string + x-enum-varnames: + - TCP + - UDP + ObservabilityPipelineSocketDestinationType: + default: socket + description: The destination type. The value should always be `socket`. + enum: + - socket + example: socket + type: string + x-enum-varnames: + - SOCKET + ObservabilityPipelineSocketSource: + description: 'The `socket` source ingests logs over TCP or UDP. + + ' + properties: + framing: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFraming' + 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 + components). + example: socket-source + type: string + mode: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceMode' + tls: + $ref: '#/components/schemas/ObservabilityPipelineTls' + description: TLS configuration. Relevant only when `mode` is `tcp`. + type: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceType' + required: + - id + - type + - mode + - framing + type: object + ObservabilityPipelineSocketSourceFraming: + description: Framing method configuration for the socket source. + oneOf: + - $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingNewlineDelimited' + - $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingBytes' + - $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingCharacterDelimited' + - $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingOctetCounting' + - $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingChunkedGelf' + ObservabilityPipelineSocketSourceFramingBytes: + description: Byte frames are passed through as-is according to the underlying + I/O boundaries (for example, split between messages or stream segments). + properties: + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingBytesMethod' + required: + - method + type: object + ObservabilityPipelineSocketSourceFramingBytesMethod: + description: Byte frames are passed through as-is according to the underlying + I/O boundaries (for example, split between messages or stream segments). + enum: + - bytes + example: bytes + type: string + x-enum-varnames: + - BYTES + ObservabilityPipelineSocketSourceFramingCharacterDelimited: + description: Byte frames which are delimited by a chosen character. + properties: + delimiter: + description: A single ASCII character used to delimit events. + example: '|' + maxLength: 1 + minLength: 1 + type: string + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingCharacterDelimitedMethod' + required: + - method + - delimiter + type: object + ObservabilityPipelineSocketSourceFramingCharacterDelimitedMethod: + description: Byte frames which are delimited by a chosen character. + enum: + - character_delimited + example: character_delimited + type: string + x-enum-varnames: + - CHARACTER_DELIMITED + ObservabilityPipelineSocketSourceFramingChunkedGelf: + description: Byte frames which are chunked GELF messages. + properties: + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingChunkedGelfMethod' + required: + - method + type: object + ObservabilityPipelineSocketSourceFramingChunkedGelfMethod: + description: Byte frames which are chunked GELF messages. + enum: + - chunked_gelf + example: chunked_gelf + type: string + x-enum-varnames: + - CHUNKED_GELF + ObservabilityPipelineSocketSourceFramingNewlineDelimited: + description: Byte frames which are delimited by a newline character. + properties: + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingNewlineDelimitedMethod' + required: + - method + type: object + ObservabilityPipelineSocketSourceFramingNewlineDelimitedMethod: + description: Byte frames which are delimited by a newline character. + enum: + - newline_delimited + example: newline_delimited + type: string + x-enum-varnames: + - NEWLINE_DELIMITED + ObservabilityPipelineSocketSourceFramingOctetCounting: + description: Byte frames according to the octet counting format as per RFC6587. + properties: + method: + $ref: '#/components/schemas/ObservabilityPipelineSocketSourceFramingOctetCountingMethod' + required: + - method + type: object + ObservabilityPipelineSocketSourceFramingOctetCountingMethod: + description: Byte frames according to the octet counting format as per RFC6587. + enum: + - octet_counting + example: octet_counting + type: string + x-enum-varnames: + - OCTET_COUNTING + ObservabilityPipelineSocketSourceMode: + description: Protocol used to receive logs. + enum: + - tcp + - udp + example: tcp + type: string + x-enum-varnames: + - TCP + - UDP + ObservabilityPipelineSocketSourceType: + default: socket + description: The source type. The value should always be `socket`. + enum: + - socket + example: socket + type: string + x-enum-varnames: + - SOCKET ObservabilityPipelineSpec: description: Input schema representing an observability pipeline configuration. Used in create and validate requests. diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 3c4246dc985..d5e6052f397 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2534,6 +2534,31 @@ def overrides "v2.observability_pipeline_sentinel_one_destination" => "ObservabilityPipelineSentinelOneDestination", "v2.observability_pipeline_sentinel_one_destination_region" => "ObservabilityPipelineSentinelOneDestinationRegion", "v2.observability_pipeline_sentinel_one_destination_type" => "ObservabilityPipelineSentinelOneDestinationType", + "v2.observability_pipeline_socket_destination" => "ObservabilityPipelineSocketDestination", + "v2.observability_pipeline_socket_destination_encoding" => "ObservabilityPipelineSocketDestinationEncoding", + "v2.observability_pipeline_socket_destination_framing" => "ObservabilityPipelineSocketDestinationFraming", + "v2.observability_pipeline_socket_destination_framing_bytes" => "ObservabilityPipelineSocketDestinationFramingBytes", + "v2.observability_pipeline_socket_destination_framing_bytes_method" => "ObservabilityPipelineSocketDestinationFramingBytesMethod", + "v2.observability_pipeline_socket_destination_framing_character_delimited" => "ObservabilityPipelineSocketDestinationFramingCharacterDelimited", + "v2.observability_pipeline_socket_destination_framing_character_delimited_method" => "ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod", + "v2.observability_pipeline_socket_destination_framing_newline_delimited" => "ObservabilityPipelineSocketDestinationFramingNewlineDelimited", + "v2.observability_pipeline_socket_destination_framing_newline_delimited_method" => "ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod", + "v2.observability_pipeline_socket_destination_mode" => "ObservabilityPipelineSocketDestinationMode", + "v2.observability_pipeline_socket_destination_type" => "ObservabilityPipelineSocketDestinationType", + "v2.observability_pipeline_socket_source" => "ObservabilityPipelineSocketSource", + "v2.observability_pipeline_socket_source_framing" => "ObservabilityPipelineSocketSourceFraming", + "v2.observability_pipeline_socket_source_framing_bytes" => "ObservabilityPipelineSocketSourceFramingBytes", + "v2.observability_pipeline_socket_source_framing_bytes_method" => "ObservabilityPipelineSocketSourceFramingBytesMethod", + "v2.observability_pipeline_socket_source_framing_character_delimited" => "ObservabilityPipelineSocketSourceFramingCharacterDelimited", + "v2.observability_pipeline_socket_source_framing_character_delimited_method" => "ObservabilityPipelineSocketSourceFramingCharacterDelimitedMethod", + "v2.observability_pipeline_socket_source_framing_chunked_gelf" => "ObservabilityPipelineSocketSourceFramingChunkedGelf", + "v2.observability_pipeline_socket_source_framing_chunked_gelf_method" => "ObservabilityPipelineSocketSourceFramingChunkedGelfMethod", + "v2.observability_pipeline_socket_source_framing_newline_delimited" => "ObservabilityPipelineSocketSourceFramingNewlineDelimited", + "v2.observability_pipeline_socket_source_framing_newline_delimited_method" => "ObservabilityPipelineSocketSourceFramingNewlineDelimitedMethod", + "v2.observability_pipeline_socket_source_framing_octet_counting" => "ObservabilityPipelineSocketSourceFramingOctetCounting", + "v2.observability_pipeline_socket_source_framing_octet_counting_method" => "ObservabilityPipelineSocketSourceFramingOctetCountingMethod", + "v2.observability_pipeline_socket_source_mode" => "ObservabilityPipelineSocketSourceMode", + "v2.observability_pipeline_socket_source_type" => "ObservabilityPipelineSocketSourceType", "v2.observability_pipeline_spec" => "ObservabilityPipelineSpec", "v2.observability_pipeline_spec_data" => "ObservabilityPipelineSpecData", "v2.observability_pipeline_splunk_hec_destination" => "ObservabilityPipelineSplunkHecDestination", 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 1e6caf8776b..49882b61862 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 @@ -40,7 +40,8 @@ def openapi_one_of :'ObservabilityPipelineNewRelicDestination', :'ObservabilityPipelineSentinelOneDestination', :'ObservabilityPipelineOpenSearchDestination', - :'ObservabilityPipelineAmazonOpenSearchDestination' + :'ObservabilityPipelineAmazonOpenSearchDestination', + :'ObservabilityPipelineSocketDestination' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb index 082c74158e7..6c5e58312de 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb @@ -40,7 +40,8 @@ def openapi_one_of :'ObservabilityPipelineAmazonDataFirehoseSource', :'ObservabilityPipelineGooglePubSubSource', :'ObservabilityPipelineHttpClientSource', - :'ObservabilityPipelineLogstashSource' + :'ObservabilityPipelineLogstashSource', + :'ObservabilityPipelineSocketSource' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination.rb new file mode 100644 index 00000000000..bbe02582079 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination.rb @@ -0,0 +1,240 @@ +=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 `socket` destination sends logs over TCP or UDP to a remote server. + class ObservabilityPipelineSocketDestination + include BaseGenericModel + + # Encoding format for log events. + attr_reader :encoding + + # Framing method configuration. + attr_reader :framing + + # 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 + + # Protocol used to send logs. + attr_reader :mode + + # Configuration for enabling TLS encryption between the pipeline component and external services. + attr_accessor :tls + + # The destination type. The value should always be `socket`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'encoding' => :'encoding', + :'framing' => :'framing', + :'id' => :'id', + :'inputs' => :'inputs', + :'mode' => :'mode', + :'tls' => :'tls', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'encoding' => :'ObservabilityPipelineSocketDestinationEncoding', + :'framing' => :'ObservabilityPipelineSocketDestinationFraming', + :'id' => :'String', + :'inputs' => :'Array', + :'mode' => :'ObservabilityPipelineSocketDestinationMode', + :'tls' => :'ObservabilityPipelineTls', + :'type' => :'ObservabilityPipelineSocketDestinationType' + } + 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::ObservabilityPipelineSocketDestination` 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?(:'encoding') + self.encoding = attributes[:'encoding'] + end + + if attributes.key?(:'framing') + self.framing = attributes[:'framing'] + 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?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'tls') + self.tls = attributes[:'tls'] + 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 @framing.nil? + return false if @id.nil? + return false if @inputs.nil? + return false if @mode.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 framing [Object] Object to be assigned + # @!visibility private + def framing=(framing) + if framing.nil? + fail ArgumentError, 'invalid value for "framing", framing cannot be nil.' + end + @framing = framing + 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 mode [Object] Object to be assigned + # @!visibility private + def mode=(mode) + if mode.nil? + fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' + end + @mode = mode + 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 && + encoding == o.encoding && + framing == o.framing && + id == o.id && + inputs == o.inputs && + mode == o.mode && + tls == o.tls && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [encoding, framing, id, inputs, mode, tls, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_encoding.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_encoding.rb new file mode 100644 index 00000000000..704d00c75b5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_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 ObservabilityPipelineSocketDestinationEncoding + include BaseEnumModel + + JSON = "json".freeze + RAW_MESSAGE = "raw_message".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing.rb new file mode 100644 index 00000000000..eb3476b06d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing.rb @@ -0,0 +1,64 @@ +=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 + # Framing method configuration. + module ObservabilityPipelineSocketDestinationFraming + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ObservabilityPipelineSocketDestinationFramingNewlineDelimited', + :'ObservabilityPipelineSocketDestinationFramingBytes', + :'ObservabilityPipelineSocketDestinationFramingCharacterDelimited' + ] + 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_socket_destination_framing_bytes.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_bytes.rb new file mode 100644 index 00000000000..8982b532c69 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_bytes.rb @@ -0,0 +1,123 @@ +=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 + # Event data is not delimited at all. + class ObservabilityPipelineSocketDestinationFramingBytes + include BaseGenericModel + + # The definition of `ObservabilityPipelineSocketDestinationFramingBytesMethod` object. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'method' => :'ObservabilityPipelineSocketDestinationFramingBytesMethod' + } + 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::ObservabilityPipelineSocketDestinationFramingBytes` 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?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_bytes_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_bytes_method.rb new file mode 100644 index 00000000000..a3adc90f611 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_bytes_method.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 definition of `ObservabilityPipelineSocketDestinationFramingBytesMethod` object. + class ObservabilityPipelineSocketDestinationFramingBytesMethod + include BaseEnumModel + + BYTES = "bytes".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_character_delimited.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_character_delimited.rb new file mode 100644 index 00000000000..ca0b99e6b66 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_character_delimited.rb @@ -0,0 +1,152 @@ +=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 + # Each log event is separated using the specified delimiter character. + class ObservabilityPipelineSocketDestinationFramingCharacterDelimited + include BaseGenericModel + + # A single ASCII character used as a delimiter. + attr_reader :delimiter + + # The definition of `ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod` object. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'delimiter' => :'delimiter', + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'delimiter' => :'String', + :'method' => :'ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod' + } + 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::ObservabilityPipelineSocketDestinationFramingCharacterDelimited` 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?(:'delimiter') + self.delimiter = attributes[:'delimiter'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + 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 @delimiter.nil? + return false if @delimiter.to_s.length > 1 + return false if @delimiter.to_s.length < 1 + return false if @method.nil? + true + end + + # Custom attribute writer method with validation + # @param delimiter [Object] Object to be assigned + # @!visibility private + def delimiter=(delimiter) + if delimiter.nil? + fail ArgumentError, 'invalid value for "delimiter", delimiter cannot be nil.' + end + if delimiter.to_s.length > 1 + fail ArgumentError, 'invalid value for "delimiter", the character length must be smaller than or equal to 1.' + end + if delimiter.to_s.length < 1 + fail ArgumentError, 'invalid value for "delimiter", the character length must be great than or equal to 1.' + end + @delimiter = delimiter + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + delimiter == o.delimiter && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [delimiter, method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_character_delimited_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_character_delimited_method.rb new file mode 100644 index 00000000000..9c6e28183cc --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_character_delimited_method.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 definition of `ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod` object. + class ObservabilityPipelineSocketDestinationFramingCharacterDelimitedMethod + include BaseEnumModel + + CHARACTER_DELIMITED = "character_delimited".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_newline_delimited.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_newline_delimited.rb new file mode 100644 index 00000000000..5b3af92da9b --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_newline_delimited.rb @@ -0,0 +1,123 @@ +=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 + # Each log event is delimited by a newline character. + class ObservabilityPipelineSocketDestinationFramingNewlineDelimited + include BaseGenericModel + + # The definition of `ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod` object. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'method' => :'ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod' + } + 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::ObservabilityPipelineSocketDestinationFramingNewlineDelimited` 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?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_newline_delimited_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_newline_delimited_method.rb new file mode 100644 index 00000000000..bad0ccd41da --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_framing_newline_delimited_method.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 definition of `ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod` object. + class ObservabilityPipelineSocketDestinationFramingNewlineDelimitedMethod + include BaseEnumModel + + NEWLINE_DELIMITED = "newline_delimited".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_mode.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_mode.rb new file mode 100644 index 00000000000..9d5c5f6773f --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_mode.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 + # Protocol used to send logs. + class ObservabilityPipelineSocketDestinationMode + include BaseEnumModel + + TCP = "tcp".freeze + UDP = "udp".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_destination_type.rb new file mode 100644 index 00000000000..bd1a5b0ae1a --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_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 `socket`. + class ObservabilityPipelineSocketDestinationType + include BaseEnumModel + + SOCKET = "socket".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb new file mode 100644 index 00000000000..17356b2960a --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb @@ -0,0 +1,196 @@ +=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 `socket` source ingests logs over TCP or UDP. + class ObservabilityPipelineSocketSource + include BaseGenericModel + + # Framing method configuration for the socket source. + attr_reader :framing + + # 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 + + # Protocol used to receive logs. + attr_reader :mode + + # Configuration for enabling TLS encryption between the pipeline component and external services. + attr_accessor :tls + + # The source type. The value should always be `socket`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'framing' => :'framing', + :'id' => :'id', + :'mode' => :'mode', + :'tls' => :'tls', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'framing' => :'ObservabilityPipelineSocketSourceFraming', + :'id' => :'String', + :'mode' => :'ObservabilityPipelineSocketSourceMode', + :'tls' => :'ObservabilityPipelineTls', + :'type' => :'ObservabilityPipelineSocketSourceType' + } + 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::ObservabilityPipelineSocketSource` 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?(:'framing') + self.framing = attributes[:'framing'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'tls') + self.tls = attributes[:'tls'] + 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 @framing.nil? + return false if @id.nil? + return false if @mode.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param framing [Object] Object to be assigned + # @!visibility private + def framing=(framing) + if framing.nil? + fail ArgumentError, 'invalid value for "framing", framing cannot be nil.' + end + @framing = framing + 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 mode [Object] Object to be assigned + # @!visibility private + def mode=(mode) + if mode.nil? + fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' + end + @mode = mode + 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 && + framing == o.framing && + id == o.id && + mode == o.mode && + tls == o.tls && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [framing, id, mode, tls, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing.rb new file mode 100644 index 00000000000..724b0e463b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing.rb @@ -0,0 +1,66 @@ +=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 + # Framing method configuration for the socket source. + module ObservabilityPipelineSocketSourceFraming + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ObservabilityPipelineSocketSourceFramingNewlineDelimited', + :'ObservabilityPipelineSocketSourceFramingBytes', + :'ObservabilityPipelineSocketSourceFramingCharacterDelimited', + :'ObservabilityPipelineSocketSourceFramingOctetCounting', + :'ObservabilityPipelineSocketSourceFramingChunkedGelf' + ] + 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_socket_source_framing_bytes.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_bytes.rb new file mode 100644 index 00000000000..3fae6e224c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_bytes.rb @@ -0,0 +1,123 @@ +=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 + # Byte frames are passed through as-is according to the underlying I/O boundaries (for example, split between messages or stream segments). + class ObservabilityPipelineSocketSourceFramingBytes + include BaseGenericModel + + # Byte frames are passed through as-is according to the underlying I/O boundaries (for example, split between messages or stream segments). + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'method' => :'ObservabilityPipelineSocketSourceFramingBytesMethod' + } + 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::ObservabilityPipelineSocketSourceFramingBytes` 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?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_bytes_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_bytes_method.rb new file mode 100644 index 00000000000..8ccd726e0de --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_bytes_method.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 + # Byte frames are passed through as-is according to the underlying I/O boundaries (for example, split between messages or stream segments). + class ObservabilityPipelineSocketSourceFramingBytesMethod + include BaseEnumModel + + BYTES = "bytes".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_character_delimited.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_character_delimited.rb new file mode 100644 index 00000000000..de4e5dee262 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_character_delimited.rb @@ -0,0 +1,152 @@ +=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 + # Byte frames which are delimited by a chosen character. + class ObservabilityPipelineSocketSourceFramingCharacterDelimited + include BaseGenericModel + + # A single ASCII character used to delimit events. + attr_reader :delimiter + + # Byte frames which are delimited by a chosen character. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'delimiter' => :'delimiter', + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'delimiter' => :'String', + :'method' => :'ObservabilityPipelineSocketSourceFramingCharacterDelimitedMethod' + } + 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::ObservabilityPipelineSocketSourceFramingCharacterDelimited` 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?(:'delimiter') + self.delimiter = attributes[:'delimiter'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + 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 @delimiter.nil? + return false if @delimiter.to_s.length > 1 + return false if @delimiter.to_s.length < 1 + return false if @method.nil? + true + end + + # Custom attribute writer method with validation + # @param delimiter [Object] Object to be assigned + # @!visibility private + def delimiter=(delimiter) + if delimiter.nil? + fail ArgumentError, 'invalid value for "delimiter", delimiter cannot be nil.' + end + if delimiter.to_s.length > 1 + fail ArgumentError, 'invalid value for "delimiter", the character length must be smaller than or equal to 1.' + end + if delimiter.to_s.length < 1 + fail ArgumentError, 'invalid value for "delimiter", the character length must be great than or equal to 1.' + end + @delimiter = delimiter + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + delimiter == o.delimiter && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [delimiter, method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_character_delimited_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_character_delimited_method.rb new file mode 100644 index 00000000000..19e79b6cf0b --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_character_delimited_method.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 + # Byte frames which are delimited by a chosen character. + class ObservabilityPipelineSocketSourceFramingCharacterDelimitedMethod + include BaseEnumModel + + CHARACTER_DELIMITED = "character_delimited".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_chunked_gelf.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_chunked_gelf.rb new file mode 100644 index 00000000000..0631cb39c88 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_chunked_gelf.rb @@ -0,0 +1,123 @@ +=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 + # Byte frames which are chunked GELF messages. + class ObservabilityPipelineSocketSourceFramingChunkedGelf + include BaseGenericModel + + # Byte frames which are chunked GELF messages. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'method' => :'ObservabilityPipelineSocketSourceFramingChunkedGelfMethod' + } + 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::ObservabilityPipelineSocketSourceFramingChunkedGelf` 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?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_chunked_gelf_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_chunked_gelf_method.rb new file mode 100644 index 00000000000..e9b464b4414 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_chunked_gelf_method.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 + # Byte frames which are chunked GELF messages. + class ObservabilityPipelineSocketSourceFramingChunkedGelfMethod + include BaseEnumModel + + CHUNKED_GELF = "chunked_gelf".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_newline_delimited.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_newline_delimited.rb new file mode 100644 index 00000000000..3853e1a4787 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_newline_delimited.rb @@ -0,0 +1,123 @@ +=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 + # Byte frames which are delimited by a newline character. + class ObservabilityPipelineSocketSourceFramingNewlineDelimited + include BaseGenericModel + + # Byte frames which are delimited by a newline character. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'method' => :'ObservabilityPipelineSocketSourceFramingNewlineDelimitedMethod' + } + 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::ObservabilityPipelineSocketSourceFramingNewlineDelimited` 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?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_newline_delimited_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_newline_delimited_method.rb new file mode 100644 index 00000000000..2067e8f863a --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_newline_delimited_method.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 + # Byte frames which are delimited by a newline character. + class ObservabilityPipelineSocketSourceFramingNewlineDelimitedMethod + include BaseEnumModel + + NEWLINE_DELIMITED = "newline_delimited".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_octet_counting.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_octet_counting.rb new file mode 100644 index 00000000000..5510dd966bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_octet_counting.rb @@ -0,0 +1,123 @@ +=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 + # Byte frames according to the octet counting format as per RFC6587. + class ObservabilityPipelineSocketSourceFramingOctetCounting + include BaseGenericModel + + # Byte frames according to the octet counting format as per RFC6587. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'method' => :'ObservabilityPipelineSocketSourceFramingOctetCountingMethod' + } + 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::ObservabilityPipelineSocketSourceFramingOctetCounting` 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?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_octet_counting_method.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_octet_counting_method.rb new file mode 100644 index 00000000000..fd6d6d0ed53 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_framing_octet_counting_method.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 + # Byte frames according to the octet counting format as per RFC6587. + class ObservabilityPipelineSocketSourceFramingOctetCountingMethod + include BaseEnumModel + + OCTET_COUNTING = "octet_counting".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_mode.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_mode.rb new file mode 100644 index 00000000000..0f89801e343 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_mode.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 + # Protocol used to receive logs. + class ObservabilityPipelineSocketSourceMode + include BaseEnumModel + + TCP = "tcp".freeze + UDP = "udp".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_type.rb new file mode 100644 index 00000000000..5503ab8ff56 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source_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 source type. The value should always be `socket`. + class ObservabilityPipelineSocketSourceType + include BaseEnumModel + + SOCKET = "socket".freeze + end +end