diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index dba7bb99f9a5..e6b232131c3f 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -4281,6 +4281,7 @@ components: - appsec_usage - asm_serverless_traced_invocations_usage - asm_serverless_traced_invocations_percentage + - bits_ai_investigations_usage - browser_usage - ci_pipeline_indexed_spans_usage - ci_test_indexed_spans_usage @@ -4364,6 +4365,7 @@ components: - APPSEC_USAGE - ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE - ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE + - BITS_AI_INVESTIGATIONS_USAGE - BROWSER_USAGE - CI_PIPELINE_INDEXED_SPANS_USAGE - CI_TEST_INDEXED_SPANS_USAGE @@ -8702,6 +8704,8 @@ components: - appsec_percentage - asm_serverless_traced_invocations_usage - asm_serverless_traced_invocations_percentage + - bits_ai_investigations_usage + - bits_ai_investigations_percentage - browser_usage - browser_percentage - ci_visibility_itr_usage @@ -8863,6 +8867,8 @@ components: - APPSEC_PERCENTAGE - ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE - ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE + - BITS_AI_INVESTIGATIONS_USAGE + - BITS_AI_INVESTIGATIONS_PERCENTAGE - BROWSER_USAGE - BROWSER_PERCENTAGE - CI_VISIBILITY_ITR_USAGE @@ -9076,6 +9082,14 @@ components: usage by tag(s). format: double type: number + bits_ai_investigations_percentage: + description: The percentage of Bits AI `SRE` investigation usage by tag(s). + format: double + type: number + bits_ai_investigations_usage: + description: The Bits AI `SRE` investigation usage by tag(s). + format: double + type: number browser_percentage: description: The percentage of synthetic browser test usage by tag(s). format: double diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0930cfd613f1..8a53c755c88d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -41244,6 +41244,114 @@ components: type: string x-enum-varnames: - PROCESS + ProductAnalyticsServerSideEventError: + description: Error details. + properties: + detail: + description: Error message. + example: Malformed payload + type: string + status: + description: Error code. + example: '400' + type: string + title: + description: Error title. + example: Bad Request + type: string + type: object + ProductAnalyticsServerSideEventErrors: + description: Error response. + properties: + errors: + description: Structured errors. + items: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventError' + type: array + type: object + ProductAnalyticsServerSideEventItem: + description: A Product Analytics server-side event. + properties: + account: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItemAccount' + application: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItemApplication' + event: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItemEvent' + session: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItemSession' + type: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItemType' + usr: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItemUsr' + required: + - application + - event + - type + type: object + ProductAnalyticsServerSideEventItemAccount: + description: The account linked to your event. + properties: + id: + description: The account ID used in Datadog. + example: account-67890 + type: string + required: + - id + type: object + ProductAnalyticsServerSideEventItemApplication: + description: The application in which you want to send your events. + properties: + id: + description: 'The application ID of your application. It can be found in + your + + [application management page](https://app.datadoghq.com/rum/list).' + example: 123abcde-123a-123b-1234-123456789abc + type: string + required: + - id + type: object + ProductAnalyticsServerSideEventItemEvent: + description: Fields used for the event. + properties: + name: + description: The name of your event, which is used for search in the same + way as view or action names. + example: payment.processed + type: string + required: + - name + type: object + ProductAnalyticsServerSideEventItemSession: + description: The session linked to your event. + properties: + id: + description: The session ID captured by the SDK. + example: session-abcdef + type: string + required: + - id + type: object + ProductAnalyticsServerSideEventItemType: + description: The type of Product Analytics event. Must be `server` for server-side + events. + enum: + - server + example: server + type: string + x-enum-varnames: + - SERVER + ProductAnalyticsServerSideEventItemUsr: + description: The user linked to your event. + properties: + id: + description: The user ID used in Datadog. + example: user-12345 + type: string + required: + - id + type: object Project: description: A Project properties: @@ -78016,6 +78124,218 @@ paths: x-permission: operator: OPEN permissions: [] + /api/v2/prodlytics: + post: + description: 'Send server-side events to Product Analytics. Server-side events + are retained for 15 months. + + + Server-Side events in Product Analytics are helpful for tracking events that + occur on the server, + + as opposed to client-side events, which are captured by Real User Monitoring + (RUM) SDKs. + + This allows for a more comprehensive view of the user journey by including + actions that happen on the server. + + Typical examples could be `checkout.completed` or `payment.processed`. + + + Ingested server-side events are integrated into Product Analytics to allow + users to select and filter + + these events in the event picker, similar to how views or actions are handled. + + + **Requirements:** + + - At least one of `usr`, `account`, or `session` must be provided with a valid + ID. + + - The `application.id` must reference a Product Analytics-enabled application. + + + **Custom Attributes:** + + Any additional fields in the payload are flattened and searchable as facets. + + For example, a payload with `{"customer": {"tier": "premium"}}` is searchable + with + + the syntax `@customer.tier:premium` in Datadog. + + + The status codes answered by the HTTP API are: + + - 202: Accepted: The request has been accepted for processing + + - 400: Bad request (likely an issue in the payload formatting) + + - 401: Unauthorized (likely a missing API Key) + + - 403: Permission issue (likely using an invalid API Key) + + - 408: Request Timeout, request should be retried after some time + + - 413: Payload too large (batch is above 5MB uncompressed) + + - 429: Too Many Requests, request should be retried after some time + + - 500: Internal Server Error, the server encountered an unexpected condition + that prevented it from fulfilling the request, request should be retried after + some time + + - 503: Service Unavailable, the server is not ready to handle the request + probably because it is overloaded, request should be retried after some time' + operationId: SubmitProductAnalyticsEvent + requestBody: + content: + application/json: + examples: + event-with-account: + description: Send a server-side event linked to an account. + summary: Event with account ID + value: + account: + id: account-456 + application: + id: 123abcde-123a-123b-1234-123456789abc + event: + name: checkout.completed + type: server + event-with-custom-attributes: + description: Send a server-side event with additional custom attributes. + summary: Event with custom attributes + value: + application: + id: 123abcde-123a-123b-1234-123456789abc + customer: + tier: premium + event: + name: payment.processed + type: server + usr: + id: '123' + event-with-session: + description: Send a server-side event linked to a session. + summary: Event with session ID + value: + application: + id: 123abcde-123a-123b-1234-123456789abc + event: + name: form.submitted + session: + id: session-789 + type: server + simple-event-with-user: + description: Send a server-side event linked to a user. + summary: Simple event with user ID + value: + application: + id: 123abcde-123a-123b-1234-123456789abc + event: + name: payment.processed + type: server + usr: + id: '123' + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventItem' + description: Server-side event to send (JSON format). + required: true + responses: + '202': + content: + application/json: + schema: + type: object + description: Request accepted for processing (always 202 empty JSON). + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Forbidden + '408': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Request Timeout + '413': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Payload Too Large + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Too Many Requests + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Internal Server Error + '503': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsServerSideEventErrors' + description: Service Unavailable + security: + - apiKeyAuth: [] + servers: + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: The regional site for customers. + enum: + - datadoghq.com + - us3.datadoghq.com + - us5.datadoghq.com + - ap1.datadoghq.com + - ap2.datadoghq.com + - datadoghq.eu + subdomain: + default: browser-intake + description: The subdomain where the API is deployed. + - url: '{protocol}://{name}' + variables: + name: + default: browser-intake-datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: browser-intake + description: The subdomain where the API is deployed. + summary: Send server-side events + tags: + - Product Analytics + x-codegen-request-body-name: body /api/v2/product-analytics/accounts/facet_info: post: description: Get facet information for account attributes including possible @@ -90212,6 +90532,18 @@ tags: See the [Live Processes page](https://docs.datadoghq.com/infrastructure/process/) for more information. name: Processes +- description: 'Send server-side events to Product Analytics. Server-Side Events Ingestion + allows you to collect custom events + + from any server-side source, and retains events for 15 months. Server-side events + are helpful for understanding + + causes of a funnel drop-off which are external to the client-side (for example, + payment processing error). + + See the [Product Analytics page](https://docs.datadoghq.com/product_analytics/) + for more information.' + name: Product Analytics - description: Manage your Real User Monitoring (RUM) applications, and search or aggregate your RUM events over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information diff --git a/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb b/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb new file mode 100644 index 000000000000..b9afa87019b1 --- /dev/null +++ b/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb @@ -0,0 +1,24 @@ +# Send server-side events returns "Request accepted for processing (always 202 empty JSON)." response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ProductAnalyticsAPI.new + +body = DatadogAPIClient::V2::ProductAnalyticsServerSideEventItem.new({ + account: DatadogAPIClient::V2::ProductAnalyticsServerSideEventItemAccount.new({ + id: "account-67890", + }), + application: DatadogAPIClient::V2::ProductAnalyticsServerSideEventItemApplication.new({ + id: "123abcde-123a-123b-1234-123456789abc", + }), + event: DatadogAPIClient::V2::ProductAnalyticsServerSideEventItemEvent.new({ + name: "payment.processed", + }), + session: DatadogAPIClient::V2::ProductAnalyticsServerSideEventItemSession.new({ + id: "session-abcdef", + }), + type: DatadogAPIClient::V2::ProductAnalyticsServerSideEventItemType::SERVER, + usr: DatadogAPIClient::V2::ProductAnalyticsServerSideEventItemUsr.new({ + id: "user-12345", + }), +}) +p api_instance.submit_product_analytics_event(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 5980fcaf9919..a1c4c68b1971 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2825,6 +2825,9 @@ "page_limit" => "Integer", "page_cursor" => "String", }, + "v2.SubmitProductAnalyticsEvent" => { + "body" => "ProductAnalyticsServerSideEventItem", + }, "v2.GetAccountFacetInfo" => { "body" => "FacetInfoRequest", }, diff --git a/features/v2/product_analytics.feature b/features/v2/product_analytics.feature new file mode 100644 index 000000000000..a915c2130412 --- /dev/null +++ b/features/v2/product_analytics.feature @@ -0,0 +1,35 @@ +@endpoint(product-analytics) @endpoint(product-analytics-v2) +Feature: Product Analytics + Send server-side events to Product Analytics. Server-Side Events Ingestion + allows you to collect custom events from any server-side source, and + retains events for 15 months. Server-side events are helpful for + understanding causes of a funnel drop-off which are external to the + client-side (for example, payment processing error). See the [Product + Analytics page](https://docs.datadoghq.com/product_analytics/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And an instance of "ProductAnalytics" API + And new "SubmitProductAnalyticsEvent" request + And body with value {"account": {"id": "account-67890"}, "application": {"id": "123abcde-123a-123b-1234-123456789abc"}, "event": {"name": "payment.processed"}, "session": {"id": "session-abcdef"}, "type": "server", "usr": {"id": "user-12345"}} + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Send server-side events returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Send server-side events returns "Payload Too Large" response + When the request is sent + Then the response status is 413 Payload Too Large + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Send server-side events returns "Request Timeout" response + When the request is sent + Then the response status is 408 Request Timeout + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Send server-side events returns "Request accepted for processing (always 202 empty JSON)." response + When the request is sent + Then the response status is 202 Request accepted for processing (always 202 empty JSON). diff --git a/features/v2/undo.json b/features/v2/undo.json index eb43f26dbec6..0867c10cd717 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3133,6 +3133,12 @@ "type": "safe" } }, + "SubmitProductAnalyticsEvent": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "GetAccountFacetInfo": { "tag": "Rum Audience Management", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 95ddf1221cda..3257b422c9b1 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -906,6 +906,58 @@ def operation_server_settings } } ], + "v2.submit_product_analytics_event": [ + { + url: +"https://{subdomain}.{site}", + description: "No description provided", + variables: { + site: { + description: "The regional site for customers.", + default_value: "datadoghq.com", + enum_values: [ + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "ap1.datadoghq.com", + "ap2.datadoghq.com", + "datadoghq.eu" + ] + }, + subdomain: { + description: "The subdomain where the API is deployed.", + default_value: "browser-intake", + } + } + }, + { + url: +"{protocol}://{name}", + description: "No description provided", + variables: { + name: { + description: "Full site DNS name.", + default_value: "browser-intake-datadoghq.com", + }, + protocol: { + description: "The protocol for accessing the API.", + default_value: "https", + } + } + }, + { + url: +"https://{subdomain}.{site}", + description: "No description provided", + variables: { + site: { + description: "Any Datadog deployment.", + default_value: "datadoghq.com", + }, + subdomain: { + description: "The subdomain where the API is deployed.", + default_value: "browser-intake", + } + } + } + ], } end diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 94cccd52c2b2..5aacc4f79d74 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3523,6 +3523,15 @@ def overrides "v2.process_summary" => "ProcessSummary", "v2.process_summary_attributes" => "ProcessSummaryAttributes", "v2.process_summary_type" => "ProcessSummaryType", + "v2.product_analytics_server_side_event_error" => "ProductAnalyticsServerSideEventError", + "v2.product_analytics_server_side_event_errors" => "ProductAnalyticsServerSideEventErrors", + "v2.product_analytics_server_side_event_item" => "ProductAnalyticsServerSideEventItem", + "v2.product_analytics_server_side_event_item_account" => "ProductAnalyticsServerSideEventItemAccount", + "v2.product_analytics_server_side_event_item_application" => "ProductAnalyticsServerSideEventItemApplication", + "v2.product_analytics_server_side_event_item_event" => "ProductAnalyticsServerSideEventItemEvent", + "v2.product_analytics_server_side_event_item_session" => "ProductAnalyticsServerSideEventItemSession", + "v2.product_analytics_server_side_event_item_type" => "ProductAnalyticsServerSideEventItemType", + "v2.product_analytics_server_side_event_item_usr" => "ProductAnalyticsServerSideEventItemUsr", "v2.project" => "Project", "v2.project_attributes" => "ProjectAttributes", "v2.project_create" => "ProjectCreate", @@ -4778,6 +4787,7 @@ def overrides "v2.organizations_api" => "OrganizationsAPI", "v2.powerpack_api" => "PowerpackAPI", "v2.processes_api" => "ProcessesAPI", + "v2.product_analytics_api" => "ProductAnalyticsAPI", "v2.reference_tables_api" => "ReferenceTablesAPI", "v2.restriction_policies_api" => "RestrictionPoliciesAPI", "v2.roles_api" => "RolesAPI", diff --git a/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index 0a5d584c5569..46c5ac5e282c 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -154,7 +154,7 @@ def get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {}) fail ArgumentError, "Missing the required parameter 'usage_type' when calling UsageMeteringAPI.get_hourly_usage_attribution" end # verify enum value - allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'apm_usm_usage', 'appsec_fargate_usage', 'appsec_usage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'browser_usage', 'ci_pipeline_indexed_spans_usage', 'ci_test_indexed_spans_usage', 'ci_visibility_itr_usage', 'cloud_siem_usage', 'code_security_host_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_event_usage', 'custom_ingested_timeseries_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_fargate_task_usage', 'cws_hosts_usage', 'data_jobs_monitoring_usage', 'data_stream_monitoring_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'flex_stored_logs', 'functions_usage', 'incident_management_monthly_active_users_usage', 'indexed_spans_usage', 'infra_host_usage', 'ingested_logs_bytes_usage', 'ingested_spans_bytes_usage', 'invocations_usage', 'lambda_traced_invocations_usage', 'llm_observability_usage', 'llm_spans_usage', 'logs_indexed_15day_usage', 'logs_indexed_180day_usage', 'logs_indexed_1day_usage', 'logs_indexed_30day_usage', 'logs_indexed_360day_usage', 'logs_indexed_3day_usage', 'logs_indexed_45day_usage', 'logs_indexed_60day_usage', 'logs_indexed_7day_usage', 'logs_indexed_90day_usage', 'logs_indexed_custom_retention_usage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'npm_host_usage', 'network_device_wireless_usage', 'obs_pipeline_bytes_usage', 'obs_pipelines_vcpu_usage', 'online_archive_usage', 'product_analytics_session_usage', 'profiled_container_usage', 'profiled_fargate_usage', 'profiled_host_usage', 'published_app', 'rum_browser_mobile_sessions_usage', 'rum_ingested_usage', 'rum_investigate_usage', 'rum_replay_sessions_usage', 'rum_session_replay_add_on_usage', 'sca_fargate_usage', 'sds_scanned_bytes_usage', 'serverless_apps_usage', 'siem_analyzed_logs_add_on_usage', 'siem_ingested_bytes_usage', 'snmp_usage', 'universal_service_monitoring_usage', 'vuln_management_hosts_usage', 'workflow_executions_usage'] + allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'apm_usm_usage', 'appsec_fargate_usage', 'appsec_usage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'bits_ai_investigations_usage', 'browser_usage', 'ci_pipeline_indexed_spans_usage', 'ci_test_indexed_spans_usage', 'ci_visibility_itr_usage', 'cloud_siem_usage', 'code_security_host_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_event_usage', 'custom_ingested_timeseries_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_fargate_task_usage', 'cws_hosts_usage', 'data_jobs_monitoring_usage', 'data_stream_monitoring_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'flex_stored_logs', 'functions_usage', 'incident_management_monthly_active_users_usage', 'indexed_spans_usage', 'infra_host_usage', 'ingested_logs_bytes_usage', 'ingested_spans_bytes_usage', 'invocations_usage', 'lambda_traced_invocations_usage', 'llm_observability_usage', 'llm_spans_usage', 'logs_indexed_15day_usage', 'logs_indexed_180day_usage', 'logs_indexed_1day_usage', 'logs_indexed_30day_usage', 'logs_indexed_360day_usage', 'logs_indexed_3day_usage', 'logs_indexed_45day_usage', 'logs_indexed_60day_usage', 'logs_indexed_7day_usage', 'logs_indexed_90day_usage', 'logs_indexed_custom_retention_usage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'npm_host_usage', 'network_device_wireless_usage', 'obs_pipeline_bytes_usage', 'obs_pipelines_vcpu_usage', 'online_archive_usage', 'product_analytics_session_usage', 'profiled_container_usage', 'profiled_fargate_usage', 'profiled_host_usage', 'published_app', 'rum_browser_mobile_sessions_usage', 'rum_ingested_usage', 'rum_investigate_usage', 'rum_replay_sessions_usage', 'rum_session_replay_add_on_usage', 'sca_fargate_usage', 'sds_scanned_bytes_usage', 'serverless_apps_usage', 'siem_analyzed_logs_add_on_usage', 'siem_ingested_bytes_usage', 'snmp_usage', 'universal_service_monitoring_usage', 'vuln_management_hosts_usage', 'workflow_executions_usage'] if @api_client.config.client_side_validation && !allowable_values.include?(usage_type) fail ArgumentError, "invalid value for \"usage_type\", must be one of #{allowable_values}" end @@ -480,7 +480,7 @@ def get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_monthly_usage_attribution" end # verify enum value - allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'apm_usm_usage', 'apm_usm_percentage', 'appsec_usage', 'appsec_percentage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'browser_usage', 'browser_percentage', 'ci_visibility_itr_usage', 'ci_visibility_itr_percentage', 'cloud_siem_usage', 'cloud_siem_percentage', 'code_security_host_usage', 'code_security_host_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'custom_ingested_timeseries_usage', 'custom_ingested_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_fargate_task_percentage', 'cws_fargate_task_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'data_jobs_monitoring_usage', 'data_jobs_monitoring_percentage', 'data_stream_monitoring_usage', 'data_stream_monitoring_percentage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'flex_stored_logs_usage', 'flex_stored_logs_percentage', 'functions_usage', 'functions_percentage', 'incident_management_monthly_active_users_usage', 'incident_management_monthly_active_users_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'lambda_traced_invocations_usage', 'lambda_traced_invocations_percentage', 'llm_observability_usage', 'llm_observability_percentage', 'llm_spans_usage', 'llm_spans_percentage', 'mobile_app_testing_percentage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'ndm_netflow_percentage', 'network_device_wireless_usage', 'network_device_wireless_percentage', 'npm_host_usage', 'npm_host_percentage', 'obs_pipeline_bytes_usage', 'obs_pipeline_bytes_percentage', 'obs_pipelines_vcpu_usage', 'obs_pipelines_vcpu_percentage', 'online_archive_usage', 'online_archive_percentage', 'product_analytics_session_usage', 'product_analytics_session_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'published_app_usage', 'published_app_percentage', 'serverless_apps_usage', 'serverless_apps_percentage', 'snmp_usage', 'snmp_percentage', 'universal_service_monitoring_usage', 'universal_service_monitoring_percentage', 'vuln_management_hosts_usage', 'vuln_management_hosts_percentage', 'sds_scanned_bytes_usage', 'sds_scanned_bytes_percentage', 'ci_test_indexed_spans_usage', 'ci_test_indexed_spans_percentage', 'ingested_logs_bytes_usage', 'ingested_logs_bytes_percentage', 'ci_pipeline_indexed_spans_usage', 'ci_pipeline_indexed_spans_percentage', 'indexed_spans_usage', 'indexed_spans_percentage', 'custom_event_usage', 'custom_event_percentage', 'logs_indexed_custom_retention_usage', 'logs_indexed_custom_retention_percentage', 'logs_indexed_360day_usage', 'logs_indexed_360day_percentage', 'logs_indexed_180day_usage', 'logs_indexed_180day_percentage', 'logs_indexed_90day_usage', 'logs_indexed_90day_percentage', 'logs_indexed_60day_usage', 'logs_indexed_60day_percentage', 'logs_indexed_45day_usage', 'logs_indexed_45day_percentage', 'logs_indexed_30day_usage', 'logs_indexed_30day_percentage', 'logs_indexed_15day_usage', 'logs_indexed_15day_percentage', 'logs_indexed_7day_usage', 'logs_indexed_7day_percentage', 'logs_indexed_3day_usage', 'logs_indexed_3day_percentage', 'logs_indexed_1day_usage', 'logs_indexed_1day_percentage', 'rum_ingested_usage', 'rum_ingested_percentage', 'rum_investigate_usage', 'rum_investigate_percentage', 'rum_replay_sessions_usage', 'rum_replay_sessions_percentage', 'rum_session_replay_add_on_usage', 'rum_session_replay_add_on_percentage', 'rum_browser_mobile_sessions_usage', 'rum_browser_mobile_sessions_percentage', 'ingested_spans_bytes_usage', 'ingested_spans_bytes_percentage', 'siem_analyzed_logs_add_on_usage', 'siem_analyzed_logs_add_on_percentage', 'siem_ingested_bytes_usage', 'siem_ingested_bytes_percentage', 'workflow_executions_usage', 'workflow_executions_percentage', 'sca_fargate_usage', 'sca_fargate_percentage', '*'] + allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'apm_usm_usage', 'apm_usm_percentage', 'appsec_usage', 'appsec_percentage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'bits_ai_investigations_usage', 'bits_ai_investigations_percentage', 'browser_usage', 'browser_percentage', 'ci_visibility_itr_usage', 'ci_visibility_itr_percentage', 'cloud_siem_usage', 'cloud_siem_percentage', 'code_security_host_usage', 'code_security_host_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'custom_ingested_timeseries_usage', 'custom_ingested_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_fargate_task_percentage', 'cws_fargate_task_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'data_jobs_monitoring_usage', 'data_jobs_monitoring_percentage', 'data_stream_monitoring_usage', 'data_stream_monitoring_percentage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'flex_stored_logs_usage', 'flex_stored_logs_percentage', 'functions_usage', 'functions_percentage', 'incident_management_monthly_active_users_usage', 'incident_management_monthly_active_users_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'lambda_traced_invocations_usage', 'lambda_traced_invocations_percentage', 'llm_observability_usage', 'llm_observability_percentage', 'llm_spans_usage', 'llm_spans_percentage', 'mobile_app_testing_percentage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'ndm_netflow_percentage', 'network_device_wireless_usage', 'network_device_wireless_percentage', 'npm_host_usage', 'npm_host_percentage', 'obs_pipeline_bytes_usage', 'obs_pipeline_bytes_percentage', 'obs_pipelines_vcpu_usage', 'obs_pipelines_vcpu_percentage', 'online_archive_usage', 'online_archive_percentage', 'product_analytics_session_usage', 'product_analytics_session_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'published_app_usage', 'published_app_percentage', 'serverless_apps_usage', 'serverless_apps_percentage', 'snmp_usage', 'snmp_percentage', 'universal_service_monitoring_usage', 'universal_service_monitoring_percentage', 'vuln_management_hosts_usage', 'vuln_management_hosts_percentage', 'sds_scanned_bytes_usage', 'sds_scanned_bytes_percentage', 'ci_test_indexed_spans_usage', 'ci_test_indexed_spans_percentage', 'ingested_logs_bytes_usage', 'ingested_logs_bytes_percentage', 'ci_pipeline_indexed_spans_usage', 'ci_pipeline_indexed_spans_percentage', 'indexed_spans_usage', 'indexed_spans_percentage', 'custom_event_usage', 'custom_event_percentage', 'logs_indexed_custom_retention_usage', 'logs_indexed_custom_retention_percentage', 'logs_indexed_360day_usage', 'logs_indexed_360day_percentage', 'logs_indexed_180day_usage', 'logs_indexed_180day_percentage', 'logs_indexed_90day_usage', 'logs_indexed_90day_percentage', 'logs_indexed_60day_usage', 'logs_indexed_60day_percentage', 'logs_indexed_45day_usage', 'logs_indexed_45day_percentage', 'logs_indexed_30day_usage', 'logs_indexed_30day_percentage', 'logs_indexed_15day_usage', 'logs_indexed_15day_percentage', 'logs_indexed_7day_usage', 'logs_indexed_7day_percentage', 'logs_indexed_3day_usage', 'logs_indexed_3day_percentage', 'logs_indexed_1day_usage', 'logs_indexed_1day_percentage', 'rum_ingested_usage', 'rum_ingested_percentage', 'rum_investigate_usage', 'rum_investigate_percentage', 'rum_replay_sessions_usage', 'rum_replay_sessions_percentage', 'rum_session_replay_add_on_usage', 'rum_session_replay_add_on_percentage', 'rum_browser_mobile_sessions_usage', 'rum_browser_mobile_sessions_percentage', 'ingested_spans_bytes_usage', 'ingested_spans_bytes_percentage', 'siem_analyzed_logs_add_on_usage', 'siem_analyzed_logs_add_on_percentage', 'siem_ingested_bytes_usage', 'siem_ingested_bytes_percentage', 'workflow_executions_usage', 'workflow_executions_percentage', 'sca_fargate_usage', 'sca_fargate_percentage', '*'] if @api_client.config.client_side_validation && !allowable_values.include?(fields) fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}" end @@ -488,7 +488,7 @@ def get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end - allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'apm_usm_usage', 'apm_usm_percentage', 'appsec_usage', 'appsec_percentage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'browser_usage', 'browser_percentage', 'ci_visibility_itr_usage', 'ci_visibility_itr_percentage', 'cloud_siem_usage', 'cloud_siem_percentage', 'code_security_host_usage', 'code_security_host_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'custom_ingested_timeseries_usage', 'custom_ingested_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_fargate_task_percentage', 'cws_fargate_task_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'data_jobs_monitoring_usage', 'data_jobs_monitoring_percentage', 'data_stream_monitoring_usage', 'data_stream_monitoring_percentage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'flex_stored_logs_usage', 'flex_stored_logs_percentage', 'functions_usage', 'functions_percentage', 'incident_management_monthly_active_users_usage', 'incident_management_monthly_active_users_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'lambda_traced_invocations_usage', 'lambda_traced_invocations_percentage', 'llm_observability_usage', 'llm_observability_percentage', 'llm_spans_usage', 'llm_spans_percentage', 'mobile_app_testing_percentage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'ndm_netflow_percentage', 'network_device_wireless_usage', 'network_device_wireless_percentage', 'npm_host_usage', 'npm_host_percentage', 'obs_pipeline_bytes_usage', 'obs_pipeline_bytes_percentage', 'obs_pipelines_vcpu_usage', 'obs_pipelines_vcpu_percentage', 'online_archive_usage', 'online_archive_percentage', 'product_analytics_session_usage', 'product_analytics_session_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'published_app_usage', 'published_app_percentage', 'serverless_apps_usage', 'serverless_apps_percentage', 'snmp_usage', 'snmp_percentage', 'universal_service_monitoring_usage', 'universal_service_monitoring_percentage', 'vuln_management_hosts_usage', 'vuln_management_hosts_percentage', 'sds_scanned_bytes_usage', 'sds_scanned_bytes_percentage', 'ci_test_indexed_spans_usage', 'ci_test_indexed_spans_percentage', 'ingested_logs_bytes_usage', 'ingested_logs_bytes_percentage', 'ci_pipeline_indexed_spans_usage', 'ci_pipeline_indexed_spans_percentage', 'indexed_spans_usage', 'indexed_spans_percentage', 'custom_event_usage', 'custom_event_percentage', 'logs_indexed_custom_retention_usage', 'logs_indexed_custom_retention_percentage', 'logs_indexed_360day_usage', 'logs_indexed_360day_percentage', 'logs_indexed_180day_usage', 'logs_indexed_180day_percentage', 'logs_indexed_90day_usage', 'logs_indexed_90day_percentage', 'logs_indexed_60day_usage', 'logs_indexed_60day_percentage', 'logs_indexed_45day_usage', 'logs_indexed_45day_percentage', 'logs_indexed_30day_usage', 'logs_indexed_30day_percentage', 'logs_indexed_15day_usage', 'logs_indexed_15day_percentage', 'logs_indexed_7day_usage', 'logs_indexed_7day_percentage', 'logs_indexed_3day_usage', 'logs_indexed_3day_percentage', 'logs_indexed_1day_usage', 'logs_indexed_1day_percentage', 'rum_ingested_usage', 'rum_ingested_percentage', 'rum_investigate_usage', 'rum_investigate_percentage', 'rum_replay_sessions_usage', 'rum_replay_sessions_percentage', 'rum_session_replay_add_on_usage', 'rum_session_replay_add_on_percentage', 'rum_browser_mobile_sessions_usage', 'rum_browser_mobile_sessions_percentage', 'ingested_spans_bytes_usage', 'ingested_spans_bytes_percentage', 'siem_analyzed_logs_add_on_usage', 'siem_analyzed_logs_add_on_percentage', 'siem_ingested_bytes_usage', 'siem_ingested_bytes_percentage', 'workflow_executions_usage', 'workflow_executions_percentage', 'sca_fargate_usage', 'sca_fargate_percentage', '*'] + allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'apm_usm_usage', 'apm_usm_percentage', 'appsec_usage', 'appsec_percentage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'bits_ai_investigations_usage', 'bits_ai_investigations_percentage', 'browser_usage', 'browser_percentage', 'ci_visibility_itr_usage', 'ci_visibility_itr_percentage', 'cloud_siem_usage', 'cloud_siem_percentage', 'code_security_host_usage', 'code_security_host_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'custom_ingested_timeseries_usage', 'custom_ingested_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_fargate_task_percentage', 'cws_fargate_task_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'data_jobs_monitoring_usage', 'data_jobs_monitoring_percentage', 'data_stream_monitoring_usage', 'data_stream_monitoring_percentage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'flex_stored_logs_usage', 'flex_stored_logs_percentage', 'functions_usage', 'functions_percentage', 'incident_management_monthly_active_users_usage', 'incident_management_monthly_active_users_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'lambda_traced_invocations_usage', 'lambda_traced_invocations_percentage', 'llm_observability_usage', 'llm_observability_percentage', 'llm_spans_usage', 'llm_spans_percentage', 'mobile_app_testing_percentage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'ndm_netflow_percentage', 'network_device_wireless_usage', 'network_device_wireless_percentage', 'npm_host_usage', 'npm_host_percentage', 'obs_pipeline_bytes_usage', 'obs_pipeline_bytes_percentage', 'obs_pipelines_vcpu_usage', 'obs_pipelines_vcpu_percentage', 'online_archive_usage', 'online_archive_percentage', 'product_analytics_session_usage', 'product_analytics_session_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'published_app_usage', 'published_app_percentage', 'serverless_apps_usage', 'serverless_apps_percentage', 'snmp_usage', 'snmp_percentage', 'universal_service_monitoring_usage', 'universal_service_monitoring_percentage', 'vuln_management_hosts_usage', 'vuln_management_hosts_percentage', 'sds_scanned_bytes_usage', 'sds_scanned_bytes_percentage', 'ci_test_indexed_spans_usage', 'ci_test_indexed_spans_percentage', 'ingested_logs_bytes_usage', 'ingested_logs_bytes_percentage', 'ci_pipeline_indexed_spans_usage', 'ci_pipeline_indexed_spans_percentage', 'indexed_spans_usage', 'indexed_spans_percentage', 'custom_event_usage', 'custom_event_percentage', 'logs_indexed_custom_retention_usage', 'logs_indexed_custom_retention_percentage', 'logs_indexed_360day_usage', 'logs_indexed_360day_percentage', 'logs_indexed_180day_usage', 'logs_indexed_180day_percentage', 'logs_indexed_90day_usage', 'logs_indexed_90day_percentage', 'logs_indexed_60day_usage', 'logs_indexed_60day_percentage', 'logs_indexed_45day_usage', 'logs_indexed_45day_percentage', 'logs_indexed_30day_usage', 'logs_indexed_30day_percentage', 'logs_indexed_15day_usage', 'logs_indexed_15day_percentage', 'logs_indexed_7day_usage', 'logs_indexed_7day_percentage', 'logs_indexed_3day_usage', 'logs_indexed_3day_percentage', 'logs_indexed_1day_usage', 'logs_indexed_1day_percentage', 'rum_ingested_usage', 'rum_ingested_percentage', 'rum_investigate_usage', 'rum_investigate_percentage', 'rum_replay_sessions_usage', 'rum_replay_sessions_percentage', 'rum_session_replay_add_on_usage', 'rum_session_replay_add_on_percentage', 'rum_browser_mobile_sessions_usage', 'rum_browser_mobile_sessions_percentage', 'ingested_spans_bytes_usage', 'ingested_spans_bytes_percentage', 'siem_analyzed_logs_add_on_usage', 'siem_analyzed_logs_add_on_percentage', 'siem_ingested_bytes_usage', 'siem_ingested_bytes_percentage', 'workflow_executions_usage', 'workflow_executions_percentage', 'sca_fargate_usage', 'sca_fargate_percentage', '*'] if @api_client.config.client_side_validation && opts[:'sort_name'] && !allowable_values.include?(opts[:'sort_name']) fail ArgumentError, "invalid value for \"sort_name\", must be one of #{allowable_values}" end diff --git a/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb b/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb index 37ee3d8a26ba..40fb5da99114 100644 --- a/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +++ b/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb @@ -30,6 +30,7 @@ class HourlyUsageAttributionUsageType APPSEC_USAGE = "appsec_usage".freeze ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE = "asm_serverless_traced_invocations_usage".freeze ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE = "asm_serverless_traced_invocations_percentage".freeze + BITS_AI_INVESTIGATIONS_USAGE = "bits_ai_investigations_usage".freeze BROWSER_USAGE = "browser_usage".freeze CI_PIPELINE_INDEXED_SPANS_USAGE = "ci_pipeline_indexed_spans_usage".freeze CI_TEST_INDEXED_SPANS_USAGE = "ci_test_indexed_spans_usage".freeze diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb index 27ac30eb43a9..b4b37ab3fef3 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb @@ -35,6 +35,8 @@ class MonthlyUsageAttributionSupportedMetrics APPSEC_PERCENTAGE = "appsec_percentage".freeze ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE = "asm_serverless_traced_invocations_usage".freeze ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE = "asm_serverless_traced_invocations_percentage".freeze + BITS_AI_INVESTIGATIONS_USAGE = "bits_ai_investigations_usage".freeze + BITS_AI_INVESTIGATIONS_PERCENTAGE = "bits_ai_investigations_percentage".freeze BROWSER_USAGE = "browser_usage".freeze BROWSER_PERCENTAGE = "browser_percentage".freeze CI_VISIBILITY_ITR_USAGE = "ci_visibility_itr_usage".freeze diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb index 9894010058a8..069af078a60b 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb @@ -64,6 +64,12 @@ class MonthlyUsageAttributionValues # The Application Security Monitoring Serverless traced invocations usage by tag(s). attr_accessor :asm_serverless_traced_invocations_usage + # The percentage of Bits AI `SRE` investigation usage by tag(s). + attr_accessor :bits_ai_investigations_percentage + + # The Bits AI `SRE` investigation usage by tag(s). + attr_accessor :bits_ai_investigations_usage + # The percentage of synthetic browser test usage by tag(s). attr_accessor :browser_percentage @@ -510,6 +516,8 @@ def self.attribute_map :'appsec_usage' => :'appsec_usage', :'asm_serverless_traced_invocations_percentage' => :'asm_serverless_traced_invocations_percentage', :'asm_serverless_traced_invocations_usage' => :'asm_serverless_traced_invocations_usage', + :'bits_ai_investigations_percentage' => :'bits_ai_investigations_percentage', + :'bits_ai_investigations_usage' => :'bits_ai_investigations_usage', :'browser_percentage' => :'browser_percentage', :'browser_usage' => :'browser_usage', :'ci_pipeline_indexed_spans_percentage' => :'ci_pipeline_indexed_spans_percentage', @@ -673,6 +681,8 @@ def self.openapi_types :'appsec_usage' => :'Float', :'asm_serverless_traced_invocations_percentage' => :'Float', :'asm_serverless_traced_invocations_usage' => :'Float', + :'bits_ai_investigations_percentage' => :'Float', + :'bits_ai_investigations_usage' => :'Float', :'browser_percentage' => :'Float', :'browser_usage' => :'Float', :'ci_pipeline_indexed_spans_percentage' => :'Float', @@ -892,6 +902,14 @@ def initialize(attributes = {}) self.asm_serverless_traced_invocations_usage = attributes[:'asm_serverless_traced_invocations_usage'] end + if attributes.key?(:'bits_ai_investigations_percentage') + self.bits_ai_investigations_percentage = attributes[:'bits_ai_investigations_percentage'] + end + + if attributes.key?(:'bits_ai_investigations_usage') + self.bits_ai_investigations_usage = attributes[:'bits_ai_investigations_usage'] + end + if attributes.key?(:'browser_percentage') self.browser_percentage = attributes[:'browser_percentage'] end @@ -1501,6 +1519,8 @@ def ==(o) appsec_usage == o.appsec_usage && asm_serverless_traced_invocations_percentage == o.asm_serverless_traced_invocations_percentage && asm_serverless_traced_invocations_usage == o.asm_serverless_traced_invocations_usage && + bits_ai_investigations_percentage == o.bits_ai_investigations_percentage && + bits_ai_investigations_usage == o.bits_ai_investigations_usage && browser_percentage == o.browser_percentage && browser_usage == o.browser_usage && ci_pipeline_indexed_spans_percentage == o.ci_pipeline_indexed_spans_percentage && @@ -1650,7 +1670,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, apm_usm_percentage, apm_usm_usage, appsec_fargate_percentage, appsec_fargate_usage, appsec_percentage, appsec_usage, asm_serverless_traced_invocations_percentage, asm_serverless_traced_invocations_usage, browser_percentage, browser_usage, ci_pipeline_indexed_spans_percentage, ci_pipeline_indexed_spans_usage, ci_test_indexed_spans_percentage, ci_test_indexed_spans_usage, ci_visibility_itr_percentage, ci_visibility_itr_usage, cloud_siem_percentage, cloud_siem_usage, code_security_host_percentage, code_security_host_usage, container_excl_agent_percentage, container_excl_agent_usage, container_percentage, container_usage, cspm_containers_percentage, cspm_containers_usage, cspm_hosts_percentage, cspm_hosts_usage, custom_event_percentage, custom_event_usage, custom_ingested_timeseries_percentage, custom_ingested_timeseries_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_containers_percentage, cws_containers_usage, cws_fargate_task_percentage, cws_fargate_task_usage, cws_hosts_percentage, cws_hosts_usage, data_jobs_monitoring_usage, data_stream_monitoring_usage, dbm_hosts_percentage, dbm_hosts_usage, dbm_queries_percentage, dbm_queries_usage, error_tracking_percentage, error_tracking_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, fargate_percentage, fargate_usage, flex_stored_logs_percentage, flex_stored_logs_usage, functions_percentage, functions_usage, incident_management_monthly_active_users_percentage, incident_management_monthly_active_users_usage, indexed_spans_percentage, indexed_spans_usage, infra_host_percentage, infra_host_usage, ingested_logs_bytes_percentage, ingested_logs_bytes_usage, ingested_spans_bytes_percentage, ingested_spans_bytes_usage, invocations_percentage, invocations_usage, lambda_traced_invocations_percentage, lambda_traced_invocations_usage, llm_observability_percentage, llm_observability_usage, llm_spans_percentage, llm_spans_usage, logs_indexed_15day_percentage, logs_indexed_15day_usage, logs_indexed_180day_percentage, logs_indexed_180day_usage, logs_indexed_1day_percentage, logs_indexed_1day_usage, logs_indexed_30day_percentage, logs_indexed_30day_usage, logs_indexed_360day_percentage, logs_indexed_360day_usage, logs_indexed_3day_percentage, logs_indexed_3day_usage, logs_indexed_45day_percentage, logs_indexed_45day_usage, logs_indexed_60day_percentage, logs_indexed_60day_usage, logs_indexed_7day_percentage, logs_indexed_7day_usage, logs_indexed_90day_percentage, logs_indexed_90day_usage, logs_indexed_custom_retention_percentage, logs_indexed_custom_retention_usage, mobile_app_testing_percentage, mobile_app_testing_usage, ndm_netflow_percentage, ndm_netflow_usage, network_device_wireless_percentage, network_device_wireless_usage, npm_host_percentage, npm_host_usage, obs_pipeline_bytes_percentage, obs_pipeline_bytes_usage, obs_pipelines_vcpu_percentage, obs_pipelines_vcpu_usage, online_archive_percentage, online_archive_usage, product_analytics_session_percentage, product_analytics_session_usage, profiled_container_percentage, profiled_container_usage, profiled_fargate_percentage, profiled_fargate_usage, profiled_host_percentage, profiled_host_usage, published_app_percentage, published_app_usage, rum_browser_mobile_sessions_percentage, rum_browser_mobile_sessions_usage, rum_ingested_percentage, rum_ingested_usage, rum_investigate_percentage, rum_investigate_usage, rum_replay_sessions_percentage, rum_replay_sessions_usage, rum_session_replay_add_on_percentage, rum_session_replay_add_on_usage, sca_fargate_percentage, sca_fargate_usage, sds_scanned_bytes_percentage, sds_scanned_bytes_usage, serverless_apps_percentage, serverless_apps_usage, siem_analyzed_logs_add_on_percentage, siem_analyzed_logs_add_on_usage, siem_ingested_bytes_percentage, siem_ingested_bytes_usage, snmp_percentage, snmp_usage, universal_service_monitoring_percentage, universal_service_monitoring_usage, vuln_management_hosts_percentage, vuln_management_hosts_usage, workflow_executions_percentage, workflow_executions_usage, additional_properties].hash + [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, apm_usm_percentage, apm_usm_usage, appsec_fargate_percentage, appsec_fargate_usage, appsec_percentage, appsec_usage, asm_serverless_traced_invocations_percentage, asm_serverless_traced_invocations_usage, bits_ai_investigations_percentage, bits_ai_investigations_usage, browser_percentage, browser_usage, ci_pipeline_indexed_spans_percentage, ci_pipeline_indexed_spans_usage, ci_test_indexed_spans_percentage, ci_test_indexed_spans_usage, ci_visibility_itr_percentage, ci_visibility_itr_usage, cloud_siem_percentage, cloud_siem_usage, code_security_host_percentage, code_security_host_usage, container_excl_agent_percentage, container_excl_agent_usage, container_percentage, container_usage, cspm_containers_percentage, cspm_containers_usage, cspm_hosts_percentage, cspm_hosts_usage, custom_event_percentage, custom_event_usage, custom_ingested_timeseries_percentage, custom_ingested_timeseries_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_containers_percentage, cws_containers_usage, cws_fargate_task_percentage, cws_fargate_task_usage, cws_hosts_percentage, cws_hosts_usage, data_jobs_monitoring_usage, data_stream_monitoring_usage, dbm_hosts_percentage, dbm_hosts_usage, dbm_queries_percentage, dbm_queries_usage, error_tracking_percentage, error_tracking_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, fargate_percentage, fargate_usage, flex_stored_logs_percentage, flex_stored_logs_usage, functions_percentage, functions_usage, incident_management_monthly_active_users_percentage, incident_management_monthly_active_users_usage, indexed_spans_percentage, indexed_spans_usage, infra_host_percentage, infra_host_usage, ingested_logs_bytes_percentage, ingested_logs_bytes_usage, ingested_spans_bytes_percentage, ingested_spans_bytes_usage, invocations_percentage, invocations_usage, lambda_traced_invocations_percentage, lambda_traced_invocations_usage, llm_observability_percentage, llm_observability_usage, llm_spans_percentage, llm_spans_usage, logs_indexed_15day_percentage, logs_indexed_15day_usage, logs_indexed_180day_percentage, logs_indexed_180day_usage, logs_indexed_1day_percentage, logs_indexed_1day_usage, logs_indexed_30day_percentage, logs_indexed_30day_usage, logs_indexed_360day_percentage, logs_indexed_360day_usage, logs_indexed_3day_percentage, logs_indexed_3day_usage, logs_indexed_45day_percentage, logs_indexed_45day_usage, logs_indexed_60day_percentage, logs_indexed_60day_usage, logs_indexed_7day_percentage, logs_indexed_7day_usage, logs_indexed_90day_percentage, logs_indexed_90day_usage, logs_indexed_custom_retention_percentage, logs_indexed_custom_retention_usage, mobile_app_testing_percentage, mobile_app_testing_usage, ndm_netflow_percentage, ndm_netflow_usage, network_device_wireless_percentage, network_device_wireless_usage, npm_host_percentage, npm_host_usage, obs_pipeline_bytes_percentage, obs_pipeline_bytes_usage, obs_pipelines_vcpu_percentage, obs_pipelines_vcpu_usage, online_archive_percentage, online_archive_usage, product_analytics_session_percentage, product_analytics_session_usage, profiled_container_percentage, profiled_container_usage, profiled_fargate_percentage, profiled_fargate_usage, profiled_host_percentage, profiled_host_usage, published_app_percentage, published_app_usage, rum_browser_mobile_sessions_percentage, rum_browser_mobile_sessions_usage, rum_ingested_percentage, rum_ingested_usage, rum_investigate_percentage, rum_investigate_usage, rum_replay_sessions_percentage, rum_replay_sessions_usage, rum_session_replay_add_on_percentage, rum_session_replay_add_on_usage, sca_fargate_percentage, sca_fargate_usage, sds_scanned_bytes_percentage, sds_scanned_bytes_usage, serverless_apps_percentage, serverless_apps_usage, siem_analyzed_logs_add_on_percentage, siem_analyzed_logs_add_on_usage, siem_ingested_bytes_percentage, siem_ingested_bytes_usage, snmp_percentage, snmp_usage, universal_service_monitoring_percentage, universal_service_monitoring_usage, vuln_management_hosts_percentage, vuln_management_hosts_usage, workflow_executions_percentage, workflow_executions_usage, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/api/product_analytics_api.rb b/lib/datadog_api_client/v2/api/product_analytics_api.rb new file mode 100644 index 000000000000..1c2ba60db287 --- /dev/null +++ b/lib/datadog_api_client/v2/api/product_analytics_api.rb @@ -0,0 +1,121 @@ +=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 'cgi' + +module DatadogAPIClient::V2 + class ProductAnalyticsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Send server-side events. + # + # @see #submit_product_analytics_event_with_http_info + def submit_product_analytics_event(body, opts = {}) + data, _status_code, _headers = submit_product_analytics_event_with_http_info(body, opts) + data + end + + # Send server-side events. + # + # Send server-side events to Product Analytics. Server-side events are retained for 15 months. + # + # Server-Side events in Product Analytics are helpful for tracking events that occur on the server, + # as opposed to client-side events, which are captured by Real User Monitoring (RUM) SDKs. + # This allows for a more comprehensive view of the user journey by including actions that happen on the server. + # Typical examples could be `checkout.completed` or `payment.processed`. + # + # Ingested server-side events are integrated into Product Analytics to allow users to select and filter + # these events in the event picker, similar to how views or actions are handled. + # + # **Requirements:** + # - At least one of `usr`, `account`, or `session` must be provided with a valid ID. + # - The `application.id` must reference a Product Analytics-enabled application. + # + # **Custom Attributes:** + # Any additional fields in the payload are flattened and searchable as facets. + # For example, a payload with `{"customer": {"tier": "premium"}}` is searchable with + # the syntax `@customer.tier:premium` in Datadog. + # + # The status codes answered by the HTTP API are: + # - 202: Accepted: The request has been accepted for processing + # - 400: Bad request (likely an issue in the payload formatting) + # - 401: Unauthorized (likely a missing API Key) + # - 403: Permission issue (likely using an invalid API Key) + # - 408: Request Timeout, request should be retried after some time + # - 413: Payload too large (batch is above 5MB uncompressed) + # - 429: Too Many Requests, request should be retried after some time + # - 500: Internal Server Error, the server encountered an unexpected condition that prevented it from fulfilling the request, request should be retried after some time + # - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time + # + # @param body [ProductAnalyticsServerSideEventItem] Server-side event to send (JSON format). + # @param opts [Hash] the optional parameters + # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers + def submit_product_analytics_event_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProductAnalyticsAPI.submit_product_analytics_event ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ProductAnalyticsAPI.submit_product_analytics_event" + end + # resource path + local_var_path = '/api/v2/prodlytics' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth] + + new_options = opts.merge( + :operation => :submit_product_analytics_event, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProductAnalyticsAPI#submit_product_analytics_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb new file mode 100644 index 000000000000..089130eee684 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb @@ -0,0 +1,125 @@ +=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 + # Error details. + class ProductAnalyticsServerSideEventError + include BaseGenericModel + + # Error message. + attr_accessor :detail + + # Error code. + attr_accessor :status + + # Error title. + attr_accessor :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'detail' => :'detail', + :'status' => :'status', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'detail' => :'String', + :'status' => :'String', + :'title' => :'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::ProductAnalyticsServerSideEventError` 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?(:'detail') + self.detail = attributes[:'detail'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + 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 && + detail == o.detail && + status == o.status && + title == o.title && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [detail, status, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb new file mode 100644 index 000000000000..fcb567994fc8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb @@ -0,0 +1,107 @@ +=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 + # Error response. + class ProductAnalyticsServerSideEventErrors + include BaseGenericModel + + # Structured errors. + attr_accessor :errors + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'errors' => :'errors' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'errors' => :'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::ProductAnalyticsServerSideEventErrors` 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?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = 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 && + errors == o.errors && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [errors, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb new file mode 100644 index 000000000000..cebf50b1a2da --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb @@ -0,0 +1,195 @@ +=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 + # A Product Analytics server-side event. + class ProductAnalyticsServerSideEventItem + include BaseGenericModel + + # The account linked to your event. + attr_accessor :account + + # The application in which you want to send your events. + attr_reader :application + + # Fields used for the event. + attr_reader :event + + # The session linked to your event. + attr_accessor :session + + # The type of Product Analytics event. Must be `server` for server-side events. + attr_reader :type + + # The user linked to your event. + attr_accessor :usr + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account' => :'account', + :'application' => :'application', + :'event' => :'event', + :'session' => :'session', + :'type' => :'type', + :'usr' => :'usr' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account' => :'ProductAnalyticsServerSideEventItemAccount', + :'application' => :'ProductAnalyticsServerSideEventItemApplication', + :'event' => :'ProductAnalyticsServerSideEventItemEvent', + :'session' => :'ProductAnalyticsServerSideEventItemSession', + :'type' => :'ProductAnalyticsServerSideEventItemType', + :'usr' => :'ProductAnalyticsServerSideEventItemUsr' + } + 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::ProductAnalyticsServerSideEventItem` 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?(:'account') + self.account = attributes[:'account'] + end + + if attributes.key?(:'application') + self.application = attributes[:'application'] + end + + if attributes.key?(:'event') + self.event = attributes[:'event'] + end + + if attributes.key?(:'session') + self.session = attributes[:'session'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'usr') + self.usr = attributes[:'usr'] + 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 @application.nil? + return false if @event.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param application [Object] Object to be assigned + # @!visibility private + def application=(application) + if application.nil? + fail ArgumentError, 'invalid value for "application", application cannot be nil.' + end + @application = application + end + + # Custom attribute writer method with validation + # @param event [Object] Object to be assigned + # @!visibility private + def event=(event) + if event.nil? + fail ArgumentError, 'invalid value for "event", event cannot be nil.' + end + @event = event + 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 && + account == o.account && + application == o.application && + event == o.event && + session == o.session && + type == o.type && + usr == o.usr && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account, application, event, session, type, usr, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.rb new file mode 100644 index 000000000000..6afa27e3c99a --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.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 + # The account linked to your event. + class ProductAnalyticsServerSideEventItemAccount + include BaseGenericModel + + # The account ID used in Datadog. + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::ProductAnalyticsServerSideEventItemAccount` 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 + 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? + 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 + + # 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb new file mode 100644 index 000000000000..ee555704034e --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb @@ -0,0 +1,124 @@ +=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 application in which you want to send your events. + class ProductAnalyticsServerSideEventItemApplication + include BaseGenericModel + + # The application ID of your application. It can be found in your + # [application management page](https://app.datadoghq.com/rum/list). + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::ProductAnalyticsServerSideEventItemApplication` 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 + 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? + 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 + + # 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.rb new file mode 100644 index 000000000000..355436650763 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.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 + # Fields used for the event. + class ProductAnalyticsServerSideEventItemEvent + include BaseGenericModel + + # The name of your event, which is used for search in the same way as view or action names. + attr_reader :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'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::ProductAnalyticsServerSideEventItemEvent` 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?(:'name') + self.name = attributes[:'name'] + 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 @name.nil? + true + 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 + + # 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 && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.rb new file mode 100644 index 000000000000..5d823e1aba42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.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 + # The session linked to your event. + class ProductAnalyticsServerSideEventItemSession + include BaseGenericModel + + # The session ID captured by the SDK. + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::ProductAnalyticsServerSideEventItemSession` 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 + 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? + 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 + + # 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_type.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_type.rb new file mode 100644 index 000000000000..e8ae42c88c6f --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_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 type of Product Analytics event. Must be `server` for server-side events. + class ProductAnalyticsServerSideEventItemType + include BaseEnumModel + + SERVER = "server".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.rb b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.rb new file mode 100644 index 000000000000..511c0b285c04 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.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 + # The user linked to your event. + class ProductAnalyticsServerSideEventItemUsr + include BaseGenericModel + + # The user ID used in Datadog. + attr_reader :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::ProductAnalyticsServerSideEventItemUsr` 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 + 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? + 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 + + # 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end