diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6c5ab8350716..8f35e44886c0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -79177,17 +79177,11 @@ components: TransportWebhookLog: description: A single email transport webhook log event. properties: - attributes: - $ref: "#/components/schemas/TransportWebhookLogAttributes" date: description: The ISO 8601 timestamp of the event. example: "2024-01-15T10:30:00Z" format: date-time type: string - log_id: - description: The unique log event identifier. - example: "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR" - type: string source: description: The email transport provider. example: "sendgrid" @@ -79196,299 +79190,12 @@ components: description: The log status level. example: "info" type: string - tags: - description: A list of tags associated with the event. - example: ["env:production"] - items: - description: A tag in key:value or key-only form (for example, env:production). - type: string - type: array - required: - - date - - log_id - - source - - status - - tags - - attributes - type: object - TransportWebhookLogAttributes: - description: Top-level attributes for the webhook log event, including delivery status, recipient details, and provider metadata. - properties: - category: - description: The event categories. - example: ["transactional"] - items: - description: An event category assigned by the transport provider. - type: string - type: array - email: - $ref: "#/components/schemas/TransportWebhookLogEmail" - email_id: - description: The unique email identifier. - example: "abc123-def456" - type: string - email_type_display_name: - description: The human-readable email type name. - example: "Monitor Alert" - type: string - message: - $ref: "#/components/schemas/TransportWebhookLogMessage" - network: - $ref: "#/components/schemas/TransportWebhookLogNetwork" - org: - description: The numeric organization identifier. - example: 1234 - format: int64 - type: integer - org_metadata: - $ref: "#/components/schemas/TransportWebhookLogOrgMetadata" - org_uuid: - description: The organization UUID. - example: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091" - type: string - queue_time: - description: The timestamp when the email was queued. - example: "2024-01-15T10:29:00Z" - type: string - sg_machine_open: - description: Indicates whether the open event was triggered by automated machine activity rather than a human recipient (SendGrid-specific). - type: boolean - subject: - description: The email subject line. - example: "[Monitor Alert] CPU usage is high" - type: string - useragent: - description: The user agent string for open events. - example: "Mozilla/5.0" - type: string type: object TransportWebhookLogBatchRequest: description: A batch of email transport webhook log events. items: $ref: "#/components/schemas/TransportWebhookLog" type: array - TransportWebhookLogEmail: - description: The email address details. - properties: - address: - description: The recipient email address. - example: "user@example.com" - type: string - domain: - description: The recipient domain. - example: "example.com" - type: string - subject: - description: The email subject line. - example: "[Monitor Alert] CPU usage is high" - type: string - type: - description: Email categorization tags applied by the transport provider (for example, "transactional", "marketing"). - example: ["transactional"] - items: - description: An email type classification (for example, "transactional", "user"). - type: string - type: array - type: object - TransportWebhookLogIpAttribute: - description: An IP attribute with its sources. - properties: - ip: - description: The IP address. - example: "192.168.1.1" - type: string - source: - description: The transport providers or systems that reported this IP address. - example: ["sendgrid"] - items: - description: A transport provider or system that reported this IP address. - type: string - type: array - type: object - TransportWebhookLogMessage: - description: The message delivery event details. - properties: - auth: - $ref: "#/components/schemas/TransportWebhookLogMessageAuth" - custom_args: - $ref: "#/components/schemas/TransportWebhookLogMessageCustomArgs" - id: - $ref: "#/components/schemas/TransportWebhookLogMessageId" - name: - description: The delivery event type emitted by the transport provider (for example, "delivered", "dropped", "bounced"). - example: "delivered" - type: string - response: - $ref: "#/components/schemas/TransportWebhookLogMessageResponse" - sender_ip: - description: The IP address of the sending server. - example: "192.168.1.1" - type: string - timestamp: - $ref: "#/components/schemas/TransportWebhookLogMessageTimestamp" - type: object - TransportWebhookLogMessageAuth: - description: The message authentication details. - properties: - delivered_with_tls: - description: The TLS version or negotiation information. - example: "TLSv1.2" - type: string - type: object - TransportWebhookLogMessageCustomArgs: - description: Custom arguments passed through the email transport provider for tracking. - properties: - email_id: - description: The unique email identifier. - example: "abc123-def456" - type: string - email_type_display_name: - description: The human-readable email type name. - example: "Monitor Alert" - type: string - org_uuid: - description: The organization UUID. - example: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091" - type: string - queue_time: - description: The timestamp when the email was queued. - example: "2024-01-15T10:29:00Z" - type: string - subject: - description: The email subject line. - example: "[Monitor Alert] CPU usage is high" - type: string - type: object - TransportWebhookLogMessageId: - description: The message identifiers. - properties: - message_id: - description: The RFC 5322 Message-ID. - example: "" - type: string - smtp_id: - description: The SMTP transaction identifier. - example: "" - type: string - transport_event_id: - description: The transport provider event identifier. - example: "evt_abc123" - type: string - type: object - TransportWebhookLogMessageResponse: - description: The SMTP response information. - properties: - enhanced_smtp_code: - description: The enhanced SMTP status code. - example: "2.0.0" - type: string - reason: - description: The SMTP response message. - example: "250 2.0.0 OK" - type: string - smtp_code: - description: The SMTP status code. - example: "250" - type: string - type: object - TransportWebhookLogMessageTimestamp: - description: The message delivery timing information. - properties: - event_timestamp: - description: The Unix timestamp of the event. - example: 1705312200.0 - format: double - type: number - lifetime: - description: The total delivery time in seconds. - example: 3.2 - format: double - type: number - queue_time: - description: Number of seconds the message spent in the delivery queue. - example: 1.5 - format: double - type: number - scheduled_time: - description: The scheduled delivery time as a Unix timestamp. - example: 1705312190.0 - format: double - type: number - type: object - TransportWebhookLogNetwork: - description: The network information for the event. - properties: - ip: - $ref: "#/components/schemas/TransportWebhookLogNetworkIp" - type: object - TransportWebhookLogNetworkIp: - description: The IP address information. - properties: - attributes: - description: Per-IP attribute records, each pairing an IP address with the providers that observed it. - items: - $ref: "#/components/schemas/TransportWebhookLogIpAttribute" - type: array - list: - description: The list of IP addresses. - example: ["192.168.1.1"] - items: - description: An IP address observed during message delivery. - type: string - type: array - type: object - TransportWebhookLogOrgMetadata: - description: Metadata about the organization that sent the email. - properties: - billing_country: - description: Country code or name used for billing purposes. - type: string - billing_plan: - description: The Datadog billing plan for the organization (for example, "pro", "enterprise"). - type: string - customer_tier: - description: Support or account tier assigned to the organization (for example, "tier-1"). - type: string - domain: - description: Primary email domain associated with the organization (for example, "example.com"). - type: string - industry: - description: Industry classification of the organization (for example, "technology", "finance"). - type: string - is_bugbounty: - description: Whether the organization is enrolled in the Datadog bug bounty program. - type: string - is_msp: - description: Whether the organization operates as a Managed Service Provider managing child orgs. - type: string - name: - description: Display name of the organization as configured in Datadog account settings. - type: string - org_uuid: - description: Globally unique identifier for the Datadog organization (UUID v1 format). - type: string - parent_org_id: - description: Identifier of the immediate parent organization, if this is a child org. - type: string - premium_support: - description: Whether the organization has a premium support plan with Datadog. - type: string - root_org_id: - description: Identifier of the top-level parent organization in a multi-org account hierarchy. - type: string - root_org_name: - description: Display name of the top-level parent organization in a multi-org account hierarchy. - type: string - shipping_country: - description: Country code or name used for shipping or regional assignment. - type: string - website: - description: Website URL provided during organization registration. - type: string - when_created: - description: ISO 8601 timestamp of when the Datadog organization was created. - type: string - type: object Trigger: description: "One of the triggers that can start the execution of a workflow." oneOf: @@ -99838,10 +99545,7 @@ paths: - monitors_downtime /api/v2/email/transport/webhook_intake: post: - description: |- - Receives a batch of email transport webhook log events and emits an audit trail entry - for each event with a final delivery status (delivered, dropped, or bounced). - Only authorized organizations can submit events. + deprecated: true operationId: CreateEmailTransportWebhookIntake requestBody: content: @@ -99849,31 +99553,9 @@ paths: examples: default: value: - - attributes: - email: - address: "user@example.com" - domain: "example.com" - email_id: "abc123-def456" - email_type_display_name: "Monitor Alert" - message: - id: - message_id: "" - smtp_id: "" - name: "delivered" - response: - reason: "250 2.0.0 OK" - smtp_code: "250" - timestamp: - event_timestamp: 1705312200.0 - org: 1234 - org_uuid: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091" - subject: "[Monitor Alert] CPU usage is high" - date: "2024-01-15T10:30:00Z" - log_id: "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR" + - date: "2024-01-15T10:30:00Z" source: "sendgrid" status: "info" - tags: - - "env:production" schema: $ref: "#/components/schemas/TransportWebhookLogBatchRequest" required: true @@ -99897,9 +99579,7 @@ paths: summary: Ingest email transport webhook events tags: - Email Transport - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + x-sunset: "2027-01-01" /api/v2/error-tracking/issues/search: post: description: Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request. diff --git a/examples/v2/email-transport/CreateEmailTransportWebhookIntake.rb b/examples/v2/email-transport/CreateEmailTransportWebhookIntake.rb index 18c14e16cc20..82ada36c4ad4 100644 --- a/examples/v2/email-transport/CreateEmailTransportWebhookIntake.rb +++ b/examples/v2/email-transport/CreateEmailTransportWebhookIntake.rb @@ -1,86 +1,13 @@ # Ingest email transport webhook events returns "No Content" response require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_email_transport_webhook_intake".to_sym] = true -end api_instance = DatadogAPIClient::V2::EmailTransportAPI.new body = [ DatadogAPIClient::V2::TransportWebhookLog.new({ - attributes: DatadogAPIClient::V2::TransportWebhookLogAttributes.new({ - category: [ - "transactional", - ], - email: DatadogAPIClient::V2::TransportWebhookLogEmail.new({ - address: "user@example.com", - domain: "example.com", - subject: "[Monitor Alert] CPU usage is high", - type: [ - "transactional", - ], - }), - email_id: "abc123-def456", - email_type_display_name: "Monitor Alert", - message: DatadogAPIClient::V2::TransportWebhookLogMessage.new({ - auth: DatadogAPIClient::V2::TransportWebhookLogMessageAuth.new({ - delivered_with_tls: "TLSv1.2", - }), - custom_args: DatadogAPIClient::V2::TransportWebhookLogMessageCustomArgs.new({ - email_id: "abc123-def456", - email_type_display_name: "Monitor Alert", - org_uuid: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091", - queue_time: "2024-01-15T10:29:00Z", - subject: "[Monitor Alert] CPU usage is high", - }), - id: DatadogAPIClient::V2::TransportWebhookLogMessageId.new({ - message_id: "", - smtp_id: "", - transport_event_id: "evt_abc123", - }), - name: "delivered", - response: DatadogAPIClient::V2::TransportWebhookLogMessageResponse.new({ - enhanced_smtp_code: "2.0.0", - reason: "250 2.0.0 OK", - smtp_code: "250", - }), - sender_ip: "192.168.1.1", - timestamp: DatadogAPIClient::V2::TransportWebhookLogMessageTimestamp.new({ - event_timestamp: 1705312200.0, - lifetime: 3.2, - queue_time: 1.5, - scheduled_time: 1705312190.0, - }), - }), - network: DatadogAPIClient::V2::TransportWebhookLogNetwork.new({ - ip: DatadogAPIClient::V2::TransportWebhookLogNetworkIp.new({ - attributes: [ - DatadogAPIClient::V2::TransportWebhookLogIpAttribute.new({ - ip: "192.168.1.1", - source: [ - "sendgrid", - ], - }), - ], - list: [ - "192.168.1.1", - ], - }), - }), - org: 1234, - org_metadata: DatadogAPIClient::V2::TransportWebhookLogOrgMetadata.new({}), - org_uuid: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091", - queue_time: "2024-01-15T10:29:00Z", - subject: "[Monitor Alert] CPU usage is high", - useragent: "Mozilla/5.0", - }), date: "2024-01-15T10:30:00Z", - log_id: "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR", source: "sendgrid", status: "info", - tags: [ - "env:production", - ], }), ] api_instance.create_email_transport_webhook_intake(body) diff --git a/features/v2/email_transport.feature b/features/v2/email_transport.feature index f2b014905edd..2825895d8513 100644 --- a/features/v2/email_transport.feature +++ b/features/v2/email_transport.feature @@ -7,9 +7,8 @@ Feature: Email Transport Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system And an instance of "EmailTransport" API - And operation "CreateEmailTransportWebhookIntake" enabled And new "CreateEmailTransportWebhookIntake" request - And body with value [{"attributes": {"category": ["transactional"], "email": {"address": "user@example.com", "domain": "example.com", "subject": "[Monitor Alert] CPU usage is high", "type": ["transactional"]}, "email_id": "abc123-def456", "email_type_display_name": "Monitor Alert", "message": {"auth": {"delivered_with_tls": "TLSv1.2"}, "custom_args": {"email_id": "abc123-def456", "email_type_display_name": "Monitor Alert", "org_uuid": "8dee7c38-00cb-11ea-a77b-8b5a08d3b091", "queue_time": "2024-01-15T10:29:00Z", "subject": "[Monitor Alert] CPU usage is high"}, "id": {"message_id": "", "smtp_id": "", "transport_event_id": "evt_abc123"}, "name": "delivered", "response": {"enhanced_smtp_code": "2.0.0", "reason": "250 2.0.0 OK", "smtp_code": "250"}, "sender_ip": "192.168.1.1", "timestamp": {"event_timestamp": 1705312200.0, "lifetime": 3.2, "queue_time": 1.5, "scheduled_time": 1705312190.0}}, "network": {"ip": {"attributes": [{"ip": "192.168.1.1", "source": ["sendgrid"]}], "list": ["192.168.1.1"]}}, "org": 1234, "org_metadata": {}, "org_uuid": "8dee7c38-00cb-11ea-a77b-8b5a08d3b091", "queue_time": "2024-01-15T10:29:00Z", "subject": "[Monitor Alert] CPU usage is high", "useragent": "Mozilla/5.0"}, "date": "2024-01-15T10:30:00Z", "log_id": "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR", "source": "sendgrid", "status": "info", "tags": ["env:production"]}] + And body with value [{"date": "2024-01-15T10:30:00Z", "source": "sendgrid", "status": "info"}] @generated @skip @team:DataDog/dogmail Scenario: Ingest email transport webhook events returns "Bad Request" response diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 544b557cb4b3..ebd880f2278f 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -316,7 +316,6 @@ def initialize "v2.trigger_deployment_gates_evaluation": false, "v2.update_deployment_gate": false, "v2.update_deployment_rule": false, - "v2.create_email_transport_webhook_intake": false, "v2.create_hamr_org_connection": false, "v2.get_hamr_org_connection": false, "v2.create_global_incident_handle": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 2be62a16392b..25cdfb7449cb 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6067,18 +6067,6 @@ def overrides "v2.timeseries_response_series" => "TimeseriesResponseSeries", "v2.token_type" => "TokenType", "v2.transport_webhook_log" => "TransportWebhookLog", - "v2.transport_webhook_log_attributes" => "TransportWebhookLogAttributes", - "v2.transport_webhook_log_email" => "TransportWebhookLogEmail", - "v2.transport_webhook_log_ip_attribute" => "TransportWebhookLogIpAttribute", - "v2.transport_webhook_log_message" => "TransportWebhookLogMessage", - "v2.transport_webhook_log_message_auth" => "TransportWebhookLogMessageAuth", - "v2.transport_webhook_log_message_custom_args" => "TransportWebhookLogMessageCustomArgs", - "v2.transport_webhook_log_message_id" => "TransportWebhookLogMessageId", - "v2.transport_webhook_log_message_response" => "TransportWebhookLogMessageResponse", - "v2.transport_webhook_log_message_timestamp" => "TransportWebhookLogMessageTimestamp", - "v2.transport_webhook_log_network" => "TransportWebhookLogNetwork", - "v2.transport_webhook_log_network_ip" => "TransportWebhookLogNetworkIp", - "v2.transport_webhook_log_org_metadata" => "TransportWebhookLogOrgMetadata", "v2.trigger" => "Trigger", "v2.trigger_attributes" => "TriggerAttributes", "v2.trigger_investigation_request" => "TriggerInvestigationRequest", diff --git a/lib/datadog_api_client/v2/api/email_transport_api.rb b/lib/datadog_api_client/v2/api/email_transport_api.rb index 66cf3b7e297b..ffa03c9a52bf 100644 --- a/lib/datadog_api_client/v2/api/email_transport_api.rb +++ b/lib/datadog_api_client/v2/api/email_transport_api.rb @@ -32,21 +32,13 @@ def create_email_transport_webhook_intake(body, opts = {}) end # Ingest email transport webhook events. - # - # Receives a batch of email transport webhook log events and emits an audit trail entry - # for each event with a final delivery status (delivered, dropped, or bounced). - # Only authorized organizations can submit events. + # @deprecated This API is deprecated. # # @param body [Array] # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def create_email_transport_webhook_intake_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_email_transport_webhook_intake".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_email_transport_webhook_intake") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_email_transport_webhook_intake")) - end + warn "[DEPRECATION] `CreateEmailTransportWebhookIntake` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailTransportAPI.create_email_transport_webhook_intake ...' diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log.rb b/lib/datadog_api_client/v2/models/transport_webhook_log.rb index 1a6b19482a8c..8ce4a84ef349 100644 --- a/lib/datadog_api_client/v2/models/transport_webhook_log.rb +++ b/lib/datadog_api_client/v2/models/transport_webhook_log.rb @@ -21,23 +21,14 @@ module DatadogAPIClient::V2 class TransportWebhookLog include BaseGenericModel - # Top-level attributes for the webhook log event, including delivery status, recipient details, and provider metadata. - attr_reader :attributes - # The ISO 8601 timestamp of the event. - attr_reader :date - - # The unique log event identifier. - attr_reader :log_id + attr_accessor :date # The email transport provider. - attr_reader :source + attr_accessor :source # The log status level. - attr_reader :status - - # A list of tags associated with the event. - attr_reader :tags + attr_accessor :status attr_accessor :additional_properties @@ -45,12 +36,9 @@ class TransportWebhookLog # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', :'date' => :'date', - :'log_id' => :'log_id', :'source' => :'source', - :'status' => :'status', - :'tags' => :'tags' + :'status' => :'status' } end @@ -58,12 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'TransportWebhookLogAttributes', :'date' => :'Time', - :'log_id' => :'String', :'source' => :'String', - :'status' => :'String', - :'tags' => :'Array' + :'status' => :'String' } end @@ -85,18 +70,10 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - if attributes.key?(:'date') self.date = attributes[:'date'] end - if attributes.key?(:'log_id') - self.log_id = attributes[:'log_id'] - end - if attributes.key?(:'source') self.source = attributes[:'source'] end @@ -104,85 +81,6 @@ def initialize(attributes = {}) if attributes.key?(:'status') self.status = attributes[:'status'] end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @date.nil? - return false if @log_id.nil? - return false if @source.nil? - return false if @status.nil? - return false if @tags.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param date [Object] Object to be assigned - # @!visibility private - def date=(date) - if date.nil? - fail ArgumentError, 'invalid value for "date", date cannot be nil.' - end - @date = date - end - - # Custom attribute writer method with validation - # @param log_id [Object] Object to be assigned - # @!visibility private - def log_id=(log_id) - if log_id.nil? - fail ArgumentError, 'invalid value for "log_id", log_id cannot be nil.' - end - @log_id = log_id - 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 - - # Custom attribute writer method with validation - # @param status [Object] Object to be assigned - # @!visibility private - def status=(status) - if status.nil? - fail ArgumentError, 'invalid value for "status", status cannot be nil.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param tags [Object] Object to be assigned - # @!visibility private - def tags=(tags) - if tags.nil? - fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' - end - @tags = tags end # Returns the object in the form of hash, with additionalProperties support. @@ -211,12 +109,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && date == o.date && - log_id == o.log_id && source == o.source && status == o.status && - tags == o.tags && additional_properties == o.additional_properties end @@ -224,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, date, log_id, source, status, tags, additional_properties].hash + [date, source, status, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_attributes.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_attributes.rb deleted file mode 100644 index db90bbbd160c..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=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 - # Top-level attributes for the webhook log event, including delivery status, recipient details, and provider metadata. - class TransportWebhookLogAttributes - include BaseGenericModel - - # The event categories. - attr_accessor :category - - # The email address details. - attr_accessor :email - - # The unique email identifier. - attr_accessor :email_id - - # The human-readable email type name. - attr_accessor :email_type_display_name - - # The message delivery event details. - attr_accessor :message - - # The network information for the event. - attr_accessor :network - - # The numeric organization identifier. - attr_accessor :org - - # Metadata about the organization that sent the email. - attr_accessor :org_metadata - - # The organization UUID. - attr_accessor :org_uuid - - # The timestamp when the email was queued. - attr_accessor :queue_time - - # Indicates whether the open event was triggered by automated machine activity rather than a human recipient (SendGrid-specific). - attr_accessor :sg_machine_open - - # The email subject line. - attr_accessor :subject - - # The user agent string for open events. - attr_accessor :useragent - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'category' => :'category', - :'email' => :'email', - :'email_id' => :'email_id', - :'email_type_display_name' => :'email_type_display_name', - :'message' => :'message', - :'network' => :'network', - :'org' => :'org', - :'org_metadata' => :'org_metadata', - :'org_uuid' => :'org_uuid', - :'queue_time' => :'queue_time', - :'sg_machine_open' => :'sg_machine_open', - :'subject' => :'subject', - :'useragent' => :'useragent' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'category' => :'Array', - :'email' => :'TransportWebhookLogEmail', - :'email_id' => :'String', - :'email_type_display_name' => :'String', - :'message' => :'TransportWebhookLogMessage', - :'network' => :'TransportWebhookLogNetwork', - :'org' => :'Integer', - :'org_metadata' => :'TransportWebhookLogOrgMetadata', - :'org_uuid' => :'String', - :'queue_time' => :'String', - :'sg_machine_open' => :'Boolean', - :'subject' => :'String', - :'useragent' => :'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::TransportWebhookLogAttributes` 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?(:'category') - if (value = attributes[:'category']).is_a?(Array) - self.category = value - end - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'email_id') - self.email_id = attributes[:'email_id'] - end - - if attributes.key?(:'email_type_display_name') - self.email_type_display_name = attributes[:'email_type_display_name'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'network') - self.network = attributes[:'network'] - end - - if attributes.key?(:'org') - self.org = attributes[:'org'] - end - - if attributes.key?(:'org_metadata') - self.org_metadata = attributes[:'org_metadata'] - end - - if attributes.key?(:'org_uuid') - self.org_uuid = attributes[:'org_uuid'] - end - - if attributes.key?(:'queue_time') - self.queue_time = attributes[:'queue_time'] - end - - if attributes.key?(:'sg_machine_open') - self.sg_machine_open = attributes[:'sg_machine_open'] - end - - if attributes.key?(:'subject') - self.subject = attributes[:'subject'] - end - - if attributes.key?(:'useragent') - self.useragent = attributes[:'useragent'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - category == o.category && - email == o.email && - email_id == o.email_id && - email_type_display_name == o.email_type_display_name && - message == o.message && - network == o.network && - org == o.org && - org_metadata == o.org_metadata && - org_uuid == o.org_uuid && - queue_time == o.queue_time && - sg_machine_open == o.sg_machine_open && - subject == o.subject && - useragent == o.useragent && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [category, email, email_id, email_type_display_name, message, network, org, org_metadata, org_uuid, queue_time, sg_machine_open, subject, useragent, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_email.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_email.rb deleted file mode 100644 index 0801c236254c..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_email.rb +++ /dev/null @@ -1,137 +0,0 @@ -=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 email address details. - class TransportWebhookLogEmail - include BaseGenericModel - - # The recipient email address. - attr_accessor :address - - # The recipient domain. - attr_accessor :domain - - # The email subject line. - attr_accessor :subject - - # Email categorization tags applied by the transport provider (for example, "transactional", "marketing"). - attr_accessor :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'address' => :'address', - :'domain' => :'domain', - :'subject' => :'subject', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'address' => :'String', - :'domain' => :'String', - :'subject' => :'String', - :'type' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TransportWebhookLogEmail` 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?(:'address') - self.address = attributes[:'address'] - end - - if attributes.key?(:'domain') - self.domain = attributes[:'domain'] - end - - if attributes.key?(:'subject') - self.subject = attributes[:'subject'] - end - - if attributes.key?(:'type') - if (value = attributes[:'type']).is_a?(Array) - self.type = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - address == o.address && - domain == o.domain && - subject == o.subject && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [address, domain, subject, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_ip_attribute.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_ip_attribute.rb deleted file mode 100644 index 242c4a67a973..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_ip_attribute.rb +++ /dev/null @@ -1,117 +0,0 @@ -=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 - # An IP attribute with its sources. - class TransportWebhookLogIpAttribute - include BaseGenericModel - - # The IP address. - attr_accessor :ip - - # The transport providers or systems that reported this IP address. - attr_accessor :source - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'ip' => :'ip', - :'source' => :'source' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'ip' => :'String', - :'source' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TransportWebhookLogIpAttribute` 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?(:'ip') - self.ip = attributes[:'ip'] - end - - if attributes.key?(:'source') - if (value = attributes[:'source']).is_a?(Array) - self.source = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ip == o.ip && - source == o.source && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [ip, source, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_message.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_message.rb deleted file mode 100644 index 9b66e80266ad..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_message.rb +++ /dev/null @@ -1,165 +0,0 @@ -=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 message delivery event details. - class TransportWebhookLogMessage - include BaseGenericModel - - # The message authentication details. - attr_accessor :auth - - # Custom arguments passed through the email transport provider for tracking. - attr_accessor :custom_args - - # The message identifiers. - attr_accessor :id - - # The delivery event type emitted by the transport provider (for example, "delivered", "dropped", "bounced"). - attr_accessor :name - - # The SMTP response information. - attr_accessor :response - - # The IP address of the sending server. - attr_accessor :sender_ip - - # The message delivery timing information. - attr_accessor :timestamp - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'auth' => :'auth', - :'custom_args' => :'custom_args', - :'id' => :'id', - :'name' => :'name', - :'response' => :'response', - :'sender_ip' => :'sender_ip', - :'timestamp' => :'timestamp' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'auth' => :'TransportWebhookLogMessageAuth', - :'custom_args' => :'TransportWebhookLogMessageCustomArgs', - :'id' => :'TransportWebhookLogMessageId', - :'name' => :'String', - :'response' => :'TransportWebhookLogMessageResponse', - :'sender_ip' => :'String', - :'timestamp' => :'TransportWebhookLogMessageTimestamp' - } - 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::TransportWebhookLogMessage` 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?(:'custom_args') - self.custom_args = attributes[:'custom_args'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'response') - self.response = attributes[:'response'] - end - - if attributes.key?(:'sender_ip') - self.sender_ip = attributes[:'sender_ip'] - end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - auth == o.auth && - custom_args == o.custom_args && - id == o.id && - name == o.name && - response == o.response && - sender_ip == o.sender_ip && - timestamp == o.timestamp && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [auth, custom_args, id, name, response, sender_ip, timestamp, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_message_auth.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_message_auth.rb deleted file mode 100644 index 5715fb9c3fea..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_message_auth.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 message authentication details. - class TransportWebhookLogMessageAuth - include BaseGenericModel - - # The TLS version or negotiation information. - attr_accessor :delivered_with_tls - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'delivered_with_tls' => :'delivered_with_tls' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'delivered_with_tls' => :'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::TransportWebhookLogMessageAuth` 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?(:'delivered_with_tls') - self.delivered_with_tls = attributes[:'delivered_with_tls'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - delivered_with_tls == o.delivered_with_tls && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [delivered_with_tls, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_message_custom_args.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_message_custom_args.rb deleted file mode 100644 index 5a5d604670e1..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_message_custom_args.rb +++ /dev/null @@ -1,145 +0,0 @@ -=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 - # Custom arguments passed through the email transport provider for tracking. - class TransportWebhookLogMessageCustomArgs - include BaseGenericModel - - # The unique email identifier. - attr_accessor :email_id - - # The human-readable email type name. - attr_accessor :email_type_display_name - - # The organization UUID. - attr_accessor :org_uuid - - # The timestamp when the email was queued. - attr_accessor :queue_time - - # The email subject line. - attr_accessor :subject - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'email_id' => :'email_id', - :'email_type_display_name' => :'email_type_display_name', - :'org_uuid' => :'org_uuid', - :'queue_time' => :'queue_time', - :'subject' => :'subject' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'email_id' => :'String', - :'email_type_display_name' => :'String', - :'org_uuid' => :'String', - :'queue_time' => :'String', - :'subject' => :'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::TransportWebhookLogMessageCustomArgs` 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?(:'email_id') - self.email_id = attributes[:'email_id'] - end - - if attributes.key?(:'email_type_display_name') - self.email_type_display_name = attributes[:'email_type_display_name'] - end - - if attributes.key?(:'org_uuid') - self.org_uuid = attributes[:'org_uuid'] - end - - if attributes.key?(:'queue_time') - self.queue_time = attributes[:'queue_time'] - end - - if attributes.key?(:'subject') - self.subject = attributes[:'subject'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - email_id == o.email_id && - email_type_display_name == o.email_type_display_name && - org_uuid == o.org_uuid && - queue_time == o.queue_time && - subject == o.subject && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [email_id, email_type_display_name, org_uuid, queue_time, subject, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_message_id.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_message_id.rb deleted file mode 100644 index 1e8028854bf4..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_message_id.rb +++ /dev/null @@ -1,125 +0,0 @@ -=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 message identifiers. - class TransportWebhookLogMessageId - include BaseGenericModel - - # The RFC 5322 Message-ID. - attr_accessor :message_id - - # The SMTP transaction identifier. - attr_accessor :smtp_id - - # The transport provider event identifier. - attr_accessor :transport_event_id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'message_id' => :'message_id', - :'smtp_id' => :'smtp_id', - :'transport_event_id' => :'transport_event_id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'message_id' => :'String', - :'smtp_id' => :'String', - :'transport_event_id' => :'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::TransportWebhookLogMessageId` 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?(:'message_id') - self.message_id = attributes[:'message_id'] - end - - if attributes.key?(:'smtp_id') - self.smtp_id = attributes[:'smtp_id'] - end - - if attributes.key?(:'transport_event_id') - self.transport_event_id = attributes[:'transport_event_id'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - message_id == o.message_id && - smtp_id == o.smtp_id && - transport_event_id == o.transport_event_id && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [message_id, smtp_id, transport_event_id, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_message_response.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_message_response.rb deleted file mode 100644 index 25f71b42a3db..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_message_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=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 SMTP response information. - class TransportWebhookLogMessageResponse - include BaseGenericModel - - # The enhanced SMTP status code. - attr_accessor :enhanced_smtp_code - - # The SMTP response message. - attr_accessor :reason - - # The SMTP status code. - attr_accessor :smtp_code - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'enhanced_smtp_code' => :'enhanced_smtp_code', - :'reason' => :'reason', - :'smtp_code' => :'smtp_code' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'enhanced_smtp_code' => :'String', - :'reason' => :'String', - :'smtp_code' => :'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::TransportWebhookLogMessageResponse` 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?(:'enhanced_smtp_code') - self.enhanced_smtp_code = attributes[:'enhanced_smtp_code'] - end - - if attributes.key?(:'reason') - self.reason = attributes[:'reason'] - end - - if attributes.key?(:'smtp_code') - self.smtp_code = attributes[:'smtp_code'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - enhanced_smtp_code == o.enhanced_smtp_code && - reason == o.reason && - smtp_code == o.smtp_code && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [enhanced_smtp_code, reason, smtp_code, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_message_timestamp.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_message_timestamp.rb deleted file mode 100644 index 22a6071b5ab3..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_message_timestamp.rb +++ /dev/null @@ -1,135 +0,0 @@ -=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 message delivery timing information. - class TransportWebhookLogMessageTimestamp - include BaseGenericModel - - # The Unix timestamp of the event. - attr_accessor :event_timestamp - - # The total delivery time in seconds. - attr_accessor :lifetime - - # Number of seconds the message spent in the delivery queue. - attr_accessor :queue_time - - # The scheduled delivery time as a Unix timestamp. - attr_accessor :scheduled_time - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'event_timestamp' => :'event_timestamp', - :'lifetime' => :'lifetime', - :'queue_time' => :'queue_time', - :'scheduled_time' => :'scheduled_time' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'event_timestamp' => :'Float', - :'lifetime' => :'Float', - :'queue_time' => :'Float', - :'scheduled_time' => :'Float' - } - 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::TransportWebhookLogMessageTimestamp` 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?(:'event_timestamp') - self.event_timestamp = attributes[:'event_timestamp'] - end - - if attributes.key?(:'lifetime') - self.lifetime = attributes[:'lifetime'] - end - - if attributes.key?(:'queue_time') - self.queue_time = attributes[:'queue_time'] - end - - if attributes.key?(:'scheduled_time') - self.scheduled_time = attributes[:'scheduled_time'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - event_timestamp == o.event_timestamp && - lifetime == o.lifetime && - queue_time == o.queue_time && - scheduled_time == o.scheduled_time && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [event_timestamp, lifetime, queue_time, scheduled_time, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_network.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_network.rb deleted file mode 100644 index c91229b63137..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_network.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 network information for the event. - class TransportWebhookLogNetwork - include BaseGenericModel - - # The IP address information. - attr_accessor :ip - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'ip' => :'ip' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'ip' => :'TransportWebhookLogNetworkIp' - } - 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::TransportWebhookLogNetwork` 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?(:'ip') - self.ip = attributes[:'ip'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ip == o.ip && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [ip, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_network_ip.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_network_ip.rb deleted file mode 100644 index ebaa7c4621d1..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_network_ip.rb +++ /dev/null @@ -1,119 +0,0 @@ -=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 IP address information. - class TransportWebhookLogNetworkIp - include BaseGenericModel - - # Per-IP attribute records, each pairing an IP address with the providers that observed it. - attr_accessor :attributes - - # The list of IP addresses. - attr_accessor :list - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'list' => :'list' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'Array', - :'list' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TransportWebhookLogNetworkIp` 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?(:'attributes') - if (value = attributes[:'attributes']).is_a?(Array) - self.attributes = value - end - end - - if attributes.key?(:'list') - if (value = attributes[:'list']).is_a?(Array) - self.list = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - list == o.list && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, list, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/transport_webhook_log_org_metadata.rb b/lib/datadog_api_client/v2/models/transport_webhook_log_org_metadata.rb deleted file mode 100644 index b1a7546abf53..000000000000 --- a/lib/datadog_api_client/v2/models/transport_webhook_log_org_metadata.rb +++ /dev/null @@ -1,255 +0,0 @@ -=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 - # Metadata about the organization that sent the email. - class TransportWebhookLogOrgMetadata - include BaseGenericModel - - # Country code or name used for billing purposes. - attr_accessor :billing_country - - # The Datadog billing plan for the organization (for example, "pro", "enterprise"). - attr_accessor :billing_plan - - # Support or account tier assigned to the organization (for example, "tier-1"). - attr_accessor :customer_tier - - # Primary email domain associated with the organization (for example, "example.com"). - attr_accessor :domain - - # Industry classification of the organization (for example, "technology", "finance"). - attr_accessor :industry - - # Whether the organization is enrolled in the Datadog bug bounty program. - attr_accessor :is_bugbounty - - # Whether the organization operates as a Managed Service Provider managing child orgs. - attr_accessor :is_msp - - # Display name of the organization as configured in Datadog account settings. - attr_accessor :name - - # Globally unique identifier for the Datadog organization (UUID v1 format). - attr_accessor :org_uuid - - # Identifier of the immediate parent organization, if this is a child org. - attr_accessor :parent_org_id - - # Whether the organization has a premium support plan with Datadog. - attr_accessor :premium_support - - # Identifier of the top-level parent organization in a multi-org account hierarchy. - attr_accessor :root_org_id - - # Display name of the top-level parent organization in a multi-org account hierarchy. - attr_accessor :root_org_name - - # Country code or name used for shipping or regional assignment. - attr_accessor :shipping_country - - # Website URL provided during organization registration. - attr_accessor :website - - # ISO 8601 timestamp of when the Datadog organization was created. - attr_accessor :when_created - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'billing_country' => :'billing_country', - :'billing_plan' => :'billing_plan', - :'customer_tier' => :'customer_tier', - :'domain' => :'domain', - :'industry' => :'industry', - :'is_bugbounty' => :'is_bugbounty', - :'is_msp' => :'is_msp', - :'name' => :'name', - :'org_uuid' => :'org_uuid', - :'parent_org_id' => :'parent_org_id', - :'premium_support' => :'premium_support', - :'root_org_id' => :'root_org_id', - :'root_org_name' => :'root_org_name', - :'shipping_country' => :'shipping_country', - :'website' => :'website', - :'when_created' => :'when_created' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'billing_country' => :'String', - :'billing_plan' => :'String', - :'customer_tier' => :'String', - :'domain' => :'String', - :'industry' => :'String', - :'is_bugbounty' => :'String', - :'is_msp' => :'String', - :'name' => :'String', - :'org_uuid' => :'String', - :'parent_org_id' => :'String', - :'premium_support' => :'String', - :'root_org_id' => :'String', - :'root_org_name' => :'String', - :'shipping_country' => :'String', - :'website' => :'String', - :'when_created' => :'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::TransportWebhookLogOrgMetadata` 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?(:'billing_country') - self.billing_country = attributes[:'billing_country'] - end - - if attributes.key?(:'billing_plan') - self.billing_plan = attributes[:'billing_plan'] - end - - if attributes.key?(:'customer_tier') - self.customer_tier = attributes[:'customer_tier'] - end - - if attributes.key?(:'domain') - self.domain = attributes[:'domain'] - end - - if attributes.key?(:'industry') - self.industry = attributes[:'industry'] - end - - if attributes.key?(:'is_bugbounty') - self.is_bugbounty = attributes[:'is_bugbounty'] - end - - if attributes.key?(:'is_msp') - self.is_msp = attributes[:'is_msp'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'org_uuid') - self.org_uuid = attributes[:'org_uuid'] - end - - if attributes.key?(:'parent_org_id') - self.parent_org_id = attributes[:'parent_org_id'] - end - - if attributes.key?(:'premium_support') - self.premium_support = attributes[:'premium_support'] - end - - if attributes.key?(:'root_org_id') - self.root_org_id = attributes[:'root_org_id'] - end - - if attributes.key?(:'root_org_name') - self.root_org_name = attributes[:'root_org_name'] - end - - if attributes.key?(:'shipping_country') - self.shipping_country = attributes[:'shipping_country'] - end - - if attributes.key?(:'website') - self.website = attributes[:'website'] - end - - if attributes.key?(:'when_created') - self.when_created = attributes[:'when_created'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - billing_country == o.billing_country && - billing_plan == o.billing_plan && - customer_tier == o.customer_tier && - domain == o.domain && - industry == o.industry && - is_bugbounty == o.is_bugbounty && - is_msp == o.is_msp && - name == o.name && - org_uuid == o.org_uuid && - parent_org_id == o.parent_org_id && - premium_support == o.premium_support && - root_org_id == o.root_org_id && - root_org_name == o.root_org_name && - shipping_country == o.shipping_country && - website == o.website && - when_created == o.when_created && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [billing_country, billing_plan, customer_tier, domain, industry, is_bugbounty, is_msp, name, org_uuid, parent_org_id, premium_support, root_org_id, root_org_name, shipping_country, website, when_created, additional_properties].hash - end - end -end