From fc0815d8fe642cae17cb134542c95f0126eca7c5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Nov 2026 09:09:31 +0000 Subject: [PATCH] Regenerate client from commit a889bce of spec repo --- .generator/schemas/v2/openapi.yaml | 415 ++++++++++++++++++ examples/v2/error-tracking/GetIssueImpact.rb | 12 + features/scenarios_model_mapping.rb | 5 + features/v2/error_tracking.feature | 35 ++ features/v2/undo.json | 6 + lib/datadog_api_client/configuration.rb | 1 + lib/datadog_api_client/inflector.rb | 16 + .../v2/api/error_tracking_api.rb | 86 ++++ .../v2/models/issue_impact.rb | 165 +++++++ .../v2/models/issue_impact_account.rb | 177 ++++++++ .../v2/models/issue_impact_accounts.rb | 146 ++++++ .../v2/models/issue_impact_attributes.rb | 229 ++++++++++ .../v2/models/issue_impact_endpoint.rb | 188 ++++++++ .../v2/models/issue_impact_endpoints.rb | 146 ++++++ .../v2/models/issue_impact_error_counts.rb | 187 ++++++++ .../v2/models/issue_impact_response.rb | 123 ++++++ .../v2/models/issue_impact_session.rb | 167 +++++++ .../v2/models/issue_impact_sessions.rb | 146 ++++++ .../v2/models/issue_impact_type.rb | 26 ++ .../v2/models/issue_impact_user.rb | 177 ++++++++ .../v2/models/issue_impact_users.rb | 146 ++++++ .../v2/models/issue_impact_view.rb | 202 +++++++++ .../v2/models/issue_impact_view_counts.rb | 188 ++++++++ .../v2/models/issue_impact_views.rb | 146 ++++++ 24 files changed, 3135 insertions(+) create mode 100644 examples/v2/error-tracking/GetIssueImpact.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_account.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_accounts.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_endpoint.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_endpoints.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_error_counts.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_response.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_session.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_sessions.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_type.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_user.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_users.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_view.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_view_counts.rb create mode 100644 lib/datadog_api_client/v2/models/issue_impact_views.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 26bdf4e880b7..9e977bb93969 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -930,6 +930,26 @@ components: required: true schema: type: string + GetIssueImpactFromParameter: + description: Start of the time window, in milliseconds since the Unix epoch. Must be before `filter[to]`. + example: 1794152269473 + in: query + name: filter[from] + required: true + schema: + format: int64 + type: integer + GetIssueImpactToParameter: + description: |- + End of the time window, in milliseconds since the Unix epoch. Use the issue's `last_seen` to end the window at + its latest error. + example: 1794238669473 + in: query + name: filter[to] + required: true + schema: + format: int64 + type: integer GetIssueIncludeQueryParameter: description: |- Comma-separated list of relationship objects that should be included in the response. Possible values are `assignee`, `bits_investigation`, `case`, `pull_requests`, `samples`, `team_owners`, and `watches`. @@ -75152,6 +75172,327 @@ components: type: string x-enum-varnames: - CASE + IssueImpact: + description: The impact of an issue over the requested time window. + properties: + attributes: + $ref: "#/components/schemas/IssueImpactAttributes" + id: + description: Identifier of the issue. + example: "c1726a66-1f64-11ee-b338-da7ad0900002" + type: string + type: + $ref: "#/components/schemas/IssueImpactType" + required: + - id + - type + - attributes + type: object + IssueImpactAccount: + description: An account whose users are affected by the issue. + properties: + error_counts: + $ref: "#/components/schemas/IssueImpactErrorCounts" + id: + description: Account ID, from the `account.id` attribute. + example: "acc-7" + type: string + name: + description: Account name, if available. + example: "Acme" + type: string + significant: + description: |- + Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + errors or for far more errors than the other listed entries. + example: true + type: boolean + required: + - id + - error_counts + - significant + type: object + IssueImpactAccounts: + description: Accounts whose users are affected by the issue. + properties: + distinct_count: + description: Number of distinct accounts affected by the issue in the time window. + example: 18 + format: int64 + type: integer + top: + description: Up to five accounts with the most errors, most affected first. + items: + $ref: "#/components/schemas/IssueImpactAccount" + type: array + required: + - distinct_count + - top + type: object + IssueImpactAttributes: + description: |- + The issue's errors in the time window, and the users, sessions, accounts, views, and endpoints they affect. + properties: + accounts: + $ref: "#/components/schemas/IssueImpactAccounts" + endpoints: + $ref: "#/components/schemas/IssueImpactEndpoints" + error_counts: + $ref: "#/components/schemas/IssueImpactErrorCounts" + sessions: + $ref: "#/components/schemas/IssueImpactSessions" + users: + $ref: "#/components/schemas/IssueImpactUsers" + views: + $ref: "#/components/schemas/IssueImpactViews" + required: + - error_counts + - users + - sessions + - accounts + - views + - endpoints + type: object + IssueImpactEndpoint: + description: An endpoint whose traces have the issue's errors. + properties: + error_counts: + $ref: "#/components/schemas/IssueImpactErrorCounts" + resource_name: + description: Resource name of the trace's root span. + example: "POST /orders" + type: string + service: + description: Service of the trace's root span. + example: "checkout-api" + type: string + significant: + description: |- + Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + errors or for far more errors than the other listed entries. + example: true + type: boolean + required: + - service + - resource_name + - error_counts + - significant + type: object + IssueImpactEndpoints: + description: Endpoints whose traces have the issue's errors, identified by each trace's root span. + properties: + distinct_count: + description: Number of distinct endpoints affected by the issue in the time window. + example: 2 + format: int64 + type: integer + top: + description: Up to five endpoints with the most errors, most affected first. + items: + $ref: "#/components/schemas/IssueImpactEndpoint" + type: array + required: + - distinct_count + - top + type: object + IssueImpactErrorCounts: + description: |- + Number of errors reported by each source. Several sources can report the same error, such as an APM span and + a log, so the counts overlap: don't add them together. + properties: + apm: + description: Number of errors reported by APM. + example: 700 + format: int64 + type: integer + llmobs: + description: Number of errors reported by Agent Observability. + example: 0 + format: int64 + type: integer + logs: + description: Number of errors reported by Log Management. + example: 700 + format: int64 + type: integer + rum: + description: Number of errors reported by RUM. + example: 440 + format: int64 + type: integer + required: + - apm + - logs + - rum + - llmobs + type: object + IssueImpactResponse: + description: Response containing the impact of an error tracking issue. + properties: + data: + $ref: "#/components/schemas/IssueImpact" + required: + - data + type: object + IssueImpactSession: + description: A RUM session where the issue occurred. + properties: + error_counts: + $ref: "#/components/schemas/IssueImpactErrorCounts" + id: + description: Session identifier. + example: "8f1c3a52-6b1e-4a5e-9d0e-2c3b4a5d6e7f" + type: string + significant: + description: |- + Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + errors or for far more errors than the other listed entries. + example: false + type: boolean + required: + - id + - error_counts + - significant + type: object + IssueImpactSessions: + description: RUM sessions where the issue occurred. + properties: + distinct_count: + description: Number of distinct sessions where the issue occurred in the time window. + example: 540 + format: int64 + type: integer + top: + description: Up to five sessions with the most errors, most affected first. + items: + $ref: "#/components/schemas/IssueImpactSession" + type: array + required: + - distinct_count + - top + type: object + IssueImpactType: + description: Type of the object. + enum: ["error_tracking_issue_impact"] + example: "error_tracking_issue_impact" + type: string + x-enum-varnames: + - ERROR_TRACKING_ISSUE_IMPACT + IssueImpactUser: + description: A user affected by the issue. + properties: + error_counts: + $ref: "#/components/schemas/IssueImpactErrorCounts" + id: + description: User ID, from the `usr.id` attribute. + example: "u-42" + type: string + name: + description: User name or email, if available. + example: "jane@example.com" + type: string + significant: + description: |- + Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + errors or for far more errors than the other listed entries. + example: true + type: boolean + required: + - id + - error_counts + - significant + type: object + IssueImpactUsers: + description: Users affected by the issue. + properties: + distinct_count: + description: Number of distinct users affected by the issue in the time window. + example: 312 + format: int64 + type: integer + top: + description: Up to five users with the most errors, most affected first. + items: + $ref: "#/components/schemas/IssueImpactUser" + type: array + required: + - distinct_count + - top + type: object + IssueImpactView: + description: A RUM view where the issue occurred. + properties: + affected: + $ref: "#/components/schemas/IssueImpactViewCounts" + baseline: + $ref: "#/components/schemas/IssueImpactViewCounts" + error_counts: + $ref: "#/components/schemas/IssueImpactErrorCounts" + name: + description: View name. + example: "/checkout" + type: string + significant: + description: |- + Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + errors or for far more errors than the other listed entries. + example: true + type: boolean + required: + - name + - error_counts + - significant + - affected + type: object + IssueImpactViewCounts: + description: |- + Distinct users, accounts, sessions, and view instances on a view. `affected` counts only those with the issue's + errors. `baseline` counts all users, accounts, sessions, and view instances on the view in the time window. It + is absent when RUM has no data for the view. + properties: + accounts: + description: Number of distinct accounts. + example: 12 + format: int64 + type: integer + sessions: + description: Number of distinct sessions. + example: 210 + format: int64 + type: integer + users: + description: Number of distinct users. + example: 150 + format: int64 + type: integer + views: + description: Number of distinct view instances. + example: 480 + format: int64 + type: integer + required: + - users + - accounts + - sessions + - views + type: object + IssueImpactViews: + description: RUM views where the issue occurred. + properties: + distinct_count: + description: Number of distinct view names where the issue occurred in the time window. + example: 4 + format: int64 + type: integer + top: + description: Up to five views with the most errors, most affected first. + items: + $ref: "#/components/schemas/IssueImpactView" + type: array + required: + - distinct_count + - top + type: object IssueIncluded: description: An array of related resources, returned when the `include` query parameter is used. oneOf: @@ -182241,6 +182582,80 @@ paths: summary: Update the assignee of an issue tags: - Error Tracking + /api/v2/error-tracking/issues/{issue_id}/impact: + get: + description: |- + Get an issue's impact over a time window: its error counts by source, and the users, sessions, accounts, + RUM views, and endpoints it affects most. + Returns 403 if the caller lacks the `error_tracking_read` permission or does not have access to the issue's + data. + operationId: GetIssueImpact + parameters: + - $ref: "#/components/parameters/IssueIDPathParameter" + - $ref: "#/components/parameters/GetIssueImpactFromParameter" + - $ref: "#/components/parameters/GetIssueImpactToParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + accounts: + distinct_count: 0 + top: [] + endpoints: + distinct_count: 1 + top: + - error_counts: + apm: 700 + llmobs: 0 + logs: 700 + rum: 0 + resource_name: POST /orders + service: checkout-api + significant: true + error_counts: + apm: 700 + llmobs: 0 + logs: 700 + rum: 0 + sessions: + distinct_count: 0 + top: [] + users: + distinct_count: 0 + top: [] + views: + distinct_count: 0 + top: [] + id: c1726a66-1f64-11ee-b338-da7ad0900002 + type: error_tracking_issue_impact + schema: + $ref: "#/components/schemas/IssueImpactResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - error_tracking_read + summary: Get the impact of an error tracking issue + tags: + - Error Tracking + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. /api/v2/error-tracking/issues/{issue_id}/state: put: description: Update the state of an issue by `issue_id`. Use this endpoint to move an issue between states such as `OPEN`, `RESOLVED`, or `IGNORED`. diff --git a/examples/v2/error-tracking/GetIssueImpact.rb b/examples/v2/error-tracking/GetIssueImpact.rb new file mode 100644 index 000000000000..50df74714883 --- /dev/null +++ b/examples/v2/error-tracking/GetIssueImpact.rb @@ -0,0 +1,12 @@ +# Get the impact of an error tracking issue returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] + config.unstable_operations["v2.get_issue_impact".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ErrorTrackingAPI.new + +# there is a valid "issue" in the system +ISSUE_ID = ENV["ISSUE_ID"] +p api_instance.get_issue_impact(ISSUE_ID, 1635333071000, 1636629071000) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 9967daf7123f..44f677f00d7f 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3816,6 +3816,11 @@ "issue_id" => "String", "body" => "IssueUpdateAssigneeRequest", }, + "v2.GetIssueImpact" => { + "issue_id" => "String", + "filter_from" => "Integer", + "filter_to" => "Integer", + }, "v2.UpdateIssueState" => { "issue_id" => "String", "body" => "IssueUpdateStateRequest", diff --git a/features/v2/error_tracking.feature b/features/v2/error_tracking.feature index 024554446221..468c9b4d8e22 100644 --- a/features/v2/error_tracking.feature +++ b/features/v2/error_tracking.feature @@ -53,6 +53,41 @@ Feature: Error Tracking And the response "data.id" is equal to "{{ issue.id }}" And the response "data.relationships" has field "samples" + @skip @team:ddoghq/error-tracking + Scenario: Get the impact of an error tracking issue returns "Bad Request" response + Given operation "GetIssueImpact" enabled + And new "GetIssueImpact" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And request contains "filter[from]" parameter with value {{ timestamp("now") }}000 + And request contains "filter[to]" parameter with value {{ timestamp("now - 15d") }}000 + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:ddoghq/error-tracking + Scenario: Get the impact of an error tracking issue returns "Not Found" response + Given operation "GetIssueImpact" enabled + And new "GetIssueImpact" request + And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And request contains "filter[from]" parameter with value {{ timestamp("now - 15d") }}000 + And request contains "filter[to]" parameter with value {{ timestamp("now") }}000 + When the request is sent + Then the response status is 404 Not Found + + @replay-only @skip @team:ddoghq/error-tracking + Scenario: Get the impact of an error tracking issue returns "OK" response + Given operation "GetIssueImpact" enabled + And new "GetIssueImpact" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And request contains "filter[from]" parameter with value {{ timestamp("now - 15d") }}000 + And request contains "filter[to]" parameter with value {{ timestamp("now") }}000 + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ issue.id }}" + And the response "data.type" is equal to "error_tracking_issue_impact" + And the response "data.attributes" has field "error_counts" + @generated @skip @team:ddoghq/error-tracking Scenario: Remove the assignee of an issue returns "Bad Request" response Given new "DeleteIssueAssignee" request diff --git a/features/v2/undo.json b/features/v2/undo.json index fb7afa5fc48d..735b21bfccae 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2783,6 +2783,12 @@ "type": "idempotent" } }, + "GetIssueImpact": { + "tag": "Error Tracking", + "undo": { + "type": "safe" + } + }, "UpdateIssueState": { "tag": "Error Tracking", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index c8475b5aeb2b..a481a0527d31 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -546,6 +546,7 @@ def initialize "v2.trigger_deployment_gates_evaluation": false, "v2.update_deployment_gate": false, "v2.update_deployment_rule": false, + "v2.get_issue_impact": false, "v2.get_eudm_device": false, "v2.get_eudm_devices": false, "v2.clone_form": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 9923c62aca2a..fe09c8ecd669 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -5369,6 +5369,22 @@ def overrides "v2.issue_case_relationship" => "IssueCaseRelationship", "v2.issue_case_relationships" => "IssueCaseRelationships", "v2.issue_case_resource_type" => "IssueCaseResourceType", + "v2.issue_impact" => "IssueImpact", + "v2.issue_impact_account" => "IssueImpactAccount", + "v2.issue_impact_accounts" => "IssueImpactAccounts", + "v2.issue_impact_attributes" => "IssueImpactAttributes", + "v2.issue_impact_endpoint" => "IssueImpactEndpoint", + "v2.issue_impact_endpoints" => "IssueImpactEndpoints", + "v2.issue_impact_error_counts" => "IssueImpactErrorCounts", + "v2.issue_impact_response" => "IssueImpactResponse", + "v2.issue_impact_session" => "IssueImpactSession", + "v2.issue_impact_sessions" => "IssueImpactSessions", + "v2.issue_impact_type" => "IssueImpactType", + "v2.issue_impact_user" => "IssueImpactUser", + "v2.issue_impact_users" => "IssueImpactUsers", + "v2.issue_impact_view" => "IssueImpactView", + "v2.issue_impact_view_counts" => "IssueImpactViewCounts", + "v2.issue_impact_views" => "IssueImpactViews", "v2.issue_included" => "IssueIncluded", "v2.issue_language" => "IssueLanguage", "v2.issue_platform" => "IssuePlatform", diff --git a/lib/datadog_api_client/v2/api/error_tracking_api.rb b/lib/datadog_api_client/v2/api/error_tracking_api.rb index eff90e968ef7..7419cf72abf0 100644 --- a/lib/datadog_api_client/v2/api/error_tracking_api.rb +++ b/lib/datadog_api_client/v2/api/error_tracking_api.rb @@ -158,6 +158,92 @@ def get_issue_with_http_info(issue_id, opts = {}) return data, status_code, headers end + # Get the impact of an error tracking issue. + # + # @see #get_issue_impact_with_http_info + def get_issue_impact(issue_id, filter_from, filter_to, opts = {}) + data, _status_code, _headers = get_issue_impact_with_http_info(issue_id, filter_from, filter_to, opts) + data + end + + # Get the impact of an error tracking issue. + # + # Get an issue's impact over a time window: its error counts by source, and the users, sessions, accounts, + # RUM views, and endpoints it affects most. + # Returns 403 if the caller lacks the `error_tracking_read` permission or does not have access to the issue's + # data. + # + # @param issue_id [String] The identifier of the issue. + # @param filter_from [Integer] Start of the time window, in milliseconds since the Unix epoch. Must be before `filter[to]`. + # @param filter_to [Integer] End of the time window, in milliseconds since the Unix epoch. Use the issue's `last_seen` to end the window at its latest error. + # @param opts [Hash] the optional parameters + # @return [Array<(IssueImpactResponse, Integer, Hash)>] IssueImpactResponse data, response status code and response headers + def get_issue_impact_with_http_info(issue_id, filter_from, filter_to, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_issue_impact".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_issue_impact") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_issue_impact")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ErrorTrackingAPI.get_issue_impact ...' + end + # verify the required parameter 'issue_id' is set + if @api_client.config.client_side_validation && issue_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_id' when calling ErrorTrackingAPI.get_issue_impact" + end + # verify the required parameter 'filter_from' is set + if @api_client.config.client_side_validation && filter_from.nil? + fail ArgumentError, "Missing the required parameter 'filter_from' when calling ErrorTrackingAPI.get_issue_impact" + end + # verify the required parameter 'filter_to' is set + if @api_client.config.client_side_validation && filter_to.nil? + fail ArgumentError, "Missing the required parameter 'filter_to' when calling ErrorTrackingAPI.get_issue_impact" + end + # resource path + local_var_path = '/api/v2/error-tracking/issues/{issue_id}/impact'.sub('{issue_id}', CGI.escape(issue_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[from]'] = filter_from + query_params[:'filter[to]'] = filter_to + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'IssueImpactResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_issue_impact, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ErrorTrackingAPI#get_issue_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Search error tracking issues. # # @see #search_issues_with_http_info diff --git a/lib/datadog_api_client/v2/models/issue_impact.rb b/lib/datadog_api_client/v2/models/issue_impact.rb new file mode 100644 index 000000000000..4987fb6e901e --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The impact of an issue over the requested time window. + class IssueImpact + include BaseGenericModel + + # The issue's errors in the time window, and the users, sessions, accounts, views, and endpoints they affect. + attr_reader :attributes + + # Identifier of the issue. + attr_reader :id + + # Type of the object. + 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' => :'IssueImpactAttributes', + :'id' => :'String', + :'type' => :'IssueImpactType' + } + 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::IssueImpact` 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/issue_impact_account.rb b/lib/datadog_api_client/v2/models/issue_impact_account.rb new file mode 100644 index 000000000000..6dfd5c7d56f0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_account.rb @@ -0,0 +1,177 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An account whose users are affected by the issue. + class IssueImpactAccount + include BaseGenericModel + + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + attr_reader :error_counts + + # Account ID, from the `account.id` attribute. + attr_reader :id + + # Account name, if available. + attr_accessor :name + + # Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + # errors or for far more errors than the other listed entries. + attr_reader :significant + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_counts' => :'error_counts', + :'id' => :'id', + :'name' => :'name', + :'significant' => :'significant' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_counts' => :'IssueImpactErrorCounts', + :'id' => :'String', + :'name' => :'String', + :'significant' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IssueImpactAccount` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'error_counts') + self.error_counts = attributes[:'error_counts'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'significant') + self.significant = attributes[:'significant'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @error_counts.nil? + return false if @id.nil? + return false if @significant.nil? + true + end + + # Custom attribute writer method with validation + # @param error_counts [Object] Object to be assigned + # @!visibility private + def error_counts=(error_counts) + if error_counts.nil? + fail ArgumentError, 'invalid value for "error_counts", error_counts cannot be nil.' + end + @error_counts = error_counts + 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 significant [Object] Object to be assigned + # @!visibility private + def significant=(significant) + if significant.nil? + fail ArgumentError, 'invalid value for "significant", significant cannot be nil.' + end + @significant = significant + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_counts == o.error_counts && + id == o.id && + name == o.name && + significant == o.significant && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_counts, id, name, significant, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_accounts.rb b/lib/datadog_api_client/v2/models/issue_impact_accounts.rb new file mode 100644 index 000000000000..138f99407ab0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_accounts.rb @@ -0,0 +1,146 @@ +=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 + # Accounts whose users are affected by the issue. + class IssueImpactAccounts + include BaseGenericModel + + # Number of distinct accounts affected by the issue in the time window. + attr_reader :distinct_count + + # Up to five accounts with the most errors, most affected first. + attr_reader :top + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'distinct_count' => :'distinct_count', + :'top' => :'top' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'distinct_count' => :'Integer', + :'top' => :'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::IssueImpactAccounts` 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?(:'distinct_count') + self.distinct_count = attributes[:'distinct_count'] + end + + if attributes.key?(:'top') + if (value = attributes[:'top']).is_a?(Array) + self.top = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @distinct_count.nil? + return false if @top.nil? + true + end + + # Custom attribute writer method with validation + # @param distinct_count [Object] Object to be assigned + # @!visibility private + def distinct_count=(distinct_count) + if distinct_count.nil? + fail ArgumentError, 'invalid value for "distinct_count", distinct_count cannot be nil.' + end + @distinct_count = distinct_count + end + + # Custom attribute writer method with validation + # @param top [Object] Object to be assigned + # @!visibility private + def top=(top) + if top.nil? + fail ArgumentError, 'invalid value for "top", top cannot be nil.' + end + @top = top + 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 && + distinct_count == o.distinct_count && + top == o.top && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [distinct_count, top, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_attributes.rb b/lib/datadog_api_client/v2/models/issue_impact_attributes.rb new file mode 100644 index 000000000000..e0a01a642b71 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_attributes.rb @@ -0,0 +1,229 @@ +=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 issue's errors in the time window, and the users, sessions, accounts, views, and endpoints they affect. + class IssueImpactAttributes + include BaseGenericModel + + # Accounts whose users are affected by the issue. + attr_reader :accounts + + # Endpoints whose traces have the issue's errors, identified by each trace's root span. + attr_reader :endpoints + + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + attr_reader :error_counts + + # RUM sessions where the issue occurred. + attr_reader :sessions + + # Users affected by the issue. + attr_reader :users + + # RUM views where the issue occurred. + attr_reader :views + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'accounts' => :'accounts', + :'endpoints' => :'endpoints', + :'error_counts' => :'error_counts', + :'sessions' => :'sessions', + :'users' => :'users', + :'views' => :'views' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'accounts' => :'IssueImpactAccounts', + :'endpoints' => :'IssueImpactEndpoints', + :'error_counts' => :'IssueImpactErrorCounts', + :'sessions' => :'IssueImpactSessions', + :'users' => :'IssueImpactUsers', + :'views' => :'IssueImpactViews' + } + 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::IssueImpactAttributes` 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?(:'accounts') + self.accounts = attributes[:'accounts'] + end + + if attributes.key?(:'endpoints') + self.endpoints = attributes[:'endpoints'] + end + + if attributes.key?(:'error_counts') + self.error_counts = attributes[:'error_counts'] + end + + if attributes.key?(:'sessions') + self.sessions = attributes[:'sessions'] + end + + if attributes.key?(:'users') + self.users = attributes[:'users'] + end + + if attributes.key?(:'views') + self.views = attributes[:'views'] + 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 @accounts.nil? + return false if @endpoints.nil? + return false if @error_counts.nil? + return false if @sessions.nil? + return false if @users.nil? + return false if @views.nil? + true + end + + # Custom attribute writer method with validation + # @param accounts [Object] Object to be assigned + # @!visibility private + def accounts=(accounts) + if accounts.nil? + fail ArgumentError, 'invalid value for "accounts", accounts cannot be nil.' + end + @accounts = accounts + end + + # Custom attribute writer method with validation + # @param endpoints [Object] Object to be assigned + # @!visibility private + def endpoints=(endpoints) + if endpoints.nil? + fail ArgumentError, 'invalid value for "endpoints", endpoints cannot be nil.' + end + @endpoints = endpoints + end + + # Custom attribute writer method with validation + # @param error_counts [Object] Object to be assigned + # @!visibility private + def error_counts=(error_counts) + if error_counts.nil? + fail ArgumentError, 'invalid value for "error_counts", error_counts cannot be nil.' + end + @error_counts = error_counts + end + + # Custom attribute writer method with validation + # @param sessions [Object] Object to be assigned + # @!visibility private + def sessions=(sessions) + if sessions.nil? + fail ArgumentError, 'invalid value for "sessions", sessions cannot be nil.' + end + @sessions = sessions + end + + # Custom attribute writer method with validation + # @param users [Object] Object to be assigned + # @!visibility private + def users=(users) + if users.nil? + fail ArgumentError, 'invalid value for "users", users cannot be nil.' + end + @users = users + end + + # Custom attribute writer method with validation + # @param views [Object] Object to be assigned + # @!visibility private + def views=(views) + if views.nil? + fail ArgumentError, 'invalid value for "views", views cannot be nil.' + end + @views = views + 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 && + accounts == o.accounts && + endpoints == o.endpoints && + error_counts == o.error_counts && + sessions == o.sessions && + users == o.users && + views == o.views && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [accounts, endpoints, error_counts, sessions, users, views, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_endpoint.rb b/lib/datadog_api_client/v2/models/issue_impact_endpoint.rb new file mode 100644 index 000000000000..c388f9764fc3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_endpoint.rb @@ -0,0 +1,188 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An endpoint whose traces have the issue's errors. + class IssueImpactEndpoint + include BaseGenericModel + + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + attr_reader :error_counts + + # Resource name of the trace's root span. + attr_reader :resource_name + + # Service of the trace's root span. + attr_reader :service + + # Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + # errors or for far more errors than the other listed entries. + attr_reader :significant + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_counts' => :'error_counts', + :'resource_name' => :'resource_name', + :'service' => :'service', + :'significant' => :'significant' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_counts' => :'IssueImpactErrorCounts', + :'resource_name' => :'String', + :'service' => :'String', + :'significant' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IssueImpactEndpoint` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'error_counts') + self.error_counts = attributes[:'error_counts'] + end + + if attributes.key?(:'resource_name') + self.resource_name = attributes[:'resource_name'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'significant') + self.significant = attributes[:'significant'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @error_counts.nil? + return false if @resource_name.nil? + return false if @service.nil? + return false if @significant.nil? + true + end + + # Custom attribute writer method with validation + # @param error_counts [Object] Object to be assigned + # @!visibility private + def error_counts=(error_counts) + if error_counts.nil? + fail ArgumentError, 'invalid value for "error_counts", error_counts cannot be nil.' + end + @error_counts = error_counts + end + + # Custom attribute writer method with validation + # @param resource_name [Object] Object to be assigned + # @!visibility private + def resource_name=(resource_name) + if resource_name.nil? + fail ArgumentError, 'invalid value for "resource_name", resource_name cannot be nil.' + end + @resource_name = resource_name + end + + # Custom attribute writer method with validation + # @param service [Object] Object to be assigned + # @!visibility private + def service=(service) + if service.nil? + fail ArgumentError, 'invalid value for "service", service cannot be nil.' + end + @service = service + end + + # Custom attribute writer method with validation + # @param significant [Object] Object to be assigned + # @!visibility private + def significant=(significant) + if significant.nil? + fail ArgumentError, 'invalid value for "significant", significant cannot be nil.' + end + @significant = significant + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_counts == o.error_counts && + resource_name == o.resource_name && + service == o.service && + significant == o.significant && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_counts, resource_name, service, significant, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_endpoints.rb b/lib/datadog_api_client/v2/models/issue_impact_endpoints.rb new file mode 100644 index 000000000000..9d1776362402 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_endpoints.rb @@ -0,0 +1,146 @@ +=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 + # Endpoints whose traces have the issue's errors, identified by each trace's root span. + class IssueImpactEndpoints + include BaseGenericModel + + # Number of distinct endpoints affected by the issue in the time window. + attr_reader :distinct_count + + # Up to five endpoints with the most errors, most affected first. + attr_reader :top + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'distinct_count' => :'distinct_count', + :'top' => :'top' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'distinct_count' => :'Integer', + :'top' => :'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::IssueImpactEndpoints` 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?(:'distinct_count') + self.distinct_count = attributes[:'distinct_count'] + end + + if attributes.key?(:'top') + if (value = attributes[:'top']).is_a?(Array) + self.top = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @distinct_count.nil? + return false if @top.nil? + true + end + + # Custom attribute writer method with validation + # @param distinct_count [Object] Object to be assigned + # @!visibility private + def distinct_count=(distinct_count) + if distinct_count.nil? + fail ArgumentError, 'invalid value for "distinct_count", distinct_count cannot be nil.' + end + @distinct_count = distinct_count + end + + # Custom attribute writer method with validation + # @param top [Object] Object to be assigned + # @!visibility private + def top=(top) + if top.nil? + fail ArgumentError, 'invalid value for "top", top cannot be nil.' + end + @top = top + 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 && + distinct_count == o.distinct_count && + top == o.top && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [distinct_count, top, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_error_counts.rb b/lib/datadog_api_client/v2/models/issue_impact_error_counts.rb new file mode 100644 index 000000000000..2090039aa60f --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_error_counts.rb @@ -0,0 +1,187 @@ +=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 + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + class IssueImpactErrorCounts + include BaseGenericModel + + # Number of errors reported by APM. + attr_reader :apm + + # Number of errors reported by Agent Observability. + attr_reader :llmobs + + # Number of errors reported by Log Management. + attr_reader :logs + + # Number of errors reported by RUM. + attr_reader :rum + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'apm' => :'apm', + :'llmobs' => :'llmobs', + :'logs' => :'logs', + :'rum' => :'rum' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'apm' => :'Integer', + :'llmobs' => :'Integer', + :'logs' => :'Integer', + :'rum' => :'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::IssueImpactErrorCounts` 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?(:'apm') + self.apm = attributes[:'apm'] + end + + if attributes.key?(:'llmobs') + self.llmobs = attributes[:'llmobs'] + end + + if attributes.key?(:'logs') + self.logs = attributes[:'logs'] + end + + if attributes.key?(:'rum') + self.rum = attributes[:'rum'] + 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 @apm.nil? + return false if @llmobs.nil? + return false if @logs.nil? + return false if @rum.nil? + true + end + + # Custom attribute writer method with validation + # @param apm [Object] Object to be assigned + # @!visibility private + def apm=(apm) + if apm.nil? + fail ArgumentError, 'invalid value for "apm", apm cannot be nil.' + end + @apm = apm + end + + # Custom attribute writer method with validation + # @param llmobs [Object] Object to be assigned + # @!visibility private + def llmobs=(llmobs) + if llmobs.nil? + fail ArgumentError, 'invalid value for "llmobs", llmobs cannot be nil.' + end + @llmobs = llmobs + end + + # Custom attribute writer method with validation + # @param logs [Object] Object to be assigned + # @!visibility private + def logs=(logs) + if logs.nil? + fail ArgumentError, 'invalid value for "logs", logs cannot be nil.' + end + @logs = logs + end + + # Custom attribute writer method with validation + # @param rum [Object] Object to be assigned + # @!visibility private + def rum=(rum) + if rum.nil? + fail ArgumentError, 'invalid value for "rum", rum cannot be nil.' + end + @rum = rum + 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 && + apm == o.apm && + llmobs == o.llmobs && + logs == o.logs && + rum == o.rum && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [apm, llmobs, logs, rum, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_response.rb b/lib/datadog_api_client/v2/models/issue_impact_response.rb new file mode 100644 index 000000000000..45cfbc6a718c --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_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 containing the impact of an error tracking issue. + class IssueImpactResponse + include BaseGenericModel + + # The impact of an issue over the requested time window. + 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' => :'IssueImpact' + } + 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::IssueImpactResponse` 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/issue_impact_session.rb b/lib/datadog_api_client/v2/models/issue_impact_session.rb new file mode 100644 index 000000000000..4c8e332fd7c6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_session.rb @@ -0,0 +1,167 @@ +=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 RUM session where the issue occurred. + class IssueImpactSession + include BaseGenericModel + + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + attr_reader :error_counts + + # Session identifier. + attr_reader :id + + # Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + # errors or for far more errors than the other listed entries. + attr_reader :significant + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_counts' => :'error_counts', + :'id' => :'id', + :'significant' => :'significant' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_counts' => :'IssueImpactErrorCounts', + :'id' => :'String', + :'significant' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IssueImpactSession` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'error_counts') + self.error_counts = attributes[:'error_counts'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'significant') + self.significant = attributes[:'significant'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @error_counts.nil? + return false if @id.nil? + return false if @significant.nil? + true + end + + # Custom attribute writer method with validation + # @param error_counts [Object] Object to be assigned + # @!visibility private + def error_counts=(error_counts) + if error_counts.nil? + fail ArgumentError, 'invalid value for "error_counts", error_counts cannot be nil.' + end + @error_counts = error_counts + 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 significant [Object] Object to be assigned + # @!visibility private + def significant=(significant) + if significant.nil? + fail ArgumentError, 'invalid value for "significant", significant cannot be nil.' + end + @significant = significant + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_counts == o.error_counts && + id == o.id && + significant == o.significant && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_counts, id, significant, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_sessions.rb b/lib/datadog_api_client/v2/models/issue_impact_sessions.rb new file mode 100644 index 000000000000..42aeb0cb5cae --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_sessions.rb @@ -0,0 +1,146 @@ +=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 + # RUM sessions where the issue occurred. + class IssueImpactSessions + include BaseGenericModel + + # Number of distinct sessions where the issue occurred in the time window. + attr_reader :distinct_count + + # Up to five sessions with the most errors, most affected first. + attr_reader :top + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'distinct_count' => :'distinct_count', + :'top' => :'top' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'distinct_count' => :'Integer', + :'top' => :'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::IssueImpactSessions` 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?(:'distinct_count') + self.distinct_count = attributes[:'distinct_count'] + end + + if attributes.key?(:'top') + if (value = attributes[:'top']).is_a?(Array) + self.top = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @distinct_count.nil? + return false if @top.nil? + true + end + + # Custom attribute writer method with validation + # @param distinct_count [Object] Object to be assigned + # @!visibility private + def distinct_count=(distinct_count) + if distinct_count.nil? + fail ArgumentError, 'invalid value for "distinct_count", distinct_count cannot be nil.' + end + @distinct_count = distinct_count + end + + # Custom attribute writer method with validation + # @param top [Object] Object to be assigned + # @!visibility private + def top=(top) + if top.nil? + fail ArgumentError, 'invalid value for "top", top cannot be nil.' + end + @top = top + 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 && + distinct_count == o.distinct_count && + top == o.top && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [distinct_count, top, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_type.rb b/lib/datadog_api_client/v2/models/issue_impact_type.rb new file mode 100644 index 000000000000..f0a4c4931708 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the object. + class IssueImpactType + include BaseEnumModel + + ERROR_TRACKING_ISSUE_IMPACT = "error_tracking_issue_impact".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_user.rb b/lib/datadog_api_client/v2/models/issue_impact_user.rb new file mode 100644 index 000000000000..164444fc559a --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_user.rb @@ -0,0 +1,177 @@ +=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 user affected by the issue. + class IssueImpactUser + include BaseGenericModel + + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + attr_reader :error_counts + + # User ID, from the `usr.id` attribute. + attr_reader :id + + # User name or email, if available. + attr_accessor :name + + # Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + # errors or for far more errors than the other listed entries. + attr_reader :significant + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_counts' => :'error_counts', + :'id' => :'id', + :'name' => :'name', + :'significant' => :'significant' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_counts' => :'IssueImpactErrorCounts', + :'id' => :'String', + :'name' => :'String', + :'significant' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IssueImpactUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'error_counts') + self.error_counts = attributes[:'error_counts'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'significant') + self.significant = attributes[:'significant'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @error_counts.nil? + return false if @id.nil? + return false if @significant.nil? + true + end + + # Custom attribute writer method with validation + # @param error_counts [Object] Object to be assigned + # @!visibility private + def error_counts=(error_counts) + if error_counts.nil? + fail ArgumentError, 'invalid value for "error_counts", error_counts cannot be nil.' + end + @error_counts = error_counts + 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 significant [Object] Object to be assigned + # @!visibility private + def significant=(significant) + if significant.nil? + fail ArgumentError, 'invalid value for "significant", significant cannot be nil.' + end + @significant = significant + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_counts == o.error_counts && + id == o.id && + name == o.name && + significant == o.significant && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_counts, id, name, significant, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_users.rb b/lib/datadog_api_client/v2/models/issue_impact_users.rb new file mode 100644 index 000000000000..60dc047b5071 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_users.rb @@ -0,0 +1,146 @@ +=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 + # Users affected by the issue. + class IssueImpactUsers + include BaseGenericModel + + # Number of distinct users affected by the issue in the time window. + attr_reader :distinct_count + + # Up to five users with the most errors, most affected first. + attr_reader :top + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'distinct_count' => :'distinct_count', + :'top' => :'top' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'distinct_count' => :'Integer', + :'top' => :'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::IssueImpactUsers` 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?(:'distinct_count') + self.distinct_count = attributes[:'distinct_count'] + end + + if attributes.key?(:'top') + if (value = attributes[:'top']).is_a?(Array) + self.top = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @distinct_count.nil? + return false if @top.nil? + true + end + + # Custom attribute writer method with validation + # @param distinct_count [Object] Object to be assigned + # @!visibility private + def distinct_count=(distinct_count) + if distinct_count.nil? + fail ArgumentError, 'invalid value for "distinct_count", distinct_count cannot be nil.' + end + @distinct_count = distinct_count + end + + # Custom attribute writer method with validation + # @param top [Object] Object to be assigned + # @!visibility private + def top=(top) + if top.nil? + fail ArgumentError, 'invalid value for "top", top cannot be nil.' + end + @top = top + 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 && + distinct_count == o.distinct_count && + top == o.top && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [distinct_count, top, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_view.rb b/lib/datadog_api_client/v2/models/issue_impact_view.rb new file mode 100644 index 000000000000..6276c8fe29fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_view.rb @@ -0,0 +1,202 @@ +=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 RUM view where the issue occurred. + class IssueImpactView + include BaseGenericModel + + # Distinct users, accounts, sessions, and view instances on a view. `affected` counts only those with the issue's + # errors. `baseline` counts all users, accounts, sessions, and view instances on the view in the time window. It + # is absent when RUM has no data for the view. + attr_reader :affected + + # Distinct users, accounts, sessions, and view instances on a view. `affected` counts only those with the issue's + # errors. `baseline` counts all users, accounts, sessions, and view instances on the view in the time window. It + # is absent when RUM has no data for the view. + attr_accessor :baseline + + # Number of errors reported by each source. Several sources can report the same error, such as an APM span and + # a log, so the counts overlap: don't add them together. + attr_reader :error_counts + + # View name. + attr_reader :name + + # Whether the entry stands out as a likely driver of the issue, because it accounts for most of the issue's + # errors or for far more errors than the other listed entries. + attr_reader :significant + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'affected' => :'affected', + :'baseline' => :'baseline', + :'error_counts' => :'error_counts', + :'name' => :'name', + :'significant' => :'significant' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'affected' => :'IssueImpactViewCounts', + :'baseline' => :'IssueImpactViewCounts', + :'error_counts' => :'IssueImpactErrorCounts', + :'name' => :'String', + :'significant' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IssueImpactView` 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?(:'affected') + self.affected = attributes[:'affected'] + end + + if attributes.key?(:'baseline') + self.baseline = attributes[:'baseline'] + end + + if attributes.key?(:'error_counts') + self.error_counts = attributes[:'error_counts'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'significant') + self.significant = attributes[:'significant'] + 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 @affected.nil? + return false if @error_counts.nil? + return false if @name.nil? + return false if @significant.nil? + true + end + + # Custom attribute writer method with validation + # @param affected [Object] Object to be assigned + # @!visibility private + def affected=(affected) + if affected.nil? + fail ArgumentError, 'invalid value for "affected", affected cannot be nil.' + end + @affected = affected + end + + # Custom attribute writer method with validation + # @param error_counts [Object] Object to be assigned + # @!visibility private + def error_counts=(error_counts) + if error_counts.nil? + fail ArgumentError, 'invalid value for "error_counts", error_counts cannot be nil.' + end + @error_counts = error_counts + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param significant [Object] Object to be assigned + # @!visibility private + def significant=(significant) + if significant.nil? + fail ArgumentError, 'invalid value for "significant", significant cannot be nil.' + end + @significant = significant + 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 && + affected == o.affected && + baseline == o.baseline && + error_counts == o.error_counts && + name == o.name && + significant == o.significant && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [affected, baseline, error_counts, name, significant, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_view_counts.rb b/lib/datadog_api_client/v2/models/issue_impact_view_counts.rb new file mode 100644 index 000000000000..ed589ff0e785 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_view_counts.rb @@ -0,0 +1,188 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Distinct users, accounts, sessions, and view instances on a view. `affected` counts only those with the issue's + # errors. `baseline` counts all users, accounts, sessions, and view instances on the view in the time window. It + # is absent when RUM has no data for the view. + class IssueImpactViewCounts + include BaseGenericModel + + # Number of distinct accounts. + attr_reader :accounts + + # Number of distinct sessions. + attr_reader :sessions + + # Number of distinct users. + attr_reader :users + + # Number of distinct view instances. + attr_reader :views + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'accounts' => :'accounts', + :'sessions' => :'sessions', + :'users' => :'users', + :'views' => :'views' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'accounts' => :'Integer', + :'sessions' => :'Integer', + :'users' => :'Integer', + :'views' => :'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::IssueImpactViewCounts` 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?(:'accounts') + self.accounts = attributes[:'accounts'] + end + + if attributes.key?(:'sessions') + self.sessions = attributes[:'sessions'] + end + + if attributes.key?(:'users') + self.users = attributes[:'users'] + end + + if attributes.key?(:'views') + self.views = attributes[:'views'] + 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 @accounts.nil? + return false if @sessions.nil? + return false if @users.nil? + return false if @views.nil? + true + end + + # Custom attribute writer method with validation + # @param accounts [Object] Object to be assigned + # @!visibility private + def accounts=(accounts) + if accounts.nil? + fail ArgumentError, 'invalid value for "accounts", accounts cannot be nil.' + end + @accounts = accounts + end + + # Custom attribute writer method with validation + # @param sessions [Object] Object to be assigned + # @!visibility private + def sessions=(sessions) + if sessions.nil? + fail ArgumentError, 'invalid value for "sessions", sessions cannot be nil.' + end + @sessions = sessions + end + + # Custom attribute writer method with validation + # @param users [Object] Object to be assigned + # @!visibility private + def users=(users) + if users.nil? + fail ArgumentError, 'invalid value for "users", users cannot be nil.' + end + @users = users + end + + # Custom attribute writer method with validation + # @param views [Object] Object to be assigned + # @!visibility private + def views=(views) + if views.nil? + fail ArgumentError, 'invalid value for "views", views cannot be nil.' + end + @views = views + 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 && + accounts == o.accounts && + sessions == o.sessions && + users == o.users && + views == o.views && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [accounts, sessions, users, views, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_impact_views.rb b/lib/datadog_api_client/v2/models/issue_impact_views.rb new file mode 100644 index 000000000000..dea009338363 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_impact_views.rb @@ -0,0 +1,146 @@ +=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 + # RUM views where the issue occurred. + class IssueImpactViews + include BaseGenericModel + + # Number of distinct view names where the issue occurred in the time window. + attr_reader :distinct_count + + # Up to five views with the most errors, most affected first. + attr_reader :top + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'distinct_count' => :'distinct_count', + :'top' => :'top' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'distinct_count' => :'Integer', + :'top' => :'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::IssueImpactViews` 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?(:'distinct_count') + self.distinct_count = attributes[:'distinct_count'] + end + + if attributes.key?(:'top') + if (value = attributes[:'top']).is_a?(Array) + self.top = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @distinct_count.nil? + return false if @top.nil? + true + end + + # Custom attribute writer method with validation + # @param distinct_count [Object] Object to be assigned + # @!visibility private + def distinct_count=(distinct_count) + if distinct_count.nil? + fail ArgumentError, 'invalid value for "distinct_count", distinct_count cannot be nil.' + end + @distinct_count = distinct_count + end + + # Custom attribute writer method with validation + # @param top [Object] Object to be assigned + # @!visibility private + def top=(top) + if top.nil? + fail ArgumentError, 'invalid value for "top", top cannot be nil.' + end + @top = top + 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 && + distinct_count == o.distinct_count && + top == o.top && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [distinct_count, top, additional_properties].hash + end + end +end