diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 901b7a232478..28271e348a4e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -3579,6 +3579,1008 @@ components: - id - base_severity type: object + AggregatedHighFrozenFrameRate: + description: Aggregated high frozen frame rate detection at view level. + properties: + avg_frozen_frame_rate: + description: Average frozen frame rate as a fraction of total frames. + example: 0.15 + format: double + type: number + avg_segment_duration: + description: Average segment duration in nanoseconds. + example: 3000000000 + format: int64 + type: integer + avg_total_frozen_duration: + description: Average total frozen duration in nanoseconds. + example: 500000000 + format: int64 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$mno345 + type: string + impact_score: + description: Impact score for this detection. + example: 14.0 + format: double + type: number + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 5 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - view_occurrences + - avg_frozen_frame_rate + - avg_total_frozen_duration + - avg_segment_duration + - impact_score + type: object + AggregatedHighScriptEval: + description: Aggregated high script evaluation detection grouped by source. + properties: + avg_duration: + description: Average script evaluation duration in nanoseconds. + example: 300000000 + format: int64 + type: integer + avg_forced_style_layout: + description: Average forced style/layout duration in nanoseconds. + example: 0 + format: int64 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$7766a8c2180aa153f5526ba8868999f8 + type: string + impact_score: + description: Impact score combining view frequency and duration severity. + example: 30.0 + format: double + type: number + instance_count: + description: Total number of detection instances across sampled views. + example: 3 + format: int32 + maximum: 2147483647 + type: integer + invoker_type: + description: Type of invoker that triggered the script evaluation. + example: user-callback + type: string + source_category: + description: Category of the script source. + example: third-party + nullable: true + type: string + source_function_name: + description: Name of the function that triggered the high script evaluation. + example: handleClick + type: string + source_url: + description: URL of the script that triggered the high script evaluation. + example: https://cdn.example.com/app.js + nullable: true + type: string + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 3 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - source_url + - source_function_name + - source_category + - invoker_type + - view_occurrences + - instance_count + - avg_duration + - avg_forced_style_layout + - impact_score + type: object + AggregatedLongTasksByInvokerType: + description: Aggregated long task statistics for a single invoker type. + properties: + criteria_view_occurrences: + description: Number of sampled views where this invoker type had long tasks contributing to the criteria metric. + example: 40 + format: int32 + maximum: 2147483647 + type: integer + impact_score: + description: Rank-product impact score combining view frequency and blocking time severity. + example: 0.4 + format: double + type: number + invoker_type: + description: Category of the long task invoker (for example, resolve-promise, user-callback). + example: resolve-promise + type: string + stats_per_view: + $ref: "#/components/schemas/LongTaskStatsPerView" + top_invokers: + description: Top invokers within this invoker type, sorted by impact score descending. + items: + $ref: "#/components/schemas/TopLongTaskInvoker" + type: array + view_occurrences: + description: Number of sampled views where this invoker type had any long tasks. + example: 68 + format: int32 + maximum: 2147483647 + type: integer + required: + - invoker_type + - view_occurrences + - stats_per_view + - top_invokers + type: object + AggregatedLongTasksRequest: + description: Request body for the aggregated long tasks endpoint. + properties: + data: + $ref: "#/components/schemas/AggregatedLongTasksRequestData" + required: + - data + type: object + AggregatedLongTasksRequestAttributes: + description: Attributes for an aggregated long tasks query. + properties: + application_id: + description: The RUM application ID to analyze. + example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + type: string + criteria: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteria" + filter: + description: RUM query string to filter events (for example, @session.type:user @geo.country:US). + example: "@session.type:user" + type: string + from: + description: Start of the time range as a Unix timestamp in seconds. + example: 1762437564 + format: int64 + type: integer + sample_size: + description: Number of view instances to sample, between 1 and 500. + example: 20 + format: int32 + maximum: 500 + minimum: 1 + type: integer + to: + description: End of the time range as a Unix timestamp in seconds. + example: 1762523964 + format: int64 + type: integer + view_name: + description: The RUM view name to analyze (for example, /account/login). + example: /account/login(/:type) + type: string + required: + - application_id + - view_name + - from + - to + - sample_size + type: object + AggregatedLongTasksRequestData: + description: Data envelope for an aggregated long tasks request. + properties: + attributes: + $ref: "#/components/schemas/AggregatedLongTasksRequestAttributes" + type: + $ref: "#/components/schemas/AggregatedLongTasksRequestType" + required: + - type + - attributes + type: object + AggregatedLongTasksRequestType: + description: The JSON:API type for aggregated long tasks requests. + enum: + - aggregated_long_tasks + example: aggregated_long_tasks + type: string + x-enum-varnames: + - AggregatedLongTasks + AggregatedLongTasksResponse: + description: Response body for the aggregated long tasks endpoint. + properties: + data: + $ref: "#/components/schemas/AggregatedLongTasksResponseData" + required: + - data + type: object + AggregatedLongTasksResponseAttributes: + description: Attributes of an aggregated long tasks response. + properties: + application_id: + description: The RUM application ID that was analyzed. + example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + type: string + criteria: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteria" + from: + description: Start of the analyzed time range as a Unix timestamp in seconds. + example: 1762437564 + format: int64 + type: integer + long_tasks_by_invoker_type: + description: Long task statistics grouped by invoker type, sorted by impact score descending. + items: + $ref: "#/components/schemas/AggregatedLongTasksByInvokerType" + type: array + sampled_view_ids: + description: List of RUM view IDs sampled for this aggregation, capped at 50. + example: + - 6fbf69b6-9455-436a-b894-a6bf64126d40 + items: + type: string + type: array + to: + description: End of the analyzed time range as a Unix timestamp in seconds. + example: 1762523964 + format: int64 + type: integer + view_count: + description: Number of view instances included in the analysis. + example: 50 + format: int32 + maximum: 2147483647 + type: integer + view_name: + description: The RUM view name that was analyzed. + example: /account/login(/:type) + type: string + required: + - view_name + - application_id + - view_count + - from + - to + - sampled_view_ids + - long_tasks_by_invoker_type + type: object + AggregatedLongTasksResponseData: + description: Data envelope for an aggregated long tasks response. + properties: + attributes: + $ref: "#/components/schemas/AggregatedLongTasksResponseAttributes" + id: + description: Hash-based unique identifier for this aggregation. + example: 2f0b3455 + type: string + type: + $ref: "#/components/schemas/AggregatedLongTasksRequestType" + required: + - id + - type + - attributes + type: object + AggregatedLowCacheHitRate: + description: Aggregated low cache hit rate detection at view level. + properties: + avg_cache_hit_rate: + description: Average cache hit rate across affected views. + example: 0.15 + format: double + type: number + avg_resource_download_size_bytes: + description: Average total download size of uncached resources in bytes. + example: 1048576 + format: int64 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$abc123 + type: string + impact_score: + description: Impact score for this detection. + example: 20.0 + format: double + type: number + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 5 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - view_occurrences + - avg_cache_hit_rate + - avg_resource_download_size_bytes + - impact_score + type: object + AggregatedMobileScrollFriction: + description: Aggregated mobile scroll friction detection at view level. + properties: + avg_scroll_frozen_frame_count: + description: Average number of frozen frames during scroll interactions. + example: 3 + format: int32 + maximum: 2147483647 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$ghi789 + type: string + impact_score: + description: Impact score for this detection. + example: 12.0 + format: double + type: number + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 6 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - view_occurrences + - avg_scroll_frozen_frame_count + - impact_score + type: object + AggregatedResource: + description: Aggregated performance statistics for a single network resource across sampled view instances. + properties: + avg_duration_ms: + description: Average total duration in milliseconds. + example: 839.1 + format: double + type: number + avg_start_time_ms: + description: Average start time relative to view start in milliseconds. + example: 1486.3 + format: double + type: number + cache_hit_rate_pct: + description: Cache hit rate as a percentage. + example: 100.0 + format: double + type: number + cached_count: + description: Number of requests served from cache. + example: 27 + format: int32 + maximum: 2147483647 + type: integer + downloaded_count: + description: Number of requests downloaded from the network. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + global_p75_duration_ms: + description: 75th percentile duration across all view names in the application, present when include_global_appearance is true. + example: 500.0 + format: double + type: number + global_view_name_count: + description: Number of distinct view names in the application that load this resource, present when include_global_appearance is true. + example: 3 + format: int32 + maximum: 2147483647 + type: integer + global_view_name_pct: + description: Percentage of distinct view names in the application that load this resource, present when include_global_appearance is true. + example: 30.0 + format: double + type: number + http_method: + description: HTTP method for the resource request. + example: GET + nullable: true + type: string + load_frequency_pct: + description: Percentage of sampled view instances that loaded this resource. + example: 54.0 + format: double + type: number + max_duration_ms: + description: Maximum duration in milliseconds. + example: 945.6 + format: double + type: number + median_duration_ms: + description: Median duration in milliseconds. + example: 836.2 + format: double + type: number + min_duration_ms: + description: Minimum duration in milliseconds. + example: 812.7 + format: double + type: number + p75_duration_ms: + description: 75th percentile duration in milliseconds. + example: 844.1 + format: double + type: number + p95_duration_ms: + description: 95th percentile duration in milliseconds. + example: 861.8 + format: double + type: number + resource_type: + description: Resource type (JS, CSS, image, fetch, XHR, document, and so on). + example: fetch + nullable: true + type: string + resource_url_path_group: + description: URL path group used to aggregate similar resources. + example: /api/gallery + type: string + timing_breakdown: + $ref: "#/components/schemas/AggregatedResourceTimingBreakdown" + total_requests: + description: Total number of requests for this resource across all sampled views. + example: 27 + format: int32 + maximum: 2147483647 + type: integer + views_with_resource: + description: Number of sampled view instances that loaded this resource. + example: 27 + format: int32 + maximum: 2147483647 + type: integer + required: + - resource_url_path_group + - resource_type + - http_method + - avg_start_time_ms + - avg_duration_ms + - p95_duration_ms + - p75_duration_ms + - median_duration_ms + - min_duration_ms + - max_duration_ms + - timing_breakdown + - total_requests + - views_with_resource + - load_frequency_pct + - cached_count + - downloaded_count + - cache_hit_rate_pct + type: object + AggregatedResourceTimingBreakdown: + description: Average timing breakdown per network phase for a resource. + properties: + avg_connect_ms: + description: Average TCP connect duration in milliseconds. + example: 20.0 + format: double + type: number + avg_dns_ms: + description: Average DNS resolution duration in milliseconds. + example: 10.0 + format: double + type: number + avg_download_ms: + description: Average download phase duration in milliseconds. + example: 135.0 + format: double + type: number + avg_first_byte_ms: + description: Average time to first byte in milliseconds. + example: 30.0 + format: double + type: number + avg_redirect_ms: + description: Average redirect phase duration in milliseconds. + example: 0.0 + format: double + type: number + avg_ssl_ms: + description: Average SSL handshake duration in milliseconds. + example: 5.0 + format: double + type: number + required: + - avg_redirect_ms + - avg_dns_ms + - avg_connect_ms + - avg_ssl_ms + - avg_first_byte_ms + - avg_download_ms + type: object + AggregatedSignalsProblemsRequest: + description: Request body for the aggregated signals and problems endpoint. + properties: + data: + $ref: "#/components/schemas/AggregatedSignalsProblemsRequestData" + required: + - data + type: object + AggregatedSignalsProblemsRequestAttributes: + description: Attributes for an aggregated signals and problems query. + properties: + application_id: + description: The RUM application ID to analyze. + example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + type: string + criteria: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteria" + detection_types: + description: List of detection types to include in the response. When omitted, all types are returned. + example: + - high_script_evaluations + - uncompressed_resources + items: + type: string + type: array + filter: + description: RUM query string to filter events (for example, @session.type:user @geo.country:US). + example: "@session.type:user" + type: string + from: + description: Start of the time range as a Unix timestamp in seconds. + example: 1762437564 + format: int64 + type: integer + sample_size: + description: Number of view instances to sample, between 1 and 50. + example: 30 + format: int32 + maximum: 50 + minimum: 1 + type: integer + to: + description: End of the time range as a Unix timestamp in seconds. + example: 1762523964 + format: int64 + type: integer + view_name: + description: The RUM view name to analyze (for example, /account/login). + example: /account/login(/:type) + type: string + required: + - application_id + - view_name + - from + - to + - sample_size + type: object + AggregatedSignalsProblemsRequestData: + description: Data envelope for an aggregated signals and problems request. + properties: + attributes: + $ref: "#/components/schemas/AggregatedSignalsProblemsRequestAttributes" + type: + $ref: "#/components/schemas/AggregatedSignalsProblemsRequestType" + required: + - type + - attributes + type: object + AggregatedSignalsProblemsRequestType: + description: The JSON:API type for aggregated signals and problems requests. + enum: + - aggregated_signals_problems + example: aggregated_signals_problems + type: string + x-enum-varnames: + - AggregatedSignalsProblems + AggregatedSignalsProblemsResponse: + description: Response body for the aggregated signals and problems endpoint. + properties: + data: + $ref: "#/components/schemas/AggregatedSignalsProblemsResponseData" + required: + - data + type: object + AggregatedSignalsProblemsResponseAttributes: + description: Attributes of an aggregated signals and problems response. + properties: + application_id: + description: The RUM application ID that was analyzed. + example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + type: string + criteria: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteria" + from: + description: Start of the analyzed time range as a Unix timestamp in seconds. + example: 1710000000 + format: int64 + type: integer + problem_detections: + $ref: "#/components/schemas/SignalsProblemsDetections" + sample_metadata: + $ref: "#/components/schemas/SignalsProblemsSampleMetadata" + to: + description: End of the analyzed time range as a Unix timestamp in seconds. + example: 1710003600 + format: int64 + type: integer + view_name: + description: The RUM view name that was analyzed. + example: /checkout + type: string + required: + - view_name + - application_id + - from + - to + - sample_metadata + - problem_detections + type: object + AggregatedSignalsProblemsResponseData: + description: Data envelope for an aggregated signals and problems response. + properties: + attributes: + $ref: "#/components/schemas/AggregatedSignalsProblemsResponseAttributes" + id: + description: Hash-based unique identifier for this aggregation. + example: 2f0b3455 + type: string + type: + $ref: "#/components/schemas/AggregatedSignalsProblemsRequestType" + required: + - id + - type + - attributes + type: object + AggregatedSlowFCPHighBytes: + description: Aggregated slow first contentful paint with high byte count detection. + properties: + avg_bytes_before_fcp_bytes: + description: Average total bytes loaded before first contentful paint. + example: 2097152 + format: int64 + type: integer + avg_first_contentful_paint_ms: + description: Average first contentful paint time in milliseconds. + example: 3500 + format: int64 + type: integer + avg_resource_count_before_fcp: + description: Average number of resources loaded before first contentful paint. + example: 25 + format: int64 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$def456 + type: string + impact_score: + description: Impact score for this detection. + example: 18.0 + format: double + type: number + platform: + description: Platform identifier for the affected views. + example: browser + type: string + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 4 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - view_occurrences + - avg_first_contentful_paint_ms + - avg_bytes_before_fcp_bytes + - avg_resource_count_before_fcp + - platform + - impact_score + type: object + AggregatedSlowInteractionLongTask: + description: Aggregated slow interaction with long task detection grouped by action and selector. + properties: + action_type: + description: Type of user interaction that triggered the slow response. + example: click + type: string + avg_blocking_duration: + description: Average long task blocking duration in nanoseconds. + example: 250000000 + format: int64 + type: integer + avg_duration: + description: Average total interaction duration in nanoseconds. + example: 320000000 + format: int64 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$jkl012 + type: string + impact_score: + description: Impact score combining view frequency and blocking severity. + example: 22.0 + format: double + type: number + instance_count: + description: Total number of detection instances across sampled views. + example: 9 + format: int32 + maximum: 2147483647 + type: integer + selector: + description: CSS selector of the element that was interacted with. + example: "#submit-button" + nullable: true + type: string + selector_normalized: + description: Normalized CSS selector with dynamic parts replaced. + example: button[data-action] + nullable: true + type: string + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 7 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - action_type + - selector + - selector_normalized + - view_occurrences + - instance_count + - avg_blocking_duration + - avg_duration + - impact_score + type: object + AggregatedUncompressedResource: + description: Aggregated uncompressed resource detection grouped by URL path. + properties: + avg_body_size: + description: Average uncompressed body size in bytes. + example: 524288 + format: int64 + type: integer + avg_duration: + description: Average resource loading duration in nanoseconds. + example: 0 + format: int64 + type: integer + fingerprint: + description: Unique fingerprint identifying this detection group. + example: v1$65e268e25cab3a1f6230405ccf011a68 + type: string + impact_score: + description: Impact score combining view frequency and resource size. + example: 16.67 + format: double + type: number + instance_count: + description: Total number of detection instances across sampled views. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + provider_type: + description: CDN or hosting provider type for the resource. + example: cloudfront + nullable: true + type: string + render_blocking: + description: Whether the resource is render-blocking. + example: blocking + nullable: true + type: string + resource_type: + description: Type of the resource (JS, CSS, image, fetch, and so on). + example: image + type: string + url_path_group: + description: Normalized URL path pattern for the uncompressed resource. + example: /cdn/hero.jpg + type: string + view_occurrences: + description: Number of sampled views where this detection occurred. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + required: + - fingerprint + - url_path_group + - resource_type + - render_blocking + - provider_type + - view_occurrences + - instance_count + - avg_body_size + - avg_duration + - impact_score + type: object + AggregatedWaterfallPerformanceCriteria: + description: Performance criteria to filter view instances by a metric threshold. + properties: + max: + description: Maximum threshold in seconds (inclusive). + example: 5.0 + format: double + type: number + metric: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteriaMetric" + min: + description: Minimum threshold in seconds (inclusive). + example: 2.5 + format: double + type: number + required: + - metric + type: object + AggregatedWaterfallPerformanceCriteriaMetric: + description: Performance metric used to filter view instances by threshold. + enum: + - loading_time + - largest_contentful_paint + - first_contentful_paint + - interaction_to_next_paint + example: largest_contentful_paint + type: string + x-enum-varnames: + - LoadingTime + - LargestContentfulPaint + - FirstContentfulPaint + - InteractionToNextPaint + AggregatedWaterfallRequest: + description: Request body for the aggregated waterfall endpoint. + properties: + data: + $ref: "#/components/schemas/AggregatedWaterfallRequestData" + required: + - data + type: object + AggregatedWaterfallRequestAttributes: + description: Attributes for an aggregated waterfall query. + properties: + application_id: + description: The RUM application ID to analyze. + example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + type: string + criteria: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteria" + filter: + description: RUM query string to filter events (for example, @session.type:user @geo.country:US). + example: "@session.type:user" + type: string + from: + description: Start of the time range as a Unix timestamp in seconds. + example: 1762437564 + format: int64 + type: integer + include_global_appearance: + description: When true, enriches each resource with cross-view appearance statistics. + example: false + type: boolean + sample_size: + description: Number of view instances to sample, between 1 and 500. + example: 20 + format: int32 + maximum: 500 + minimum: 1 + type: integer + to: + description: End of the time range as a Unix timestamp in seconds. + example: 1762523964 + format: int64 + type: integer + view_name: + description: The RUM view name to analyze (for example, /account/login). + example: /account/login(/:type) + type: string + required: + - application_id + - view_name + - from + - to + - sample_size + type: object + AggregatedWaterfallRequestData: + description: Data envelope for an aggregated waterfall request. + properties: + attributes: + $ref: "#/components/schemas/AggregatedWaterfallRequestAttributes" + type: + $ref: "#/components/schemas/AggregatedWaterfallRequestType" + required: + - type + - attributes + type: object + AggregatedWaterfallRequestType: + description: The JSON:API type for aggregated waterfall requests. + enum: + - aggregated_waterfall + example: aggregated_waterfall + type: string + x-enum-varnames: + - AggregatedWaterfall + AggregatedWaterfallResponse: + description: Response body for the aggregated waterfall endpoint. + properties: + data: + $ref: "#/components/schemas/AggregatedWaterfallResponseData" + required: + - data + type: object + AggregatedWaterfallResponseAttributes: + description: Attributes of an aggregated waterfall response. + properties: + application_id: + description: The RUM application ID that was analyzed. + example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + type: string + criteria: + $ref: "#/components/schemas/AggregatedWaterfallPerformanceCriteria" + from: + description: Start of the analyzed time range as a Unix timestamp in seconds. + example: 1762437564 + format: int64 + type: integer + resources: + description: Network resources in chronological waterfall order. + items: + $ref: "#/components/schemas/AggregatedResource" + type: array + sampled_view_ids: + description: List of RUM view IDs sampled for this aggregation, capped at 50. + example: + - 6fbf69b6-9455-436a-b894-a6bf64126d40 + - dfe318df-4ae5-44b8-9fe2-4107885e1a46 + items: + type: string + type: array + to: + description: End of the analyzed time range as a Unix timestamp in seconds. + example: 1762523964 + format: int64 + type: integer + total_cache_hit_rate_pct: + description: Overall cache hit rate across all sampled views. + example: 0.677 + format: double + type: number + view_count: + description: Number of view instances included in the analysis. + example: 50 + format: int32 + maximum: 2147483647 + type: integer + view_name: + description: The RUM view name that was analyzed. + example: /account/login(/:type) + type: string + required: + - view_name + - application_id + - view_count + - from + - to + - sampled_view_ids + - total_cache_hit_rate_pct + - resources + type: object + AggregatedWaterfallResponseData: + description: Data envelope for an aggregated waterfall response. + properties: + attributes: + $ref: "#/components/schemas/AggregatedWaterfallResponseAttributes" + id: + description: Hash-based unique identifier for this aggregation. + example: 2f0b3455 + type: string + type: + $ref: "#/components/schemas/AggregatedWaterfallRequestType" + required: + - id + - type + - attributes + type: object AlertEventAttributes: description: Alert event attributes. properties: @@ -46817,6 +47819,53 @@ components: example: "One or several indexes are missing or invalid, results hold data from the other indexes" type: string type: object + LongTaskMetricStats: + description: Statistical distribution (average, min, max) of a long task metric across sampled views. + properties: + average: + description: Average value across sampled views. + example: 3504.1 + format: double + type: number + max: + description: Maximum value across sampled views. + example: 3517.8 + format: double + type: number + min: + description: Minimum value across sampled views. + example: 3500.1 + format: double + type: number + required: + - average + - min + - max + type: object + LongTaskStatsPerView: + description: Statistical distributions of long task metrics computed per view across sampled views. + properties: + fcp_blocking_time_ms: + $ref: "#/components/schemas/LongTaskMetricStats" + fcp_count: + $ref: "#/components/schemas/LongTaskMetricStats" + inp_overlap_blocking_time_ms: + $ref: "#/components/schemas/LongTaskMetricStats" + inp_overlap_count: + $ref: "#/components/schemas/LongTaskMetricStats" + lcp_blocking_time_ms: + $ref: "#/components/schemas/LongTaskMetricStats" + lcp_count: + $ref: "#/components/schemas/LongTaskMetricStats" + loading_time_blocking_time_ms: + $ref: "#/components/schemas/LongTaskMetricStats" + loading_time_count: + $ref: "#/components/schemas/LongTaskMetricStats" + total_blocking_time_ms: + $ref: "#/components/schemas/LongTaskMetricStats" + total_count: + $ref: "#/components/schemas/LongTaskMetricStats" + type: object MSTeamsIntegrationMetadata: description: Incident integration metadata for the Microsoft Teams integration. properties: @@ -75122,6 +76171,85 @@ components: description: Included data for shift operations. oneOf: - $ref: "#/components/schemas/ScheduleUser" + SignalsProblemsDetections: + description: Grouped detection results by detection type. + properties: + high_frozen_frame_rates: + description: Detected high frozen frame rate issues. + items: + $ref: "#/components/schemas/AggregatedHighFrozenFrameRate" + type: array + high_script_evaluations: + description: Detected high script evaluation issues. + items: + $ref: "#/components/schemas/AggregatedHighScriptEval" + type: array + low_cache_hit_rates: + description: Detected low cache hit rate issues. + items: + $ref: "#/components/schemas/AggregatedLowCacheHitRate" + type: array + mobile_scroll_frictions: + description: Detected mobile scroll friction issues. + items: + $ref: "#/components/schemas/AggregatedMobileScrollFriction" + type: array + slow_fcp_high_bytes: + description: Detected slow first contentful paint with high byte count issues. + items: + $ref: "#/components/schemas/AggregatedSlowFCPHighBytes" + type: array + slow_interaction_long_tasks: + description: Detected slow interaction with long task issues. + items: + $ref: "#/components/schemas/AggregatedSlowInteractionLongTask" + type: array + uncompressed_resources: + description: Detected uncompressed resource issues. + items: + $ref: "#/components/schemas/AggregatedUncompressedResource" + type: array + type: object + SignalsProblemsSampleMetadata: + description: Metadata about the sampling quality for a signals and problems query. + properties: + failed: + description: Number of view instances that failed to process. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + requested: + description: Number of view instances requested for sampling. + example: 30 + format: int32 + maximum: 2147483647 + type: integer + sampled_view_ids: + description: List of RUM view IDs that were sampled. + example: + - 6fbf69b6-9455-436a-b894-a6bf64126d40 + items: + type: string + type: array + succeeded: + description: Number of view instances successfully processed. + example: 28 + format: int32 + maximum: 2147483647 + type: integer + success_rate: + description: Ratio of successfully processed views to requested views. + example: 0.93 + format: double + type: number + required: + - requested + - succeeded + - failed + - success_rate + - sampled_view_ids + type: object SimpleMonitorUserTemplate: description: A simplified version of a monitor user template. properties: @@ -84965,6 +86093,43 @@ components: type: string x-enum-varnames: - SECRET + TopLongTaskInvoker: + description: A top long task invoker within an invoker type. + properties: + criteria_view_occurrences: + description: Number of sampled views where this invoker had long tasks contributing to the criteria metric. + example: 40 + format: int32 + maximum: 2147483647 + type: integer + file: + description: Cleaned source file path for the invoker script. + example: src/pages/Gallery.tsx + nullable: true + type: string + impact_score: + description: Rank-product impact score combining view frequency and blocking time severity. + example: 0.67 + format: double + type: number + invoker: + description: Name of the invoker function or script. + example: Response.json.then + type: string + stats_per_view: + $ref: "#/components/schemas/LongTaskStatsPerView" + view_occurrences: + description: Number of sampled views where this invoker had any long tasks. + example: 68 + format: int32 + maximum: 2147483647 + type: integer + required: + - invoker + - file + - view_occurrences + - stats_per_view + type: object Trigger: description: "One of the triggers that can start the execution of a workflow." oneOf: @@ -137142,6 +138307,265 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/rum/query/insight/aggregated_long_tasks: + post: + description: |- + Get aggregated long task data for a RUM view, grouped by invoker type and sampled across multiple view instances. + operationId: QueryAggregatedLongTasks + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + from: 1762437564 + sample_size: 20 + to: 1762523964 + view_name: /account/login(/:type) + type: aggregated_long_tasks + schema: + $ref: "#/components/schemas/AggregatedLongTasksRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + from: 1762437564 + long_tasks_by_invoker_type: + - impact_score: 0.4 + invoker_type: resolve-promise + stats_per_view: + total_blocking_time_ms: + average: 3504.1 + max: 3517.8 + min: 3500.1 + total_count: + average: 1.0 + max: 1.0 + min: 1.0 + top_invokers: + - file: src/pages/Gallery.tsx + impact_score: 0.67 + invoker: Response.json.then + stats_per_view: + total_count: + average: 1.0 + max: 1.0 + min: 1.0 + view_occurrences: 68 + view_occurrences: 68 + sampled_view_ids: + - 6fbf69b6-9455-436a-b894-a6bf64126d40 + to: 1762523964 + view_count: 20 + view_name: /account/login(/:type) + id: 2f0b3455 + type: aggregated_long_tasks + schema: + $ref: "#/components/schemas/AggregatedLongTasksResponse" + description: Successful response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Query aggregated long tasks + tags: ["RUM"] + x-permission: + operator: OR + permissions: + - rum_apps_read + /api/v2/rum/query/insight/aggregated_signals_problems: + post: + description: |- + Get aggregated performance signals and problem detections for a RUM view, sampled across multiple view instances. + operationId: QueryAggregatedSignalsProblems + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + from: 1762437564 + sample_size: 30 + to: 1762523964 + view_name: /account/login(/:type) + type: aggregated_signals_problems + schema: + $ref: "#/components/schemas/AggregatedSignalsProblemsRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + from: 1710000000 + problem_detections: + high_script_evaluations: + - avg_duration: 300000000 + avg_forced_style_layout: 0 + fingerprint: v1$7766a8c2180aa153f5526ba8868999f8 + impact_score: 30.0 + instance_count: 3 + invoker_type: user-callback + source_category: + source_function_name: handleClick + source_url: https://cdn.example.com/app.js + view_occurrences: 3 + sample_metadata: + failed: 2 + requested: 30 + sampled_view_ids: + - 6fbf69b6-9455-436a-b894-a6bf64126d40 + succeeded: 28 + success_rate: 0.93 + to: 1710003600 + view_name: /checkout + id: 2f0b3455 + type: aggregated_signals_problems + schema: + $ref: "#/components/schemas/AggregatedSignalsProblemsResponse" + description: Successful response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Query aggregated signals and problems + tags: ["RUM"] + x-permission: + operator: OR + permissions: + - rum_apps_read + /api/v2/rum/query/insight/aggregated_waterfall: + post: + description: |- + Get aggregated network resource waterfall data for a RUM view, sampled across multiple view instances. + operationId: QueryAggregatedWaterfall + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + criteria: + metric: largest_contentful_paint + min: 0.3 + from: 1762437564 + sample_size: 20 + to: 1762523964 + view_name: /account/login(/:type) + type: aggregated_waterfall + schema: + $ref: "#/components/schemas/AggregatedWaterfallRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b + criteria: + metric: largest_contentful_paint + min: 0.3 + from: 1762437564 + resources: + - avg_duration_ms: 839.1 + avg_start_time_ms: 1486.3 + cache_hit_rate_pct: 100.0 + cached_count: 27 + downloaded_count: 0 + http_method: GET + load_frequency_pct: 54.0 + max_duration_ms: 945.6 + median_duration_ms: 836.2 + min_duration_ms: 812.7 + p75_duration_ms: 844.1 + p95_duration_ms: 861.8 + resource_type: fetch + resource_url_path_group: /api/gallery + timing_breakdown: + avg_connect_ms: 0.0 + avg_dns_ms: 0.0 + avg_download_ms: 0.6 + avg_first_byte_ms: 59.9 + avg_redirect_ms: 0.0 + avg_ssl_ms: 0.0 + total_requests: 27 + views_with_resource: 27 + sampled_view_ids: + - 6fbf69b6-9455-436a-b894-a6bf64126d40 + to: 1762523964 + total_cache_hit_rate_pct: 0.5 + view_count: 20 + view_name: /account/login(/:type) + id: 2f0b3455 + type: aggregated_waterfall + schema: + $ref: "#/components/schemas/AggregatedWaterfallResponse" + description: Successful response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Query aggregated waterfall + tags: ["RUM"] + x-permission: + operator: OR + permissions: + - rum_apps_read /api/v2/rum/replay/playlists: get: description: List playlists. diff --git a/examples/v2/rum/QueryAggregatedLongTasks.rb b/examples/v2/rum/QueryAggregatedLongTasks.rb new file mode 100644 index 000000000000..a9a144bb4dd1 --- /dev/null +++ b/examples/v2/rum/QueryAggregatedLongTasks.rb @@ -0,0 +1,24 @@ +# Query aggregated long tasks returns "Successful response" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RUMAPI.new + +body = DatadogAPIClient::V2::AggregatedLongTasksRequest.new({ + data: DatadogAPIClient::V2::AggregatedLongTasksRequestData.new({ + attributes: DatadogAPIClient::V2::AggregatedLongTasksRequestAttributes.new({ + application_id: "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", + criteria: DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteria.new({ + max: 5.0, + metric: DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteriaMetric::LARGESTCONTENTFULPAINT, + min: 2.5, + }), + filter: "@session.type:user", + from: 1762437564, + sample_size: 20, + to: 1762523964, + view_name: "/account/login(/:type)", + }), + type: DatadogAPIClient::V2::AggregatedLongTasksRequestType::AGGREGATEDLONGTASKS, + }), +}) +p api_instance.query_aggregated_long_tasks(body) diff --git a/examples/v2/rum/QueryAggregatedSignalsProblems.rb b/examples/v2/rum/QueryAggregatedSignalsProblems.rb new file mode 100644 index 000000000000..83e1b23167e8 --- /dev/null +++ b/examples/v2/rum/QueryAggregatedSignalsProblems.rb @@ -0,0 +1,28 @@ +# Query aggregated signals and problems returns "Successful response" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RUMAPI.new + +body = DatadogAPIClient::V2::AggregatedSignalsProblemsRequest.new({ + data: DatadogAPIClient::V2::AggregatedSignalsProblemsRequestData.new({ + attributes: DatadogAPIClient::V2::AggregatedSignalsProblemsRequestAttributes.new({ + application_id: "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", + criteria: DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteria.new({ + max: 5.0, + metric: DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteriaMetric::LARGESTCONTENTFULPAINT, + min: 2.5, + }), + detection_types: [ + "high_script_evaluations", + "uncompressed_resources", + ], + filter: "@session.type:user", + from: 1762437564, + sample_size: 30, + to: 1762523964, + view_name: "/account/login(/:type)", + }), + type: DatadogAPIClient::V2::AggregatedSignalsProblemsRequestType::AGGREGATEDSIGNALSPROBLEMS, + }), +}) +p api_instance.query_aggregated_signals_problems(body) diff --git a/examples/v2/rum/QueryAggregatedWaterfall.rb b/examples/v2/rum/QueryAggregatedWaterfall.rb new file mode 100644 index 000000000000..a021a038134e --- /dev/null +++ b/examples/v2/rum/QueryAggregatedWaterfall.rb @@ -0,0 +1,25 @@ +# Query aggregated waterfall returns "Successful response" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RUMAPI.new + +body = DatadogAPIClient::V2::AggregatedWaterfallRequest.new({ + data: DatadogAPIClient::V2::AggregatedWaterfallRequestData.new({ + attributes: DatadogAPIClient::V2::AggregatedWaterfallRequestAttributes.new({ + application_id: "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", + criteria: DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteria.new({ + max: 5.0, + metric: DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteriaMetric::LARGESTCONTENTFULPAINT, + min: 2.5, + }), + filter: "@session.type:user", + from: 1762437564, + include_global_appearance: false, + sample_size: 20, + to: 1762523964, + view_name: "/account/login(/:type)", + }), + type: DatadogAPIClient::V2::AggregatedWaterfallRequestType::AGGREGATEDWATERFALL, + }), +}) +p api_instance.query_aggregated_waterfall(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 9fd6af3114f8..26dd2c56faab 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4201,6 +4201,15 @@ "v2.SearchRUMEvents" => { "body" => "RUMSearchEventsRequest", }, + "v2.QueryAggregatedLongTasks" => { + "body" => "AggregatedLongTasksRequest", + }, + "v2.QueryAggregatedSignalsProblems" => { + "body" => "AggregatedSignalsProblemsRequest", + }, + "v2.QueryAggregatedWaterfall" => { + "body" => "AggregatedWaterfallRequest", + }, "v2.OrderRetentionFilters" => { "app_id" => "String", "body" => "RumRetentionFiltersOrderRequest", diff --git a/features/v2/rum.feature b/features/v2/rum.feature index e25922fb48cd..386fca68b457 100644 --- a/features/v2/rum.feature +++ b/features/v2/rum.feature @@ -130,6 +130,48 @@ Feature: RUM And the response "data" has item with field "attributes.product_scales.rum_event_processing_scale.state" with value "ALL" And the response "data" has item with field "attributes.product_scales.product_analytics_retention_scale.state" with value "NONE" + @generated @skip @team:DataDog/rum-backend + Scenario: Query aggregated long tasks returns "Bad Request" response + Given new "QueryAggregatedLongTasks" request + And body with value {"data": {"attributes": {"application_id": "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", "criteria": {"max": 5.0, "metric": "largest_contentful_paint", "min": 2.5}, "filter": "@session.type:user", "from": 1762437564, "sample_size": 20, "to": 1762523964, "view_name": "/account/login(/:type)"}, "type": "aggregated_long_tasks"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Query aggregated long tasks returns "Successful response" response + Given new "QueryAggregatedLongTasks" request + And body with value {"data": {"attributes": {"application_id": "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", "criteria": {"max": 5.0, "metric": "largest_contentful_paint", "min": 2.5}, "filter": "@session.type:user", "from": 1762437564, "sample_size": 20, "to": 1762523964, "view_name": "/account/login(/:type)"}, "type": "aggregated_long_tasks"}} + When the request is sent + Then the response status is 201 Successful response + + @generated @skip @team:DataDog/rum-backend + Scenario: Query aggregated signals and problems returns "Bad Request" response + Given new "QueryAggregatedSignalsProblems" request + And body with value {"data": {"attributes": {"application_id": "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", "criteria": {"max": 5.0, "metric": "largest_contentful_paint", "min": 2.5}, "detection_types": ["high_script_evaluations", "uncompressed_resources"], "filter": "@session.type:user", "from": 1762437564, "sample_size": 30, "to": 1762523964, "view_name": "/account/login(/:type)"}, "type": "aggregated_signals_problems"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Query aggregated signals and problems returns "Successful response" response + Given new "QueryAggregatedSignalsProblems" request + And body with value {"data": {"attributes": {"application_id": "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", "criteria": {"max": 5.0, "metric": "largest_contentful_paint", "min": 2.5}, "detection_types": ["high_script_evaluations", "uncompressed_resources"], "filter": "@session.type:user", "from": 1762437564, "sample_size": 30, "to": 1762523964, "view_name": "/account/login(/:type)"}, "type": "aggregated_signals_problems"}} + When the request is sent + Then the response status is 201 Successful response + + @generated @skip @team:DataDog/rum-backend + Scenario: Query aggregated waterfall returns "Bad Request" response + Given new "QueryAggregatedWaterfall" request + And body with value {"data": {"attributes": {"application_id": "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", "criteria": {"max": 5.0, "metric": "largest_contentful_paint", "min": 2.5}, "filter": "@session.type:user", "from": 1762437564, "include_global_appearance": false, "sample_size": 20, "to": 1762523964, "view_name": "/account/login(/:type)"}, "type": "aggregated_waterfall"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Query aggregated waterfall returns "Successful response" response + Given new "QueryAggregatedWaterfall" request + And body with value {"data": {"attributes": {"application_id": "ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b", "criteria": {"max": 5.0, "metric": "largest_contentful_paint", "min": 2.5}, "filter": "@session.type:user", "from": 1762437564, "include_global_appearance": false, "sample_size": 20, "to": 1762523964, "view_name": "/account/login(/:type)"}, "type": "aggregated_waterfall"}} + When the request is sent + Then the response status is 201 Successful response + @generated @skip @team:DataDog/rum-backend Scenario: Search RUM events returns "Bad Request" response Given new "SearchRUMEvents" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 1b8f5ec0b974..d962240081c6 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -5666,6 +5666,24 @@ "type": "safe" } }, + "QueryAggregatedLongTasks": { + "tag": "RUM", + "undo": { + "type": "safe" + } + }, + "QueryAggregatedSignalsProblems": { + "tag": "RUM", + "undo": { + "type": "safe" + } + }, + "QueryAggregatedWaterfall": { + "tag": "RUM", + "undo": { + "type": "safe" + } + }, "ListRumReplayPlaylists": { "tag": "Rum Replay Playlists", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c68c30af571a..176ea8a1c66d 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1146,6 +1146,39 @@ def overrides "v2.active_billing_dimensions_type" => "ActiveBillingDimensionsType", "v2.add_member_team_request" => "AddMemberTeamRequest", "v2.advisory" => "Advisory", + "v2.aggregated_high_frozen_frame_rate" => "AggregatedHighFrozenFrameRate", + "v2.aggregated_high_script_eval" => "AggregatedHighScriptEval", + "v2.aggregated_long_tasks_by_invoker_type" => "AggregatedLongTasksByInvokerType", + "v2.aggregated_long_tasks_request" => "AggregatedLongTasksRequest", + "v2.aggregated_long_tasks_request_attributes" => "AggregatedLongTasksRequestAttributes", + "v2.aggregated_long_tasks_request_data" => "AggregatedLongTasksRequestData", + "v2.aggregated_long_tasks_request_type" => "AggregatedLongTasksRequestType", + "v2.aggregated_long_tasks_response" => "AggregatedLongTasksResponse", + "v2.aggregated_long_tasks_response_attributes" => "AggregatedLongTasksResponseAttributes", + "v2.aggregated_long_tasks_response_data" => "AggregatedLongTasksResponseData", + "v2.aggregated_low_cache_hit_rate" => "AggregatedLowCacheHitRate", + "v2.aggregated_mobile_scroll_friction" => "AggregatedMobileScrollFriction", + "v2.aggregated_resource" => "AggregatedResource", + "v2.aggregated_resource_timing_breakdown" => "AggregatedResourceTimingBreakdown", + "v2.aggregated_signals_problems_request" => "AggregatedSignalsProblemsRequest", + "v2.aggregated_signals_problems_request_attributes" => "AggregatedSignalsProblemsRequestAttributes", + "v2.aggregated_signals_problems_request_data" => "AggregatedSignalsProblemsRequestData", + "v2.aggregated_signals_problems_request_type" => "AggregatedSignalsProblemsRequestType", + "v2.aggregated_signals_problems_response" => "AggregatedSignalsProblemsResponse", + "v2.aggregated_signals_problems_response_attributes" => "AggregatedSignalsProblemsResponseAttributes", + "v2.aggregated_signals_problems_response_data" => "AggregatedSignalsProblemsResponseData", + "v2.aggregated_slow_fcp_high_bytes" => "AggregatedSlowFCPHighBytes", + "v2.aggregated_slow_interaction_long_task" => "AggregatedSlowInteractionLongTask", + "v2.aggregated_uncompressed_resource" => "AggregatedUncompressedResource", + "v2.aggregated_waterfall_performance_criteria" => "AggregatedWaterfallPerformanceCriteria", + "v2.aggregated_waterfall_performance_criteria_metric" => "AggregatedWaterfallPerformanceCriteriaMetric", + "v2.aggregated_waterfall_request" => "AggregatedWaterfallRequest", + "v2.aggregated_waterfall_request_attributes" => "AggregatedWaterfallRequestAttributes", + "v2.aggregated_waterfall_request_data" => "AggregatedWaterfallRequestData", + "v2.aggregated_waterfall_request_type" => "AggregatedWaterfallRequestType", + "v2.aggregated_waterfall_response" => "AggregatedWaterfallResponse", + "v2.aggregated_waterfall_response_attributes" => "AggregatedWaterfallResponseAttributes", + "v2.aggregated_waterfall_response_data" => "AggregatedWaterfallResponseData", "v2.alert_event_attributes" => "AlertEventAttributes", "v2.alert_event_attributes_links_item" => "AlertEventAttributesLinksItem", "v2.alert_event_attributes_links_item_category" => "AlertEventAttributesLinksItemCategory", @@ -3952,6 +3985,8 @@ def overrides "v2.logs_storage_tier" => "LogsStorageTier", "v2.logs_warning" => "LogsWarning", "v2.log_type" => "LogType", + "v2.long_task_metric_stats" => "LongTaskMetricStats", + "v2.long_task_stats_per_view" => "LongTaskStatsPerView", "v2.maintenance" => "Maintenance", "v2.maintenance_array" => "MaintenanceArray", "v2.maintenance_data" => "MaintenanceData", @@ -5796,6 +5831,8 @@ def overrides "v2.shift_data_relationships_user_data_type" => "ShiftDataRelationshipsUserDataType", "v2.shift_data_type" => "ShiftDataType", "v2.shift_included" => "ShiftIncluded", + "v2.signals_problems_detections" => "SignalsProblemsDetections", + "v2.signals_problems_sample_metadata" => "SignalsProblemsSampleMetadata", "v2.simple_monitor_user_template" => "SimpleMonitorUserTemplate", "v2.single_aggregated_connection_response_array" => "SingleAggregatedConnectionResponseArray", "v2.single_aggregated_connection_response_data" => "SingleAggregatedConnectionResponseData", @@ -6395,6 +6432,7 @@ def overrides "v2.timeseries_response_attributes" => "TimeseriesResponseAttributes", "v2.timeseries_response_series" => "TimeseriesResponseSeries", "v2.token_type" => "TokenType", + "v2.top_long_task_invoker" => "TopLongTaskInvoker", "v2.trigger" => "Trigger", "v2.trigger_attributes" => "TriggerAttributes", "v2.trigger_investigation_request" => "TriggerInvestigationRequest", diff --git a/lib/datadog_api_client/v2/api/rum_api.rb b/lib/datadog_api_client/v2/api/rum_api.rb index bd3c413cab66..968a70cd6194 100644 --- a/lib/datadog_api_client/v2/api/rum_api.rb +++ b/lib/datadog_api_client/v2/api/rum_api.rb @@ -452,6 +452,207 @@ def list_rum_events_with_pagination(opts = {}) end end + # Query aggregated long tasks. + # + # @see #query_aggregated_long_tasks_with_http_info + def query_aggregated_long_tasks(body, opts = {}) + data, _status_code, _headers = query_aggregated_long_tasks_with_http_info(body, opts) + data + end + + # Query aggregated long tasks. + # + # Get aggregated long task data for a RUM view, grouped by invoker type and sampled across multiple view instances. + # + # @param body [AggregatedLongTasksRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(AggregatedLongTasksResponse, Integer, Hash)>] AggregatedLongTasksResponse data, response status code and response headers + def query_aggregated_long_tasks_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.query_aggregated_long_tasks ...' + 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 RUMAPI.query_aggregated_long_tasks" + end + # resource path + local_var_path = '/api/v2/rum/query/insight/aggregated_long_tasks' + + # 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] || 'AggregatedLongTasksResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :query_aggregated_long_tasks, + :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: RUMAPI#query_aggregated_long_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query aggregated signals and problems. + # + # @see #query_aggregated_signals_problems_with_http_info + def query_aggregated_signals_problems(body, opts = {}) + data, _status_code, _headers = query_aggregated_signals_problems_with_http_info(body, opts) + data + end + + # Query aggregated signals and problems. + # + # Get aggregated performance signals and problem detections for a RUM view, sampled across multiple view instances. + # + # @param body [AggregatedSignalsProblemsRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(AggregatedSignalsProblemsResponse, Integer, Hash)>] AggregatedSignalsProblemsResponse data, response status code and response headers + def query_aggregated_signals_problems_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.query_aggregated_signals_problems ...' + 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 RUMAPI.query_aggregated_signals_problems" + end + # resource path + local_var_path = '/api/v2/rum/query/insight/aggregated_signals_problems' + + # 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] || 'AggregatedSignalsProblemsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :query_aggregated_signals_problems, + :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: RUMAPI#query_aggregated_signals_problems\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query aggregated waterfall. + # + # @see #query_aggregated_waterfall_with_http_info + def query_aggregated_waterfall(body, opts = {}) + data, _status_code, _headers = query_aggregated_waterfall_with_http_info(body, opts) + data + end + + # Query aggregated waterfall. + # + # Get aggregated network resource waterfall data for a RUM view, sampled across multiple view instances. + # + # @param body [AggregatedWaterfallRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(AggregatedWaterfallResponse, Integer, Hash)>] AggregatedWaterfallResponse data, response status code and response headers + def query_aggregated_waterfall_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.query_aggregated_waterfall ...' + 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 RUMAPI.query_aggregated_waterfall" + end + # resource path + local_var_path = '/api/v2/rum/query/insight/aggregated_waterfall' + + # 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] || 'AggregatedWaterfallResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :query_aggregated_waterfall, + :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: RUMAPI#query_aggregated_waterfall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Search RUM events. # # @see #search_rum_events_with_http_info diff --git a/lib/datadog_api_client/v2/models/aggregated_high_frozen_frame_rate.rb b/lib/datadog_api_client/v2/models/aggregated_high_frozen_frame_rate.rb new file mode 100644 index 000000000000..2434fa1a18ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_high_frozen_frame_rate.rb @@ -0,0 +1,232 @@ +=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 + # Aggregated high frozen frame rate detection at view level. + class AggregatedHighFrozenFrameRate + include BaseGenericModel + + # Average frozen frame rate as a fraction of total frames. + attr_reader :avg_frozen_frame_rate + + # Average segment duration in nanoseconds. + attr_reader :avg_segment_duration + + # Average total frozen duration in nanoseconds. + attr_reader :avg_total_frozen_duration + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score for this detection. + attr_reader :impact_score + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_frozen_frame_rate' => :'avg_frozen_frame_rate', + :'avg_segment_duration' => :'avg_segment_duration', + :'avg_total_frozen_duration' => :'avg_total_frozen_duration', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_frozen_frame_rate' => :'Float', + :'avg_segment_duration' => :'Integer', + :'avg_total_frozen_duration' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'view_occurrences' => :'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::AggregatedHighFrozenFrameRate` 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?(:'avg_frozen_frame_rate') + self.avg_frozen_frame_rate = attributes[:'avg_frozen_frame_rate'] + end + + if attributes.key?(:'avg_segment_duration') + self.avg_segment_duration = attributes[:'avg_segment_duration'] + end + + if attributes.key?(:'avg_total_frozen_duration') + self.avg_total_frozen_duration = attributes[:'avg_total_frozen_duration'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 @avg_frozen_frame_rate.nil? + return false if @avg_segment_duration.nil? + return false if @avg_total_frozen_duration.nil? + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_frozen_frame_rate [Object] Object to be assigned + # @!visibility private + def avg_frozen_frame_rate=(avg_frozen_frame_rate) + if avg_frozen_frame_rate.nil? + fail ArgumentError, 'invalid value for "avg_frozen_frame_rate", avg_frozen_frame_rate cannot be nil.' + end + @avg_frozen_frame_rate = avg_frozen_frame_rate + end + + # Custom attribute writer method with validation + # @param avg_segment_duration [Object] Object to be assigned + # @!visibility private + def avg_segment_duration=(avg_segment_duration) + if avg_segment_duration.nil? + fail ArgumentError, 'invalid value for "avg_segment_duration", avg_segment_duration cannot be nil.' + end + @avg_segment_duration = avg_segment_duration + end + + # Custom attribute writer method with validation + # @param avg_total_frozen_duration [Object] Object to be assigned + # @!visibility private + def avg_total_frozen_duration=(avg_total_frozen_duration) + if avg_total_frozen_duration.nil? + fail ArgumentError, 'invalid value for "avg_total_frozen_duration", avg_total_frozen_duration cannot be nil.' + end + @avg_total_frozen_duration = avg_total_frozen_duration + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + avg_frozen_frame_rate == o.avg_frozen_frame_rate && + avg_segment_duration == o.avg_segment_duration && + avg_total_frozen_duration == o.avg_total_frozen_duration && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_frozen_frame_rate, avg_segment_duration, avg_total_frozen_duration, fingerprint, impact_score, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_high_script_eval.rb b/lib/datadog_api_client/v2/models/aggregated_high_script_eval.rb new file mode 100644 index 000000000000..d9a3cceb1b95 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_high_script_eval.rb @@ -0,0 +1,307 @@ +=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 + # Aggregated high script evaluation detection grouped by source. + class AggregatedHighScriptEval + include BaseGenericModel + + # Average script evaluation duration in nanoseconds. + attr_reader :avg_duration + + # Average forced style/layout duration in nanoseconds. + attr_reader :avg_forced_style_layout + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score combining view frequency and duration severity. + attr_reader :impact_score + + # Total number of detection instances across sampled views. + attr_reader :instance_count + + # Type of invoker that triggered the script evaluation. + attr_reader :invoker_type + + # Category of the script source. + attr_accessor :source_category + + # Name of the function that triggered the high script evaluation. + attr_reader :source_function_name + + # URL of the script that triggered the high script evaluation. + attr_accessor :source_url + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_duration' => :'avg_duration', + :'avg_forced_style_layout' => :'avg_forced_style_layout', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'instance_count' => :'instance_count', + :'invoker_type' => :'invoker_type', + :'source_category' => :'source_category', + :'source_function_name' => :'source_function_name', + :'source_url' => :'source_url', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_duration' => :'Integer', + :'avg_forced_style_layout' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'instance_count' => :'Integer', + :'invoker_type' => :'String', + :'source_category' => :'String', + :'source_function_name' => :'String', + :'source_url' => :'String', + :'view_occurrences' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'source_category', + :'source_url', + ]) + 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::AggregatedHighScriptEval` 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?(:'avg_duration') + self.avg_duration = attributes[:'avg_duration'] + end + + if attributes.key?(:'avg_forced_style_layout') + self.avg_forced_style_layout = attributes[:'avg_forced_style_layout'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'instance_count') + self.instance_count = attributes[:'instance_count'] + end + + if attributes.key?(:'invoker_type') + self.invoker_type = attributes[:'invoker_type'] + end + + if attributes.key?(:'source_category') + self.source_category = attributes[:'source_category'] + end + + if attributes.key?(:'source_function_name') + self.source_function_name = attributes[:'source_function_name'] + end + + if attributes.key?(:'source_url') + self.source_url = attributes[:'source_url'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 @avg_duration.nil? + return false if @avg_forced_style_layout.nil? + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @instance_count.nil? + return false if @instance_count > 2147483647 + return false if @invoker_type.nil? + return false if @source_function_name.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_duration [Object] Object to be assigned + # @!visibility private + def avg_duration=(avg_duration) + if avg_duration.nil? + fail ArgumentError, 'invalid value for "avg_duration", avg_duration cannot be nil.' + end + @avg_duration = avg_duration + end + + # Custom attribute writer method with validation + # @param avg_forced_style_layout [Object] Object to be assigned + # @!visibility private + def avg_forced_style_layout=(avg_forced_style_layout) + if avg_forced_style_layout.nil? + fail ArgumentError, 'invalid value for "avg_forced_style_layout", avg_forced_style_layout cannot be nil.' + end + @avg_forced_style_layout = avg_forced_style_layout + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param instance_count [Object] Object to be assigned + # @!visibility private + def instance_count=(instance_count) + if instance_count.nil? + fail ArgumentError, 'invalid value for "instance_count", instance_count cannot be nil.' + end + if instance_count > 2147483647 + fail ArgumentError, 'invalid value for "instance_count", must be smaller than or equal to 2147483647.' + end + @instance_count = instance_count + end + + # Custom attribute writer method with validation + # @param invoker_type [Object] Object to be assigned + # @!visibility private + def invoker_type=(invoker_type) + if invoker_type.nil? + fail ArgumentError, 'invalid value for "invoker_type", invoker_type cannot be nil.' + end + @invoker_type = invoker_type + end + + # Custom attribute writer method with validation + # @param source_function_name [Object] Object to be assigned + # @!visibility private + def source_function_name=(source_function_name) + if source_function_name.nil? + fail ArgumentError, 'invalid value for "source_function_name", source_function_name cannot be nil.' + end + @source_function_name = source_function_name + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + avg_duration == o.avg_duration && + avg_forced_style_layout == o.avg_forced_style_layout && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + instance_count == o.instance_count && + invoker_type == o.invoker_type && + source_category == o.source_category && + source_function_name == o.source_function_name && + source_url == o.source_url && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_duration, avg_forced_style_layout, fingerprint, impact_score, instance_count, invoker_type, source_category, source_function_name, source_url, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_long_tasks_by_invoker_type.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_by_invoker_type.rb new file mode 100644 index 000000000000..768b6a44605f --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_by_invoker_type.rb @@ -0,0 +1,223 @@ +=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 + # Aggregated long task statistics for a single invoker type. + class AggregatedLongTasksByInvokerType + include BaseGenericModel + + # Number of sampled views where this invoker type had long tasks contributing to the criteria metric. + attr_reader :criteria_view_occurrences + + # Rank-product impact score combining view frequency and blocking time severity. + attr_accessor :impact_score + + # Category of the long task invoker (for example, resolve-promise, user-callback). + attr_reader :invoker_type + + # Statistical distributions of long task metrics computed per view across sampled views. + attr_reader :stats_per_view + + # Top invokers within this invoker type, sorted by impact score descending. + attr_reader :top_invokers + + # Number of sampled views where this invoker type had any long tasks. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'criteria_view_occurrences' => :'criteria_view_occurrences', + :'impact_score' => :'impact_score', + :'invoker_type' => :'invoker_type', + :'stats_per_view' => :'stats_per_view', + :'top_invokers' => :'top_invokers', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'criteria_view_occurrences' => :'Integer', + :'impact_score' => :'Float', + :'invoker_type' => :'String', + :'stats_per_view' => :'LongTaskStatsPerView', + :'top_invokers' => :'Array', + :'view_occurrences' => :'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::AggregatedLongTasksByInvokerType` 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?(:'criteria_view_occurrences') + self.criteria_view_occurrences = attributes[:'criteria_view_occurrences'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'invoker_type') + self.invoker_type = attributes[:'invoker_type'] + end + + if attributes.key?(:'stats_per_view') + self.stats_per_view = attributes[:'stats_per_view'] + end + + if attributes.key?(:'top_invokers') + if (value = attributes[:'top_invokers']).is_a?(Array) + self.top_invokers = value + end + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 !@criteria_view_occurrences.nil? && @criteria_view_occurrences > 2147483647 + return false if @invoker_type.nil? + return false if @stats_per_view.nil? + return false if @top_invokers.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param criteria_view_occurrences [Object] Object to be assigned + # @!visibility private + def criteria_view_occurrences=(criteria_view_occurrences) + if !criteria_view_occurrences.nil? && criteria_view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "criteria_view_occurrences", must be smaller than or equal to 2147483647.' + end + @criteria_view_occurrences = criteria_view_occurrences + end + + # Custom attribute writer method with validation + # @param invoker_type [Object] Object to be assigned + # @!visibility private + def invoker_type=(invoker_type) + if invoker_type.nil? + fail ArgumentError, 'invalid value for "invoker_type", invoker_type cannot be nil.' + end + @invoker_type = invoker_type + end + + # Custom attribute writer method with validation + # @param stats_per_view [Object] Object to be assigned + # @!visibility private + def stats_per_view=(stats_per_view) + if stats_per_view.nil? + fail ArgumentError, 'invalid value for "stats_per_view", stats_per_view cannot be nil.' + end + @stats_per_view = stats_per_view + end + + # Custom attribute writer method with validation + # @param top_invokers [Object] Object to be assigned + # @!visibility private + def top_invokers=(top_invokers) + if top_invokers.nil? + fail ArgumentError, 'invalid value for "top_invokers", top_invokers cannot be nil.' + end + @top_invokers = top_invokers + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + criteria_view_occurrences == o.criteria_view_occurrences && + impact_score == o.impact_score && + invoker_type == o.invoker_type && + stats_per_view == o.stats_per_view && + top_invokers == o.top_invokers && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [criteria_view_occurrences, impact_score, invoker_type, stats_per_view, top_invokers, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_long_tasks_request.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_request.rb new file mode 100644 index 000000000000..28fc316f7f81 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_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 the aggregated long tasks endpoint. + class AggregatedLongTasksRequest + include BaseGenericModel + + # Data envelope for an aggregated long tasks 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' => :'AggregatedLongTasksRequestData' + } + 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::AggregatedLongTasksRequest` 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/aggregated_long_tasks_request_attributes.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_request_attributes.rb new file mode 100644 index 000000000000..75d1ec199ccb --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_request_attributes.rb @@ -0,0 +1,235 @@ +=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 for an aggregated long tasks query. + class AggregatedLongTasksRequestAttributes + include BaseGenericModel + + # The RUM application ID to analyze. + attr_reader :application_id + + # Performance criteria to filter view instances by a metric threshold. + attr_accessor :criteria + + # RUM query string to filter events (for example, @session.type:user @geo.country:US). + attr_accessor :filter + + # Start of the time range as a Unix timestamp in seconds. + attr_reader :from + + # Number of view instances to sample, between 1 and 500. + attr_reader :sample_size + + # End of the time range as a Unix timestamp in seconds. + attr_reader :to + + # The RUM view name to analyze (for example, /account/login). + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'criteria' => :'criteria', + :'filter' => :'filter', + :'from' => :'from', + :'sample_size' => :'sample_size', + :'to' => :'to', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'criteria' => :'AggregatedWaterfallPerformanceCriteria', + :'filter' => :'String', + :'from' => :'Integer', + :'sample_size' => :'Integer', + :'to' => :'Integer', + :'view_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::AggregatedLongTasksRequestAttributes` 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?(:'criteria') + self.criteria = attributes[:'criteria'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'sample_size') + self.sample_size = attributes[:'sample_size'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @from.nil? + return false if @sample_size.nil? + return false if @sample_size > 500 + return false if @sample_size < 1 + return false if @to.nil? + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + 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 sample_size [Object] Object to be assigned + # @!visibility private + def sample_size=(sample_size) + if sample_size.nil? + fail ArgumentError, 'invalid value for "sample_size", sample_size cannot be nil.' + end + if sample_size > 500 + fail ArgumentError, 'invalid value for "sample_size", must be smaller than or equal to 500.' + end + if sample_size < 1 + fail ArgumentError, 'invalid value for "sample_size", must be greater than or equal to 1.' + end + @sample_size = sample_size + 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 + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + criteria == o.criteria && + filter == o.filter && + from == o.from && + sample_size == o.sample_size && + to == o.to && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, criteria, filter, from, sample_size, to, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_long_tasks_request_data.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_request_data.rb new file mode 100644 index 000000000000..2994e56cc1d1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_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 envelope for an aggregated long tasks request. + class AggregatedLongTasksRequestData + include BaseGenericModel + + # Attributes for an aggregated long tasks query. + attr_reader :attributes + + # The JSON:API type for aggregated long tasks requests. + 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' => :'AggregatedLongTasksRequestAttributes', + :'type' => :'AggregatedLongTasksRequestType' + } + 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::AggregatedLongTasksRequestData` 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/aggregated_long_tasks_request_type.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_request_type.rb new file mode 100644 index 000000000000..70f35fe5afc8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_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 JSON:API type for aggregated long tasks requests. + class AggregatedLongTasksRequestType + include BaseEnumModel + + AggregatedLongTasks = "aggregated_long_tasks".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_long_tasks_response.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_response.rb new file mode 100644 index 000000000000..5836d1cdbf89 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_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 body for the aggregated long tasks endpoint. + class AggregatedLongTasksResponse + include BaseGenericModel + + # Data envelope for an aggregated long tasks response. + 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' => :'AggregatedLongTasksResponseData' + } + 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::AggregatedLongTasksResponse` 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/aggregated_long_tasks_response_attributes.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_response_attributes.rb new file mode 100644 index 000000000000..c703be19c19f --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_response_attributes.rb @@ -0,0 +1,267 @@ +=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 an aggregated long tasks response. + class AggregatedLongTasksResponseAttributes + include BaseGenericModel + + # The RUM application ID that was analyzed. + attr_reader :application_id + + # Performance criteria to filter view instances by a metric threshold. + attr_accessor :criteria + + # Start of the analyzed time range as a Unix timestamp in seconds. + attr_reader :from + + # Long task statistics grouped by invoker type, sorted by impact score descending. + attr_reader :long_tasks_by_invoker_type + + # List of RUM view IDs sampled for this aggregation, capped at 50. + attr_reader :sampled_view_ids + + # End of the analyzed time range as a Unix timestamp in seconds. + attr_reader :to + + # Number of view instances included in the analysis. + attr_reader :view_count + + # The RUM view name that was analyzed. + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'criteria' => :'criteria', + :'from' => :'from', + :'long_tasks_by_invoker_type' => :'long_tasks_by_invoker_type', + :'sampled_view_ids' => :'sampled_view_ids', + :'to' => :'to', + :'view_count' => :'view_count', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'criteria' => :'AggregatedWaterfallPerformanceCriteria', + :'from' => :'Integer', + :'long_tasks_by_invoker_type' => :'Array', + :'sampled_view_ids' => :'Array', + :'to' => :'Integer', + :'view_count' => :'Integer', + :'view_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::AggregatedLongTasksResponseAttributes` 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?(:'criteria') + self.criteria = attributes[:'criteria'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'long_tasks_by_invoker_type') + if (value = attributes[:'long_tasks_by_invoker_type']).is_a?(Array) + self.long_tasks_by_invoker_type = value + end + end + + if attributes.key?(:'sampled_view_ids') + if (value = attributes[:'sampled_view_ids']).is_a?(Array) + self.sampled_view_ids = value + end + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'view_count') + self.view_count = attributes[:'view_count'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @from.nil? + return false if @long_tasks_by_invoker_type.nil? + return false if @sampled_view_ids.nil? + return false if @to.nil? + return false if @view_count.nil? + return false if @view_count > 2147483647 + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + 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 long_tasks_by_invoker_type [Object] Object to be assigned + # @!visibility private + def long_tasks_by_invoker_type=(long_tasks_by_invoker_type) + if long_tasks_by_invoker_type.nil? + fail ArgumentError, 'invalid value for "long_tasks_by_invoker_type", long_tasks_by_invoker_type cannot be nil.' + end + @long_tasks_by_invoker_type = long_tasks_by_invoker_type + end + + # Custom attribute writer method with validation + # @param sampled_view_ids [Object] Object to be assigned + # @!visibility private + def sampled_view_ids=(sampled_view_ids) + if sampled_view_ids.nil? + fail ArgumentError, 'invalid value for "sampled_view_ids", sampled_view_ids cannot be nil.' + end + @sampled_view_ids = sampled_view_ids + 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 + + # Custom attribute writer method with validation + # @param view_count [Object] Object to be assigned + # @!visibility private + def view_count=(view_count) + if view_count.nil? + fail ArgumentError, 'invalid value for "view_count", view_count cannot be nil.' + end + if view_count > 2147483647 + fail ArgumentError, 'invalid value for "view_count", must be smaller than or equal to 2147483647.' + end + @view_count = view_count + end + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + criteria == o.criteria && + from == o.from && + long_tasks_by_invoker_type == o.long_tasks_by_invoker_type && + sampled_view_ids == o.sampled_view_ids && + to == o.to && + view_count == o.view_count && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, criteria, from, long_tasks_by_invoker_type, sampled_view_ids, to, view_count, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_long_tasks_response_data.rb b/lib/datadog_api_client/v2/models/aggregated_long_tasks_response_data.rb new file mode 100644 index 000000000000..4b6e52d31ae1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_long_tasks_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 + # Data envelope for an aggregated long tasks response. + class AggregatedLongTasksResponseData + include BaseGenericModel + + # Attributes of an aggregated long tasks response. + attr_reader :attributes + + # Hash-based unique identifier for this aggregation. + attr_reader :id + + # The JSON:API type for aggregated long tasks requests. + 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' => :'AggregatedLongTasksResponseAttributes', + :'id' => :'String', + :'type' => :'AggregatedLongTasksRequestType' + } + 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::AggregatedLongTasksResponseData` 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/aggregated_low_cache_hit_rate.rb b/lib/datadog_api_client/v2/models/aggregated_low_cache_hit_rate.rb new file mode 100644 index 000000000000..9d9bddd1cd22 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_low_cache_hit_rate.rb @@ -0,0 +1,211 @@ +=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 + # Aggregated low cache hit rate detection at view level. + class AggregatedLowCacheHitRate + include BaseGenericModel + + # Average cache hit rate across affected views. + attr_reader :avg_cache_hit_rate + + # Average total download size of uncached resources in bytes. + attr_reader :avg_resource_download_size_bytes + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score for this detection. + attr_reader :impact_score + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_cache_hit_rate' => :'avg_cache_hit_rate', + :'avg_resource_download_size_bytes' => :'avg_resource_download_size_bytes', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_cache_hit_rate' => :'Float', + :'avg_resource_download_size_bytes' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'view_occurrences' => :'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::AggregatedLowCacheHitRate` 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?(:'avg_cache_hit_rate') + self.avg_cache_hit_rate = attributes[:'avg_cache_hit_rate'] + end + + if attributes.key?(:'avg_resource_download_size_bytes') + self.avg_resource_download_size_bytes = attributes[:'avg_resource_download_size_bytes'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 @avg_cache_hit_rate.nil? + return false if @avg_resource_download_size_bytes.nil? + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_cache_hit_rate [Object] Object to be assigned + # @!visibility private + def avg_cache_hit_rate=(avg_cache_hit_rate) + if avg_cache_hit_rate.nil? + fail ArgumentError, 'invalid value for "avg_cache_hit_rate", avg_cache_hit_rate cannot be nil.' + end + @avg_cache_hit_rate = avg_cache_hit_rate + end + + # Custom attribute writer method with validation + # @param avg_resource_download_size_bytes [Object] Object to be assigned + # @!visibility private + def avg_resource_download_size_bytes=(avg_resource_download_size_bytes) + if avg_resource_download_size_bytes.nil? + fail ArgumentError, 'invalid value for "avg_resource_download_size_bytes", avg_resource_download_size_bytes cannot be nil.' + end + @avg_resource_download_size_bytes = avg_resource_download_size_bytes + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + avg_cache_hit_rate == o.avg_cache_hit_rate && + avg_resource_download_size_bytes == o.avg_resource_download_size_bytes && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_cache_hit_rate, avg_resource_download_size_bytes, fingerprint, impact_score, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_mobile_scroll_friction.rb b/lib/datadog_api_client/v2/models/aggregated_mobile_scroll_friction.rb new file mode 100644 index 000000000000..31b9c69848b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_mobile_scroll_friction.rb @@ -0,0 +1,194 @@ +=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 + # Aggregated mobile scroll friction detection at view level. + class AggregatedMobileScrollFriction + include BaseGenericModel + + # Average number of frozen frames during scroll interactions. + attr_reader :avg_scroll_frozen_frame_count + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score for this detection. + attr_reader :impact_score + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_scroll_frozen_frame_count' => :'avg_scroll_frozen_frame_count', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_scroll_frozen_frame_count' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'view_occurrences' => :'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::AggregatedMobileScrollFriction` 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?(:'avg_scroll_frozen_frame_count') + self.avg_scroll_frozen_frame_count = attributes[:'avg_scroll_frozen_frame_count'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 @avg_scroll_frozen_frame_count.nil? + return false if @avg_scroll_frozen_frame_count > 2147483647 + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_scroll_frozen_frame_count [Object] Object to be assigned + # @!visibility private + def avg_scroll_frozen_frame_count=(avg_scroll_frozen_frame_count) + if avg_scroll_frozen_frame_count.nil? + fail ArgumentError, 'invalid value for "avg_scroll_frozen_frame_count", avg_scroll_frozen_frame_count cannot be nil.' + end + if avg_scroll_frozen_frame_count > 2147483647 + fail ArgumentError, 'invalid value for "avg_scroll_frozen_frame_count", must be smaller than or equal to 2147483647.' + end + @avg_scroll_frozen_frame_count = avg_scroll_frozen_frame_count + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + avg_scroll_frozen_frame_count == o.avg_scroll_frozen_frame_count && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_scroll_frozen_frame_count, fingerprint, impact_score, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_resource.rb b/lib/datadog_api_client/v2/models/aggregated_resource.rb new file mode 100644 index 000000000000..2543e45318c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_resource.rb @@ -0,0 +1,503 @@ +=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 + # Aggregated performance statistics for a single network resource across sampled view instances. + class AggregatedResource + include BaseGenericModel + + # Average total duration in milliseconds. + attr_reader :avg_duration_ms + + # Average start time relative to view start in milliseconds. + attr_reader :avg_start_time_ms + + # Cache hit rate as a percentage. + attr_reader :cache_hit_rate_pct + + # Number of requests served from cache. + attr_reader :cached_count + + # Number of requests downloaded from the network. + attr_reader :downloaded_count + + # 75th percentile duration across all view names in the application, present when include_global_appearance is true. + attr_accessor :global_p75_duration_ms + + # Number of distinct view names in the application that load this resource, present when include_global_appearance is true. + attr_reader :global_view_name_count + + # Percentage of distinct view names in the application that load this resource, present when include_global_appearance is true. + attr_accessor :global_view_name_pct + + # HTTP method for the resource request. + attr_accessor :http_method + + # Percentage of sampled view instances that loaded this resource. + attr_reader :load_frequency_pct + + # Maximum duration in milliseconds. + attr_reader :max_duration_ms + + # Median duration in milliseconds. + attr_reader :median_duration_ms + + # Minimum duration in milliseconds. + attr_reader :min_duration_ms + + # 75th percentile duration in milliseconds. + attr_reader :p75_duration_ms + + # 95th percentile duration in milliseconds. + attr_reader :p95_duration_ms + + # Resource type (JS, CSS, image, fetch, XHR, document, and so on). + attr_accessor :resource_type + + # URL path group used to aggregate similar resources. + attr_reader :resource_url_path_group + + # Average timing breakdown per network phase for a resource. + attr_reader :timing_breakdown + + # Total number of requests for this resource across all sampled views. + attr_reader :total_requests + + # Number of sampled view instances that loaded this resource. + attr_reader :views_with_resource + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_duration_ms' => :'avg_duration_ms', + :'avg_start_time_ms' => :'avg_start_time_ms', + :'cache_hit_rate_pct' => :'cache_hit_rate_pct', + :'cached_count' => :'cached_count', + :'downloaded_count' => :'downloaded_count', + :'global_p75_duration_ms' => :'global_p75_duration_ms', + :'global_view_name_count' => :'global_view_name_count', + :'global_view_name_pct' => :'global_view_name_pct', + :'http_method' => :'http_method', + :'load_frequency_pct' => :'load_frequency_pct', + :'max_duration_ms' => :'max_duration_ms', + :'median_duration_ms' => :'median_duration_ms', + :'min_duration_ms' => :'min_duration_ms', + :'p75_duration_ms' => :'p75_duration_ms', + :'p95_duration_ms' => :'p95_duration_ms', + :'resource_type' => :'resource_type', + :'resource_url_path_group' => :'resource_url_path_group', + :'timing_breakdown' => :'timing_breakdown', + :'total_requests' => :'total_requests', + :'views_with_resource' => :'views_with_resource' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_duration_ms' => :'Float', + :'avg_start_time_ms' => :'Float', + :'cache_hit_rate_pct' => :'Float', + :'cached_count' => :'Integer', + :'downloaded_count' => :'Integer', + :'global_p75_duration_ms' => :'Float', + :'global_view_name_count' => :'Integer', + :'global_view_name_pct' => :'Float', + :'http_method' => :'String', + :'load_frequency_pct' => :'Float', + :'max_duration_ms' => :'Float', + :'median_duration_ms' => :'Float', + :'min_duration_ms' => :'Float', + :'p75_duration_ms' => :'Float', + :'p95_duration_ms' => :'Float', + :'resource_type' => :'String', + :'resource_url_path_group' => :'String', + :'timing_breakdown' => :'AggregatedResourceTimingBreakdown', + :'total_requests' => :'Integer', + :'views_with_resource' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'http_method', + :'resource_type', + ]) + 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::AggregatedResource` 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?(:'avg_duration_ms') + self.avg_duration_ms = attributes[:'avg_duration_ms'] + end + + if attributes.key?(:'avg_start_time_ms') + self.avg_start_time_ms = attributes[:'avg_start_time_ms'] + end + + if attributes.key?(:'cache_hit_rate_pct') + self.cache_hit_rate_pct = attributes[:'cache_hit_rate_pct'] + end + + if attributes.key?(:'cached_count') + self.cached_count = attributes[:'cached_count'] + end + + if attributes.key?(:'downloaded_count') + self.downloaded_count = attributes[:'downloaded_count'] + end + + if attributes.key?(:'global_p75_duration_ms') + self.global_p75_duration_ms = attributes[:'global_p75_duration_ms'] + end + + if attributes.key?(:'global_view_name_count') + self.global_view_name_count = attributes[:'global_view_name_count'] + end + + if attributes.key?(:'global_view_name_pct') + self.global_view_name_pct = attributes[:'global_view_name_pct'] + end + + if attributes.key?(:'http_method') + self.http_method = attributes[:'http_method'] + end + + if attributes.key?(:'load_frequency_pct') + self.load_frequency_pct = attributes[:'load_frequency_pct'] + end + + if attributes.key?(:'max_duration_ms') + self.max_duration_ms = attributes[:'max_duration_ms'] + end + + if attributes.key?(:'median_duration_ms') + self.median_duration_ms = attributes[:'median_duration_ms'] + end + + if attributes.key?(:'min_duration_ms') + self.min_duration_ms = attributes[:'min_duration_ms'] + end + + if attributes.key?(:'p75_duration_ms') + self.p75_duration_ms = attributes[:'p75_duration_ms'] + end + + if attributes.key?(:'p95_duration_ms') + self.p95_duration_ms = attributes[:'p95_duration_ms'] + end + + if attributes.key?(:'resource_type') + self.resource_type = attributes[:'resource_type'] + end + + if attributes.key?(:'resource_url_path_group') + self.resource_url_path_group = attributes[:'resource_url_path_group'] + end + + if attributes.key?(:'timing_breakdown') + self.timing_breakdown = attributes[:'timing_breakdown'] + end + + if attributes.key?(:'total_requests') + self.total_requests = attributes[:'total_requests'] + end + + if attributes.key?(:'views_with_resource') + self.views_with_resource = attributes[:'views_with_resource'] + 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 @avg_duration_ms.nil? + return false if @avg_start_time_ms.nil? + return false if @cache_hit_rate_pct.nil? + return false if @cached_count.nil? + return false if @cached_count > 2147483647 + return false if @downloaded_count.nil? + return false if @downloaded_count > 2147483647 + return false if !@global_view_name_count.nil? && @global_view_name_count > 2147483647 + return false if @load_frequency_pct.nil? + return false if @max_duration_ms.nil? + return false if @median_duration_ms.nil? + return false if @min_duration_ms.nil? + return false if @p75_duration_ms.nil? + return false if @p95_duration_ms.nil? + return false if @resource_url_path_group.nil? + return false if @timing_breakdown.nil? + return false if @total_requests.nil? + return false if @total_requests > 2147483647 + return false if @views_with_resource.nil? + return false if @views_with_resource > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_duration_ms [Object] Object to be assigned + # @!visibility private + def avg_duration_ms=(avg_duration_ms) + if avg_duration_ms.nil? + fail ArgumentError, 'invalid value for "avg_duration_ms", avg_duration_ms cannot be nil.' + end + @avg_duration_ms = avg_duration_ms + end + + # Custom attribute writer method with validation + # @param avg_start_time_ms [Object] Object to be assigned + # @!visibility private + def avg_start_time_ms=(avg_start_time_ms) + if avg_start_time_ms.nil? + fail ArgumentError, 'invalid value for "avg_start_time_ms", avg_start_time_ms cannot be nil.' + end + @avg_start_time_ms = avg_start_time_ms + end + + # Custom attribute writer method with validation + # @param cache_hit_rate_pct [Object] Object to be assigned + # @!visibility private + def cache_hit_rate_pct=(cache_hit_rate_pct) + if cache_hit_rate_pct.nil? + fail ArgumentError, 'invalid value for "cache_hit_rate_pct", cache_hit_rate_pct cannot be nil.' + end + @cache_hit_rate_pct = cache_hit_rate_pct + end + + # Custom attribute writer method with validation + # @param cached_count [Object] Object to be assigned + # @!visibility private + def cached_count=(cached_count) + if cached_count.nil? + fail ArgumentError, 'invalid value for "cached_count", cached_count cannot be nil.' + end + if cached_count > 2147483647 + fail ArgumentError, 'invalid value for "cached_count", must be smaller than or equal to 2147483647.' + end + @cached_count = cached_count + end + + # Custom attribute writer method with validation + # @param downloaded_count [Object] Object to be assigned + # @!visibility private + def downloaded_count=(downloaded_count) + if downloaded_count.nil? + fail ArgumentError, 'invalid value for "downloaded_count", downloaded_count cannot be nil.' + end + if downloaded_count > 2147483647 + fail ArgumentError, 'invalid value for "downloaded_count", must be smaller than or equal to 2147483647.' + end + @downloaded_count = downloaded_count + end + + # Custom attribute writer method with validation + # @param global_view_name_count [Object] Object to be assigned + # @!visibility private + def global_view_name_count=(global_view_name_count) + if !global_view_name_count.nil? && global_view_name_count > 2147483647 + fail ArgumentError, 'invalid value for "global_view_name_count", must be smaller than or equal to 2147483647.' + end + @global_view_name_count = global_view_name_count + end + + # Custom attribute writer method with validation + # @param load_frequency_pct [Object] Object to be assigned + # @!visibility private + def load_frequency_pct=(load_frequency_pct) + if load_frequency_pct.nil? + fail ArgumentError, 'invalid value for "load_frequency_pct", load_frequency_pct cannot be nil.' + end + @load_frequency_pct = load_frequency_pct + end + + # Custom attribute writer method with validation + # @param max_duration_ms [Object] Object to be assigned + # @!visibility private + def max_duration_ms=(max_duration_ms) + if max_duration_ms.nil? + fail ArgumentError, 'invalid value for "max_duration_ms", max_duration_ms cannot be nil.' + end + @max_duration_ms = max_duration_ms + end + + # Custom attribute writer method with validation + # @param median_duration_ms [Object] Object to be assigned + # @!visibility private + def median_duration_ms=(median_duration_ms) + if median_duration_ms.nil? + fail ArgumentError, 'invalid value for "median_duration_ms", median_duration_ms cannot be nil.' + end + @median_duration_ms = median_duration_ms + end + + # Custom attribute writer method with validation + # @param min_duration_ms [Object] Object to be assigned + # @!visibility private + def min_duration_ms=(min_duration_ms) + if min_duration_ms.nil? + fail ArgumentError, 'invalid value for "min_duration_ms", min_duration_ms cannot be nil.' + end + @min_duration_ms = min_duration_ms + end + + # Custom attribute writer method with validation + # @param p75_duration_ms [Object] Object to be assigned + # @!visibility private + def p75_duration_ms=(p75_duration_ms) + if p75_duration_ms.nil? + fail ArgumentError, 'invalid value for "p75_duration_ms", p75_duration_ms cannot be nil.' + end + @p75_duration_ms = p75_duration_ms + end + + # Custom attribute writer method with validation + # @param p95_duration_ms [Object] Object to be assigned + # @!visibility private + def p95_duration_ms=(p95_duration_ms) + if p95_duration_ms.nil? + fail ArgumentError, 'invalid value for "p95_duration_ms", p95_duration_ms cannot be nil.' + end + @p95_duration_ms = p95_duration_ms + end + + # Custom attribute writer method with validation + # @param resource_url_path_group [Object] Object to be assigned + # @!visibility private + def resource_url_path_group=(resource_url_path_group) + if resource_url_path_group.nil? + fail ArgumentError, 'invalid value for "resource_url_path_group", resource_url_path_group cannot be nil.' + end + @resource_url_path_group = resource_url_path_group + end + + # Custom attribute writer method with validation + # @param timing_breakdown [Object] Object to be assigned + # @!visibility private + def timing_breakdown=(timing_breakdown) + if timing_breakdown.nil? + fail ArgumentError, 'invalid value for "timing_breakdown", timing_breakdown cannot be nil.' + end + @timing_breakdown = timing_breakdown + end + + # Custom attribute writer method with validation + # @param total_requests [Object] Object to be assigned + # @!visibility private + def total_requests=(total_requests) + if total_requests.nil? + fail ArgumentError, 'invalid value for "total_requests", total_requests cannot be nil.' + end + if total_requests > 2147483647 + fail ArgumentError, 'invalid value for "total_requests", must be smaller than or equal to 2147483647.' + end + @total_requests = total_requests + end + + # Custom attribute writer method with validation + # @param views_with_resource [Object] Object to be assigned + # @!visibility private + def views_with_resource=(views_with_resource) + if views_with_resource.nil? + fail ArgumentError, 'invalid value for "views_with_resource", views_with_resource cannot be nil.' + end + if views_with_resource > 2147483647 + fail ArgumentError, 'invalid value for "views_with_resource", must be smaller than or equal to 2147483647.' + end + @views_with_resource = views_with_resource + 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 && + avg_duration_ms == o.avg_duration_ms && + avg_start_time_ms == o.avg_start_time_ms && + cache_hit_rate_pct == o.cache_hit_rate_pct && + cached_count == o.cached_count && + downloaded_count == o.downloaded_count && + global_p75_duration_ms == o.global_p75_duration_ms && + global_view_name_count == o.global_view_name_count && + global_view_name_pct == o.global_view_name_pct && + http_method == o.http_method && + load_frequency_pct == o.load_frequency_pct && + max_duration_ms == o.max_duration_ms && + median_duration_ms == o.median_duration_ms && + min_duration_ms == o.min_duration_ms && + p75_duration_ms == o.p75_duration_ms && + p95_duration_ms == o.p95_duration_ms && + resource_type == o.resource_type && + resource_url_path_group == o.resource_url_path_group && + timing_breakdown == o.timing_breakdown && + total_requests == o.total_requests && + views_with_resource == o.views_with_resource && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_duration_ms, avg_start_time_ms, cache_hit_rate_pct, cached_count, downloaded_count, global_p75_duration_ms, global_view_name_count, global_view_name_pct, http_method, load_frequency_pct, max_duration_ms, median_duration_ms, min_duration_ms, p75_duration_ms, p95_duration_ms, resource_type, resource_url_path_group, timing_breakdown, total_requests, views_with_resource, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_resource_timing_breakdown.rb b/lib/datadog_api_client/v2/models/aggregated_resource_timing_breakdown.rb new file mode 100644 index 000000000000..de0872d4a399 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_resource_timing_breakdown.rb @@ -0,0 +1,228 @@ +=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 + # Average timing breakdown per network phase for a resource. + class AggregatedResourceTimingBreakdown + include BaseGenericModel + + # Average TCP connect duration in milliseconds. + attr_reader :avg_connect_ms + + # Average DNS resolution duration in milliseconds. + attr_reader :avg_dns_ms + + # Average download phase duration in milliseconds. + attr_reader :avg_download_ms + + # Average time to first byte in milliseconds. + attr_reader :avg_first_byte_ms + + # Average redirect phase duration in milliseconds. + attr_reader :avg_redirect_ms + + # Average SSL handshake duration in milliseconds. + attr_reader :avg_ssl_ms + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_connect_ms' => :'avg_connect_ms', + :'avg_dns_ms' => :'avg_dns_ms', + :'avg_download_ms' => :'avg_download_ms', + :'avg_first_byte_ms' => :'avg_first_byte_ms', + :'avg_redirect_ms' => :'avg_redirect_ms', + :'avg_ssl_ms' => :'avg_ssl_ms' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_connect_ms' => :'Float', + :'avg_dns_ms' => :'Float', + :'avg_download_ms' => :'Float', + :'avg_first_byte_ms' => :'Float', + :'avg_redirect_ms' => :'Float', + :'avg_ssl_ms' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AggregatedResourceTimingBreakdown` 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?(:'avg_connect_ms') + self.avg_connect_ms = attributes[:'avg_connect_ms'] + end + + if attributes.key?(:'avg_dns_ms') + self.avg_dns_ms = attributes[:'avg_dns_ms'] + end + + if attributes.key?(:'avg_download_ms') + self.avg_download_ms = attributes[:'avg_download_ms'] + end + + if attributes.key?(:'avg_first_byte_ms') + self.avg_first_byte_ms = attributes[:'avg_first_byte_ms'] + end + + if attributes.key?(:'avg_redirect_ms') + self.avg_redirect_ms = attributes[:'avg_redirect_ms'] + end + + if attributes.key?(:'avg_ssl_ms') + self.avg_ssl_ms = attributes[:'avg_ssl_ms'] + 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 @avg_connect_ms.nil? + return false if @avg_dns_ms.nil? + return false if @avg_download_ms.nil? + return false if @avg_first_byte_ms.nil? + return false if @avg_redirect_ms.nil? + return false if @avg_ssl_ms.nil? + true + end + + # Custom attribute writer method with validation + # @param avg_connect_ms [Object] Object to be assigned + # @!visibility private + def avg_connect_ms=(avg_connect_ms) + if avg_connect_ms.nil? + fail ArgumentError, 'invalid value for "avg_connect_ms", avg_connect_ms cannot be nil.' + end + @avg_connect_ms = avg_connect_ms + end + + # Custom attribute writer method with validation + # @param avg_dns_ms [Object] Object to be assigned + # @!visibility private + def avg_dns_ms=(avg_dns_ms) + if avg_dns_ms.nil? + fail ArgumentError, 'invalid value for "avg_dns_ms", avg_dns_ms cannot be nil.' + end + @avg_dns_ms = avg_dns_ms + end + + # Custom attribute writer method with validation + # @param avg_download_ms [Object] Object to be assigned + # @!visibility private + def avg_download_ms=(avg_download_ms) + if avg_download_ms.nil? + fail ArgumentError, 'invalid value for "avg_download_ms", avg_download_ms cannot be nil.' + end + @avg_download_ms = avg_download_ms + end + + # Custom attribute writer method with validation + # @param avg_first_byte_ms [Object] Object to be assigned + # @!visibility private + def avg_first_byte_ms=(avg_first_byte_ms) + if avg_first_byte_ms.nil? + fail ArgumentError, 'invalid value for "avg_first_byte_ms", avg_first_byte_ms cannot be nil.' + end + @avg_first_byte_ms = avg_first_byte_ms + end + + # Custom attribute writer method with validation + # @param avg_redirect_ms [Object] Object to be assigned + # @!visibility private + def avg_redirect_ms=(avg_redirect_ms) + if avg_redirect_ms.nil? + fail ArgumentError, 'invalid value for "avg_redirect_ms", avg_redirect_ms cannot be nil.' + end + @avg_redirect_ms = avg_redirect_ms + end + + # Custom attribute writer method with validation + # @param avg_ssl_ms [Object] Object to be assigned + # @!visibility private + def avg_ssl_ms=(avg_ssl_ms) + if avg_ssl_ms.nil? + fail ArgumentError, 'invalid value for "avg_ssl_ms", avg_ssl_ms cannot be nil.' + end + @avg_ssl_ms = avg_ssl_ms + 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 && + avg_connect_ms == o.avg_connect_ms && + avg_dns_ms == o.avg_dns_ms && + avg_download_ms == o.avg_download_ms && + avg_first_byte_ms == o.avg_first_byte_ms && + avg_redirect_ms == o.avg_redirect_ms && + avg_ssl_ms == o.avg_ssl_ms && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_connect_ms, avg_dns_ms, avg_download_ms, avg_first_byte_ms, avg_redirect_ms, avg_ssl_ms, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_signals_problems_request.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_request.rb new file mode 100644 index 000000000000..073e46ba9555 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_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 the aggregated signals and problems endpoint. + class AggregatedSignalsProblemsRequest + include BaseGenericModel + + # Data envelope for an aggregated signals and problems 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' => :'AggregatedSignalsProblemsRequestData' + } + 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::AggregatedSignalsProblemsRequest` 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/aggregated_signals_problems_request_attributes.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_request_attributes.rb new file mode 100644 index 000000000000..60122d518c8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_request_attributes.rb @@ -0,0 +1,247 @@ +=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 for an aggregated signals and problems query. + class AggregatedSignalsProblemsRequestAttributes + include BaseGenericModel + + # The RUM application ID to analyze. + attr_reader :application_id + + # Performance criteria to filter view instances by a metric threshold. + attr_accessor :criteria + + # List of detection types to include in the response. When omitted, all types are returned. + attr_accessor :detection_types + + # RUM query string to filter events (for example, @session.type:user @geo.country:US). + attr_accessor :filter + + # Start of the time range as a Unix timestamp in seconds. + attr_reader :from + + # Number of view instances to sample, between 1 and 50. + attr_reader :sample_size + + # End of the time range as a Unix timestamp in seconds. + attr_reader :to + + # The RUM view name to analyze (for example, /account/login). + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'criteria' => :'criteria', + :'detection_types' => :'detection_types', + :'filter' => :'filter', + :'from' => :'from', + :'sample_size' => :'sample_size', + :'to' => :'to', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'criteria' => :'AggregatedWaterfallPerformanceCriteria', + :'detection_types' => :'Array', + :'filter' => :'String', + :'from' => :'Integer', + :'sample_size' => :'Integer', + :'to' => :'Integer', + :'view_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::AggregatedSignalsProblemsRequestAttributes` 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?(:'criteria') + self.criteria = attributes[:'criteria'] + end + + if attributes.key?(:'detection_types') + if (value = attributes[:'detection_types']).is_a?(Array) + self.detection_types = value + end + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'sample_size') + self.sample_size = attributes[:'sample_size'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @from.nil? + return false if @sample_size.nil? + return false if @sample_size > 50 + return false if @sample_size < 1 + return false if @to.nil? + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + 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 sample_size [Object] Object to be assigned + # @!visibility private + def sample_size=(sample_size) + if sample_size.nil? + fail ArgumentError, 'invalid value for "sample_size", sample_size cannot be nil.' + end + if sample_size > 50 + fail ArgumentError, 'invalid value for "sample_size", must be smaller than or equal to 50.' + end + if sample_size < 1 + fail ArgumentError, 'invalid value for "sample_size", must be greater than or equal to 1.' + end + @sample_size = sample_size + 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 + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + criteria == o.criteria && + detection_types == o.detection_types && + filter == o.filter && + from == o.from && + sample_size == o.sample_size && + to == o.to && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, criteria, detection_types, filter, from, sample_size, to, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_signals_problems_request_data.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_request_data.rb new file mode 100644 index 000000000000..e40dd2c97391 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_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 envelope for an aggregated signals and problems request. + class AggregatedSignalsProblemsRequestData + include BaseGenericModel + + # Attributes for an aggregated signals and problems query. + attr_reader :attributes + + # The JSON:API type for aggregated signals and problems requests. + 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' => :'AggregatedSignalsProblemsRequestAttributes', + :'type' => :'AggregatedSignalsProblemsRequestType' + } + 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::AggregatedSignalsProblemsRequestData` 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/aggregated_signals_problems_request_type.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_request_type.rb new file mode 100644 index 000000000000..0bf7937b231a --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_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 JSON:API type for aggregated signals and problems requests. + class AggregatedSignalsProblemsRequestType + include BaseEnumModel + + AggregatedSignalsProblems = "aggregated_signals_problems".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_signals_problems_response.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_response.rb new file mode 100644 index 000000000000..2239471969a5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_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 body for the aggregated signals and problems endpoint. + class AggregatedSignalsProblemsResponse + include BaseGenericModel + + # Data envelope for an aggregated signals and problems response. + 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' => :'AggregatedSignalsProblemsResponseData' + } + 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::AggregatedSignalsProblemsResponse` 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/aggregated_signals_problems_response_attributes.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_response_attributes.rb new file mode 100644 index 000000000000..c5b8f5a10346 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_response_attributes.rb @@ -0,0 +1,238 @@ +=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 an aggregated signals and problems response. + class AggregatedSignalsProblemsResponseAttributes + include BaseGenericModel + + # The RUM application ID that was analyzed. + attr_reader :application_id + + # Performance criteria to filter view instances by a metric threshold. + attr_accessor :criteria + + # Start of the analyzed time range as a Unix timestamp in seconds. + attr_reader :from + + # Grouped detection results by detection type. + attr_reader :problem_detections + + # Metadata about the sampling quality for a signals and problems query. + attr_reader :sample_metadata + + # End of the analyzed time range as a Unix timestamp in seconds. + attr_reader :to + + # The RUM view name that was analyzed. + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'criteria' => :'criteria', + :'from' => :'from', + :'problem_detections' => :'problem_detections', + :'sample_metadata' => :'sample_metadata', + :'to' => :'to', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'criteria' => :'AggregatedWaterfallPerformanceCriteria', + :'from' => :'Integer', + :'problem_detections' => :'SignalsProblemsDetections', + :'sample_metadata' => :'SignalsProblemsSampleMetadata', + :'to' => :'Integer', + :'view_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::AggregatedSignalsProblemsResponseAttributes` 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?(:'criteria') + self.criteria = attributes[:'criteria'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'problem_detections') + self.problem_detections = attributes[:'problem_detections'] + end + + if attributes.key?(:'sample_metadata') + self.sample_metadata = attributes[:'sample_metadata'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @from.nil? + return false if @problem_detections.nil? + return false if @sample_metadata.nil? + return false if @to.nil? + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + 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 problem_detections [Object] Object to be assigned + # @!visibility private + def problem_detections=(problem_detections) + if problem_detections.nil? + fail ArgumentError, 'invalid value for "problem_detections", problem_detections cannot be nil.' + end + @problem_detections = problem_detections + end + + # Custom attribute writer method with validation + # @param sample_metadata [Object] Object to be assigned + # @!visibility private + def sample_metadata=(sample_metadata) + if sample_metadata.nil? + fail ArgumentError, 'invalid value for "sample_metadata", sample_metadata cannot be nil.' + end + @sample_metadata = sample_metadata + 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 + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + criteria == o.criteria && + from == o.from && + problem_detections == o.problem_detections && + sample_metadata == o.sample_metadata && + to == o.to && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, criteria, from, problem_detections, sample_metadata, to, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_signals_problems_response_data.rb b/lib/datadog_api_client/v2/models/aggregated_signals_problems_response_data.rb new file mode 100644 index 000000000000..4c1ae8e8c8ee --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_signals_problems_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 + # Data envelope for an aggregated signals and problems response. + class AggregatedSignalsProblemsResponseData + include BaseGenericModel + + # Attributes of an aggregated signals and problems response. + attr_reader :attributes + + # Hash-based unique identifier for this aggregation. + attr_reader :id + + # The JSON:API type for aggregated signals and problems requests. + 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' => :'AggregatedSignalsProblemsResponseAttributes', + :'id' => :'String', + :'type' => :'AggregatedSignalsProblemsRequestType' + } + 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::AggregatedSignalsProblemsResponseData` 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/aggregated_slow_fcp_high_bytes.rb b/lib/datadog_api_client/v2/models/aggregated_slow_fcp_high_bytes.rb new file mode 100644 index 000000000000..8dba0c7c7bbe --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_slow_fcp_high_bytes.rb @@ -0,0 +1,253 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Aggregated slow first contentful paint with high byte count detection. + class AggregatedSlowFCPHighBytes + include BaseGenericModel + + # Average total bytes loaded before first contentful paint. + attr_reader :avg_bytes_before_fcp_bytes + + # Average first contentful paint time in milliseconds. + attr_reader :avg_first_contentful_paint_ms + + # Average number of resources loaded before first contentful paint. + attr_reader :avg_resource_count_before_fcp + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score for this detection. + attr_reader :impact_score + + # Platform identifier for the affected views. + attr_reader :platform + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_bytes_before_fcp_bytes' => :'avg_bytes_before_fcp_bytes', + :'avg_first_contentful_paint_ms' => :'avg_first_contentful_paint_ms', + :'avg_resource_count_before_fcp' => :'avg_resource_count_before_fcp', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'platform' => :'platform', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_bytes_before_fcp_bytes' => :'Integer', + :'avg_first_contentful_paint_ms' => :'Integer', + :'avg_resource_count_before_fcp' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'platform' => :'String', + :'view_occurrences' => :'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::AggregatedSlowFCPHighBytes` 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?(:'avg_bytes_before_fcp_bytes') + self.avg_bytes_before_fcp_bytes = attributes[:'avg_bytes_before_fcp_bytes'] + end + + if attributes.key?(:'avg_first_contentful_paint_ms') + self.avg_first_contentful_paint_ms = attributes[:'avg_first_contentful_paint_ms'] + end + + if attributes.key?(:'avg_resource_count_before_fcp') + self.avg_resource_count_before_fcp = attributes[:'avg_resource_count_before_fcp'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'platform') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 @avg_bytes_before_fcp_bytes.nil? + return false if @avg_first_contentful_paint_ms.nil? + return false if @avg_resource_count_before_fcp.nil? + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @platform.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_bytes_before_fcp_bytes [Object] Object to be assigned + # @!visibility private + def avg_bytes_before_fcp_bytes=(avg_bytes_before_fcp_bytes) + if avg_bytes_before_fcp_bytes.nil? + fail ArgumentError, 'invalid value for "avg_bytes_before_fcp_bytes", avg_bytes_before_fcp_bytes cannot be nil.' + end + @avg_bytes_before_fcp_bytes = avg_bytes_before_fcp_bytes + end + + # Custom attribute writer method with validation + # @param avg_first_contentful_paint_ms [Object] Object to be assigned + # @!visibility private + def avg_first_contentful_paint_ms=(avg_first_contentful_paint_ms) + if avg_first_contentful_paint_ms.nil? + fail ArgumentError, 'invalid value for "avg_first_contentful_paint_ms", avg_first_contentful_paint_ms cannot be nil.' + end + @avg_first_contentful_paint_ms = avg_first_contentful_paint_ms + end + + # Custom attribute writer method with validation + # @param avg_resource_count_before_fcp [Object] Object to be assigned + # @!visibility private + def avg_resource_count_before_fcp=(avg_resource_count_before_fcp) + if avg_resource_count_before_fcp.nil? + fail ArgumentError, 'invalid value for "avg_resource_count_before_fcp", avg_resource_count_before_fcp cannot be nil.' + end + @avg_resource_count_before_fcp = avg_resource_count_before_fcp + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param platform [Object] Object to be assigned + # @!visibility private + def platform=(platform) + if platform.nil? + fail ArgumentError, 'invalid value for "platform", platform cannot be nil.' + end + @platform = platform + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + avg_bytes_before_fcp_bytes == o.avg_bytes_before_fcp_bytes && + avg_first_contentful_paint_ms == o.avg_first_contentful_paint_ms && + avg_resource_count_before_fcp == o.avg_resource_count_before_fcp && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + platform == o.platform && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_bytes_before_fcp_bytes, avg_first_contentful_paint_ms, avg_resource_count_before_fcp, fingerprint, impact_score, platform, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_slow_interaction_long_task.rb b/lib/datadog_api_client/v2/models/aggregated_slow_interaction_long_task.rb new file mode 100644 index 000000000000..354a05fcfa21 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_slow_interaction_long_task.rb @@ -0,0 +1,286 @@ +=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 + # Aggregated slow interaction with long task detection grouped by action and selector. + class AggregatedSlowInteractionLongTask + include BaseGenericModel + + # Type of user interaction that triggered the slow response. + attr_reader :action_type + + # Average long task blocking duration in nanoseconds. + attr_reader :avg_blocking_duration + + # Average total interaction duration in nanoseconds. + attr_reader :avg_duration + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score combining view frequency and blocking severity. + attr_reader :impact_score + + # Total number of detection instances across sampled views. + attr_reader :instance_count + + # CSS selector of the element that was interacted with. + attr_accessor :selector + + # Normalized CSS selector with dynamic parts replaced. + attr_accessor :selector_normalized + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'action_type' => :'action_type', + :'avg_blocking_duration' => :'avg_blocking_duration', + :'avg_duration' => :'avg_duration', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'instance_count' => :'instance_count', + :'selector' => :'selector', + :'selector_normalized' => :'selector_normalized', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'action_type' => :'String', + :'avg_blocking_duration' => :'Integer', + :'avg_duration' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'instance_count' => :'Integer', + :'selector' => :'String', + :'selector_normalized' => :'String', + :'view_occurrences' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'selector', + :'selector_normalized', + ]) + 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::AggregatedSlowInteractionLongTask` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'action_type') + self.action_type = attributes[:'action_type'] + end + + if attributes.key?(:'avg_blocking_duration') + self.avg_blocking_duration = attributes[:'avg_blocking_duration'] + end + + if attributes.key?(:'avg_duration') + self.avg_duration = attributes[:'avg_duration'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'instance_count') + self.instance_count = attributes[:'instance_count'] + end + + if attributes.key?(:'selector') + self.selector = attributes[:'selector'] + end + + if attributes.key?(:'selector_normalized') + self.selector_normalized = attributes[:'selector_normalized'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @action_type.nil? + return false if @avg_blocking_duration.nil? + return false if @avg_duration.nil? + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @instance_count.nil? + return false if @instance_count > 2147483647 + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param action_type [Object] Object to be assigned + # @!visibility private + def action_type=(action_type) + if action_type.nil? + fail ArgumentError, 'invalid value for "action_type", action_type cannot be nil.' + end + @action_type = action_type + end + + # Custom attribute writer method with validation + # @param avg_blocking_duration [Object] Object to be assigned + # @!visibility private + def avg_blocking_duration=(avg_blocking_duration) + if avg_blocking_duration.nil? + fail ArgumentError, 'invalid value for "avg_blocking_duration", avg_blocking_duration cannot be nil.' + end + @avg_blocking_duration = avg_blocking_duration + end + + # Custom attribute writer method with validation + # @param avg_duration [Object] Object to be assigned + # @!visibility private + def avg_duration=(avg_duration) + if avg_duration.nil? + fail ArgumentError, 'invalid value for "avg_duration", avg_duration cannot be nil.' + end + @avg_duration = avg_duration + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param instance_count [Object] Object to be assigned + # @!visibility private + def instance_count=(instance_count) + if instance_count.nil? + fail ArgumentError, 'invalid value for "instance_count", instance_count cannot be nil.' + end + if instance_count > 2147483647 + fail ArgumentError, 'invalid value for "instance_count", must be smaller than or equal to 2147483647.' + end + @instance_count = instance_count + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + action_type == o.action_type && + avg_blocking_duration == o.avg_blocking_duration && + avg_duration == o.avg_duration && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + instance_count == o.instance_count && + selector == o.selector && + selector_normalized == o.selector_normalized && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [action_type, avg_blocking_duration, avg_duration, fingerprint, impact_score, instance_count, selector, selector_normalized, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_uncompressed_resource.rb b/lib/datadog_api_client/v2/models/aggregated_uncompressed_resource.rb new file mode 100644 index 000000000000..467311527b84 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_uncompressed_resource.rb @@ -0,0 +1,307 @@ +=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 + # Aggregated uncompressed resource detection grouped by URL path. + class AggregatedUncompressedResource + include BaseGenericModel + + # Average uncompressed body size in bytes. + attr_reader :avg_body_size + + # Average resource loading duration in nanoseconds. + attr_reader :avg_duration + + # Unique fingerprint identifying this detection group. + attr_reader :fingerprint + + # Impact score combining view frequency and resource size. + attr_reader :impact_score + + # Total number of detection instances across sampled views. + attr_reader :instance_count + + # CDN or hosting provider type for the resource. + attr_accessor :provider_type + + # Whether the resource is render-blocking. + attr_accessor :render_blocking + + # Type of the resource (JS, CSS, image, fetch, and so on). + attr_reader :resource_type + + # Normalized URL path pattern for the uncompressed resource. + attr_reader :url_path_group + + # Number of sampled views where this detection occurred. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg_body_size' => :'avg_body_size', + :'avg_duration' => :'avg_duration', + :'fingerprint' => :'fingerprint', + :'impact_score' => :'impact_score', + :'instance_count' => :'instance_count', + :'provider_type' => :'provider_type', + :'render_blocking' => :'render_blocking', + :'resource_type' => :'resource_type', + :'url_path_group' => :'url_path_group', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg_body_size' => :'Integer', + :'avg_duration' => :'Integer', + :'fingerprint' => :'String', + :'impact_score' => :'Float', + :'instance_count' => :'Integer', + :'provider_type' => :'String', + :'render_blocking' => :'String', + :'resource_type' => :'String', + :'url_path_group' => :'String', + :'view_occurrences' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'provider_type', + :'render_blocking', + ]) + 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::AggregatedUncompressedResource` 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?(:'avg_body_size') + self.avg_body_size = attributes[:'avg_body_size'] + end + + if attributes.key?(:'avg_duration') + self.avg_duration = attributes[:'avg_duration'] + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'instance_count') + self.instance_count = attributes[:'instance_count'] + end + + if attributes.key?(:'provider_type') + self.provider_type = attributes[:'provider_type'] + end + + if attributes.key?(:'render_blocking') + self.render_blocking = attributes[:'render_blocking'] + end + + if attributes.key?(:'resource_type') + self.resource_type = attributes[:'resource_type'] + end + + if attributes.key?(:'url_path_group') + self.url_path_group = attributes[:'url_path_group'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 @avg_body_size.nil? + return false if @avg_duration.nil? + return false if @fingerprint.nil? + return false if @impact_score.nil? + return false if @instance_count.nil? + return false if @instance_count > 2147483647 + return false if @resource_type.nil? + return false if @url_path_group.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param avg_body_size [Object] Object to be assigned + # @!visibility private + def avg_body_size=(avg_body_size) + if avg_body_size.nil? + fail ArgumentError, 'invalid value for "avg_body_size", avg_body_size cannot be nil.' + end + @avg_body_size = avg_body_size + end + + # Custom attribute writer method with validation + # @param avg_duration [Object] Object to be assigned + # @!visibility private + def avg_duration=(avg_duration) + if avg_duration.nil? + fail ArgumentError, 'invalid value for "avg_duration", avg_duration cannot be nil.' + end + @avg_duration = avg_duration + end + + # Custom attribute writer method with validation + # @param fingerprint [Object] Object to be assigned + # @!visibility private + def fingerprint=(fingerprint) + if fingerprint.nil? + fail ArgumentError, 'invalid value for "fingerprint", fingerprint cannot be nil.' + end + @fingerprint = fingerprint + end + + # Custom attribute writer method with validation + # @param impact_score [Object] Object to be assigned + # @!visibility private + def impact_score=(impact_score) + if impact_score.nil? + fail ArgumentError, 'invalid value for "impact_score", impact_score cannot be nil.' + end + @impact_score = impact_score + end + + # Custom attribute writer method with validation + # @param instance_count [Object] Object to be assigned + # @!visibility private + def instance_count=(instance_count) + if instance_count.nil? + fail ArgumentError, 'invalid value for "instance_count", instance_count cannot be nil.' + end + if instance_count > 2147483647 + fail ArgumentError, 'invalid value for "instance_count", must be smaller than or equal to 2147483647.' + end + @instance_count = instance_count + end + + # Custom attribute writer method with validation + # @param resource_type [Object] Object to be assigned + # @!visibility private + def resource_type=(resource_type) + if resource_type.nil? + fail ArgumentError, 'invalid value for "resource_type", resource_type cannot be nil.' + end + @resource_type = resource_type + end + + # Custom attribute writer method with validation + # @param url_path_group [Object] Object to be assigned + # @!visibility private + def url_path_group=(url_path_group) + if url_path_group.nil? + fail ArgumentError, 'invalid value for "url_path_group", url_path_group cannot be nil.' + end + @url_path_group = url_path_group + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + avg_body_size == o.avg_body_size && + avg_duration == o.avg_duration && + fingerprint == o.fingerprint && + impact_score == o.impact_score && + instance_count == o.instance_count && + provider_type == o.provider_type && + render_blocking == o.render_blocking && + resource_type == o.resource_type && + url_path_group == o.url_path_group && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg_body_size, avg_duration, fingerprint, impact_score, instance_count, provider_type, render_blocking, resource_type, url_path_group, view_occurrences, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_waterfall_performance_criteria.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_performance_criteria.rb new file mode 100644 index 000000000000..3d441b5b9924 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_performance_criteria.rb @@ -0,0 +1,143 @@ +=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 + # Performance criteria to filter view instances by a metric threshold. + class AggregatedWaterfallPerformanceCriteria + include BaseGenericModel + + # Maximum threshold in seconds (inclusive). + attr_accessor :max + + # Performance metric used to filter view instances by threshold. + attr_reader :metric + + # Minimum threshold in seconds (inclusive). + attr_accessor :min + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'max' => :'max', + :'metric' => :'metric', + :'min' => :'min' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'max' => :'Float', + :'metric' => :'AggregatedWaterfallPerformanceCriteriaMetric', + :'min' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AggregatedWaterfallPerformanceCriteria` 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?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + 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 @metric.nil? + true + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + 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 && + max == o.max && + metric == o.metric && + min == o.min && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [max, metric, min, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_waterfall_performance_criteria_metric.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_performance_criteria_metric.rb new file mode 100644 index 000000000000..813fa4a088b8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_performance_criteria_metric.rb @@ -0,0 +1,29 @@ +=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 + # Performance metric used to filter view instances by threshold. + class AggregatedWaterfallPerformanceCriteriaMetric + include BaseEnumModel + + LoadingTime = "loading_time".freeze + LargestContentfulPaint = "largest_contentful_paint".freeze + FirstContentfulPaint = "first_contentful_paint".freeze + InteractionToNextPaint = "interaction_to_next_paint".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_waterfall_request.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_request.rb new file mode 100644 index 000000000000..d2a392c2a87f --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_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 the aggregated waterfall endpoint. + class AggregatedWaterfallRequest + include BaseGenericModel + + # Data envelope for an aggregated waterfall 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' => :'AggregatedWaterfallRequestData' + } + 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::AggregatedWaterfallRequest` 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/aggregated_waterfall_request_attributes.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_request_attributes.rb new file mode 100644 index 000000000000..780629f0b0f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_request_attributes.rb @@ -0,0 +1,245 @@ +=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 for an aggregated waterfall query. + class AggregatedWaterfallRequestAttributes + include BaseGenericModel + + # The RUM application ID to analyze. + attr_reader :application_id + + # Performance criteria to filter view instances by a metric threshold. + attr_accessor :criteria + + # RUM query string to filter events (for example, @session.type:user @geo.country:US). + attr_accessor :filter + + # Start of the time range as a Unix timestamp in seconds. + attr_reader :from + + # When true, enriches each resource with cross-view appearance statistics. + attr_accessor :include_global_appearance + + # Number of view instances to sample, between 1 and 500. + attr_reader :sample_size + + # End of the time range as a Unix timestamp in seconds. + attr_reader :to + + # The RUM view name to analyze (for example, /account/login). + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'criteria' => :'criteria', + :'filter' => :'filter', + :'from' => :'from', + :'include_global_appearance' => :'include_global_appearance', + :'sample_size' => :'sample_size', + :'to' => :'to', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'criteria' => :'AggregatedWaterfallPerformanceCriteria', + :'filter' => :'String', + :'from' => :'Integer', + :'include_global_appearance' => :'Boolean', + :'sample_size' => :'Integer', + :'to' => :'Integer', + :'view_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::AggregatedWaterfallRequestAttributes` 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?(:'criteria') + self.criteria = attributes[:'criteria'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'include_global_appearance') + self.include_global_appearance = attributes[:'include_global_appearance'] + end + + if attributes.key?(:'sample_size') + self.sample_size = attributes[:'sample_size'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @from.nil? + return false if @sample_size.nil? + return false if @sample_size > 500 + return false if @sample_size < 1 + return false if @to.nil? + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + 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 sample_size [Object] Object to be assigned + # @!visibility private + def sample_size=(sample_size) + if sample_size.nil? + fail ArgumentError, 'invalid value for "sample_size", sample_size cannot be nil.' + end + if sample_size > 500 + fail ArgumentError, 'invalid value for "sample_size", must be smaller than or equal to 500.' + end + if sample_size < 1 + fail ArgumentError, 'invalid value for "sample_size", must be greater than or equal to 1.' + end + @sample_size = sample_size + 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 + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + criteria == o.criteria && + filter == o.filter && + from == o.from && + include_global_appearance == o.include_global_appearance && + sample_size == o.sample_size && + to == o.to && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, criteria, filter, from, include_global_appearance, sample_size, to, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_waterfall_request_data.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_request_data.rb new file mode 100644 index 000000000000..eceb05cd5129 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_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 envelope for an aggregated waterfall request. + class AggregatedWaterfallRequestData + include BaseGenericModel + + # Attributes for an aggregated waterfall query. + attr_reader :attributes + + # The JSON:API type for aggregated waterfall requests. + 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' => :'AggregatedWaterfallRequestAttributes', + :'type' => :'AggregatedWaterfallRequestType' + } + 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::AggregatedWaterfallRequestData` 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/aggregated_waterfall_request_type.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_request_type.rb new file mode 100644 index 000000000000..024bad3ab1a5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_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 JSON:API type for aggregated waterfall requests. + class AggregatedWaterfallRequestType + include BaseEnumModel + + AggregatedWaterfall = "aggregated_waterfall".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_waterfall_response.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_response.rb new file mode 100644 index 000000000000..922acf4b4956 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_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 body for the aggregated waterfall endpoint. + class AggregatedWaterfallResponse + include BaseGenericModel + + # Data envelope for an aggregated waterfall response. + 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' => :'AggregatedWaterfallResponseData' + } + 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::AggregatedWaterfallResponse` 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/aggregated_waterfall_response_attributes.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_response_attributes.rb new file mode 100644 index 000000000000..0ccc156ad708 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_response_attributes.rb @@ -0,0 +1,288 @@ +=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 an aggregated waterfall response. + class AggregatedWaterfallResponseAttributes + include BaseGenericModel + + # The RUM application ID that was analyzed. + attr_reader :application_id + + # Performance criteria to filter view instances by a metric threshold. + attr_accessor :criteria + + # Start of the analyzed time range as a Unix timestamp in seconds. + attr_reader :from + + # Network resources in chronological waterfall order. + attr_reader :resources + + # List of RUM view IDs sampled for this aggregation, capped at 50. + attr_reader :sampled_view_ids + + # End of the analyzed time range as a Unix timestamp in seconds. + attr_reader :to + + # Overall cache hit rate across all sampled views. + attr_reader :total_cache_hit_rate_pct + + # Number of view instances included in the analysis. + attr_reader :view_count + + # The RUM view name that was analyzed. + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'criteria' => :'criteria', + :'from' => :'from', + :'resources' => :'resources', + :'sampled_view_ids' => :'sampled_view_ids', + :'to' => :'to', + :'total_cache_hit_rate_pct' => :'total_cache_hit_rate_pct', + :'view_count' => :'view_count', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'criteria' => :'AggregatedWaterfallPerformanceCriteria', + :'from' => :'Integer', + :'resources' => :'Array', + :'sampled_view_ids' => :'Array', + :'to' => :'Integer', + :'total_cache_hit_rate_pct' => :'Float', + :'view_count' => :'Integer', + :'view_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::AggregatedWaterfallResponseAttributes` 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?(:'criteria') + self.criteria = attributes[:'criteria'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + + if attributes.key?(:'sampled_view_ids') + if (value = attributes[:'sampled_view_ids']).is_a?(Array) + self.sampled_view_ids = value + end + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'total_cache_hit_rate_pct') + self.total_cache_hit_rate_pct = attributes[:'total_cache_hit_rate_pct'] + end + + if attributes.key?(:'view_count') + self.view_count = attributes[:'view_count'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @from.nil? + return false if @resources.nil? + return false if @sampled_view_ids.nil? + return false if @to.nil? + return false if @total_cache_hit_rate_pct.nil? + return false if @view_count.nil? + return false if @view_count > 2147483647 + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + 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 resources [Object] Object to be assigned + # @!visibility private + def resources=(resources) + if resources.nil? + fail ArgumentError, 'invalid value for "resources", resources cannot be nil.' + end + @resources = resources + end + + # Custom attribute writer method with validation + # @param sampled_view_ids [Object] Object to be assigned + # @!visibility private + def sampled_view_ids=(sampled_view_ids) + if sampled_view_ids.nil? + fail ArgumentError, 'invalid value for "sampled_view_ids", sampled_view_ids cannot be nil.' + end + @sampled_view_ids = sampled_view_ids + 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 + + # Custom attribute writer method with validation + # @param total_cache_hit_rate_pct [Object] Object to be assigned + # @!visibility private + def total_cache_hit_rate_pct=(total_cache_hit_rate_pct) + if total_cache_hit_rate_pct.nil? + fail ArgumentError, 'invalid value for "total_cache_hit_rate_pct", total_cache_hit_rate_pct cannot be nil.' + end + @total_cache_hit_rate_pct = total_cache_hit_rate_pct + end + + # Custom attribute writer method with validation + # @param view_count [Object] Object to be assigned + # @!visibility private + def view_count=(view_count) + if view_count.nil? + fail ArgumentError, 'invalid value for "view_count", view_count cannot be nil.' + end + if view_count > 2147483647 + fail ArgumentError, 'invalid value for "view_count", must be smaller than or equal to 2147483647.' + end + @view_count = view_count + end + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + criteria == o.criteria && + from == o.from && + resources == o.resources && + sampled_view_ids == o.sampled_view_ids && + to == o.to && + total_cache_hit_rate_pct == o.total_cache_hit_rate_pct && + view_count == o.view_count && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, criteria, from, resources, sampled_view_ids, to, total_cache_hit_rate_pct, view_count, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aggregated_waterfall_response_data.rb b/lib/datadog_api_client/v2/models/aggregated_waterfall_response_data.rb new file mode 100644 index 000000000000..7196295a2ddc --- /dev/null +++ b/lib/datadog_api_client/v2/models/aggregated_waterfall_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 + # Data envelope for an aggregated waterfall response. + class AggregatedWaterfallResponseData + include BaseGenericModel + + # Attributes of an aggregated waterfall response. + attr_reader :attributes + + # Hash-based unique identifier for this aggregation. + attr_reader :id + + # The JSON:API type for aggregated waterfall requests. + 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' => :'AggregatedWaterfallResponseAttributes', + :'id' => :'String', + :'type' => :'AggregatedWaterfallRequestType' + } + 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::AggregatedWaterfallResponseData` 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/long_task_metric_stats.rb b/lib/datadog_api_client/v2/models/long_task_metric_stats.rb new file mode 100644 index 000000000000..2da8e801c563 --- /dev/null +++ b/lib/datadog_api_client/v2/models/long_task_metric_stats.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 + # Statistical distribution (average, min, max) of a long task metric across sampled views. + class LongTaskMetricStats + include BaseGenericModel + + # Average value across sampled views. + attr_reader :average + + # Maximum value across sampled views. + attr_reader :max + + # Minimum value across sampled views. + attr_reader :min + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'average' => :'average', + :'max' => :'max', + :'min' => :'min' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'average' => :'Float', + :'max' => :'Float', + :'min' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LongTaskMetricStats` 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?(:'average') + self.average = attributes[:'average'] + end + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + 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 @average.nil? + return false if @max.nil? + return false if @min.nil? + true + end + + # Custom attribute writer method with validation + # @param average [Object] Object to be assigned + # @!visibility private + def average=(average) + if average.nil? + fail ArgumentError, 'invalid value for "average", average cannot be nil.' + end + @average = average + end + + # Custom attribute writer method with validation + # @param max [Object] Object to be assigned + # @!visibility private + def max=(max) + if max.nil? + fail ArgumentError, 'invalid value for "max", max cannot be nil.' + end + @max = max + end + + # Custom attribute writer method with validation + # @param min [Object] Object to be assigned + # @!visibility private + def min=(min) + if min.nil? + fail ArgumentError, 'invalid value for "min", min cannot be nil.' + end + @min = min + 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 && + average == o.average && + max == o.max && + min == o.min && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [average, max, min, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/long_task_stats_per_view.rb b/lib/datadog_api_client/v2/models/long_task_stats_per_view.rb new file mode 100644 index 000000000000..4749e5882779 --- /dev/null +++ b/lib/datadog_api_client/v2/models/long_task_stats_per_view.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Statistical distributions of long task metrics computed per view across sampled views. + class LongTaskStatsPerView + include BaseGenericModel + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :fcp_blocking_time_ms + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :fcp_count + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :inp_overlap_blocking_time_ms + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :inp_overlap_count + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :lcp_blocking_time_ms + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :lcp_count + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :loading_time_blocking_time_ms + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :loading_time_count + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :total_blocking_time_ms + + # Statistical distribution (average, min, max) of a long task metric across sampled views. + attr_accessor :total_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fcp_blocking_time_ms' => :'fcp_blocking_time_ms', + :'fcp_count' => :'fcp_count', + :'inp_overlap_blocking_time_ms' => :'inp_overlap_blocking_time_ms', + :'inp_overlap_count' => :'inp_overlap_count', + :'lcp_blocking_time_ms' => :'lcp_blocking_time_ms', + :'lcp_count' => :'lcp_count', + :'loading_time_blocking_time_ms' => :'loading_time_blocking_time_ms', + :'loading_time_count' => :'loading_time_count', + :'total_blocking_time_ms' => :'total_blocking_time_ms', + :'total_count' => :'total_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fcp_blocking_time_ms' => :'LongTaskMetricStats', + :'fcp_count' => :'LongTaskMetricStats', + :'inp_overlap_blocking_time_ms' => :'LongTaskMetricStats', + :'inp_overlap_count' => :'LongTaskMetricStats', + :'lcp_blocking_time_ms' => :'LongTaskMetricStats', + :'lcp_count' => :'LongTaskMetricStats', + :'loading_time_blocking_time_ms' => :'LongTaskMetricStats', + :'loading_time_count' => :'LongTaskMetricStats', + :'total_blocking_time_ms' => :'LongTaskMetricStats', + :'total_count' => :'LongTaskMetricStats' + } + 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::LongTaskStatsPerView` 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?(:'fcp_blocking_time_ms') + self.fcp_blocking_time_ms = attributes[:'fcp_blocking_time_ms'] + end + + if attributes.key?(:'fcp_count') + self.fcp_count = attributes[:'fcp_count'] + end + + if attributes.key?(:'inp_overlap_blocking_time_ms') + self.inp_overlap_blocking_time_ms = attributes[:'inp_overlap_blocking_time_ms'] + end + + if attributes.key?(:'inp_overlap_count') + self.inp_overlap_count = attributes[:'inp_overlap_count'] + end + + if attributes.key?(:'lcp_blocking_time_ms') + self.lcp_blocking_time_ms = attributes[:'lcp_blocking_time_ms'] + end + + if attributes.key?(:'lcp_count') + self.lcp_count = attributes[:'lcp_count'] + end + + if attributes.key?(:'loading_time_blocking_time_ms') + self.loading_time_blocking_time_ms = attributes[:'loading_time_blocking_time_ms'] + end + + if attributes.key?(:'loading_time_count') + self.loading_time_count = attributes[:'loading_time_count'] + end + + if attributes.key?(:'total_blocking_time_ms') + self.total_blocking_time_ms = attributes[:'total_blocking_time_ms'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + 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 && + fcp_blocking_time_ms == o.fcp_blocking_time_ms && + fcp_count == o.fcp_count && + inp_overlap_blocking_time_ms == o.inp_overlap_blocking_time_ms && + inp_overlap_count == o.inp_overlap_count && + lcp_blocking_time_ms == o.lcp_blocking_time_ms && + lcp_count == o.lcp_count && + loading_time_blocking_time_ms == o.loading_time_blocking_time_ms && + loading_time_count == o.loading_time_count && + total_blocking_time_ms == o.total_blocking_time_ms && + total_count == o.total_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fcp_blocking_time_ms, fcp_count, inp_overlap_blocking_time_ms, inp_overlap_count, lcp_blocking_time_ms, lcp_count, loading_time_blocking_time_ms, loading_time_count, total_blocking_time_ms, total_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/signals_problems_detections.rb b/lib/datadog_api_client/v2/models/signals_problems_detections.rb new file mode 100644 index 000000000000..aee7c2097e95 --- /dev/null +++ b/lib/datadog_api_client/v2/models/signals_problems_detections.rb @@ -0,0 +1,179 @@ +=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 + # Grouped detection results by detection type. + class SignalsProblemsDetections + include BaseGenericModel + + # Detected high frozen frame rate issues. + attr_accessor :high_frozen_frame_rates + + # Detected high script evaluation issues. + attr_accessor :high_script_evaluations + + # Detected low cache hit rate issues. + attr_accessor :low_cache_hit_rates + + # Detected mobile scroll friction issues. + attr_accessor :mobile_scroll_frictions + + # Detected slow first contentful paint with high byte count issues. + attr_accessor :slow_fcp_high_bytes + + # Detected slow interaction with long task issues. + attr_accessor :slow_interaction_long_tasks + + # Detected uncompressed resource issues. + attr_accessor :uncompressed_resources + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'high_frozen_frame_rates' => :'high_frozen_frame_rates', + :'high_script_evaluations' => :'high_script_evaluations', + :'low_cache_hit_rates' => :'low_cache_hit_rates', + :'mobile_scroll_frictions' => :'mobile_scroll_frictions', + :'slow_fcp_high_bytes' => :'slow_fcp_high_bytes', + :'slow_interaction_long_tasks' => :'slow_interaction_long_tasks', + :'uncompressed_resources' => :'uncompressed_resources' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'high_frozen_frame_rates' => :'Array', + :'high_script_evaluations' => :'Array', + :'low_cache_hit_rates' => :'Array', + :'mobile_scroll_frictions' => :'Array', + :'slow_fcp_high_bytes' => :'Array', + :'slow_interaction_long_tasks' => :'Array', + :'uncompressed_resources' => :'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::SignalsProblemsDetections` 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?(:'high_frozen_frame_rates') + if (value = attributes[:'high_frozen_frame_rates']).is_a?(Array) + self.high_frozen_frame_rates = value + end + end + + if attributes.key?(:'high_script_evaluations') + if (value = attributes[:'high_script_evaluations']).is_a?(Array) + self.high_script_evaluations = value + end + end + + if attributes.key?(:'low_cache_hit_rates') + if (value = attributes[:'low_cache_hit_rates']).is_a?(Array) + self.low_cache_hit_rates = value + end + end + + if attributes.key?(:'mobile_scroll_frictions') + if (value = attributes[:'mobile_scroll_frictions']).is_a?(Array) + self.mobile_scroll_frictions = value + end + end + + if attributes.key?(:'slow_fcp_high_bytes') + if (value = attributes[:'slow_fcp_high_bytes']).is_a?(Array) + self.slow_fcp_high_bytes = value + end + end + + if attributes.key?(:'slow_interaction_long_tasks') + if (value = attributes[:'slow_interaction_long_tasks']).is_a?(Array) + self.slow_interaction_long_tasks = value + end + end + + if attributes.key?(:'uncompressed_resources') + if (value = attributes[:'uncompressed_resources']).is_a?(Array) + self.uncompressed_resources = 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 && + high_frozen_frame_rates == o.high_frozen_frame_rates && + high_script_evaluations == o.high_script_evaluations && + low_cache_hit_rates == o.low_cache_hit_rates && + mobile_scroll_frictions == o.mobile_scroll_frictions && + slow_fcp_high_bytes == o.slow_fcp_high_bytes && + slow_interaction_long_tasks == o.slow_interaction_long_tasks && + uncompressed_resources == o.uncompressed_resources && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [high_frozen_frame_rates, high_script_evaluations, low_cache_hit_rates, mobile_scroll_frictions, slow_fcp_high_bytes, slow_interaction_long_tasks, uncompressed_resources, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/signals_problems_sample_metadata.rb b/lib/datadog_api_client/v2/models/signals_problems_sample_metadata.rb new file mode 100644 index 000000000000..ce4bca602d2e --- /dev/null +++ b/lib/datadog_api_client/v2/models/signals_problems_sample_metadata.rb @@ -0,0 +1,221 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metadata about the sampling quality for a signals and problems query. + class SignalsProblemsSampleMetadata + include BaseGenericModel + + # Number of view instances that failed to process. + attr_reader :failed + + # Number of view instances requested for sampling. + attr_reader :requested + + # List of RUM view IDs that were sampled. + attr_reader :sampled_view_ids + + # Number of view instances successfully processed. + attr_reader :succeeded + + # Ratio of successfully processed views to requested views. + attr_reader :success_rate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'failed' => :'failed', + :'requested' => :'requested', + :'sampled_view_ids' => :'sampled_view_ids', + :'succeeded' => :'succeeded', + :'success_rate' => :'success_rate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'failed' => :'Integer', + :'requested' => :'Integer', + :'sampled_view_ids' => :'Array', + :'succeeded' => :'Integer', + :'success_rate' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SignalsProblemsSampleMetadata` 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?(:'failed') + self.failed = attributes[:'failed'] + end + + if attributes.key?(:'requested') + self.requested = attributes[:'requested'] + end + + if attributes.key?(:'sampled_view_ids') + if (value = attributes[:'sampled_view_ids']).is_a?(Array) + self.sampled_view_ids = value + end + end + + if attributes.key?(:'succeeded') + self.succeeded = attributes[:'succeeded'] + end + + if attributes.key?(:'success_rate') + self.success_rate = attributes[:'success_rate'] + 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 @failed.nil? + return false if @failed > 2147483647 + return false if @requested.nil? + return false if @requested > 2147483647 + return false if @sampled_view_ids.nil? + return false if @succeeded.nil? + return false if @succeeded > 2147483647 + return false if @success_rate.nil? + true + end + + # Custom attribute writer method with validation + # @param failed [Object] Object to be assigned + # @!visibility private + def failed=(failed) + if failed.nil? + fail ArgumentError, 'invalid value for "failed", failed cannot be nil.' + end + if failed > 2147483647 + fail ArgumentError, 'invalid value for "failed", must be smaller than or equal to 2147483647.' + end + @failed = failed + end + + # Custom attribute writer method with validation + # @param requested [Object] Object to be assigned + # @!visibility private + def requested=(requested) + if requested.nil? + fail ArgumentError, 'invalid value for "requested", requested cannot be nil.' + end + if requested > 2147483647 + fail ArgumentError, 'invalid value for "requested", must be smaller than or equal to 2147483647.' + end + @requested = requested + end + + # Custom attribute writer method with validation + # @param sampled_view_ids [Object] Object to be assigned + # @!visibility private + def sampled_view_ids=(sampled_view_ids) + if sampled_view_ids.nil? + fail ArgumentError, 'invalid value for "sampled_view_ids", sampled_view_ids cannot be nil.' + end + @sampled_view_ids = sampled_view_ids + end + + # Custom attribute writer method with validation + # @param succeeded [Object] Object to be assigned + # @!visibility private + def succeeded=(succeeded) + if succeeded.nil? + fail ArgumentError, 'invalid value for "succeeded", succeeded cannot be nil.' + end + if succeeded > 2147483647 + fail ArgumentError, 'invalid value for "succeeded", must be smaller than or equal to 2147483647.' + end + @succeeded = succeeded + end + + # Custom attribute writer method with validation + # @param success_rate [Object] Object to be assigned + # @!visibility private + def success_rate=(success_rate) + if success_rate.nil? + fail ArgumentError, 'invalid value for "success_rate", success_rate cannot be nil.' + end + @success_rate = success_rate + 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 && + failed == o.failed && + requested == o.requested && + sampled_view_ids == o.sampled_view_ids && + succeeded == o.succeeded && + success_rate == o.success_rate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [failed, requested, sampled_view_ids, succeeded, success_rate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/top_long_task_invoker.rb b/lib/datadog_api_client/v2/models/top_long_task_invoker.rb new file mode 100644 index 000000000000..ef76e35e3e72 --- /dev/null +++ b/lib/datadog_api_client/v2/models/top_long_task_invoker.rb @@ -0,0 +1,218 @@ +=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 top long task invoker within an invoker type. + class TopLongTaskInvoker + include BaseGenericModel + + # Number of sampled views where this invoker had long tasks contributing to the criteria metric. + attr_reader :criteria_view_occurrences + + # Cleaned source file path for the invoker script. + attr_accessor :file + + # Rank-product impact score combining view frequency and blocking time severity. + attr_accessor :impact_score + + # Name of the invoker function or script. + attr_reader :invoker + + # Statistical distributions of long task metrics computed per view across sampled views. + attr_reader :stats_per_view + + # Number of sampled views where this invoker had any long tasks. + attr_reader :view_occurrences + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'criteria_view_occurrences' => :'criteria_view_occurrences', + :'file' => :'file', + :'impact_score' => :'impact_score', + :'invoker' => :'invoker', + :'stats_per_view' => :'stats_per_view', + :'view_occurrences' => :'view_occurrences' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'criteria_view_occurrences' => :'Integer', + :'file' => :'String', + :'impact_score' => :'Float', + :'invoker' => :'String', + :'stats_per_view' => :'LongTaskStatsPerView', + :'view_occurrences' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'file', + ]) + 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::TopLongTaskInvoker` 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?(:'criteria_view_occurrences') + self.criteria_view_occurrences = attributes[:'criteria_view_occurrences'] + end + + if attributes.key?(:'file') + self.file = attributes[:'file'] + end + + if attributes.key?(:'impact_score') + self.impact_score = attributes[:'impact_score'] + end + + if attributes.key?(:'invoker') + self.invoker = attributes[:'invoker'] + end + + if attributes.key?(:'stats_per_view') + self.stats_per_view = attributes[:'stats_per_view'] + end + + if attributes.key?(:'view_occurrences') + self.view_occurrences = attributes[:'view_occurrences'] + 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 !@criteria_view_occurrences.nil? && @criteria_view_occurrences > 2147483647 + return false if @invoker.nil? + return false if @stats_per_view.nil? + return false if @view_occurrences.nil? + return false if @view_occurrences > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param criteria_view_occurrences [Object] Object to be assigned + # @!visibility private + def criteria_view_occurrences=(criteria_view_occurrences) + if !criteria_view_occurrences.nil? && criteria_view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "criteria_view_occurrences", must be smaller than or equal to 2147483647.' + end + @criteria_view_occurrences = criteria_view_occurrences + end + + # Custom attribute writer method with validation + # @param invoker [Object] Object to be assigned + # @!visibility private + def invoker=(invoker) + if invoker.nil? + fail ArgumentError, 'invalid value for "invoker", invoker cannot be nil.' + end + @invoker = invoker + end + + # Custom attribute writer method with validation + # @param stats_per_view [Object] Object to be assigned + # @!visibility private + def stats_per_view=(stats_per_view) + if stats_per_view.nil? + fail ArgumentError, 'invalid value for "stats_per_view", stats_per_view cannot be nil.' + end + @stats_per_view = stats_per_view + end + + # Custom attribute writer method with validation + # @param view_occurrences [Object] Object to be assigned + # @!visibility private + def view_occurrences=(view_occurrences) + if view_occurrences.nil? + fail ArgumentError, 'invalid value for "view_occurrences", view_occurrences cannot be nil.' + end + if view_occurrences > 2147483647 + fail ArgumentError, 'invalid value for "view_occurrences", must be smaller than or equal to 2147483647.' + end + @view_occurrences = view_occurrences + 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 && + criteria_view_occurrences == o.criteria_view_occurrences && + file == o.file && + impact_score == o.impact_score && + invoker == o.invoker && + stats_per_view == o.stats_per_view && + view_occurrences == o.view_occurrences && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [criteria_view_occurrences, file, impact_score, invoker, stats_per_view, view_occurrences, additional_properties].hash + end + end +end