diff --git a/.generated-info b/.generated-info index 48849a21708..8623329320a 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "3a6cb30", - "generated": "2025-08-12 15:41:18.406" + "spec_repo_commit": "8001cbb", + "generated": "2025-08-13 20:27:07.288" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e9356a61f40..5ab5923ba83 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -26851,6 +26851,59 @@ components: type: string x-enum-varnames: - AMAZON_S3 + ObservabilityPipelineAmazonSecurityLakeDestination: + description: 'The `amazon_security_lake` destination sends your logs to Amazon + Security Lake. + + ' + properties: + auth: + $ref: '#/components/schemas/ObservabilityPipelineAwsAuth' + bucket: + description: Name of the Amazon S3 bucket in Security Lake (3-63 characters). + example: security-lake-bucket + type: string + custom_source_name: + description: Custom source name for the logs in Security Lake. + example: my-custom-source + type: string + id: + description: Unique identifier for the destination component. + example: amazon-security-lake-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 + region: + description: AWS region of the S3 bucket. + example: us-east-1 + type: string + tls: + $ref: '#/components/schemas/ObservabilityPipelineTls' + type: + $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestinationType' + required: + - id + - type + - inputs + - bucket + - region + - custom_source_name + type: object + ObservabilityPipelineAmazonSecurityLakeDestinationType: + default: amazon_security_lake + description: The destination type. Always `amazon_security_lake`. + enum: + - amazon_security_lake + example: amazon_security_lake + type: string + x-enum-varnames: + - AMAZON_SECURITY_LAKE ObservabilityPipelineAwsAuth: description: "AWS authentication credentials used for accessing AWS services such as S3.\nIf omitted, the system\u2019s default credentials are used (for @@ -26922,6 +26975,9 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineSentinelOneDestination' - $ref: '#/components/schemas/ObservabilityPipelineOpenSearchDestination' - $ref: '#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination' + - $ref: '#/components/schemas/ObservabilityPipelineSocketDestination' + - $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination' + - $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination' ObservabilityPipelineConfigProcessorItem: description: A processor for the pipeline. oneOf: @@ -26941,6 +26997,8 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableProcessor' - $ref: '#/components/schemas/ObservabilityPipelineReduceProcessor' - $ref: '#/components/schemas/ObservabilityPipelineThrottleProcessor' + - $ref: '#/components/schemas/ObservabilityPipelineCustomProcessor' + - $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessor' ObservabilityPipelineConfigSourceItem: description: A data source for the pipeline. oneOf: @@ -26959,6 +27017,159 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubSource' - $ref: '#/components/schemas/ObservabilityPipelineHttpClientSource' - $ref: '#/components/schemas/ObservabilityPipelineLogstashSource' + - $ref: '#/components/schemas/ObservabilityPipelineSocketSource' + ObservabilityPipelineCrowdStrikeNextGenSiemDestination: + description: The `crowdstrike_next_gen_siem` destination forwards logs to CrowdStrike + Next Gen SIEM. + properties: + compression: + $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression' + encoding: + $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding' + id: + description: The unique identifier for this component. + example: crowdstrike-ngsiem-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 + tls: + $ref: '#/components/schemas/ObservabilityPipelineTls' + type: + $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType' + required: + - id + - type + - inputs + - encoding + type: object + ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression: + description: Compression configuration for log events. + properties: + algorithm: + $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompressionAlgorithm' + level: + description: Compression level. + example: 6 + format: int64 + type: integer + required: + - algorithm + type: object + ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompressionAlgorithm: + description: Compression algorithm for log events. + enum: + - gzip + - zlib + example: gzip + type: string + x-enum-varnames: + - GZIP + - ZLIB + ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding: + description: Encoding format for log events. + enum: + - json + - raw_message + example: json + type: string + x-enum-varnames: + - JSON + - RAW_MESSAGE + ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType: + default: crowdstrike_next_gen_siem + description: The destination type. The value should always be `crowdstrike_next_gen_siem`. + enum: + - crowdstrike_next_gen_siem + example: crowdstrike_next_gen_siem + type: string + x-enum-varnames: + - CROWDSTRIKE_NEXT_GEN_SIEM + ObservabilityPipelineCustomProcessor: + description: The `custom_processor` processor transforms events using [Vector + Remap Language (VRL)](https://vector.dev/docs/reference/vrl/) scripts with + advanced filtering capabilities. + properties: + id: + description: The unique identifier for this processor. + example: remap-vrl-processor + type: string + include: + default: '*' + description: A Datadog search query used to determine which logs this processor + targets. This field should always be set to `*` for the custom_processor + processor. + example: '*' + type: string + inputs: + description: A list of component IDs whose output is used as the input for + this processor. + example: + - datadog-agent-source + items: + type: string + type: array + remaps: + description: Array of VRL remap rules. + items: + $ref: '#/components/schemas/ObservabilityPipelineCustomProcessorRemap' + minItems: 1 + type: array + type: + $ref: '#/components/schemas/ObservabilityPipelineCustomProcessorType' + required: + - id + - type + - include + - remaps + - inputs + type: object + ObservabilityPipelineCustomProcessorRemap: + description: Defines a single VRL remap rule with its own filtering and transformation + logic. + properties: + drop_on_error: + description: Whether to drop events that caused errors during processing. + example: false + type: boolean + enabled: + description: Whether this remap rule is enabled. + example: true + type: boolean + include: + description: A Datadog search query used to filter events for this specific + remap rule. + example: service:web + type: string + name: + description: A descriptive name for this remap rule. + example: Parse JSON from message field + type: string + source: + description: The VRL script source code that defines the processing logic. + example: . = parse_json!(.message) + type: string + required: + - include + - name + - source + - enabled + - drop_on_error + type: object + ObservabilityPipelineCustomProcessorType: + default: custom_processor + description: The processor type. The value should always be `custom_processor`. + enum: + - custom_processor + example: custom_processor + type: string + x-enum-varnames: + - CUSTOM_PROCESSOR ObservabilityPipelineData: description: "Contains the pipeline\u2019s ID, type, and configuration attributes." properties: @@ -27050,6 +27261,80 @@ components: type: string x-enum-varnames: - DATADOG_LOGS + ObservabilityPipelineDatadogTagsProcessor: + description: The `datadog_tags` processor includes or excludes specific Datadog + tags in your logs. + properties: + action: + $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorAction' + id: + description: The unique identifier for this component. Used to reference + this component in other parts of the pipeline (for example, as the `input` + to downstream components). + example: datadog-tags-processor + type: string + include: + description: A Datadog search query used to determine which logs this processor + targets. + example: service:my-service + type: string + inputs: + description: A list of component IDs whose output is used as the `input` + for this component. + example: + - datadog-agent-source + items: + type: string + type: array + keys: + description: A list of tag keys. + example: + - env + - service + - version + items: + type: string + type: array + mode: + $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorMode' + type: + $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorType' + required: + - id + - type + - include + - mode + - action + - keys + - inputs + type: object + ObservabilityPipelineDatadogTagsProcessorAction: + description: The action to take on tags with matching keys. + enum: + - include + - exclude + example: include + type: string + x-enum-varnames: + - INCLUDE + - EXCLUDE + ObservabilityPipelineDatadogTagsProcessorMode: + description: The processing mode. + enum: + - filter + example: filter + type: string + x-enum-varnames: + - FILTER + ObservabilityPipelineDatadogTagsProcessorType: + default: datadog_tags + description: The processor type. The value should always be `datadog_tags`. + enum: + - datadog_tags + example: datadog_tags + type: string + x-enum-varnames: + - DATADOG_TAGS ObservabilityPipelineDecoding: description: The decoding format used to interpret incoming logs. enum: @@ -29241,6 +29526,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/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.frozen index e80ec51462b..8f630e980fd 100644 --- a/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.frozen @@ -1 +1 @@ -2025-04-24T11:34:50.866Z \ No newline at end of file +2025-08-13T20:13:44.192Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.yml index 26b198fa876..06a70a88c48 100644 --- a/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Thu, 24 Apr 2025 11:34:50 GMT +- recorded_at: Wed, 13 Aug 2025 20:13:44 GMT request: body: encoding: UTF-8 string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test - rule","name":"Test-Convert_a_rule_from_JSON_to_Terraform_returns_OK_response-1745494490","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[],"type":"log_detection"}' + rule","name":"_b87eac89722bbff0","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[],"type":"log_detection"}' headers: Accept: - application/json @@ -16,9 +16,8 @@ http_interactions: body: encoding: UTF-8 string: '{"terraformContent":"resource \"datadog_security_monitoring_rule\" - \"test-convert_a_rule_from_json_to_terraform_returns_ok_response-1745494490\" - {\n\tname = \"Test-Convert_a_rule_from_JSON_to_Terraform_returns_OK_response-1745494490\"\n\tenabled - = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields + \"_b87eac89722bbff0\" {\n\tname = \"_b87eac89722bbff0\"\n\tenabled = true\n\tquery + {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus diff --git a/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.frozen index cb7f9eae20c..82a36934d8f 100644 --- a/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.frozen @@ -1 +1 @@ -2025-04-24T11:34:51.208Z \ No newline at end of file +2025-08-13T20:13:44.611Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.yml index 425c7e551c1..555b874d098 100644 --- a/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Thu, 24 Apr 2025 11:34:51 GMT +- recorded_at: Wed, 13 Aug 2025 20:13:44 GMT request: body: encoding: UTF-8 string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test - rule","name":"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1745494491","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[],"type":"log_detection"}' + rule","name":"_1166a375f2500467","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[],"type":"log_detection"}' headers: Accept: - application/json @@ -15,29 +15,28 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"name":"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1745494491","createdAt":1745494491502,"isDefault":false,"isPartner":false,"isEnabled":true,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"","dataSource":"logs"}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"cases":[{"name":"","status":"info","notifications":[],"condition":"a - \u003e 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[],"version":1,"id":"e60-iv6-d7e","blocking":false,"metadata":{"entities":null,"sources":null},"creationAuthorId":1445416,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"","name":""}}' + string: '{"name":"_1166a375f2500467","createdAt":1755116024952,"isDefault":false,"isPartner":false,"isEnabled":true,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"","dataSource":"logs"}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"cases":[{"name":"","status":"info","notifications":[],"condition":"a + \u003e 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[],"version":1,"id":"shm-tx8-e8x","blocking":false,"metadata":{"entities":null,"sources":null},"creationAuthorId":1445416,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"","name":""}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Thu, 24 Apr 2025 11:34:51 GMT +- recorded_at: Wed, 13 Aug 2025 20:13:44 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/e60-iv6-d7e/convert + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/shm-tx8-e8x/convert response: body: encoding: UTF-8 string: '{"terraformContent":"resource \"datadog_security_monitoring_rule\" - \"test-convert_an_existing_rule_from_json_to_terraform_returns_ok_response-1745494491\" - {\n\tname = \"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1745494491\"\n\tenabled - = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields + \"_1166a375f2500467\" {\n\tname = \"_1166a375f2500467\"\n\tenabled = true\n\tquery + {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus @@ -49,14 +48,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Thu, 24 Apr 2025 11:34:51 GMT +- recorded_at: Wed, 13 Aug 2025 20:13:44 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/e60-iv6-d7e + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/shm-tx8-e8x response: body: encoding: UTF-8 diff --git a/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.rb b/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.rb index af81080c70a..a9303957fe7 100644 --- a/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.rb +++ b/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.rb @@ -3,6 +3,6 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new -# there is a valid "security_rule" in the system -SECURITY_RULE_ID = ENV["SECURITY_RULE_ID"] -p api_instance.convert_existing_security_monitoring_rule(SECURITY_RULE_ID) +# there is a valid "security_rule_hash" in the system +SECURITY_RULE_HASH_ID = ENV["SECURITY_RULE_HASH_ID"] +p api_instance.convert_existing_security_monitoring_rule(SECURITY_RULE_HASH_ID) diff --git a/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.rb b/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.rb index facd523df10..9fdbb450eca 100644 --- a/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.rb +++ b/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.rb @@ -4,7 +4,7 @@ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new body = DatadogAPIClient::V2::SecurityMonitoringStandardRulePayload.new({ - name: "Example-Security-Monitoring", + name: "_49768568946de993", queries: [ DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery.new({ query: "@test:true", diff --git a/features/v2/given.json b/features/v2/given.json index 904a03d7591..b6097093658 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -804,6 +804,18 @@ "tag": "Security Monitoring", "operationId": "CreateSecurityMonitoringRule" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"name\": \"_{{ unique_hash }}\",\n \"queries\": [{\n \"query\": \"@test:true\",\n \"aggregation\": \"count\",\n \"groupByFields\": [],\n \"distinctFields\": [],\n \"metrics\": []\n }],\n \"filters\": [],\n \"cases\": [{\n \"name\": \"\",\n \"status\": \"info\",\n \"condition\": \"a > 0\",\n \"notifications\": []\n }],\n \"options\": {\n \"evaluationWindow\": 900,\n \"keepAlive\": 3600,\n \"maxSignalDuration\": 86400\n },\n \"message\": \"Test rule\",\n \"tags\": [],\n \"isEnabled\": true,\n \"type\": \"log_detection\"\n}" + } + ], + "step": "there is a valid \"security_rule_hash\" in the system", + "key": "security_rule_hash", + "tag": "Security Monitoring", + "operationId": "CreateSecurityMonitoringRule" + }, { "step": "a valid \"configuration\" in the system", "key": "configuration", diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 3acea8148db..1ef29aec3e6 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -132,10 +132,10 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-security-platform Scenario: Convert a rule from JSON to Terraform returns "OK" response Given new "ConvertSecurityMonitoringRuleFromJSONToTerraform" request - And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type":"log_detection"} + And body with value {"name":"_{{ unique_hash }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type":"log_detection"} When the request is sent Then the response status is 200 OK - And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"{{ unique_lower }}\" {\n\tname = \"{{ unique }}\"\n\tenabled = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus = \"info\"\n\t\tnotifications = []\n\t\tcondition = \"a > 0\"\n\t}\n\tmessage = \"Test rule\"\n\ttags = []\n\thas_extended_title = false\n\ttype = \"log_detection\"\n}\n" + And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"_{{ unique_hash }}\" {\n\tname = \"_{{ unique_hash }}\"\n\tenabled = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus = \"info\"\n\t\tnotifications = []\n\t\tcondition = \"a > 0\"\n\t}\n\tmessage = \"Test rule\"\n\ttags = []\n\thas_extended_title = false\n\ttype = \"log_detection\"\n}\n" @skip @team:DataDog/k9-cloud-security-platform Scenario: Convert an existing rule from JSON to Terraform returns "Bad Request" response @@ -154,11 +154,11 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-security-platform Scenario: Convert an existing rule from JSON to Terraform returns "OK" response Given new "ConvertExistingSecurityMonitoringRule" request - And there is a valid "security_rule" in the system - And request contains "rule_id" parameter from "security_rule.id" + And there is a valid "security_rule_hash" in the system + And request contains "rule_id" parameter from "security_rule_hash.id" When the request is sent Then the response status is 200 OK - And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"{{ unique_lower }}\" {\n\tname = \"{{ unique }}\"\n\tenabled = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus = \"info\"\n\t\tnotifications = []\n\t\tcondition = \"a > 0\"\n\t}\n\tmessage = \"Test rule\"\n\ttags = []\n\thas_extended_title = false\n\ttype = \"log_detection\"\n}\n" + And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"_{{ unique_hash }}\" {\n\tname = \"_{{ unique_hash }}\"\n\tenabled = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus = \"info\"\n\t\tnotifications = []\n\t\tcondition = \"a > 0\"\n\t}\n\tmessage = \"Test rule\"\n\ttags = []\n\thas_extended_title = false\n\ttype = \"log_detection\"\n}\n" @skip-validation @team:DataDog/k9-cloud-security-platform Scenario: Create a cloud_configuration rule returns "OK" response diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 7ce705bbb7e..f308b274bb0 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2619,17 +2619,31 @@ def overrides "v2.observability_pipeline_amazon_s3_destination_type" => "ObservabilityPipelineAmazonS3DestinationType", "v2.observability_pipeline_amazon_s3_source" => "ObservabilityPipelineAmazonS3Source", "v2.observability_pipeline_amazon_s3_source_type" => "ObservabilityPipelineAmazonS3SourceType", + "v2.observability_pipeline_amazon_security_lake_destination" => "ObservabilityPipelineAmazonSecurityLakeDestination", + "v2.observability_pipeline_amazon_security_lake_destination_type" => "ObservabilityPipelineAmazonSecurityLakeDestinationType", "v2.observability_pipeline_aws_auth" => "ObservabilityPipelineAwsAuth", "v2.observability_pipeline_config" => "ObservabilityPipelineConfig", "v2.observability_pipeline_config_destination_item" => "ObservabilityPipelineConfigDestinationItem", "v2.observability_pipeline_config_processor_item" => "ObservabilityPipelineConfigProcessorItem", "v2.observability_pipeline_config_source_item" => "ObservabilityPipelineConfigSourceItem", + "v2.observability_pipeline_crowd_strike_next_gen_siem_destination" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestination", + "v2.observability_pipeline_crowd_strike_next_gen_siem_destination_compression" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression", + "v2.observability_pipeline_crowd_strike_next_gen_siem_destination_compression_algorithm" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompressionAlgorithm", + "v2.observability_pipeline_crowd_strike_next_gen_siem_destination_encoding" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding", + "v2.observability_pipeline_crowd_strike_next_gen_siem_destination_type" => "ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType", + "v2.observability_pipeline_custom_processor" => "ObservabilityPipelineCustomProcessor", + "v2.observability_pipeline_custom_processor_remap" => "ObservabilityPipelineCustomProcessorRemap", + "v2.observability_pipeline_custom_processor_type" => "ObservabilityPipelineCustomProcessorType", "v2.observability_pipeline_data" => "ObservabilityPipelineData", "v2.observability_pipeline_data_attributes" => "ObservabilityPipelineDataAttributes", "v2.observability_pipeline_datadog_agent_source" => "ObservabilityPipelineDatadogAgentSource", "v2.observability_pipeline_datadog_agent_source_type" => "ObservabilityPipelineDatadogAgentSourceType", "v2.observability_pipeline_datadog_logs_destination" => "ObservabilityPipelineDatadogLogsDestination", "v2.observability_pipeline_datadog_logs_destination_type" => "ObservabilityPipelineDatadogLogsDestinationType", + "v2.observability_pipeline_datadog_tags_processor" => "ObservabilityPipelineDatadogTagsProcessor", + "v2.observability_pipeline_datadog_tags_processor_action" => "ObservabilityPipelineDatadogTagsProcessorAction", + "v2.observability_pipeline_datadog_tags_processor_mode" => "ObservabilityPipelineDatadogTagsProcessorMode", + "v2.observability_pipeline_datadog_tags_processor_type" => "ObservabilityPipelineDatadogTagsProcessorType", "v2.observability_pipeline_decoding" => "ObservabilityPipelineDecoding", "v2.observability_pipeline_dedupe_processor" => "ObservabilityPipelineDedupeProcessor", "v2.observability_pipeline_dedupe_processor_mode" => "ObservabilityPipelineDedupeProcessorMode", @@ -2757,6 +2771,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_amazon_security_lake_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_security_lake_destination.rb new file mode 100644 index 00000000000..b890a2a2564 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_security_lake_destination.rb @@ -0,0 +1,252 @@ +=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_security_lake` destination sends your logs to Amazon Security Lake. + class ObservabilityPipelineAmazonSecurityLakeDestination + 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 + + # Name of the Amazon S3 bucket in Security Lake (3-63 characters). + attr_reader :bucket + + # Custom source name for the logs in Security Lake. + attr_reader :custom_source_name + + # 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 + + # AWS region of the S3 bucket. + attr_reader :region + + # Configuration for enabling TLS encryption between the pipeline component and external services. + attr_accessor :tls + + # The destination type. Always `amazon_security_lake`. + 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', + :'bucket' => :'bucket', + :'custom_source_name' => :'custom_source_name', + :'id' => :'id', + :'inputs' => :'inputs', + :'region' => :'region', + :'tls' => :'tls', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth' => :'ObservabilityPipelineAwsAuth', + :'bucket' => :'String', + :'custom_source_name' => :'String', + :'id' => :'String', + :'inputs' => :'Array', + :'region' => :'String', + :'tls' => :'ObservabilityPipelineTls', + :'type' => :'ObservabilityPipelineAmazonSecurityLakeDestinationType' + } + 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::ObservabilityPipelineAmazonSecurityLakeDestination` 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?(:'bucket') + self.bucket = attributes[:'bucket'] + end + + if attributes.key?(:'custom_source_name') + self.custom_source_name = attributes[:'custom_source_name'] + 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?(:'region') + self.region = attributes[:'region'] + 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 @bucket.nil? + return false if @custom_source_name.nil? + return false if @id.nil? + return false if @inputs.nil? + return false if @region.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 custom_source_name [Object] Object to be assigned + # @!visibility private + def custom_source_name=(custom_source_name) + if custom_source_name.nil? + fail ArgumentError, 'invalid value for "custom_source_name", custom_source_name cannot be nil.' + end + @custom_source_name = custom_source_name + 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 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 && + bucket == o.bucket && + custom_source_name == o.custom_source_name && + id == o.id && + inputs == o.inputs && + region == o.region && + 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 + [auth, bucket, custom_source_name, id, inputs, region, tls, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_amazon_security_lake_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_security_lake_destination_type.rb new file mode 100644 index 00000000000..5b9b6f5ce1b --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_amazon_security_lake_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_security_lake`. + class ObservabilityPipelineAmazonSecurityLakeDestinationType + include BaseEnumModel + + AMAZON_SECURITY_LAKE = "amazon_security_lake".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 1e6caf8776b..1763fc8909a 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,10 @@ def openapi_one_of :'ObservabilityPipelineNewRelicDestination', :'ObservabilityPipelineSentinelOneDestination', :'ObservabilityPipelineOpenSearchDestination', - :'ObservabilityPipelineAmazonOpenSearchDestination' + :'ObservabilityPipelineAmazonOpenSearchDestination', + :'ObservabilityPipelineSocketDestination', + :'ObservabilityPipelineAmazonSecurityLakeDestination', + :'ObservabilityPipelineCrowdStrikeNextGenSiemDestination' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb index 5a67d9f3135..334f6e14d8a 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb @@ -41,7 +41,9 @@ def openapi_one_of :'ObservabilityPipelineDedupeProcessor', :'ObservabilityPipelineEnrichmentTableProcessor', :'ObservabilityPipelineReduceProcessor', - :'ObservabilityPipelineThrottleProcessor' + :'ObservabilityPipelineThrottleProcessor', + :'ObservabilityPipelineCustomProcessor', + :'ObservabilityPipelineDatadogTagsProcessor' ] 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_crowd_strike_next_gen_siem_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination.rb new file mode 100644 index 00000000000..827d8cc8c39 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination.rb @@ -0,0 +1,208 @@ +=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 `crowdstrike_next_gen_siem` destination forwards logs to CrowdStrike Next Gen SIEM. + class ObservabilityPipelineCrowdStrikeNextGenSiemDestination + include BaseGenericModel + + # Compression configuration for log events. + attr_accessor :compression + + # Encoding format for log events. + attr_reader :encoding + + # 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 + + # Configuration for enabling TLS encryption between the pipeline component and external services. + attr_accessor :tls + + # The destination type. The value should always be `crowdstrike_next_gen_siem`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compression' => :'compression', + :'encoding' => :'encoding', + :'id' => :'id', + :'inputs' => :'inputs', + :'tls' => :'tls', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compression' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression', + :'encoding' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding', + :'id' => :'String', + :'inputs' => :'Array', + :'tls' => :'ObservabilityPipelineTls', + :'type' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType' + } + 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::ObservabilityPipelineCrowdStrikeNextGenSiemDestination` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'compression') + self.compression = attributes[:'compression'] + end + + if attributes.key?(:'encoding') + self.encoding = attributes[:'encoding'] + end + + if attributes.key?(:'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?(:'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 @id.nil? + return false if @inputs.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param encoding [Object] Object to be assigned + # @!visibility private + def encoding=(encoding) + if encoding.nil? + fail ArgumentError, 'invalid value for "encoding", encoding cannot be nil.' + end + @encoding = encoding + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param inputs [Object] Object to be assigned + # @!visibility private + def inputs=(inputs) + if inputs.nil? + fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' + end + @inputs = inputs + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + compression == o.compression && + encoding == o.encoding && + id == o.id && + inputs == o.inputs && + 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 + [compression, encoding, id, inputs, tls, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_compression.rb b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_compression.rb new file mode 100644 index 00000000000..9b95c491cfd --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_compression.rb @@ -0,0 +1,133 @@ +=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 configuration for log events. + class ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression + include BaseGenericModel + + # Compression algorithm for log events. + attr_reader :algorithm + + # Compression level. + attr_accessor :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' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompressionAlgorithm', + :'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::ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression` 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? + 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 && + 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_crowd_strike_next_gen_siem_destination_compression_algorithm.rb b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_compression_algorithm.rb new file mode 100644 index 00000000000..b932d7f98ec --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_compression_algorithm.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 + # Compression algorithm for log events. + class ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompressionAlgorithm + include BaseEnumModel + + GZIP = "gzip".freeze + ZLIB = "zlib".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_encoding.rb b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_encoding.rb new file mode 100644 index 00000000000..41f2e02feba --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_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 ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding + include BaseEnumModel + + JSON = "json".freeze + RAW_MESSAGE = "raw_message".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_destination_type.rb new file mode 100644 index 00000000000..1ed562d036b --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_crowd_strike_next_gen_siem_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 `crowdstrike_next_gen_siem`. + class ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType + include BaseEnumModel + + CROWDSTRIKE_NEXT_GEN_SIEM = "crowdstrike_next_gen_siem".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb new file mode 100644 index 00000000000..e0d50f74d5c --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb @@ -0,0 +1,215 @@ +=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 `custom_processor` processor transforms events using [Vector Remap Language (VRL)](https://vector.dev/docs/reference/vrl/) scripts with advanced filtering capabilities. + class ObservabilityPipelineCustomProcessor + include BaseGenericModel + + # The unique identifier for this processor. + attr_reader :id + + # A Datadog search query used to determine which logs this processor targets. This field should always be set to `*` for the custom_processor processor. + attr_reader :include + + # A list of component IDs whose output is used as the input for this processor. + attr_reader :inputs + + # Array of VRL remap rules. + attr_reader :remaps + + # The processor type. The value should always be `custom_processor`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'include' => :'include', + :'inputs' => :'inputs', + :'remaps' => :'remaps', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'include' => :'String', + :'inputs' => :'Array', + :'remaps' => :'Array', + :'type' => :'ObservabilityPipelineCustomProcessorType' + } + 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::ObservabilityPipelineCustomProcessor` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'inputs') + if (value = attributes[:'inputs']).is_a?(Array) + self.inputs = value + end + end + + if attributes.key?(:'remaps') + if (value = attributes[:'remaps']).is_a?(Array) + self.remaps = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @include.nil? + return false if @inputs.nil? + return false if @remaps.nil? + return false if @remaps.length < 1 + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param inputs [Object] Object to be assigned + # @!visibility private + def inputs=(inputs) + if inputs.nil? + fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' + end + @inputs = inputs + end + + # Custom attribute writer method with validation + # @param remaps [Object] Object to be assigned + # @!visibility private + def remaps=(remaps) + if remaps.nil? + fail ArgumentError, 'invalid value for "remaps", remaps cannot be nil.' + end + if remaps.length < 1 + fail ArgumentError, 'invalid value for "remaps", number of items must be greater than or equal to 1.' + end + @remaps = remaps + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + include == o.include && + inputs == o.inputs && + remaps == o.remaps && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, include, inputs, remaps, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_remap.rb b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_remap.rb new file mode 100644 index 00000000000..04f0e10e693 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_remap.rb @@ -0,0 +1,207 @@ +=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 + # Defines a single VRL remap rule with its own filtering and transformation logic. + class ObservabilityPipelineCustomProcessorRemap + include BaseGenericModel + + # Whether to drop events that caused errors during processing. + attr_reader :drop_on_error + + # Whether this remap rule is enabled. + attr_reader :enabled + + # A Datadog search query used to filter events for this specific remap rule. + attr_reader :include + + # A descriptive name for this remap rule. + attr_reader :name + + # The VRL script source code that defines the processing logic. + attr_reader :source + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'drop_on_error' => :'drop_on_error', + :'enabled' => :'enabled', + :'include' => :'include', + :'name' => :'name', + :'source' => :'source' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'drop_on_error' => :'Boolean', + :'enabled' => :'Boolean', + :'include' => :'String', + :'name' => :'String', + :'source' => :'String' + } + 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::ObservabilityPipelineCustomProcessorRemap` 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?(:'drop_on_error') + self.drop_on_error = attributes[:'drop_on_error'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + 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 @drop_on_error.nil? + return false if @enabled.nil? + return false if @include.nil? + return false if @name.nil? + return false if @source.nil? + true + end + + # Custom attribute writer method with validation + # @param drop_on_error [Object] Object to be assigned + # @!visibility private + def drop_on_error=(drop_on_error) + if drop_on_error.nil? + fail ArgumentError, 'invalid value for "drop_on_error", drop_on_error cannot be nil.' + end + @drop_on_error = drop_on_error + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param source [Object] Object to be assigned + # @!visibility private + def source=(source) + if source.nil? + fail ArgumentError, 'invalid value for "source", source cannot be nil.' + end + @source = source + 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 && + drop_on_error == o.drop_on_error && + enabled == o.enabled && + include == o.include && + name == o.name && + source == o.source && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [drop_on_error, enabled, include, name, source, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_type.rb new file mode 100644 index 00000000000..79d42d5787b --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_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 processor type. The value should always be `custom_processor`. + class ObservabilityPipelineCustomProcessorType + include BaseEnumModel + + CUSTOM_PROCESSOR = "custom_processor".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb new file mode 100644 index 00000000000..4b3ae3a6e07 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb @@ -0,0 +1,253 @@ +=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 `datadog_tags` processor includes or excludes specific Datadog tags in your logs. + class ObservabilityPipelineDatadogTagsProcessor + include BaseGenericModel + + # The action to take on tags with matching keys. + attr_reader :action + + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). + attr_reader :id + + # A Datadog search query used to determine which logs this processor targets. + attr_reader :include + + # A list of component IDs whose output is used as the `input` for this component. + attr_reader :inputs + + # A list of tag keys. + attr_reader :keys + + # The processing mode. + attr_reader :mode + + # The processor type. The value should always be `datadog_tags`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'action' => :'action', + :'id' => :'id', + :'include' => :'include', + :'inputs' => :'inputs', + :'keys' => :'keys', + :'mode' => :'mode', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'action' => :'ObservabilityPipelineDatadogTagsProcessorAction', + :'id' => :'String', + :'include' => :'String', + :'inputs' => :'Array', + :'keys' => :'Array', + :'mode' => :'ObservabilityPipelineDatadogTagsProcessorMode', + :'type' => :'ObservabilityPipelineDatadogTagsProcessorType' + } + 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::ObservabilityPipelineDatadogTagsProcessor` 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?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'inputs') + if (value = attributes[:'inputs']).is_a?(Array) + self.inputs = value + end + end + + if attributes.key?(:'keys') + if (value = attributes[:'keys']).is_a?(Array) + self.keys = value + end + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + 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 @action.nil? + return false if @id.nil? + return false if @include.nil? + return false if @inputs.nil? + return false if @keys.nil? + return false if @mode.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param action [Object] Object to be assigned + # @!visibility private + def action=(action) + if action.nil? + fail ArgumentError, 'invalid value for "action", action cannot be nil.' + end + @action = action + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param inputs [Object] Object to be assigned + # @!visibility private + def inputs=(inputs) + if inputs.nil? + fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' + end + @inputs = inputs + end + + # Custom attribute writer method with validation + # @param keys [Object] Object to be assigned + # @!visibility private + def keys=(keys) + if keys.nil? + fail ArgumentError, 'invalid value for "keys", keys cannot be nil.' + end + @keys = keys + 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 && + action == o.action && + id == o.id && + include == o.include && + inputs == o.inputs && + keys == o.keys && + mode == o.mode && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [action, id, include, inputs, keys, mode, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_action.rb b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_action.rb new file mode 100644 index 00000000000..874c8d60b81 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_action.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 + # The action to take on tags with matching keys. + class ObservabilityPipelineDatadogTagsProcessorAction + include BaseEnumModel + + INCLUDE = "include".freeze + EXCLUDE = "exclude".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_mode.rb b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_mode.rb new file mode 100644 index 00000000000..797b02eeaf4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_mode.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 processing mode. + class ObservabilityPipelineDatadogTagsProcessorMode + include BaseEnumModel + + FILTER = "filter".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_type.rb new file mode 100644 index 00000000000..39b6dd336d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor_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 processor type. The value should always be `datadog_tags`. + class ObservabilityPipelineDatadogTagsProcessorType + include BaseEnumModel + + DATADOG_TAGS = "datadog_tags".freeze + end +end 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