From 64295b8ab3a535db716a8a0759e98bd9b3505363 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Nov 2026 15:11:41 +0000 Subject: [PATCH] Regenerate client from commit e06507f of spec repo --- .generator/schemas/v2/openapi.yaml | 607 ++++++++++++++++++ ...ryProductAnalyticsFunnelStepSuggestions.rb | 22 + .../QueryProductAnalyticsFunnelSuggestions.rb | 18 + .../QueryProductAnalyticsJourneyDropOff.rb | 81 +++ features/scenarios_model_mapping.rb | 9 + features/v2/product_analytics.feature | 54 ++ features/v2/undo.json | 18 + lib/datadog_api_client/configuration.rb | 3 + lib/datadog_api_client/inflector.rb | 31 + .../v2/api/product_analytics_api.rb | 227 +++++++ .../product_analytics_core_user_journey.rb | 135 ++++ ...alytics_funnel_step_suggestions_request.rb | 123 ++++ ...nel_step_suggestions_request_attributes.rb | 156 +++++ ...cs_funnel_step_suggestions_request_data.rb | 144 +++++ ...cs_funnel_step_suggestions_request_type.rb | 26 + ...lytics_funnel_step_suggestions_response.rb | 105 +++ ...el_step_suggestions_response_attributes.rb | 107 +++ ...s_funnel_step_suggestions_response_data.rb | 125 ++++ ...s_funnel_step_suggestions_response_type.rb | 26 + ...nalytics_funnel_suggestions_application.rb | 117 ++++ ...uct_analytics_funnel_suggestions_domain.rb | 117 ++++ ...ct_analytics_funnel_suggestions_feature.rb | 157 +++++ ...ct_analytics_funnel_suggestions_request.rb | 123 ++++ ...s_funnel_suggestions_request_attributes.rb | 105 +++ ...alytics_funnel_suggestions_request_data.rb | 133 ++++ ...alytics_funnel_suggestions_request_type.rb | 26 + ...t_analytics_funnel_suggestions_response.rb | 105 +++ ..._funnel_suggestions_response_attributes.rb | 107 +++ ...lytics_funnel_suggestions_response_data.rb | 125 ++++ ...lytics_funnel_suggestions_response_type.rb | 26 + ...roduct_analytics_journey_drop_off_issue.rb | 165 +++++ ...roduct_analytics_journey_drop_off_query.rb | 168 +++++ ...duct_analytics_journey_drop_off_request.rb | 123 ++++ ...ics_journey_drop_off_request_attributes.rb | 165 +++++ ...analytics_journey_drop_off_request_data.rb | 144 +++++ ...analytics_journey_drop_off_request_type.rb | 26 + ...uct_analytics_journey_drop_off_response.rb | 123 ++++ ...cs_journey_drop_off_response_attributes.rb | 188 ++++++ ...nalytics_journey_drop_off_response_data.rb | 165 +++++ ...nalytics_journey_drop_off_response_type.rb | 26 + .../v2/models/product_analytics_sampling.rb | 105 +++ 41 files changed, 4556 insertions(+) create mode 100644 examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.rb create mode 100644 examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.rb create mode 100644 examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_core_user_journey.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_type.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_type.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_application.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_domain.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_feature.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_type.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_type.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_issue.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_query.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_type.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_type.rb create mode 100644 lib/datadog_api_client/v2/models/product_analytics_sampling.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 583d0d86f573..c2f8e16d4865 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -108739,6 +108739,33 @@ components: required: - aggregation type: object + ProductAnalyticsCoreUserJourney: + description: A sequence of events that users follow to use a feature. + properties: + expression: + description: Order of the steps, as step IDs joined by `->`. + example: node_0->node_1 + type: string + score: + description: Relevance score of the journey. Higher is more relevant. + example: 50 + format: int64 + type: integer + steps: + additionalProperties: + description: Event query of the step. + type: string + description: Map of step ID to the event query of the step. + example: + node_0: "@type:view @view.name:/checkout" + node_1: "@type:action @action.name:pay" + type: object + support: + description: Number of sessions that followed the journey. + example: 120 + format: int64 + type: integer + type: object ProductAnalyticsElapsedTime: description: Elapsed time statistics (min/max/avg in milliseconds). properties: @@ -108945,6 +108972,228 @@ components: type: string x-enum-varnames: - FORMULA_RETENTION_REQUEST + ProductAnalyticsFunnelStepSuggestionsRequest: + description: Request to get suggested next steps for a funnel. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequestData" + required: + - data + type: object + ProductAnalyticsFunnelStepSuggestionsRequestAttributes: + description: Attributes of a step suggestions request. + properties: + application_id: + description: Only use journeys from this RUM application. + example: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: string + expression: + description: Order of the funnel steps, as step IDs joined by `->`. + example: node_0->node_1 + type: string + steps: + additionalProperties: + description: Event query of the step. + type: string + description: |- + Map of step ID to the event query of the step. Steps are matched in the string sort + order of their IDs, so use zero-padded IDs such as `node_01`, `node_02`. Without padding, + `node_10` sorts before `node_2`. + example: + node_0: "@type:view @view.name:/checkout" + minProperties: 1 + type: object + required: + - expression + - steps + type: object + ProductAnalyticsFunnelStepSuggestionsRequestData: + description: Data of a step suggestions request. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsFunnelStepSuggestionsRequestType: + default: funnel_suggestions_steps_request + description: Type of a step suggestions request. + enum: + - funnel_suggestions_steps_request + example: funnel_suggestions_steps_request + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_STEPS_REQUEST + ProductAnalyticsFunnelStepSuggestionsResponse: + description: Suggested next steps for a funnel. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponseData" + type: object + ProductAnalyticsFunnelStepSuggestionsResponseAttributes: + description: Attributes of a step suggestions response. + properties: + steps: + description: Event queries of the suggested next steps, most relevant first. + example: + - "@type:action @action.name:pay" + items: + description: Event query of a suggested step. + type: string + type: array + type: object + ProductAnalyticsFunnelStepSuggestionsResponseData: + description: Data of a step suggestions response. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponseAttributes" + id: + description: ID of the response. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponseType" + type: object + ProductAnalyticsFunnelStepSuggestionsResponseType: + default: funnel_suggestions_steps_response + description: Type of a step suggestions response. + enum: + - funnel_suggestions_steps_response + example: funnel_suggestions_steps_response + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_STEPS_RESPONSE + ProductAnalyticsFunnelSuggestionsApplication: + description: Suggested features of one application. + properties: + application_id: + description: ID of the RUM application. + example: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: string + domains: + description: Feature areas of the application. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsDomain" + type: array + type: object + ProductAnalyticsFunnelSuggestionsDomain: + description: A feature area of an application, such as checkout or settings. + properties: + features: + description: Features in this area. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsFeature" + type: array + name: + description: Name of the feature area. + example: Checkout + type: string + type: object + ProductAnalyticsFunnelSuggestionsFeature: + description: A feature detected in the application, with the journeys users take to use it. + properties: + core_user_journeys: + description: The suggested journey that users follow to use the feature. Contains one journey. + items: + $ref: "#/components/schemas/ProductAnalyticsCoreUserJourney" + type: array + description: + description: Description of the feature. + example: Users enter a promo code and pay for their order. + type: string + id: + description: ID of the feature. + example: "12" + type: string + name: + description: Name of the feature. + example: Pay for an order + type: string + score: + description: Relevance score of the feature. Higher is more relevant. + example: 111 + format: int64 + type: integer + support: + description: Number of sessions that used the feature. + example: 222 + format: int64 + type: integer + type: object + ProductAnalyticsFunnelSuggestionsRequest: + description: Request to get suggested features and their journeys. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequestData" + required: + - data + type: object + ProductAnalyticsFunnelSuggestionsRequestAttributes: + description: Attributes of a feature suggestions request. + properties: + application_id: + description: Only return suggestions for this RUM application. + example: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: string + type: object + ProductAnalyticsFunnelSuggestionsRequestData: + description: Data of a feature suggestions request. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequestType" + required: + - type + type: object + ProductAnalyticsFunnelSuggestionsRequestType: + default: funnel_suggestions_request + description: Type of a feature suggestions request. + enum: + - funnel_suggestions_request + example: funnel_suggestions_request + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_REQUEST + ProductAnalyticsFunnelSuggestionsResponse: + description: Suggested features and their journeys. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponseData" + type: object + ProductAnalyticsFunnelSuggestionsResponseAttributes: + description: Attributes of a feature suggestions response. + properties: + applications: + description: Suggested features, grouped by application and feature area. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsApplication" + type: array + type: object + ProductAnalyticsFunnelSuggestionsResponseData: + description: Data of a feature suggestions response. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponseAttributes" + id: + description: ID of the response. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponseType" + type: object + ProductAnalyticsFunnelSuggestionsResponseType: + default: funnel_suggestions_response + description: Type of a feature suggestions response. + enum: + - funnel_suggestions_response + example: funnel_suggestions_response + type: string + x-enum-varnames: + - FUNNEL_SUGGESTIONS_RESPONSE ProductAnalyticsGraphQueryCompute: description: Defines the metric computed over the journey. properties: @@ -109180,6 +109429,155 @@ components: x-enum-varnames: - CONVERSION - DROP_OFF + ProductAnalyticsJourneyDropOffIssue: + description: An issue contributing to drop-off at the target step. + properties: + error_count: + description: Number of errors attributed to this issue. + example: 120 + format: int64 + type: integer + issue_id: + description: Identifier of the issue. + example: 00000000-0000-0000-0000-000000000001 + type: string + session_count: + description: Number of sessions affected by this issue. + example: 84 + format: int64 + type: integer + required: + - issue_id + - error_count + - session_count + type: object + ProductAnalyticsJourneyDropOffQuery: + description: Query definition for a journey drop-off analysis request. + properties: + sampling: + $ref: "#/components/schemas/ProductAnalyticsSampling" + search: + $ref: "#/components/schemas/ProductAnalyticsJourneySearch" + target: + $ref: "#/components/schemas/ProductAnalyticsJourneyNodeTarget" + top_issue_count: + default: 5 + description: Maximum number of issues to return. + format: int64 + maximum: 100 + minimum: 1 + type: integer + required: + - search + type: object + ProductAnalyticsJourneyDropOffRequest: + description: Request body for a journey drop-off analysis. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequestData" + required: + - data + type: object + ProductAnalyticsJourneyDropOffRequestAttributes: + description: Attributes of a journey drop-off analysis request. + properties: + from: + description: Start of the query window, in epoch milliseconds. + example: 1756425600000 + format: int64 + type: integer + query: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffQuery" + to: + description: End of the query window, in epoch milliseconds. + example: 1756857600000 + format: int64 + type: integer + required: + - from + - to + - query + type: object + ProductAnalyticsJourneyDropOffRequestData: + description: The definition of a journey drop-off analysis request body. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequestAttributes" + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequestType" + required: + - type + - attributes + type: object + ProductAnalyticsJourneyDropOffRequestType: + description: The resource type identifier for a journey drop-off analysis request. + enum: + - journey_drop_off_analysis_request + example: journey_drop_off_analysis_request + type: string + x-enum-varnames: + - JOURNEY_DROP_OFF_ANALYSIS_REQUEST + ProductAnalyticsJourneyDropOffResponse: + description: Response for a journey drop-off analysis. + properties: + data: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponseData" + required: + - data + type: object + ProductAnalyticsJourneyDropOffResponseAttributes: + description: Attributes of a journey drop-off analysis response. + properties: + drop_off_count: + description: Number of sessions that reached the step before the target but not the target step. + example: 696 + format: int64 + type: integer + issues: + description: The issues most associated with the drop-off. + items: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffIssue" + type: array + sessions_with_errors: + description: Number of dropped-off sessions that contained an error. + example: 84 + format: int64 + type: integer + sessions_with_frustration_signals: + description: Number of dropped-off sessions that contained a frustration signal. + example: 31 + format: int64 + type: integer + required: + - drop_off_count + - sessions_with_errors + - sessions_with_frustration_signals + - issues + type: object + ProductAnalyticsJourneyDropOffResponseData: + description: The journey drop-off analysis results. + properties: + attributes: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponseAttributes" + id: + description: Identifier of this result. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponseType" + required: + - id + - type + - attributes + type: object + ProductAnalyticsJourneyDropOffResponseType: + description: The resource type identifier for a journey drop-off analysis response. + enum: + - journey_drop_off_analysis_response + example: journey_drop_off_analysis_response + type: string + x-enum-varnames: + - JOURNEY_DROP_OFF_ANALYSIS_RESPONSE ProductAnalyticsJourneyEntity: description: The kind of entity returned by a journey list query. enum: @@ -110597,6 +110995,14 @@ components: oneOf: - $ref: "#/components/schemas/ProductAnalyticsRetentionCalendarTimeInterval" - $ref: "#/components/schemas/ProductAnalyticsRetentionFixedTimeInterval" + ProductAnalyticsSampling: + description: Sampling configuration for a query. + properties: + enabled: + default: false + description: Whether session sampling is enabled; reduces query cost at the cost of statistical precision. + type: boolean + type: object ProductAnalyticsSankeyAggregatedNode: description: One of the nodes rolled up into an aggregated node, retained so the roll-up can be broken down. properties: @@ -229416,6 +229822,83 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/product-analytics/journey/drop_off_analysis: + post: + description: |- + Analyze the drop-off at a given step of the journey. The journey must have at least two + steps, and only the `@session.id` join key is supported. Set `target` to the node to + analyze. It can't be the first step. When `target` is omitted, the last step is used. + Returns the number of sessions that reached the step before the target but not the target, + together with the issues and frustration signals most associated with the drop-off. + operationId: QueryProductAnalyticsJourneyDropOff + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1756425600000 + query: + search: + expression: A -> B + node_objects: + A: + data_source: product_analytics + search: + query: "@type:view @view.name:Login" + B: + data_source: product_analytics + search: + query: "@type:action @action.target.name:Submit" + target: + type: node + value: B + top_issue_count: 5 + to: 1756857600000 + type: journey_drop_off_analysis_request + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + drop_off_count: 696 + issues: + - error_count: 120 + issue_id: 00000000-0000-0000-0000-000000000001 + session_count: 84 + sessions_with_errors: 84 + sessions_with_frustration_signals: 31 + id: 00000000-0000-0000-0000-000000000000 + type: journey_drop_off_analysis_response + schema: + $ref: "#/components/schemas/ProductAnalyticsJourneyDropOffResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Analyze journey drop-off + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/product-analytics/journey/funnel: post: description: |- @@ -230077,6 +230560,130 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/suggestions/features: + post: + description: |- + Get the features that Product Analytics detected in your applications, grouped by + application and feature area. Each feature comes with a suggested journey that users + follow to use it, which you can use as funnel steps. + operationId: QueryProductAnalyticsFunnelSuggestions + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + type: funnel_suggestions_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + applications: + - application_id: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + domains: + - features: + - core_user_journeys: + - expression: node_0->node_1 + score: 50 + steps: + node_0: "@type:view @view.name:/checkout" + node_1: "@type:action @action.name:pay" + support: 120 + description: Users enter a promo code and pay for their order. + id: "12" + name: Pay for an order + score: 111 + support: 222 + name: Checkout + id: 00000000-0000-0000-0000-000000000000 + type: funnel_suggestions_response + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelSuggestionsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get feature suggestions + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/product-analytics/suggestions/features/steps: + post: + description: |- + Get the steps that users most often take after the existing steps of a funnel. + Suggestions come from the same precomputed journeys as feature suggestions. + Returns an empty list when no journey starts with the given steps. + operationId: QueryProductAnalyticsFunnelStepSuggestions + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: 40d8ca4b-2ac0-481f-b16e-f110699ecff6 + expression: node_0 + steps: + node_0: "@type:view @view.name:/checkout" + type: funnel_suggestions_steps_request + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + steps: + - "@type:action @action.name:pay" + id: 00000000-0000-0000-0000-000000000000 + type: funnel_suggestions_steps_response + schema: + $ref: "#/components/schemas/ProductAnalyticsFunnelStepSuggestionsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get funnel step suggestions + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/product-analytics/users/event_filtered_query: post: description: Query users filtered by both user properties and event platform data diff --git a/examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.rb b/examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.rb new file mode 100644 index 000000000000..22605f2d84fb --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsFunnelStepSuggestions.rb @@ -0,0 +1,22 @@ +# Get funnel step suggestions returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.query_product_analytics_funnel_step_suggestions".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ProductAnalyticsAPI.new + +body = DatadogAPIClient::V2::ProductAnalyticsFunnelStepSuggestionsRequest.new({ + data: DatadogAPIClient::V2::ProductAnalyticsFunnelStepSuggestionsRequestData.new({ + attributes: DatadogAPIClient::V2::ProductAnalyticsFunnelStepSuggestionsRequestAttributes.new({ + application_id: "40d8ca4b-2ac0-481f-b16e-f110699ecff6", + expression: "node_0->node_1", + steps: { + node_0: "@type:view @view.name:/checkout", + }, + }), + type: DatadogAPIClient::V2::ProductAnalyticsFunnelStepSuggestionsRequestType::FUNNEL_SUGGESTIONS_STEPS_REQUEST, + }), +}) +p api_instance.query_product_analytics_funnel_step_suggestions(body) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.rb b/examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.rb new file mode 100644 index 000000000000..f186c1fd757b --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsFunnelSuggestions.rb @@ -0,0 +1,18 @@ +# Get feature suggestions returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.query_product_analytics_funnel_suggestions".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ProductAnalyticsAPI.new + +body = DatadogAPIClient::V2::ProductAnalyticsFunnelSuggestionsRequest.new({ + data: DatadogAPIClient::V2::ProductAnalyticsFunnelSuggestionsRequestData.new({ + attributes: DatadogAPIClient::V2::ProductAnalyticsFunnelSuggestionsRequestAttributes.new({ + application_id: "40d8ca4b-2ac0-481f-b16e-f110699ecff6", + }), + type: DatadogAPIClient::V2::ProductAnalyticsFunnelSuggestionsRequestType::FUNNEL_SUGGESTIONS_REQUEST, + }), +}) +p api_instance.query_product_analytics_funnel_suggestions(body) diff --git a/examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.rb b/examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.rb new file mode 100644 index 000000000000..402311803a81 --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsJourneyDropOff.rb @@ -0,0 +1,81 @@ +# Analyze journey drop-off returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.query_product_analytics_journey_drop_off".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ProductAnalyticsAPI.new + +body = DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffRequest.new({ + data: DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffRequestData.new({ + attributes: DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffRequestAttributes.new({ + from: 1756425600000, + query: DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffQuery.new({ + sampling: DatadogAPIClient::V2::ProductAnalyticsSampling.new({ + enabled: false, + }), + search: DatadogAPIClient::V2::ProductAnalyticsJourneySearch.new({ + expression: "A -> B", + filters: DatadogAPIClient::V2::ProductAnalyticsJourneySearchFilters.new({ + audience_filters: DatadogAPIClient::V2::ProductAnalyticsJourneyAudienceFilters.new({ + accounts: [ + DatadogAPIClient::V2::ProductAnalyticsJourneyAudienceAccountQuery.new({ + name: "enterprise_accounts", + }), + ], + formula: "power_users AND NOT trial_segment", + segments: [ + DatadogAPIClient::V2::ProductAnalyticsJourneyAudienceSegmentQuery.new({ + name: "trial_segment", + segment_id: "00000000-0000-0000-0000-000000000000", + }), + ], + users: [ + DatadogAPIClient::V2::ProductAnalyticsJourneyAudienceUserQuery.new({ + name: "power_users", + }), + ], + }), + graph_filters: [ + DatadogAPIClient::V2::ProductAnalyticsJourneySearchGraphFilter.new({ + name: DatadogAPIClient::V2::ProductAnalyticsJourneySearchGraphFilterName::TIME_TO_CONVERT, + operator: DatadogAPIClient::V2::ProductAnalyticsJourneySearchGraphFilterOperator::LESS_THAN_OR_EQUAL, + target: DatadogAPIClient::V2::ProductAnalyticsJourneyNodeTarget.new({ + type: DatadogAPIClient::V2::ProductAnalyticsJourneyNodeTargetType::NODE, + value: "A", + }), + value: 60000, + }), + ], + }), + join_keys: DatadogAPIClient::V2::ProductAnalyticsJoinKeys.new({ + primary: "@session.id", + secondary: [], + }), + node_objects: { + A: DatadogAPIClient::V2::ProductAnalyticsEventQuery.new({ + data_source: DatadogAPIClient::V2::ProductAnalyticsEventQueryDataSource::PRODUCT_ANALYTICS, + search: DatadogAPIClient::V2::ProductAnalyticsEventSearch.new({ + query: "@type:view @view.name:Login", + }), + }), B: DatadogAPIClient::V2::ProductAnalyticsEventQuery.new({ + data_source: DatadogAPIClient::V2::ProductAnalyticsEventQueryDataSource::PRODUCT_ANALYTICS, + search: DatadogAPIClient::V2::ProductAnalyticsEventSearch.new({ + query: "@type:action @action.target.name:Submit", + }), + }), + }, + }), + target: DatadogAPIClient::V2::ProductAnalyticsJourneyNodeTarget.new({ + type: DatadogAPIClient::V2::ProductAnalyticsJourneyNodeTargetType::NODE, + value: "B", + }), + top_issue_count: 5, + }), + to: 1756857600000, + }), + type: DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffRequestType::JOURNEY_DROP_OFF_ANALYSIS_REQUEST, + }), +}) +p api_instance.query_product_analytics_journey_drop_off(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 07274057c608..b12132fee212 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -6008,6 +6008,9 @@ "v2.QueryProductAnalyticsTimeseries" => { "body" => "ProductAnalyticsAnalyticsRequest", }, + "v2.QueryProductAnalyticsJourneyDropOff" => { + "body" => "ProductAnalyticsJourneyDropOffRequest", + }, "v2.QueryProductAnalyticsJourneyFunnel" => { "body" => "ProductAnalyticsJourneyFunnelRequest", }, @@ -6035,6 +6038,12 @@ "v2.QueryProductAnalyticsSankey" => { "body" => "ProductAnalyticsSankeyRequest", }, + "v2.QueryProductAnalyticsFunnelSuggestions" => { + "body" => "ProductAnalyticsFunnelSuggestionsRequest", + }, + "v2.QueryProductAnalyticsFunnelStepSuggestions" => { + "body" => "ProductAnalyticsFunnelStepSuggestionsRequest", + }, "v2.GetAccountFacetInfo" => { "body" => "FacetInfoRequest", }, diff --git a/features/v2/product_analytics.feature b/features/v2/product_analytics.feature index 1af45e54a76d..ae4981609319 100644 --- a/features/v2/product_analytics.feature +++ b/features/v2/product_analytics.feature @@ -14,6 +14,24 @@ Feature: Product Analytics Given a valid "apiKeyAuth" key in the system And an instance of "ProductAnalytics" API + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Analyze journey drop-off returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyDropOff" enabled + And new "QueryProductAnalyticsJourneyDropOff" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"sampling": {"enabled": false}, "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}, "target": {"type": "node", "value": "A"}, "top_issue_count": 5}, "to": 1756857600000}, "type": "journey_drop_off_analysis_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:ddoghq/product-analytics-platform + Scenario: Analyze journey drop-off returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsJourneyDropOff" enabled + And new "QueryProductAnalyticsJourneyDropOff" request + And body with value {"data": {"attributes": {"from": 1756425600000, "query": {"sampling": {"enabled": false}, "search": {"expression": "A -> B", "filters": {"audience_filters": {"accounts": [{"name": "enterprise_accounts"}], "formula": "power_users AND NOT trial_segment", "segments": [{"name": "trial_segment", "segment_id": "00000000-0000-0000-0000-000000000000"}], "users": [{"name": "power_users"}]}, "graph_filters": [{"name": "__dd.time_to_convert", "operator": "<=", "target": {"type": "node", "value": "A"}, "value": 60000}]}, "join_keys": {"primary": "@session.id", "secondary": []}, "node_objects": {"A": {"data_source": "product_analytics", "search": {"query": "@type:view @view.name:Login"}}, "B": {"data_source": "product_analytics", "search": {"query": "@type:action @action.target.name:Submit"}}}}, "target": {"type": "node", "value": "B"}, "top_issue_count": 5}, "to": 1756857600000}, "type": "journey_drop_off_analysis_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/product-analytics-platform Scenario: Compute a Sankey diagram returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -172,6 +190,42 @@ Feature: Product Analytics When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get feature suggestions returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelSuggestions" enabled + And new "QueryProductAnalyticsFunnelSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6"}, "type": "funnel_suggestions_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get feature suggestions returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelSuggestions" enabled + And new "QueryProductAnalyticsFunnelSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6"}, "type": "funnel_suggestions_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get funnel step suggestions returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelStepSuggestions" enabled + And new "QueryProductAnalyticsFunnelStepSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6", "expression": "node_0->node_1", "steps": {"node_0": "@type:view @view.name:/checkout"}}, "type": "funnel_suggestions_steps_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/product-analytics-platform + Scenario: Get funnel step suggestions returns "OK" response + Given a valid "appKeyAuth" key in the system + And operation "QueryProductAnalyticsFunnelStepSuggestions" enabled + And new "QueryProductAnalyticsFunnelStepSuggestions" request + And body with value {"data": {"attributes": {"application_id": "40d8ca4b-2ac0-481f-b16e-f110699ecff6", "expression": "node_0->node_1", "steps": {"node_0": "@type:view @view.name:/checkout"}}, "type": "funnel_suggestions_steps_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/product-analytics-platform Scenario: List analytics events returns "Bad Request" response Given a valid "appKeyAuth" key in the system diff --git a/features/v2/undo.json b/features/v2/undo.json index 0d9b33aa46f6..3e70edcb488e 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -7528,6 +7528,12 @@ "type": "safe" } }, + "QueryProductAnalyticsJourneyDropOff": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryProductAnalyticsJourneyFunnel": { "tag": "Product Analytics", "undo": { @@ -7582,6 +7588,18 @@ "type": "safe" } }, + "QueryProductAnalyticsFunnelSuggestions": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, + "QueryProductAnalyticsFunnelStepSuggestions": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryEventFilteredUsers": { "tag": "Rum Audience Management", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index f3c25b0e12e0..2acc2677737f 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -792,6 +792,9 @@ def initialize "v2.update_org_group_policy": false, "v2.update_org_group_policy_override": false, "v2.list_role_templates": false, + "v2.query_product_analytics_funnel_step_suggestions": false, + "v2.query_product_analytics_funnel_suggestions": false, + "v2.query_product_analytics_journey_drop_off": false, "v2.query_product_analytics_journey_funnel": false, "v2.query_product_analytics_journey_list": false, "v2.query_product_analytics_journey_scalar": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 01c6d5579703..c39eb284f6db 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -7471,6 +7471,7 @@ def overrides "v2.product_analytics_calendar_interval" => "ProductAnalyticsCalendarInterval", "v2.product_analytics_calendar_interval_type" => "ProductAnalyticsCalendarIntervalType", "v2.product_analytics_compute" => "ProductAnalyticsCompute", + "v2.product_analytics_core_user_journey" => "ProductAnalyticsCoreUserJourney", "v2.product_analytics_elapsed_time" => "ProductAnalyticsElapsedTime", "v2.product_analytics_event_query" => "ProductAnalyticsEventQuery", "v2.product_analytics_event_query_data_source" => "ProductAnalyticsEventQueryDataSource", @@ -7486,6 +7487,25 @@ def overrides "v2.product_analytics_formula_retention_request_attributes" => "ProductAnalyticsFormulaRetentionRequestAttributes", "v2.product_analytics_formula_retention_request_data" => "ProductAnalyticsFormulaRetentionRequestData", "v2.product_analytics_formula_retention_request_type" => "ProductAnalyticsFormulaRetentionRequestType", + "v2.product_analytics_funnel_step_suggestions_request" => "ProductAnalyticsFunnelStepSuggestionsRequest", + "v2.product_analytics_funnel_step_suggestions_request_attributes" => "ProductAnalyticsFunnelStepSuggestionsRequestAttributes", + "v2.product_analytics_funnel_step_suggestions_request_data" => "ProductAnalyticsFunnelStepSuggestionsRequestData", + "v2.product_analytics_funnel_step_suggestions_request_type" => "ProductAnalyticsFunnelStepSuggestionsRequestType", + "v2.product_analytics_funnel_step_suggestions_response" => "ProductAnalyticsFunnelStepSuggestionsResponse", + "v2.product_analytics_funnel_step_suggestions_response_attributes" => "ProductAnalyticsFunnelStepSuggestionsResponseAttributes", + "v2.product_analytics_funnel_step_suggestions_response_data" => "ProductAnalyticsFunnelStepSuggestionsResponseData", + "v2.product_analytics_funnel_step_suggestions_response_type" => "ProductAnalyticsFunnelStepSuggestionsResponseType", + "v2.product_analytics_funnel_suggestions_application" => "ProductAnalyticsFunnelSuggestionsApplication", + "v2.product_analytics_funnel_suggestions_domain" => "ProductAnalyticsFunnelSuggestionsDomain", + "v2.product_analytics_funnel_suggestions_feature" => "ProductAnalyticsFunnelSuggestionsFeature", + "v2.product_analytics_funnel_suggestions_request" => "ProductAnalyticsFunnelSuggestionsRequest", + "v2.product_analytics_funnel_suggestions_request_attributes" => "ProductAnalyticsFunnelSuggestionsRequestAttributes", + "v2.product_analytics_funnel_suggestions_request_data" => "ProductAnalyticsFunnelSuggestionsRequestData", + "v2.product_analytics_funnel_suggestions_request_type" => "ProductAnalyticsFunnelSuggestionsRequestType", + "v2.product_analytics_funnel_suggestions_response" => "ProductAnalyticsFunnelSuggestionsResponse", + "v2.product_analytics_funnel_suggestions_response_attributes" => "ProductAnalyticsFunnelSuggestionsResponseAttributes", + "v2.product_analytics_funnel_suggestions_response_data" => "ProductAnalyticsFunnelSuggestionsResponseData", + "v2.product_analytics_funnel_suggestions_response_type" => "ProductAnalyticsFunnelSuggestionsResponseType", "v2.product_analytics_graph_query_compute" => "ProductAnalyticsGraphQueryCompute", "v2.product_analytics_graph_query_group_by" => "ProductAnalyticsGraphQueryGroupBy", "v2.product_analytics_graph_query_group_by_source" => "ProductAnalyticsGraphQueryGroupBySource", @@ -7500,6 +7520,16 @@ def overrides "v2.product_analytics_journey_computed_column" => "ProductAnalyticsJourneyComputedColumn", "v2.product_analytics_journey_computed_column_name" => "ProductAnalyticsJourneyComputedColumnName", "v2.product_analytics_journey_conversion_type" => "ProductAnalyticsJourneyConversionType", + "v2.product_analytics_journey_drop_off_issue" => "ProductAnalyticsJourneyDropOffIssue", + "v2.product_analytics_journey_drop_off_query" => "ProductAnalyticsJourneyDropOffQuery", + "v2.product_analytics_journey_drop_off_request" => "ProductAnalyticsJourneyDropOffRequest", + "v2.product_analytics_journey_drop_off_request_attributes" => "ProductAnalyticsJourneyDropOffRequestAttributes", + "v2.product_analytics_journey_drop_off_request_data" => "ProductAnalyticsJourneyDropOffRequestData", + "v2.product_analytics_journey_drop_off_request_type" => "ProductAnalyticsJourneyDropOffRequestType", + "v2.product_analytics_journey_drop_off_response" => "ProductAnalyticsJourneyDropOffResponse", + "v2.product_analytics_journey_drop_off_response_attributes" => "ProductAnalyticsJourneyDropOffResponseAttributes", + "v2.product_analytics_journey_drop_off_response_data" => "ProductAnalyticsJourneyDropOffResponseData", + "v2.product_analytics_journey_drop_off_response_type" => "ProductAnalyticsJourneyDropOffResponseType", "v2.product_analytics_journey_entity" => "ProductAnalyticsJourneyEntity", "v2.product_analytics_journey_funnel_compute" => "ProductAnalyticsJourneyFunnelCompute", "v2.product_analytics_journey_funnel_query" => "ProductAnalyticsJourneyFunnelQuery", @@ -7602,6 +7632,7 @@ def overrides "v2.product_analytics_retention_scope" => "ProductAnalyticsRetentionScope", "v2.product_analytics_retention_search" => "ProductAnalyticsRetentionSearch", "v2.product_analytics_retention_time_interval" => "ProductAnalyticsRetentionTimeInterval", + "v2.product_analytics_sampling" => "ProductAnalyticsSampling", "v2.product_analytics_sankey_aggregated_node" => "ProductAnalyticsSankeyAggregatedNode", "v2.product_analytics_sankey_aggregated_node_type" => "ProductAnalyticsSankeyAggregatedNodeType", "v2.product_analytics_sankey_definition" => "ProductAnalyticsSankeyDefinition", diff --git a/lib/datadog_api_client/v2/api/product_analytics_api.rb b/lib/datadog_api_client/v2/api/product_analytics_api.rb index b4d47be0f0c9..c8bc8e420586 100644 --- a/lib/datadog_api_client/v2/api/product_analytics_api.rb +++ b/lib/datadog_api_client/v2/api/product_analytics_api.rb @@ -23,6 +23,233 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Get funnel step suggestions. + # + # @see #query_product_analytics_funnel_step_suggestions_with_http_info + def query_product_analytics_funnel_step_suggestions(body, opts = {}) + data, _status_code, _headers = query_product_analytics_funnel_step_suggestions_with_http_info(body, opts) + data + end + + # Get funnel step suggestions. + # + # Get the steps that users most often take after the existing steps of a funnel. + # Suggestions come from the same precomputed journeys as feature suggestions. + # Returns an empty list when no journey starts with the given steps. + # + # @param body [ProductAnalyticsFunnelStepSuggestionsRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ProductAnalyticsFunnelStepSuggestionsResponse, Integer, Hash)>] ProductAnalyticsFunnelStepSuggestionsResponse data, response status code and response headers + def query_product_analytics_funnel_step_suggestions_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.query_product_analytics_funnel_step_suggestions".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_product_analytics_funnel_step_suggestions") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_product_analytics_funnel_step_suggestions")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProductAnalyticsAPI.query_product_analytics_funnel_step_suggestions ...' + 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.query_product_analytics_funnel_step_suggestions" + end + # resource path + local_var_path = '/api/v2/product-analytics/suggestions/features/steps' + + # 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] || 'ProductAnalyticsFunnelStepSuggestionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :query_product_analytics_funnel_step_suggestions, + :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#query_product_analytics_funnel_step_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get feature suggestions. + # + # @see #query_product_analytics_funnel_suggestions_with_http_info + def query_product_analytics_funnel_suggestions(body, opts = {}) + data, _status_code, _headers = query_product_analytics_funnel_suggestions_with_http_info(body, opts) + data + end + + # Get feature suggestions. + # + # Get the features that Product Analytics detected in your applications, grouped by + # application and feature area. Each feature comes with a suggested journey that users + # follow to use it, which you can use as funnel steps. + # + # @param body [ProductAnalyticsFunnelSuggestionsRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ProductAnalyticsFunnelSuggestionsResponse, Integer, Hash)>] ProductAnalyticsFunnelSuggestionsResponse data, response status code and response headers + def query_product_analytics_funnel_suggestions_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.query_product_analytics_funnel_suggestions".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_product_analytics_funnel_suggestions") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_product_analytics_funnel_suggestions")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProductAnalyticsAPI.query_product_analytics_funnel_suggestions ...' + 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.query_product_analytics_funnel_suggestions" + end + # resource path + local_var_path = '/api/v2/product-analytics/suggestions/features' + + # 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] || 'ProductAnalyticsFunnelSuggestionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :query_product_analytics_funnel_suggestions, + :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#query_product_analytics_funnel_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Analyze journey drop-off. + # + # @see #query_product_analytics_journey_drop_off_with_http_info + def query_product_analytics_journey_drop_off(body, opts = {}) + data, _status_code, _headers = query_product_analytics_journey_drop_off_with_http_info(body, opts) + data + end + + # Analyze journey drop-off. + # + # Analyze the drop-off at a given step of the journey. The journey must have at least two + # steps, and only the `@session.id` join key is supported. Set `target` to the node to + # analyze. It can't be the first step. When `target` is omitted, the last step is used. + # Returns the number of sessions that reached the step before the target but not the target, + # together with the issues and frustration signals most associated with the drop-off. + # + # @param body [ProductAnalyticsJourneyDropOffRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ProductAnalyticsJourneyDropOffResponse, Integer, Hash)>] ProductAnalyticsJourneyDropOffResponse data, response status code and response headers + def query_product_analytics_journey_drop_off_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.query_product_analytics_journey_drop_off".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_product_analytics_journey_drop_off") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_product_analytics_journey_drop_off")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProductAnalyticsAPI.query_product_analytics_journey_drop_off ...' + 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.query_product_analytics_journey_drop_off" + end + # resource path + local_var_path = '/api/v2/product-analytics/journey/drop_off_analysis' + + # 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] || 'ProductAnalyticsJourneyDropOffResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :query_product_analytics_journey_drop_off, + :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#query_product_analytics_journey_drop_off\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Compute journey funnel analysis. # # @see #query_product_analytics_journey_funnel_with_http_info diff --git a/lib/datadog_api_client/v2/models/product_analytics_core_user_journey.rb b/lib/datadog_api_client/v2/models/product_analytics_core_user_journey.rb new file mode 100644 index 000000000000..f7fddbfcd40a --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_core_user_journey.rb @@ -0,0 +1,135 @@ +=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 sequence of events that users follow to use a feature. + class ProductAnalyticsCoreUserJourney + include BaseGenericModel + + # Order of the steps, as step IDs joined by `->`. + attr_accessor :expression + + # Relevance score of the journey. Higher is more relevant. + attr_accessor :score + + # Map of step ID to the event query of the step. + attr_accessor :steps + + # Number of sessions that followed the journey. + attr_accessor :support + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'expression' => :'expression', + :'score' => :'score', + :'steps' => :'steps', + :'support' => :'support' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'expression' => :'String', + :'score' => :'Integer', + :'steps' => :'Hash', + :'support' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProductAnalyticsCoreUserJourney` 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?(:'expression') + self.expression = attributes[:'expression'] + end + + if attributes.key?(:'score') + self.score = attributes[:'score'] + end + + if attributes.key?(:'steps') + self.steps = attributes[:'steps'] + end + + if attributes.key?(:'support') + self.support = attributes[:'support'] + 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 && + expression == o.expression && + score == o.score && + steps == o.steps && + support == o.support && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [expression, score, steps, support, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request.rb new file mode 100644 index 000000000000..38bc5f123024 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request.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 + # Request to get suggested next steps for a funnel. + class ProductAnalyticsFunnelStepSuggestionsRequest + include BaseGenericModel + + # Data of a step suggestions request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProductAnalyticsFunnelStepSuggestionsRequestData' + } + 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::ProductAnalyticsFunnelStepSuggestionsRequest` 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?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_attributes.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_attributes.rb new file mode 100644 index 000000000000..14e3d4f779fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_attributes.rb @@ -0,0 +1,156 @@ +=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 + # Attributes of a step suggestions request. + class ProductAnalyticsFunnelStepSuggestionsRequestAttributes + include BaseGenericModel + + # Only use journeys from this RUM application. + attr_accessor :application_id + + # Order of the funnel steps, as step IDs joined by `->`. + attr_reader :expression + + # Map of step ID to the event query of the step. Steps are matched in the string sort + # order of their IDs, so use zero-padded IDs such as `node_01`, `node_02`. Without padding, + # `node_10` sorts before `node_2`. + attr_reader :steps + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'expression' => :'expression', + :'steps' => :'steps' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'expression' => :'String', + :'steps' => :'Hash' + } + 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::ProductAnalyticsFunnelStepSuggestionsRequestAttributes` 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?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'expression') + self.expression = attributes[:'expression'] + end + + if attributes.key?(:'steps') + self.steps = attributes[:'steps'] + 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 @expression.nil? + return false if @steps.nil? + true + end + + # Custom attribute writer method with validation + # @param expression [Object] Object to be assigned + # @!visibility private + def expression=(expression) + if expression.nil? + fail ArgumentError, 'invalid value for "expression", expression cannot be nil.' + end + @expression = expression + end + + # Custom attribute writer method with validation + # @param steps [Object] Object to be assigned + # @!visibility private + def steps=(steps) + if steps.nil? + fail ArgumentError, 'invalid value for "steps", steps cannot be nil.' + end + @steps = steps + 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 && + application_id == o.application_id && + expression == o.expression && + steps == o.steps && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, expression, steps, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_data.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_data.rb new file mode 100644 index 000000000000..c0253cd0cf10 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data of a step suggestions request. + class ProductAnalyticsFunnelStepSuggestionsRequestData + include BaseGenericModel + + # Attributes of a step suggestions request. + attr_reader :attributes + + # Type of a step suggestions request. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProductAnalyticsFunnelStepSuggestionsRequestAttributes', + :'type' => :'ProductAnalyticsFunnelStepSuggestionsRequestType' + } + 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::ProductAnalyticsFunnelStepSuggestionsRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param 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 && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_type.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_type.rb new file mode 100644 index 000000000000..f12358972cbc --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_request_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 + # Type of a step suggestions request. + class ProductAnalyticsFunnelStepSuggestionsRequestType + include BaseEnumModel + + FUNNEL_SUGGESTIONS_STEPS_REQUEST = "funnel_suggestions_steps_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response.rb new file mode 100644 index 000000000000..222d5a250a0a --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response.rb @@ -0,0 +1,105 @@ +=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 + # Suggested next steps for a funnel. + class ProductAnalyticsFunnelStepSuggestionsResponse + include BaseGenericModel + + # Data of a step suggestions response. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProductAnalyticsFunnelStepSuggestionsResponseData' + } + 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::ProductAnalyticsFunnelStepSuggestionsResponse` 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?(:'data') + self.data = attributes[:'data'] + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_attributes.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_attributes.rb new file mode 100644 index 000000000000..5b6edb3b5e46 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_attributes.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 + # Attributes of a step suggestions response. + class ProductAnalyticsFunnelStepSuggestionsResponseAttributes + include BaseGenericModel + + # Event queries of the suggested next steps, most relevant first. + attr_accessor :steps + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'steps' => :'steps' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'steps' => :'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::ProductAnalyticsFunnelStepSuggestionsResponseAttributes` 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?(:'steps') + if (value = attributes[:'steps']).is_a?(Array) + self.steps = 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 && + steps == o.steps && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [steps, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_data.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_data.rb new file mode 100644 index 000000000000..47f2430df11c --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_data.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 + # Data of a step suggestions response. + class ProductAnalyticsFunnelStepSuggestionsResponseData + include BaseGenericModel + + # Attributes of a step suggestions response. + attr_accessor :attributes + + # ID of the response. + attr_accessor :id + + # Type of a step suggestions response. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProductAnalyticsFunnelStepSuggestionsResponseAttributes', + :'id' => :'String', + :'type' => :'ProductAnalyticsFunnelStepSuggestionsResponseType' + } + 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::ProductAnalyticsFunnelStepSuggestionsResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_type.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_type.rb new file mode 100644 index 000000000000..8cf9d0001612 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_step_suggestions_response_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 + # Type of a step suggestions response. + class ProductAnalyticsFunnelStepSuggestionsResponseType + include BaseEnumModel + + FUNNEL_SUGGESTIONS_STEPS_RESPONSE = "funnel_suggestions_steps_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_application.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_application.rb new file mode 100644 index 000000000000..5a753adb23fb --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_application.rb @@ -0,0 +1,117 @@ +=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 + # Suggested features of one application. + class ProductAnalyticsFunnelSuggestionsApplication + include BaseGenericModel + + # ID of the RUM application. + attr_accessor :application_id + + # Feature areas of the application. + attr_accessor :domains + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'domains' => :'domains' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'domains' => :'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::ProductAnalyticsFunnelSuggestionsApplication` 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?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'domains') + if (value = attributes[:'domains']).is_a?(Array) + self.domains = 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 && + application_id == o.application_id && + domains == o.domains && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, domains, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_domain.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_domain.rb new file mode 100644 index 000000000000..26cbe628fb99 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_domain.rb @@ -0,0 +1,117 @@ +=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 feature area of an application, such as checkout or settings. + class ProductAnalyticsFunnelSuggestionsDomain + include BaseGenericModel + + # Features in this area. + attr_accessor :features + + # Name of the feature area. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'features' => :'features', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'features' => :'Array', + :'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::ProductAnalyticsFunnelSuggestionsDomain` 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?(:'features') + if (value = attributes[:'features']).is_a?(Array) + self.features = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 && + features == o.features && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [features, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_feature.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_feature.rb new file mode 100644 index 000000000000..e6180d232f8b --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_feature.rb @@ -0,0 +1,157 @@ +=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 feature detected in the application, with the journeys users take to use it. + class ProductAnalyticsFunnelSuggestionsFeature + include BaseGenericModel + + # The suggested journey that users follow to use the feature. Contains one journey. + attr_accessor :core_user_journeys + + # Description of the feature. + attr_accessor :description + + # ID of the feature. + attr_accessor :id + + # Name of the feature. + attr_accessor :name + + # Relevance score of the feature. Higher is more relevant. + attr_accessor :score + + # Number of sessions that used the feature. + attr_accessor :support + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'core_user_journeys' => :'core_user_journeys', + :'description' => :'description', + :'id' => :'id', + :'name' => :'name', + :'score' => :'score', + :'support' => :'support' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'core_user_journeys' => :'Array', + :'description' => :'String', + :'id' => :'String', + :'name' => :'String', + :'score' => :'Integer', + :'support' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProductAnalyticsFunnelSuggestionsFeature` 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?(:'core_user_journeys') + if (value = attributes[:'core_user_journeys']).is_a?(Array) + self.core_user_journeys = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'score') + self.score = attributes[:'score'] + end + + if attributes.key?(:'support') + self.support = attributes[:'support'] + 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 && + core_user_journeys == o.core_user_journeys && + description == o.description && + id == o.id && + name == o.name && + score == o.score && + support == o.support && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [core_user_journeys, description, id, name, score, support, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request.rb new file mode 100644 index 000000000000..7f99a3f42859 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request.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 + # Request to get suggested features and their journeys. + class ProductAnalyticsFunnelSuggestionsRequest + include BaseGenericModel + + # Data of a feature suggestions request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProductAnalyticsFunnelSuggestionsRequestData' + } + 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::ProductAnalyticsFunnelSuggestionsRequest` 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?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_attributes.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_attributes.rb new file mode 100644 index 000000000000..f01dccf075ec --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_attributes.rb @@ -0,0 +1,105 @@ +=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 + # Attributes of a feature suggestions request. + class ProductAnalyticsFunnelSuggestionsRequestAttributes + include BaseGenericModel + + # Only return suggestions for this RUM application. + attr_accessor :application_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_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::ProductAnalyticsFunnelSuggestionsRequestAttributes` 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?(:'application_id') + self.application_id = attributes[:'application_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_data.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_data.rb new file mode 100644 index 000000000000..5468c3538474 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data of a feature suggestions request. + class ProductAnalyticsFunnelSuggestionsRequestData + include BaseGenericModel + + # Attributes of a feature suggestions request. + attr_accessor :attributes + + # Type of a feature suggestions request. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProductAnalyticsFunnelSuggestionsRequestAttributes', + :'type' => :'ProductAnalyticsFunnelSuggestionsRequestType' + } + 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::ProductAnalyticsFunnelSuggestionsRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_type.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_type.rb new file mode 100644 index 000000000000..301eb9f41d2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_request_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 + # Type of a feature suggestions request. + class ProductAnalyticsFunnelSuggestionsRequestType + include BaseEnumModel + + FUNNEL_SUGGESTIONS_REQUEST = "funnel_suggestions_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response.rb new file mode 100644 index 000000000000..8ee9c7233cd4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response.rb @@ -0,0 +1,105 @@ +=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 + # Suggested features and their journeys. + class ProductAnalyticsFunnelSuggestionsResponse + include BaseGenericModel + + # Data of a feature suggestions response. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProductAnalyticsFunnelSuggestionsResponseData' + } + 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::ProductAnalyticsFunnelSuggestionsResponse` 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?(:'data') + self.data = attributes[:'data'] + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_attributes.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_attributes.rb new file mode 100644 index 000000000000..68c13e8863e7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_attributes.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 + # Attributes of a feature suggestions response. + class ProductAnalyticsFunnelSuggestionsResponseAttributes + include BaseGenericModel + + # Suggested features, grouped by application and feature area. + attr_accessor :applications + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'applications' => :'applications' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'applications' => :'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::ProductAnalyticsFunnelSuggestionsResponseAttributes` 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?(:'applications') + if (value = attributes[:'applications']).is_a?(Array) + self.applications = 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 && + applications == o.applications && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [applications, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_data.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_data.rb new file mode 100644 index 000000000000..8efbeb9cbc6d --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_data.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 + # Data of a feature suggestions response. + class ProductAnalyticsFunnelSuggestionsResponseData + include BaseGenericModel + + # Attributes of a feature suggestions response. + attr_accessor :attributes + + # ID of the response. + attr_accessor :id + + # Type of a feature suggestions response. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProductAnalyticsFunnelSuggestionsResponseAttributes', + :'id' => :'String', + :'type' => :'ProductAnalyticsFunnelSuggestionsResponseType' + } + 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::ProductAnalyticsFunnelSuggestionsResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_type.rb b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_type.rb new file mode 100644 index 000000000000..d83f7f9a7da3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_funnel_suggestions_response_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 + # Type of a feature suggestions response. + class ProductAnalyticsFunnelSuggestionsResponseType + include BaseEnumModel + + FUNNEL_SUGGESTIONS_RESPONSE = "funnel_suggestions_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_issue.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_issue.rb new file mode 100644 index 000000000000..f651e5c99721 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_issue.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An issue contributing to drop-off at the target step. + class ProductAnalyticsJourneyDropOffIssue + include BaseGenericModel + + # Number of errors attributed to this issue. + attr_reader :error_count + + # Identifier of the issue. + attr_reader :issue_id + + # Number of sessions affected by this issue. + attr_reader :session_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_count' => :'error_count', + :'issue_id' => :'issue_id', + :'session_count' => :'session_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_count' => :'Integer', + :'issue_id' => :'String', + :'session_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffIssue` 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?(:'error_count') + self.error_count = attributes[:'error_count'] + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + end + + if attributes.key?(:'session_count') + self.session_count = attributes[:'session_count'] + 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 @error_count.nil? + return false if @issue_id.nil? + return false if @session_count.nil? + true + end + + # Custom attribute writer method with validation + # @param error_count [Object] Object to be assigned + # @!visibility private + def error_count=(error_count) + if error_count.nil? + fail ArgumentError, 'invalid value for "error_count", error_count cannot be nil.' + end + @error_count = error_count + end + + # Custom attribute writer method with validation + # @param issue_id [Object] Object to be assigned + # @!visibility private + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'invalid value for "issue_id", issue_id cannot be nil.' + end + @issue_id = issue_id + end + + # Custom attribute writer method with validation + # @param session_count [Object] Object to be assigned + # @!visibility private + def session_count=(session_count) + if session_count.nil? + fail ArgumentError, 'invalid value for "session_count", session_count cannot be nil.' + end + @session_count = session_count + 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 && + error_count == o.error_count && + issue_id == o.issue_id && + session_count == o.session_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_count, issue_id, session_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_query.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_query.rb new file mode 100644 index 000000000000..2496986cbee8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_query.rb @@ -0,0 +1,168 @@ +=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 + # Query definition for a journey drop-off analysis request. + class ProductAnalyticsJourneyDropOffQuery + include BaseGenericModel + + # Sampling configuration for a query. + attr_accessor :sampling + + # Defines the steps of the journey and the filters applied to it. + attr_reader :search + + # A reference to a single step of the journey. + attr_accessor :target + + # Maximum number of issues to return. + attr_reader :top_issue_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'sampling' => :'sampling', + :'search' => :'search', + :'target' => :'target', + :'top_issue_count' => :'top_issue_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'sampling' => :'ProductAnalyticsSampling', + :'search' => :'ProductAnalyticsJourneySearch', + :'target' => :'ProductAnalyticsJourneyNodeTarget', + :'top_issue_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffQuery` 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?(:'sampling') + self.sampling = attributes[:'sampling'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + + if attributes.key?(:'top_issue_count') + self.top_issue_count = attributes[:'top_issue_count'] + 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 @search.nil? + return false if !@top_issue_count.nil? && @top_issue_count > 100 + return false if !@top_issue_count.nil? && @top_issue_count < 1 + true + end + + # Custom attribute writer method with validation + # @param search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + end + + # Custom attribute writer method with validation + # @param top_issue_count [Object] Object to be assigned + # @!visibility private + def top_issue_count=(top_issue_count) + if !top_issue_count.nil? && top_issue_count > 100 + fail ArgumentError, 'invalid value for "top_issue_count", must be smaller than or equal to 100.' + end + if !top_issue_count.nil? && top_issue_count < 1 + fail ArgumentError, 'invalid value for "top_issue_count", must be greater than or equal to 1.' + end + @top_issue_count = top_issue_count + 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 && + sampling == o.sampling && + search == o.search && + target == o.target && + top_issue_count == o.top_issue_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [sampling, search, target, top_issue_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request.rb new file mode 100644 index 000000000000..12cd18705847 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request.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 + # Request body for a journey drop-off analysis. + class ProductAnalyticsJourneyDropOffRequest + include BaseGenericModel + + # The definition of a journey drop-off analysis request body. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProductAnalyticsJourneyDropOffRequestData' + } + 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::ProductAnalyticsJourneyDropOffRequest` 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?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_attributes.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_attributes.rb new file mode 100644 index 000000000000..e7080ba07c92 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_attributes.rb @@ -0,0 +1,165 @@ +=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 + # Attributes of a journey drop-off analysis request. + class ProductAnalyticsJourneyDropOffRequestAttributes + include BaseGenericModel + + # Start of the query window, in epoch milliseconds. + attr_reader :from + + # Query definition for a journey drop-off analysis request. + attr_reader :query + + # End of the query window, in epoch milliseconds. + attr_reader :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'query' => :'query', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'query' => :'ProductAnalyticsJourneyDropOffQuery', + :'to' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffRequestAttributes` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 @from.nil? + return false if @query.nil? + return false if @to.nil? + true + end + + # Custom attribute writer method with validation + # @param from [Object] Object to be assigned + # @!visibility private + def from=(from) + if from.nil? + fail ArgumentError, 'invalid value for "from", from cannot be nil.' + end + @from = from + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param to [Object] Object to be assigned + # @!visibility private + def to=(to) + if to.nil? + fail ArgumentError, 'invalid value for "to", to cannot be nil.' + end + @to = to + 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 && + from == o.from && + query == o.query && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, query, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_data.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_data.rb new file mode 100644 index 000000000000..549de73c4cbf --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of a journey drop-off analysis request body. + class ProductAnalyticsJourneyDropOffRequestData + include BaseGenericModel + + # Attributes of a journey drop-off analysis request. + attr_reader :attributes + + # The resource type identifier for a journey drop-off analysis request. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProductAnalyticsJourneyDropOffRequestAttributes', + :'type' => :'ProductAnalyticsJourneyDropOffRequestType' + } + 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::ProductAnalyticsJourneyDropOffRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param 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 && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_type.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_type.rb new file mode 100644 index 000000000000..d522216da885 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_request_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 resource type identifier for a journey drop-off analysis request. + class ProductAnalyticsJourneyDropOffRequestType + include BaseEnumModel + + JOURNEY_DROP_OFF_ANALYSIS_REQUEST = "journey_drop_off_analysis_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response.rb new file mode 100644 index 000000000000..f9ee369e9084 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response.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 + # Response for a journey drop-off analysis. + class ProductAnalyticsJourneyDropOffResponse + include BaseGenericModel + + # The journey drop-off analysis results. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProductAnalyticsJourneyDropOffResponseData' + } + 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::ProductAnalyticsJourneyDropOffResponse` 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?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_attributes.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_attributes.rb new file mode 100644 index 000000000000..c7e5e7e7c9cb --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_attributes.rb @@ -0,0 +1,188 @@ +=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 + # Attributes of a journey drop-off analysis response. + class ProductAnalyticsJourneyDropOffResponseAttributes + include BaseGenericModel + + # Number of sessions that reached the step before the target but not the target step. + attr_reader :drop_off_count + + # The issues most associated with the drop-off. + attr_reader :issues + + # Number of dropped-off sessions that contained an error. + attr_reader :sessions_with_errors + + # Number of dropped-off sessions that contained a frustration signal. + attr_reader :sessions_with_frustration_signals + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'drop_off_count' => :'drop_off_count', + :'issues' => :'issues', + :'sessions_with_errors' => :'sessions_with_errors', + :'sessions_with_frustration_signals' => :'sessions_with_frustration_signals' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'drop_off_count' => :'Integer', + :'issues' => :'Array', + :'sessions_with_errors' => :'Integer', + :'sessions_with_frustration_signals' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProductAnalyticsJourneyDropOffResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'drop_off_count') + self.drop_off_count = attributes[:'drop_off_count'] + end + + if attributes.key?(:'issues') + if (value = attributes[:'issues']).is_a?(Array) + self.issues = value + end + end + + if attributes.key?(:'sessions_with_errors') + self.sessions_with_errors = attributes[:'sessions_with_errors'] + end + + if attributes.key?(:'sessions_with_frustration_signals') + self.sessions_with_frustration_signals = attributes[:'sessions_with_frustration_signals'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @drop_off_count.nil? + return false if @issues.nil? + return false if @sessions_with_errors.nil? + return false if @sessions_with_frustration_signals.nil? + true + end + + # Custom attribute writer method with validation + # @param drop_off_count [Object] Object to be assigned + # @!visibility private + def drop_off_count=(drop_off_count) + if drop_off_count.nil? + fail ArgumentError, 'invalid value for "drop_off_count", drop_off_count cannot be nil.' + end + @drop_off_count = drop_off_count + end + + # Custom attribute writer method with validation + # @param issues [Object] Object to be assigned + # @!visibility private + def issues=(issues) + if issues.nil? + fail ArgumentError, 'invalid value for "issues", issues cannot be nil.' + end + @issues = issues + end + + # Custom attribute writer method with validation + # @param sessions_with_errors [Object] Object to be assigned + # @!visibility private + def sessions_with_errors=(sessions_with_errors) + if sessions_with_errors.nil? + fail ArgumentError, 'invalid value for "sessions_with_errors", sessions_with_errors cannot be nil.' + end + @sessions_with_errors = sessions_with_errors + end + + # Custom attribute writer method with validation + # @param sessions_with_frustration_signals [Object] Object to be assigned + # @!visibility private + def sessions_with_frustration_signals=(sessions_with_frustration_signals) + if sessions_with_frustration_signals.nil? + fail ArgumentError, 'invalid value for "sessions_with_frustration_signals", sessions_with_frustration_signals cannot be nil.' + end + @sessions_with_frustration_signals = sessions_with_frustration_signals + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + drop_off_count == o.drop_off_count && + issues == o.issues && + sessions_with_errors == o.sessions_with_errors && + sessions_with_frustration_signals == o.sessions_with_frustration_signals && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [drop_off_count, issues, sessions_with_errors, sessions_with_frustration_signals, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_data.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_data.rb new file mode 100644 index 000000000000..8478f2aa051d --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_data.rb @@ -0,0 +1,165 @@ +=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 journey drop-off analysis results. + class ProductAnalyticsJourneyDropOffResponseData + include BaseGenericModel + + # Attributes of a journey drop-off analysis response. + attr_reader :attributes + + # Identifier of this result. + attr_reader :id + + # The resource type identifier for a journey drop-off analysis response. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProductAnalyticsJourneyDropOffResponseAttributes', + :'id' => :'String', + :'type' => :'ProductAnalyticsJourneyDropOffResponseType' + } + 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::ProductAnalyticsJourneyDropOffResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param 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 && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_type.rb b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_type.rb new file mode 100644 index 000000000000..e50ee3b187e4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_journey_drop_off_response_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 resource type identifier for a journey drop-off analysis response. + class ProductAnalyticsJourneyDropOffResponseType + include BaseEnumModel + + JOURNEY_DROP_OFF_ANALYSIS_RESPONSE = "journey_drop_off_analysis_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/product_analytics_sampling.rb b/lib/datadog_api_client/v2/models/product_analytics_sampling.rb new file mode 100644 index 000000000000..4abb453f9b5b --- /dev/null +++ b/lib/datadog_api_client/v2/models/product_analytics_sampling.rb @@ -0,0 +1,105 @@ +=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 + # Sampling configuration for a query. + class ProductAnalyticsSampling + include BaseGenericModel + + # Whether session sampling is enabled; reduces query cost at the cost of statistical precision. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + 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::ProductAnalyticsSampling` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + 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 && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end