diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a27042d9b8fc..64f30b323064 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4004,19 +4004,29 @@ components: - server.request.uri.raw - server.request.path_params - server.request.query + - server.request.headers - server.request.headers.no_cookies + - server.request.custom-auth - server.request.cookies - server.request.trailers - server.request.body + - server.request.body.filenames - server.response.status - server.response.headers.no_cookies - server.response.trailers + - server.response.body - grpc.server.request.metadata - grpc.server.request.message - grpc.server.method - graphql.server.all_resolvers - usr.id - http.client_ip + - server.llm.event + - server.llm.guard.verdict + - _dd.appsec.fp.http.header + - _dd.appsec.fp.http.network + - _dd.appsec.fp.session + - _dd.appsec.fp.http.endpoint example: server.db.statement type: string x-enum-varnames: @@ -4028,19 +4038,29 @@ components: - SERVER_REQUEST_URI_RAW - SERVER_REQUEST_PATH_PARAMS - SERVER_REQUEST_QUERY + - SERVER_REQUEST_HEADERS - SERVER_REQUEST_HEADERS_NO_COOKIES + - SERVER_REQUEST_CUSTOM_AUTH - SERVER_REQUEST_COOKIES - SERVER_REQUEST_TRAILERS - SERVER_REQUEST_BODY + - SERVER_REQUEST_BODY_FILENAMES - SERVER_RESPONSE_STATUS - SERVER_RESPONSE_HEADERS_NO_COOKIES - SERVER_RESPONSE_TRAILERS + - SERVER_RESPONSE_BODY - GRPC_SERVER_REQUEST_METADATA - GRPC_SERVER_REQUEST_MESSAGE - GRPC_SERVER_METHOD - GRAPHQL_SERVER_ALL_RESOLVERS - USR_ID - HTTP_CLIENT_IP + - SERVER_LLM_EVENT + - SERVER_LLM_GUARD_VERDICT + - DD_APPSEC_FP_HTTP_HEADER + - DD_APPSEC_FP_HTTP_NETWORK + - DD_APPSEC_FP_SESSION + - DD_APPSEC_FP_HTTP_ENDPOINT ApplicationSecurityWafCustomRuleConditionOperator: description: Operator to use for the WAF Condition. enum: @@ -42075,6 +42095,191 @@ components: type: string x-enum-varnames: - AMAZON_S3 + ObservabilityPipelineAmazonS3GenericBatchSettings: + description: Event batching settings + properties: + batch_size: + description: Maximum batch size in bytes. + example: 100000000 + format: int64 + type: integer + timeout_secs: + description: Maximum number of seconds to wait before flushing the batch. + example: 900 + format: int64 + type: integer + type: object + ObservabilityPipelineAmazonS3GenericCompression: + description: Compression algorithm applied to encoded logs. + oneOf: + - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionZstd' + - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionGzip' + - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionSnappy' + ObservabilityPipelineAmazonS3GenericCompressionGzip: + description: Gzip compression. + properties: + algorithm: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionGzipType' + level: + description: Gzip compression level. + example: 6 + format: int64 + type: integer + required: + - algorithm + - level + type: object + ObservabilityPipelineAmazonS3GenericCompressionGzipType: + default: gzip + description: The compression type. Always `gzip`. + enum: + - gzip + example: gzip + type: string + x-enum-varnames: + - GZIP + ObservabilityPipelineAmazonS3GenericCompressionSnappy: + description: Snappy compression. + properties: + algorithm: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionSnappyType' + required: + - algorithm + type: object + ObservabilityPipelineAmazonS3GenericCompressionSnappyType: + default: snappy + description: The compression type. Always `snappy`. + enum: + - snappy + example: snappy + type: string + x-enum-varnames: + - SNAPPY + ObservabilityPipelineAmazonS3GenericCompressionZstd: + description: Zstd compression. + properties: + algorithm: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionZstdType' + level: + description: Zstd compression level. + example: 3 + format: int64 + type: integer + required: + - algorithm + - level + type: object + ObservabilityPipelineAmazonS3GenericCompressionZstdType: + default: zstd + description: The compression type. Always `zstd`. + enum: + - zstd + example: zstd + type: string + x-enum-varnames: + - ZSTD + ObservabilityPipelineAmazonS3GenericDestination: + description: 'The `amazon_s3_generic` destination sends your logs to an Amazon + S3 bucket. + + + **Supported pipeline types:** logs' + properties: + auth: + $ref: '#/components/schemas/ObservabilityPipelineAwsAuth' + batch_settings: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericBatchSettings' + bucket: + description: S3 bucket name. + example: my-bucket + type: string + compression: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompression' + encoding: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncoding' + id: + description: Unique identifier for the destination component. + example: generic-s3-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_prefix: + description: Optional prefix for object keys. + type: string + region: + description: AWS region of the S3 bucket. + example: us-east-1 + type: string + storage_class: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3DestinationStorageClass' + type: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericDestinationType' + required: + - id + - type + - inputs + - bucket + - region + - storage_class + - encoding + - compression + type: object + x-pipeline-types: + - logs + ObservabilityPipelineAmazonS3GenericDestinationType: + default: amazon_s3_generic + description: The destination type. Always `amazon_s3_generic`. + enum: + - amazon_s3_generic + example: amazon_s3_generic + type: string + x-enum-varnames: + - GENERIC_ARCHIVES_S3 + ObservabilityPipelineAmazonS3GenericEncoding: + description: Encoding format for the destination. + oneOf: + - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingJson' + - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingParquet' + ObservabilityPipelineAmazonS3GenericEncodingJson: + description: JSON encoding. + properties: + type: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingJsonType' + required: + - type + type: object + ObservabilityPipelineAmazonS3GenericEncodingJsonType: + default: json + description: The encoding type. Always `json`. + enum: + - json + example: json + type: string + x-enum-varnames: + - JSON + ObservabilityPipelineAmazonS3GenericEncodingParquet: + description: Parquet encoding. + properties: + type: + $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingParquetType' + required: + - type + type: object + ObservabilityPipelineAmazonS3GenericEncodingParquetType: + default: parquet + description: The encoding type. Always `parquet`. + enum: + - parquet + example: parquet + type: string + x-enum-varnames: + - PARQUET ObservabilityPipelineAmazonS3Source: description: 'The `amazon_s3` source ingests logs from an Amazon S3 bucket. @@ -42350,6 +42555,7 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineHttpClientDestination' - $ref: '#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination' - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3Destination' + - $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericDestination' - $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination' - $ref: '#/components/schemas/AzureStorageDestination' - $ref: '#/components/schemas/ObservabilityPipelineCloudPremDestination' diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index ecfa13f94836..5f602f8ecf14 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3614,6 +3614,21 @@ def overrides "v2.observability_pipeline_amazon_s3_destination" => "ObservabilityPipelineAmazonS3Destination", "v2.observability_pipeline_amazon_s3_destination_storage_class" => "ObservabilityPipelineAmazonS3DestinationStorageClass", "v2.observability_pipeline_amazon_s3_destination_type" => "ObservabilityPipelineAmazonS3DestinationType", + "v2.observability_pipeline_amazon_s3_generic_batch_settings" => "ObservabilityPipelineAmazonS3GenericBatchSettings", + "v2.observability_pipeline_amazon_s3_generic_compression" => "ObservabilityPipelineAmazonS3GenericCompression", + "v2.observability_pipeline_amazon_s3_generic_compression_gzip" => "ObservabilityPipelineAmazonS3GenericCompressionGzip", + "v2.observability_pipeline_amazon_s3_generic_compression_gzip_type" => "ObservabilityPipelineAmazonS3GenericCompressionGzipType", + "v2.observability_pipeline_amazon_s3_generic_compression_snappy" => "ObservabilityPipelineAmazonS3GenericCompressionSnappy", + "v2.observability_pipeline_amazon_s3_generic_compression_snappy_type" => "ObservabilityPipelineAmazonS3GenericCompressionSnappyType", + "v2.observability_pipeline_amazon_s3_generic_compression_zstd" => "ObservabilityPipelineAmazonS3GenericCompressionZstd", + "v2.observability_pipeline_amazon_s3_generic_compression_zstd_type" => "ObservabilityPipelineAmazonS3GenericCompressionZstdType", + "v2.observability_pipeline_amazon_s3_generic_destination" => "ObservabilityPipelineAmazonS3GenericDestination", + "v2.observability_pipeline_amazon_s3_generic_destination_type" => "ObservabilityPipelineAmazonS3GenericDestinationType", + "v2.observability_pipeline_amazon_s3_generic_encoding" => "ObservabilityPipelineAmazonS3GenericEncoding", + "v2.observability_pipeline_amazon_s3_generic_encoding_json" => "ObservabilityPipelineAmazonS3GenericEncodingJson", + "v2.observability_pipeline_amazon_s3_generic_encoding_json_type" => "ObservabilityPipelineAmazonS3GenericEncodingJsonType", + "v2.observability_pipeline_amazon_s3_generic_encoding_parquet" => "ObservabilityPipelineAmazonS3GenericEncodingParquet", + "v2.observability_pipeline_amazon_s3_generic_encoding_parquet_type" => "ObservabilityPipelineAmazonS3GenericEncodingParquetType", "v2.observability_pipeline_amazon_s3_source" => "ObservabilityPipelineAmazonS3Source", "v2.observability_pipeline_amazon_s3_source_type" => "ObservabilityPipelineAmazonS3SourceType", "v2.observability_pipeline_amazon_security_lake_destination" => "ObservabilityPipelineAmazonSecurityLakeDestination", diff --git a/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_input_address.rb b/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_input_address.rb index 4f6a77ba1ae3..a3d55ea9cf8b 100644 --- a/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_input_address.rb +++ b/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_condition_input_address.rb @@ -29,18 +29,28 @@ class ApplicationSecurityWafCustomRuleConditionInputAddress SERVER_REQUEST_URI_RAW = "server.request.uri.raw".freeze SERVER_REQUEST_PATH_PARAMS = "server.request.path_params".freeze SERVER_REQUEST_QUERY = "server.request.query".freeze + SERVER_REQUEST_HEADERS = "server.request.headers".freeze SERVER_REQUEST_HEADERS_NO_COOKIES = "server.request.headers.no_cookies".freeze + SERVER_REQUEST_CUSTOM_AUTH = "server.request.custom-auth".freeze SERVER_REQUEST_COOKIES = "server.request.cookies".freeze SERVER_REQUEST_TRAILERS = "server.request.trailers".freeze SERVER_REQUEST_BODY = "server.request.body".freeze + SERVER_REQUEST_BODY_FILENAMES = "server.request.body.filenames".freeze SERVER_RESPONSE_STATUS = "server.response.status".freeze SERVER_RESPONSE_HEADERS_NO_COOKIES = "server.response.headers.no_cookies".freeze SERVER_RESPONSE_TRAILERS = "server.response.trailers".freeze + SERVER_RESPONSE_BODY = "server.response.body".freeze GRPC_SERVER_REQUEST_METADATA = "grpc.server.request.metadata".freeze GRPC_SERVER_REQUEST_MESSAGE = "grpc.server.request.message".freeze GRPC_SERVER_METHOD = "grpc.server.method".freeze GRAPHQL_SERVER_ALL_RESOLVERS = "graphql.server.all_resolvers".freeze USR_ID = "usr.id".freeze HTTP_CLIENT_IP = "http.client_ip".freeze + SERVER_LLM_EVENT = "server.llm.event".freeze + SERVER_LLM_GUARD_VERDICT = "server.llm.guard.verdict".freeze + DD_APPSEC_FP_HTTP_HEADER = "_dd.appsec.fp.http.header".freeze + DD_APPSEC_FP_HTTP_NETWORK = "_dd.appsec.fp.http.network".freeze + DD_APPSEC_FP_SESSION = "_dd.appsec.fp.session".freeze + DD_APPSEC_FP_HTTP_ENDPOINT = "_dd.appsec.fp.http.endpoint".freeze end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_batch_settings.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_batch_settings.rb new file mode 100644 index 000000000000..d78e8a4618ae --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_batch_settings.rb @@ -0,0 +1,115 @@ +=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 batching settings + class ObservabilityPipelineAmazonS3GenericBatchSettings + include BaseGenericModel + + # Maximum batch size in bytes. + attr_accessor :batch_size + + # Maximum number of seconds to wait before flushing the batch. + attr_accessor :timeout_secs + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'batch_size' => :'batch_size', + :'timeout_secs' => :'timeout_secs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'batch_size' => :'Integer', + :'timeout_secs' => :'Integer' + } + 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::ObservabilityPipelineAmazonS3GenericBatchSettings` 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?(:'batch_size') + self.batch_size = attributes[:'batch_size'] + end + + if attributes.key?(:'timeout_secs') + self.timeout_secs = attributes[:'timeout_secs'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + batch_size == o.batch_size && + timeout_secs == o.timeout_secs && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [batch_size, timeout_secs, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression.rb new file mode 100644 index 000000000000..14a469652f98 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression.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 + # Compression algorithm applied to encoded logs. + module ObservabilityPipelineAmazonS3GenericCompression + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ObservabilityPipelineAmazonS3GenericCompressionZstd', + :'ObservabilityPipelineAmazonS3GenericCompressionGzip', + :'ObservabilityPipelineAmazonS3GenericCompressionSnappy' + ] + 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_amazon_s3_generic_compression_gzip.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_gzip.rb new file mode 100644 index 000000000000..542e9cab7e4e --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_gzip.rb @@ -0,0 +1,144 @@ +=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 + # Gzip compression. + class ObservabilityPipelineAmazonS3GenericCompressionGzip + include BaseGenericModel + + # The compression type. Always `gzip`. + attr_reader :algorithm + + # Gzip compression level. + attr_reader :level + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'algorithm' => :'algorithm', + :'level' => :'level' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'algorithm' => :'ObservabilityPipelineAmazonS3GenericCompressionGzipType', + :'level' => :'Integer' + } + 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::ObservabilityPipelineAmazonS3GenericCompressionGzip` 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?(:'algorithm') + self.algorithm = attributes[:'algorithm'] + end + + if attributes.key?(:'level') + self.level = attributes[:'level'] + 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 @algorithm.nil? + return false if @level.nil? + true + end + + # Custom attribute writer method with validation + # @param algorithm [Object] Object to be assigned + # @!visibility private + def algorithm=(algorithm) + if algorithm.nil? + fail ArgumentError, 'invalid value for "algorithm", algorithm cannot be nil.' + end + @algorithm = algorithm + end + + # Custom attribute writer method with validation + # @param level [Object] Object to be assigned + # @!visibility private + def level=(level) + if level.nil? + fail ArgumentError, 'invalid value for "level", level cannot be nil.' + end + @level = level + 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 && + algorithm == o.algorithm && + level == o.level && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [algorithm, level, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_gzip_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_gzip_type.rb new file mode 100644 index 000000000000..cd04e779eaa2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_gzip_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 compression type. Always `gzip`. + class ObservabilityPipelineAmazonS3GenericCompressionGzipType + include BaseEnumModel + + GZIP = "gzip".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_snappy.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_snappy.rb new file mode 100644 index 000000000000..a4cd1bd45dd7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_snappy.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 + # Snappy compression. + class ObservabilityPipelineAmazonS3GenericCompressionSnappy + include BaseGenericModel + + # The compression type. Always `snappy`. + attr_reader :algorithm + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'algorithm' => :'algorithm' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'algorithm' => :'ObservabilityPipelineAmazonS3GenericCompressionSnappyType' + } + 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::ObservabilityPipelineAmazonS3GenericCompressionSnappy` 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?(:'algorithm') + self.algorithm = attributes[:'algorithm'] + 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 @algorithm.nil? + true + end + + # Custom attribute writer method with validation + # @param algorithm [Object] Object to be assigned + # @!visibility private + def algorithm=(algorithm) + if algorithm.nil? + fail ArgumentError, 'invalid value for "algorithm", algorithm cannot be nil.' + end + @algorithm = algorithm + 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 && + algorithm == o.algorithm && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [algorithm, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_snappy_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_snappy_type.rb new file mode 100644 index 000000000000..9e8a18ea5d41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_snappy_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 compression type. Always `snappy`. + class ObservabilityPipelineAmazonS3GenericCompressionSnappyType + include BaseEnumModel + + SNAPPY = "snappy".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_zstd.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_zstd.rb new file mode 100644 index 000000000000..59373255aa5c --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_zstd.rb @@ -0,0 +1,144 @@ +=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 + # Zstd compression. + class ObservabilityPipelineAmazonS3GenericCompressionZstd + include BaseGenericModel + + # The compression type. Always `zstd`. + attr_reader :algorithm + + # Zstd compression level. + attr_reader :level + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'algorithm' => :'algorithm', + :'level' => :'level' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'algorithm' => :'ObservabilityPipelineAmazonS3GenericCompressionZstdType', + :'level' => :'Integer' + } + 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::ObservabilityPipelineAmazonS3GenericCompressionZstd` 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?(:'algorithm') + self.algorithm = attributes[:'algorithm'] + end + + if attributes.key?(:'level') + self.level = attributes[:'level'] + 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 @algorithm.nil? + return false if @level.nil? + true + end + + # Custom attribute writer method with validation + # @param algorithm [Object] Object to be assigned + # @!visibility private + def algorithm=(algorithm) + if algorithm.nil? + fail ArgumentError, 'invalid value for "algorithm", algorithm cannot be nil.' + end + @algorithm = algorithm + end + + # Custom attribute writer method with validation + # @param level [Object] Object to be assigned + # @!visibility private + def level=(level) + if level.nil? + fail ArgumentError, 'invalid value for "level", level cannot be nil.' + end + @level = level + 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 && + algorithm == o.algorithm && + level == o.level && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [algorithm, level, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_zstd_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_zstd_type.rb new file mode 100644 index 000000000000..99a72e24c5d8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_compression_zstd_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 compression type. Always `zstd`. + class ObservabilityPipelineAmazonS3GenericCompressionZstdType + include BaseEnumModel + + ZSTD = "zstd".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_destination.rb new file mode 100644 index 000000000000..99cb4d1d7d53 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_destination.rb @@ -0,0 +1,305 @@ +=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 `amazon_s3_generic` destination sends your logs to an Amazon S3 bucket. + # + # **Supported pipeline types:** logs + class ObservabilityPipelineAmazonS3GenericDestination + include BaseGenericModel + + # AWS authentication credentials used for accessing AWS services such as S3. + # If omitted, the system’s default credentials are used (for example, the IAM role and environment variables). + attr_accessor :auth + + # Event batching settings + attr_accessor :batch_settings + + # S3 bucket name. + attr_reader :bucket + + # Compression algorithm applied to encoded logs. + attr_reader :compression + + # Encoding format for the destination. + attr_reader :encoding + + # Unique identifier for the destination component. + attr_reader :id + + # A list of component IDs whose output is used as the `input` for this component. + attr_reader :inputs + + # Optional prefix for object keys. + attr_accessor :key_prefix + + # AWS region of the S3 bucket. + attr_reader :region + + # S3 storage class. + attr_reader :storage_class + + # The destination type. Always `amazon_s3_generic`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth' => :'auth', + :'batch_settings' => :'batch_settings', + :'bucket' => :'bucket', + :'compression' => :'compression', + :'encoding' => :'encoding', + :'id' => :'id', + :'inputs' => :'inputs', + :'key_prefix' => :'key_prefix', + :'region' => :'region', + :'storage_class' => :'storage_class', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth' => :'ObservabilityPipelineAwsAuth', + :'batch_settings' => :'ObservabilityPipelineAmazonS3GenericBatchSettings', + :'bucket' => :'String', + :'compression' => :'ObservabilityPipelineAmazonS3GenericCompression', + :'encoding' => :'ObservabilityPipelineAmazonS3GenericEncoding', + :'id' => :'String', + :'inputs' => :'Array', + :'key_prefix' => :'String', + :'region' => :'String', + :'storage_class' => :'ObservabilityPipelineAmazonS3DestinationStorageClass', + :'type' => :'ObservabilityPipelineAmazonS3GenericDestinationType' + } + 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::ObservabilityPipelineAmazonS3GenericDestination` 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?(:'auth') + self.auth = attributes[:'auth'] + end + + if attributes.key?(:'batch_settings') + self.batch_settings = attributes[:'batch_settings'] + end + + if attributes.key?(:'bucket') + self.bucket = attributes[:'bucket'] + end + + if attributes.key?(:'compression') + self.compression = attributes[:'compression'] + end + + if attributes.key?(:'encoding') + self.encoding = attributes[:'encoding'] + 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_prefix') + self.key_prefix = attributes[:'key_prefix'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'storage_class') + self.storage_class = attributes[:'storage_class'] + 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 @bucket.nil? + return false if @compression.nil? + return false if @encoding.nil? + return false if @id.nil? + return false if @inputs.nil? + return false if @region.nil? + return false if @storage_class.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param bucket [Object] Object to be assigned + # @!visibility private + def bucket=(bucket) + if bucket.nil? + fail ArgumentError, 'invalid value for "bucket", bucket cannot be nil.' + end + @bucket = bucket + end + + # Custom attribute writer method with validation + # @param compression [Object] Object to be assigned + # @!visibility private + def compression=(compression) + if compression.nil? + fail ArgumentError, 'invalid value for "compression", compression cannot be nil.' + end + @compression = compression + 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 region [Object] Object to be assigned + # @!visibility private + def region=(region) + if region.nil? + fail ArgumentError, 'invalid value for "region", region cannot be nil.' + end + @region = region + end + + # Custom attribute writer method with validation + # @param storage_class [Object] Object to be assigned + # @!visibility private + def storage_class=(storage_class) + if storage_class.nil? + fail ArgumentError, 'invalid value for "storage_class", storage_class cannot be nil.' + end + @storage_class = storage_class + 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 && + auth == o.auth && + batch_settings == o.batch_settings && + bucket == o.bucket && + compression == o.compression && + encoding == o.encoding && + id == o.id && + inputs == o.inputs && + key_prefix == o.key_prefix && + region == o.region && + storage_class == o.storage_class && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth, batch_settings, bucket, compression, encoding, id, inputs, key_prefix, region, storage_class, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_destination_type.rb new file mode 100644 index 000000000000..8eba02f159d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_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. Always `amazon_s3_generic`. + class ObservabilityPipelineAmazonS3GenericDestinationType + include BaseEnumModel + + GENERIC_ARCHIVES_S3 = "amazon_s3_generic".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding.rb new file mode 100644 index 000000000000..2d1f00931bd5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Encoding format for the destination. + module ObservabilityPipelineAmazonS3GenericEncoding + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ObservabilityPipelineAmazonS3GenericEncodingJson', + :'ObservabilityPipelineAmazonS3GenericEncodingParquet' + ] + 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_amazon_s3_generic_encoding_json.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_json.rb new file mode 100644 index 000000000000..d2e08785c6b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_json.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 + # JSON encoding. + class ObservabilityPipelineAmazonS3GenericEncodingJson + include BaseGenericModel + + # The encoding type. Always `json`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'ObservabilityPipelineAmazonS3GenericEncodingJsonType' + } + 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::ObservabilityPipelineAmazonS3GenericEncodingJson` 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?(:'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 @type.nil? + true + 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 && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_json_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_json_type.rb new file mode 100644 index 000000000000..8a8a68372cdb --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_json_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 encoding type. Always `json`. + class ObservabilityPipelineAmazonS3GenericEncodingJsonType + include BaseEnumModel + + JSON = "json".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_parquet.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_parquet.rb new file mode 100644 index 000000000000..17e397ad201d --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_parquet.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 + # Parquet encoding. + class ObservabilityPipelineAmazonS3GenericEncodingParquet + include BaseGenericModel + + # The encoding type. Always `parquet`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'ObservabilityPipelineAmazonS3GenericEncodingParquetType' + } + 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::ObservabilityPipelineAmazonS3GenericEncodingParquet` 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?(:'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 @type.nil? + true + 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 && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_parquet_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_parquet_type.rb new file mode 100644 index 000000000000..7e1fabbc7f59 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_s3_generic_encoding_parquet_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 encoding type. Always `parquet`. + class ObservabilityPipelineAmazonS3GenericEncodingParquetType + include BaseEnumModel + + PARQUET = "parquet".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 43df429f92fb..7e89379e7a02 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 @@ -29,6 +29,7 @@ def openapi_one_of :'ObservabilityPipelineHttpClientDestination', :'ObservabilityPipelineAmazonOpenSearchDestination', :'ObservabilityPipelineAmazonS3Destination', + :'ObservabilityPipelineAmazonS3GenericDestination', :'ObservabilityPipelineAmazonSecurityLakeDestination', :'AzureStorageDestination', :'ObservabilityPipelineCloudPremDestination',