From e69a0555c2348f77b17169749ebbd07051a86f15 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 28 May 2026 15:03:27 +0000 Subject: [PATCH] Regenerate client from commit 0427008 of spec repo --- .generator/schemas/v2/openapi.yaml | 1224 +++++++++++++++++ ...a-device-returns-Not-Found-response.frozen | 1 + ...et-a-device-returns-Not-Found-response.yml | 20 + ...sue-definitions-returns-OK-response.frozen | 1 + ...-issue-definitions-returns-OK-response.yml | 30 + ...Get-all-devices-returns-OK-response.frozen | 1 + .../Get-all-devices-returns-OK-response.yml | 37 + ...ed-by-attribute-returns-OK-response.frozen | 1 + ...ouped-by-attribute-returns-OK-response.yml | 20 + ...-overview-tiles-returns-OK-response.frozen | 1 + ...Get-overview-tiles-returns-OK-response.yml | 20 + .../GetEUDMDevice.rb | 5 + .../GetEUDMDevices.rb | 5 + .../GetEUDMGraph.rb | 5 + .../GetEUDMIssues.rb | 5 + .../GetEUDMOverview.rb | 5 + .../DeleteScopesRestriction.rb | 8 + .../GetScopesRestriction.rb | 8 + .../RegisterOAuthClient.rb | 29 + .../UpsertScopesRestriction.rb | 24 + features/scenarios_model_mapping.rb | 19 + .../v2/end_user_device_monitoring.feature | 49 + features/v2/eudm.feature | 42 + features/v2/oauth2_client_public.feature | 100 ++ features/v2/undo.json | 54 + lib/datadog_api_client/configuration.rb | 4 + lib/datadog_api_client/inflector.rb | 37 + .../v2/api/end_user_device_monitoring_api.rb | 322 +++++ .../v2/api/o_auth2_client_public_api.rb | 319 +++++ .../v2/models/device_base_array.rb | 125 ++ .../v2/models/device_base_data.rb | 154 +++ .../v2/models/device_base_data_attributes.rb | 369 +++++ .../v2/models/device_details.rb | 105 ++ .../v2/models/device_details_data.rb | 155 +++ .../models/device_details_data_attributes.rb | 461 +++++++ .../v2/models/device_details_data_type.rb | 26 + .../v2/models/graph_item_array.rb | 125 ++ .../v2/models/graph_item_data.rb | 154 +++ .../v2/models/graph_item_data_attributes.rb | 117 ++ ...graph_item_data_attributes_counts_items.rb | 116 ++ .../v2/models/graph_item_data_type.rb | 26 + .../v2/models/issue_definition_array.rb | 125 ++ .../v2/models/issue_definition_data.rb | 154 +++ .../issue_definition_data_attributes.rb | 165 +++ .../v2/models/issue_definition_data_type.rb | 26 + .../o_auth_client_registration_error.rb | 144 ++ .../o_auth_client_registration_grant_type.rb | 27 + .../o_auth_client_registration_request.rb | 322 +++++ .../o_auth_client_registration_response.rb | 234 ++++ ..._auth_client_registration_response_type.rb | 26 + .../v2/models/o_auth_oidc_scope.rb | 29 + .../v2/models/o_auth_scopes_restriction.rb | 148 ++ .../o_auth_scopes_restriction_response.rb | 123 ++ ..._scopes_restriction_response_attributes.rb | 127 ++ ...o_auth_scopes_restriction_response_data.rb | 165 +++ .../models/o_auth_scopes_restriction_type.rb | 26 + .../v2/models/overview_item_array.rb | 126 ++ .../v2/models/overview_item_data.rb | 154 +++ .../models/overview_item_data_attributes.rb | 115 ++ .../v2/models/overview_item_data_type.rb | 26 + .../upsert_o_auth_scopes_restriction_data.rb | 133 ++ ...auth_scopes_restriction_data_attributes.rb | 120 ++ ...psert_o_auth_scopes_restriction_request.rb | 123 ++ .../upsert_o_auth_scopes_restriction_type.rb | 26 + 64 files changed, 6993 insertions(+) create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.frozen create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.yml create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.frozen create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.yml create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.frozen create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.yml create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.frozen create mode 100644 cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.yml create mode 100644 examples/v2/end-user-device-monitoring/GetEUDMDevice.rb create mode 100644 examples/v2/end-user-device-monitoring/GetEUDMDevices.rb create mode 100644 examples/v2/end-user-device-monitoring/GetEUDMGraph.rb create mode 100644 examples/v2/end-user-device-monitoring/GetEUDMIssues.rb create mode 100644 examples/v2/end-user-device-monitoring/GetEUDMOverview.rb create mode 100644 examples/v2/oauth2-client-public/DeleteScopesRestriction.rb create mode 100644 examples/v2/oauth2-client-public/GetScopesRestriction.rb create mode 100644 examples/v2/oauth2-client-public/RegisterOAuthClient.rb create mode 100644 examples/v2/oauth2-client-public/UpsertScopesRestriction.rb create mode 100644 features/v2/end_user_device_monitoring.feature create mode 100644 features/v2/eudm.feature create mode 100644 features/v2/oauth2_client_public.feature create mode 100644 lib/datadog_api_client/v2/api/end_user_device_monitoring_api.rb create mode 100644 lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb create mode 100644 lib/datadog_api_client/v2/models/device_base_array.rb create mode 100644 lib/datadog_api_client/v2/models/device_base_data.rb create mode 100644 lib/datadog_api_client/v2/models/device_base_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/device_details.rb create mode 100644 lib/datadog_api_client/v2/models/device_details_data.rb create mode 100644 lib/datadog_api_client/v2/models/device_details_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/device_details_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/graph_item_array.rb create mode 100644 lib/datadog_api_client/v2/models/graph_item_data.rb create mode 100644 lib/datadog_api_client/v2/models/graph_item_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/graph_item_data_attributes_counts_items.rb create mode 100644 lib/datadog_api_client/v2/models/graph_item_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/issue_definition_array.rb create mode 100644 lib/datadog_api_client/v2/models/issue_definition_data.rb create mode 100644 lib/datadog_api_client/v2/models/issue_definition_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/issue_definition_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_client_registration_error.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_client_registration_grant_type.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_client_registration_request.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_client_registration_response.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_client_registration_response_type.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_oidc_scope.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_scopes_restriction.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth_scopes_restriction_type.rb create mode 100644 lib/datadog_api_client/v2/models/overview_item_array.rb create mode 100644 lib/datadog_api_client/v2/models/overview_item_data.rb create mode 100644 lib/datadog_api_client/v2/models/overview_item_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/overview_item_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data.rb create mode 100644 lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_request.rb create mode 100644 lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index dede702aea71..a26fc1aec851 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1034,6 +1034,15 @@ components: required: true schema: type: string + OAuthClientUUIDPathParameter: + description: UUID of the OAuth2 client. + in: path + name: client_uuid + required: true + schema: + example: fafa8e1c-36a5-11f0-a83d-da7ad0900001 + format: uuid + type: string OnDemandTaskId: description: The UUID of the task. example: "6d09294c-9ad9-42fd-a759-a0c1599b4828" @@ -27850,6 +27859,304 @@ components: format: int64 type: integer type: object + DeviceBaseArray: + description: Response body for the list devices endpoint. + properties: + data: + description: List of devices matching the request. + items: + $ref: "#/components/schemas/DeviceBaseData" + type: array + required: + - data + type: object + DeviceBaseData: + description: A single device entry as returned by the list devices endpoint. + properties: + attributes: + $ref: "#/components/schemas/DeviceBaseDataAttributes" + id: + description: Unique identifier of the device. Matches the Datadog host identifier. + example: LAPTOP-DEMO-001 + type: string + type: + $ref: "#/components/schemas/DeviceDetailsDataType" + required: + - type + - id + type: object + DeviceBaseDataAttributes: + description: Common health and identity attributes shared by every End User Device Monitoring device record. + properties: + agent_key: + description: Public key of the Datadog Agent installed on the device. + type: string + agent_version: + description: Version of the Datadog Agent installed on the device. + type: string + battery_max_capacity_pct: + description: Maximum battery capacity expressed as a percentage of the device's design capacity. + format: int64 + type: integer + cpu_cores: + description: Number of physical CPU cores on the device. + format: int64 + type: integer + cpu_logical_processors: + description: Number of logical CPU processors (hardware threads) on the device. + format: int64 + type: integer + cpu_model: + description: Human-readable name of the device's CPU model. + type: string + cpu_usage: + description: Average CPU usage on the device, as a percentage between 0 and 100. + format: double + type: number + disk_usage: + description: Average disk usage on the device, as a percentage between 0 and 100. + format: double + type: number + ip_address: + description: Last observed IPv4 or IPv6 address of the device. + type: string + issues: + description: |- + List of issue identifiers currently affecting the device. + References entries returned by the issues endpoint. + items: + description: Identifier of a single issue currently affecting the device. + type: string + type: array + kernel_name: + description: Name of the operating system kernel running on the device. + type: string + last_seen: + description: Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + type: string + manufacturer: + description: Manufacturer of the device. + type: string + mem_usage: + description: Average memory usage on the device, as a percentage between 0 and 100. + format: double + type: number + memory_total_kb: + description: Total amount of physical memory available on the device, in kilobytes. + format: int64 + type: integer + model_name: + description: Marketing or product name of the device model. + type: string + model_number: + description: Manufacturer-assigned model number of the device. + type: string + os: + description: Operating system family running on the device (for example, `mac`, `windows`, or `linux`). + type: string + os_version: + description: Operating system version running on the device. + type: string + resource_id: + description: Datadog resource identifier for the device. + type: string + serial_number: + description: Serial number assigned to the device by its manufacturer. + type: string + status: + description: Health status of the device computed from its issues and recent telemetry. + type: string + type: + description: Hardware type of the device (for example, `laptop`, `desktop`, or `mobile`). + type: string + uptime: + description: Time elapsed since the device last booted, in seconds. + format: double + type: number + wlan_bssid: + description: |- + BSSID (MAC address of the access point) of the wireless network the device is + currently connected to. + type: string + wlan_rssi: + description: Received signal strength indicator of the device's current wireless connection, in dBm. + format: double + type: number + wlan_ssid: + description: SSID of the wireless network the device is currently connected to. + type: string + type: object + DeviceDetails: + description: Response body for the get device endpoint, returning a single device with full attribute detail. + properties: + data: + $ref: "#/components/schemas/DeviceDetailsData" + type: object + DeviceDetailsData: + description: A single device entry with full attribute detail. + properties: + attributes: + $ref: "#/components/schemas/DeviceDetailsDataAttributes" + id: + description: Unique identifier of the device. Matches the Datadog host identifier. + example: LAPTOP-DEMO-001 + type: string + type: + $ref: "#/components/schemas/DeviceDetailsDataType" + required: + - type + - id + type: object + DeviceDetailsDataAttributes: + description: |- + Extended set of attributes for a single End User Device Monitoring device, + including detailed network and battery metrics. + properties: + agent_key: + description: Public key of the Datadog Agent installed on the device. + type: string + agent_version: + description: Version of the Datadog Agent installed on the device. + type: string + battery_charge_pct: + description: Current battery charge level as a percentage between 0 and 100. + format: int64 + type: integer + battery_charge_rate: + description: |- + Rate at which the battery is charging or discharging, in milliamperes. + Negative values indicate discharge. + format: int64 + type: integer + battery_cycle_count: + description: Number of full charge cycles the battery has gone through. + format: int64 + type: integer + battery_max_capacity_pct: + description: Maximum battery capacity expressed as a percentage of the device's design capacity. + format: int64 + type: integer + cpu_cores: + description: Number of physical CPU cores on the device. + format: int64 + type: integer + cpu_logical_processors: + description: Number of logical CPU processors (hardware threads) on the device. + format: int64 + type: integer + cpu_model: + description: Human-readable name of the device's CPU model. + type: string + cpu_usage: + description: Average CPU usage on the device, as a percentage between 0 and 100. + format: double + type: number + disk_usage: + description: Average disk usage on the device, as a percentage between 0 and 100. + format: double + type: number + ip_address: + description: Last observed IPv4 or IPv6 address of the device. + type: string + issues: + description: |- + List of issue identifiers currently affecting the device. + References entries returned by the issues endpoint. + items: + description: Identifier of a single issue currently affecting the device. + type: string + type: array + kernel_name: + description: Name of the operating system kernel running on the device. + type: string + last_seen: + description: Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + type: string + manufacturer: + description: Manufacturer of the device. + type: string + mem_usage: + description: Average memory usage on the device, as a percentage between 0 and 100. + format: double + type: number + memory_total_kb: + description: Total amount of physical memory available on the device, in kilobytes. + format: int64 + type: integer + model_name: + description: Marketing or product name of the device model. + type: string + model_number: + description: Manufacturer-assigned model number of the device. + type: string + os: + description: Operating system family running on the device (for example, `mac`, `windows`, or `linux`). + type: string + os_version: + description: Operating system version running on the device. + type: string + packets_in_drop: + description: Average rate of dropped inbound network packets, in packets per second. + format: double + type: number + packets_in_error: + description: Average rate of inbound network packets received with errors, in packets per second. + format: double + type: number + packets_out_drop: + description: Average rate of dropped outbound network packets, in packets per second. + format: double + type: number + packets_out_error: + description: Average rate of outbound network packets sent with errors, in packets per second. + format: double + type: number + resource_id: + description: Datadog resource identifier for the device. + type: string + serial_number: + description: Serial number assigned to the device by its manufacturer. + type: string + status: + description: Health status of the device computed from its issues and recent telemetry. + type: string + tcp_out_segs: + description: Average rate of TCP segments sent by the device, in segments per second. + format: double + type: number + tcp_retrans_segs: + description: Average rate of TCP segments retransmitted by the device, in segments per second. + format: double + type: number + type: + description: Hardware type of the device (for example, `laptop`, `desktop`, or `mobile`). + type: string + uptime: + description: Time elapsed since the device last booted, in seconds. + format: double + type: number + wlan_bssid: + description: |- + BSSID (MAC address of the access point) of the wireless network the device is + currently connected to. + type: string + wlan_rssi: + description: Received signal strength indicator of the device's current wireless connection, in dBm. + format: double + type: number + wlan_ssid: + description: SSID of the wireless network the device is currently connected to. + type: string + type: object + DeviceDetailsDataType: + default: devices + description: Devices resource type. + enum: + - devices + example: devices + type: string + x-enum-varnames: + - DEVICES DevicesListData: description: The devices list data properties: @@ -36945,6 +37252,66 @@ components: - id - type type: object + GraphItemArray: + description: Response body for the graph endpoint, returning per-grouping device counts. + properties: + data: + description: List of grouping entries with their associated device counts. + items: + $ref: "#/components/schemas/GraphItemData" + type: array + required: + - data + type: object + GraphItemData: + description: A single grouping entry in the End User Device Monitoring graph response. + properties: + attributes: + $ref: "#/components/schemas/GraphItemDataAttributes" + id: + description: Unique identifier of the grouping, derived from the grouping column. + example: macOS + type: string + type: + $ref: "#/components/schemas/GraphItemDataType" + required: + - type + - id + type: object + GraphItemDataAttributes: + description: Attributes of a single grouping in the End User Device Monitoring graph response. + properties: + counts: + description: List of per-value counts for the grouping column. + items: + $ref: "#/components/schemas/GraphItemDataAttributesCountsItems" + type: array + type: + description: Identifier of the grouping column (for example, `os` or `type`). + type: string + type: object + GraphItemDataAttributesCountsItems: + description: Count of devices for a single value of the grouping column in the End User Device Monitoring graph. + properties: + columnName: + description: |- + Value of the grouping column for this bucket (for example, an operating system + name or a device type). + type: string + count: + description: Number of devices that fall into this bucket. + format: int64 + type: integer + type: object + GraphItemDataType: + default: graph_items + description: Graph items resource type. + enum: + - graph_items + example: graph_items + type: string + x-enum-varnames: + - GRAPH_ITEMS GreyNoiseAPIKey: description: The definition of the `GreyNoiseAPIKey` object. properties: @@ -42037,6 +42404,61 @@ components: type: string x-enum-varnames: - CASE + IssueDefinitionArray: + description: Response body for the issues endpoint, returning all available device issue definitions. + properties: + data: + description: List of available issue definitions. + items: + $ref: "#/components/schemas/IssueDefinitionData" + type: array + required: + - data + type: object + IssueDefinitionData: + description: A single issue definition entry returned by the issues endpoint. + properties: + attributes: + $ref: "#/components/schemas/IssueDefinitionDataAttributes" + id: + description: Stable identifier of the issue definition, used in the `issues` field of a device record. + example: low-battery-capacity + type: string + type: + $ref: "#/components/schemas/IssueDefinitionDataType" + required: + - type + - id + type: object + IssueDefinitionDataAttributes: + description: Attributes of a single End User Device Monitoring issue definition. + properties: + category: + description: Category of the issue (for example, `battery`, `network`, or `performance`). + example: battery + type: string + label: + description: Human-readable label describing the issue, suitable for display in the Datadog UI. + example: Battery health is below 80% + type: string + level: + description: Severity level of the issue (for example, `warning` or `critical`). + example: warning + type: string + required: + - category + - label + - level + type: object + IssueDefinitionDataType: + default: issue_definitions + description: Issue definitions resource type. + enum: + - issue_definitions + example: issue_definitions + type: string + x-enum-varnames: + - ISSUE_DEFINITIONS IssueIncluded: description: An array of related resources, returned when the `include` query parameter is used. oneOf: @@ -54649,6 +55071,256 @@ components: - id - type type: object + OAuthClientRegistrationError: + description: Error payload returned by OAuth2 dynamic client registration as defined by RFC 7591. + properties: + error: + description: Single ASCII error code per RFC 7591, such as `invalid_request` or `invalid_client_metadata`. + example: invalid_client_metadata + type: string + error_description: + description: Human-readable description of the error. + example: redirect URI is not well-formed + type: string + required: + - error + - error_description + type: object + OAuthClientRegistrationGrantType: + description: OAuth 2.0 grant type that a registered client may use. + enum: + - authorization_code + - refresh_token + example: authorization_code + type: string + x-enum-varnames: + - AUTHORIZATION_CODE + - REFRESH_TOKEN + OAuthClientRegistrationRequest: + description: Request payload for OAuth2 dynamic client registration as defined by RFC 7591. + properties: + client_name: + description: Human-readable name of the client. Control characters are rejected. + example: Example MCP Client + maxLength: 1000 + type: string + client_uri: + description: URL of the home page of the client. + example: https://example.com + maxLength: 1000 + type: string + grant_types: + description: |- + OAuth 2.0 grant types the client may use. + Defaults to `authorization_code` and `refresh_token` when omitted. + example: + - authorization_code + - refresh_token + items: + $ref: "#/components/schemas/OAuthClientRegistrationGrantType" + type: array + jwks_uri: + description: URL referencing the client's JSON Web Key Set. + example: https://example.com/.well-known/jwks.json + maxLength: 1000 + type: string + logo_uri: + description: URL referencing a logo for the client. + example: https://example.com/logo.png + maxLength: 1000 + type: string + policy_uri: + description: URL pointing to the client's privacy policy. + example: https://example.com/privacy + maxLength: 1000 + type: string + redirect_uris: + description: Array of redirection URI strings used by the client in redirect-based flows. + example: + - https://example.com/oauth/callback + items: + description: Redirection URI registered for the client. + example: https://example.com/oauth/callback + maxLength: 1000 + type: string + type: array + response_types: + description: OAuth 2.0 response types the client may use. Only `code` is supported. + example: + - code + items: + $ref: "#/components/schemas/OAuthClientRegistrationResponseType" + type: array + scope: + description: Space-separated list of scope values the client may request. + example: openid profile + maxLength: 1000 + type: string + token_endpoint_auth_method: + description: Requested authentication method for the token endpoint. Only `none` is supported. + example: none + maxLength: 20 + type: string + tos_uri: + description: URL pointing to the client's terms of service. + example: https://example.com/tos + maxLength: 1000 + type: string + required: + - client_name + - redirect_uris + type: object + OAuthClientRegistrationResponse: + description: Response payload for a successful OAuth2 dynamic client registration as defined by RFC 7591. + properties: + client_id: + description: Unique identifier assigned to the registered client. + example: 72b68208-36a6-11f0-b21b-da7ad0900002 + format: uuid + type: string + client_name: + description: Human-readable name of the client. + example: Example MCP Client + type: string + grant_types: + description: OAuth 2.0 grant types registered for the client. + example: + - authorization_code + - refresh_token + items: + $ref: "#/components/schemas/OAuthClientRegistrationGrantType" + type: array + redirect_uris: + description: Redirection URIs registered for the client. + example: + - https://example.com/oauth/callback + items: + description: Redirection URI registered for the client. + example: https://example.com/oauth/callback + type: string + type: array + response_types: + description: OAuth 2.0 response types registered for the client. + example: + - code + items: + $ref: "#/components/schemas/OAuthClientRegistrationResponseType" + type: array + token_endpoint_auth_method: + description: Authentication method registered for the token endpoint. Always `none`. + example: none + type: string + required: + - client_id + - client_name + - redirect_uris + - token_endpoint_auth_method + - grant_types + - response_types + type: object + OAuthClientRegistrationResponseType: + description: OAuth 2.0 response type that a registered client may use. + enum: + - code + example: code + type: string + x-enum-varnames: + - CODE + OAuthOidcScope: + description: OIDC scope a client may be restricted to. + enum: + - openid + - profile + - email + - offline_access + example: openid + type: string + x-enum-varnames: + - OPENID + - PROFILE + - EMAIL + - OFFLINE_ACCESS + OAuthScopesRestriction: + description: Allowlist of OIDC and permission scopes enforced for the OAuth2 client. + nullable: true + properties: + oidc_scopes: + description: OIDC scopes the client is restricted to. + example: + - openid + - email + items: + $ref: "#/components/schemas/OAuthOidcScope" + type: array + permission_scopes: + description: Datadog permission scopes the client is restricted to. + example: + - dashboards_read + - metrics_read + items: + description: Datadog permission scope name. + example: dashboards_read + type: string + type: array + required: + - oidc_scopes + - permission_scopes + type: object + OAuthScopesRestrictionResponse: + description: Response payload describing the scopes restriction of an OAuth2 client. + properties: + data: + $ref: "#/components/schemas/OAuthScopesRestrictionResponseData" + required: + - data + type: object + OAuthScopesRestrictionResponseAttributes: + description: Attributes of an OAuth2 client scopes restriction. + properties: + required_permission_scopes: + description: |- + Permission scopes automatically required for this client (for example, mobile-app permission scopes). + Returns `null` when no scopes are required. + example: + - mobile_app_access + items: + description: Datadog permission scope name. + example: mobile_app_access + type: string + nullable: true + type: array + scopes_restriction: + $ref: "#/components/schemas/OAuthScopesRestriction" + required: + - scopes_restriction + - required_permission_scopes + type: object + OAuthScopesRestrictionResponseData: + description: Data object of an OAuth2 client scopes restriction response. + properties: + attributes: + $ref: "#/components/schemas/OAuthScopesRestrictionResponseAttributes" + id: + description: UUID of the OAuth2 client this restriction applies to. + example: fafa8e1c-36a5-11f0-a83d-da7ad0900001 + format: uuid + type: string + type: + $ref: "#/components/schemas/OAuthScopesRestrictionType" + required: + - id + - type + - attributes + type: object + OAuthScopesRestrictionType: + default: scopes_restriction + description: JSON:API resource type for an OAuth2 client scopes restriction. + enum: + - scopes_restriction + example: scopes_restriction + type: string + x-enum-varnames: + - SCOPES_RESTRICTION OCIConfig: description: OCI config. properties: @@ -62639,6 +63311,54 @@ components: - ARRAY_NUMBER - ARRAY_BOOLEAN - ARRAY_OBJECT + OverviewItemArray: + description: |- + Response body for the overview endpoint, returning the tiles shown on the + End User Device Monitoring overview dashboard. + properties: + data: + description: List of overview tiles. + items: + $ref: "#/components/schemas/OverviewItemData" + type: array + required: + - data + type: object + OverviewItemData: + description: A single tile entry in the End User Device Monitoring overview response. + properties: + attributes: + $ref: "#/components/schemas/OverviewItemDataAttributes" + id: + description: Unique identifier of the overview tile. + example: total_devices + type: string + type: + $ref: "#/components/schemas/OverviewItemDataType" + required: + - type + - id + type: object + OverviewItemDataAttributes: + description: Attributes of a single tile in the End User Device Monitoring overview dashboard. + properties: + name: + description: Human-readable name of the overview tile. + type: string + value: + description: Numeric value displayed on the overview tile. + format: int64 + type: integer + type: object + OverviewItemDataType: + default: overview_items + description: Overview items resource type. + enum: + - overview_items + example: overview_items + type: string + x-enum-varnames: + - OVERVIEW_ITEMS OverwriteAllocationsRequest: description: Request to overwrite targeting rules (allocations) for a feature flag in an environment. properties: @@ -92269,6 +92989,57 @@ components: - id - attributes type: object + UpsertOAuthScopesRestrictionData: + description: Data object of an upsert OAuth2 scopes restriction request. + properties: + attributes: + $ref: "#/components/schemas/UpsertOAuthScopesRestrictionDataAttributes" + type: + $ref: "#/components/schemas/UpsertOAuthScopesRestrictionType" + required: + - type + type: object + UpsertOAuthScopesRestrictionDataAttributes: + description: Attributes of an upsert OAuth2 scopes restriction request. + properties: + oidc_scopes: + description: OIDC scopes the client is allowed to request. + example: + - openid + - email + items: + $ref: "#/components/schemas/OAuthOidcScope" + type: array + permission_scopes: + description: |- + Datadog permission scopes the client is allowed to request. + Each value must be a valid permission name. + example: + - dashboards_read + - metrics_read + items: + description: Datadog permission scope name. + example: dashboards_read + type: string + type: array + type: object + UpsertOAuthScopesRestrictionRequest: + description: Request payload for creating or updating the scopes restriction of an OAuth2 client. + properties: + data: + $ref: "#/components/schemas/UpsertOAuthScopesRestrictionData" + required: + - data + type: object + UpsertOAuthScopesRestrictionType: + default: upsert_scopes_restriction + description: JSON:API resource type for an upsert OAuth2 client scopes restriction request. + enum: + - upsert_scopes_restriction + example: upsert_scopes_restriction + type: string + x-enum-varnames: + - UPSERT_SCOPES_RESTRICTION Urgency: description: Specifies the level of urgency for a routing rule (low, high, or dynamic). enum: @@ -115654,6 +116425,234 @@ paths: summary: Update the state of an issue tags: - Error Tracking + /api/v2/eudm/devices: + get: + operationId: GetEUDMDevices + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cpu_usage: 12.4 + disk_usage: 38.2 + issues: [] + last_seen: "2026-05-20T10:15:30Z" + manufacturer: Apple + mem_usage: 47.1 + model_name: MacBook Pro + os: macOS + os_version: macOS 15.6.1 arm64 + status: healthy + id: LAPTOP-DEMO-001 + type: devices + schema: + $ref: "#/components/schemas/DeviceBaseArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get all devices + tags: + - End User Device Monitoring + /api/v2/eudm/devices/{device_id}: + get: + operationId: GetEUDMDevice + parameters: + - description: Unique identifier of the device to fetch. Matches the Datadog host identifier. + in: path + name: device_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + battery_charge_pct: 82 + battery_charge_rate: 1200 + battery_cycle_count: 134 + battery_max_capacity_pct: 96 + cpu_cores: 10 + cpu_logical_processors: 10 + cpu_model: Apple M1 Pro + cpu_usage: 12.4 + disk_usage: 38.2 + ip_address: 192.0.2.10 + issues: [] + kernel_name: Darwin + last_seen: "2026-05-20T10:15:30Z" + manufacturer: Apple + mem_usage: 47.1 + memory_total_kb: 16777216 + model_name: MacBook Pro + model_number: MacBookPro18,3 + os: macOS + os_version: macOS 15.6.1 arm64 + packets_in_drop: 0.0 + packets_in_error: 0.0 + packets_out_drop: 0.0 + packets_out_error: 0.0 + serial_number: TESTDEVICE001 + status: healthy + tcp_out_segs: 4321.0 + tcp_retrans_segs: 12.0 + uptime: 432000 + wlan_bssid: 00:00:5e:00:53:01 + wlan_rssi: -55.0 + wlan_ssid: corp-wifi + id: LAPTOP-DEMO-001 + type: devices + schema: + $ref: "#/components/schemas/DeviceDetails" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get a device + tags: + - End User Device Monitoring + /api/v2/eudm/graph: + get: + operationId: GetEUDMGraph + parameters: + - description: |- + Device attribute to group by (for example, `os` or `type`). + Determines which column the response counts are bucketed against. + in: query + name: by + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + counts: + - columnName: mac + count: 42 + - columnName: windows + count: 17 + - columnName: linux + count: 3 + type: os + id: os + type: graph_items + schema: + $ref: "#/components/schemas/GraphItemArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get device counts grouped by attribute + tags: + - End User Device Monitoring + /api/v2/eudm/issues: + get: + operationId: GetEUDMIssues + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + category: battery + label: Battery health is below 80% + level: warning + id: battery_low_health + type: issue_definitions + - attributes: + category: agent + label: Datadog Agent has not reported in over 24 hours + level: critical + id: agent_offline + type: issue_definitions + schema: + $ref: "#/components/schemas/IssueDefinitionArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get all device issue definitions + tags: + - End User Device Monitoring + /api/v2/eudm/overview: + get: + operationId: GetEUDMOverview + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + name: Total devices + value: 62 + id: total_devices + type: overview_items + - attributes: + name: Devices with issues + value: 4 + id: devices_with_issues + type: overview_items + schema: + $ref: "#/components/schemas/OverviewItemArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get overview tiles + tags: + - End User Device Monitoring /api/v2/events: get: description: |- @@ -134428,6 +135427,223 @@ paths: summary: Get all aggregated DNS traffic tags: - Cloud Network Monitoring + /api/v2/oauth2/clients/{client_uuid}/scopes_restriction: + delete: + description: Delete the scopes restriction configured for the OAuth2 client. + operationId: DeleteScopesRestriction + parameters: + - $ref: "#/components/parameters/OAuthClientUUIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an OAuth2 client scopes restriction + tags: + - OAuth2 Client Public + x-permission: + operator: OR + permissions: + - org_authorized_apps_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the scopes restriction configured for the OAuth2 client. + operationId: GetScopesRestriction + parameters: + - $ref: "#/components/parameters/OAuthClientUUIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + required_permission_scopes: + scopes_restriction: + oidc_scopes: + - openid + - email + permission_scopes: + - dashboards_read + - metrics_read + id: fafa8e1c-36a5-11f0-a83d-da7ad0900001 + type: scopes_restriction + schema: + $ref: "#/components/schemas/OAuthScopesRestrictionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an OAuth2 client scopes restriction + tags: + - OAuth2 Client Public + x-permission: + operator: OR + permissions: + - org_authorized_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create or update the scopes restriction configured for the OAuth2 client. + operationId: UpsertScopesRestriction + parameters: + - $ref: "#/components/parameters/OAuthClientUUIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + oidc_scopes: + - openid + - email + permission_scopes: + - dashboards_read + - metrics_read + type: upsert_scopes_restriction + schema: + $ref: "#/components/schemas/UpsertOAuthScopesRestrictionRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + required_permission_scopes: + scopes_restriction: + oidc_scopes: + - openid + - email + permission_scopes: + - dashboards_read + - metrics_read + id: fafa8e1c-36a5-11f0-a83d-da7ad0900001 + type: scopes_restriction + schema: + $ref: "#/components/schemas/OAuthScopesRestrictionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Upsert an OAuth2 client scopes restriction + tags: + - OAuth2 Client Public + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - org_authorized_apps_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/oauth2/register: + post: + description: Register an OAuth2 client using the Dynamic Client Registration protocol defined in RFC 7591. + operationId: RegisterOAuthClient + requestBody: + content: + application/json: + examples: + default: + value: + client_name: Example MCP Client + grant_types: + - authorization_code + - refresh_token + redirect_uris: + - https://example.com/oauth/callback + response_types: + - code + token_endpoint_auth_method: none + schema: + $ref: "#/components/schemas/OAuthClientRegistrationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + client_id: 72b68208-36a6-11f0-b21b-da7ad0900002 + client_name: Example MCP Client + grant_types: + - authorization_code + - refresh_token + redirect_uris: + - https://example.com/oauth/callback + response_types: + - code + token_endpoint_auth_method: none + schema: + $ref: "#/components/schemas/OAuthClientRegistrationResponse" + description: Created + "400": + content: + application/json: + examples: + default: + value: + error: invalid_client_metadata + error_description: redirect URI is not well-formed + schema: + $ref: "#/components/schemas/OAuthClientRegistrationError" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: [] + summary: Register an OAuth2 client + tags: + - OAuth2 Client Public + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/obs-pipelines/pipelines: get: description: Retrieve a list of pipelines. @@ -167676,6 +168892,10 @@ tags: scopes from alerting. Downtime settings, which can be scheduled with start and end times, prevent all alerting related to specified Datadog tags. name: Downtimes + - description: |- + Inspect devices reported by the Datadog Agent on end-user laptops, desktops, + and mobile devices, including their health, hardware, and connectivity attributes. + name: End User Device Monitoring - description: Manage per-integration configurations for the Internal Developer Portal (IDP). These configurations control which external resources (for example, GitHub repositories, Jira projects, or PagerDuty services) are synced as entities into the Software Catalog. name: Entity Integration Configs - description: Retrieves security risk scores for entities in your organization. @@ -167842,6 +169062,10 @@ tags: - description: |- The Network Device Monitoring API allows you to fetch devices and interfaces and their attributes. See the [Network Device Monitoring page](https://docs.datadoghq.com/network_monitoring/) for more information. name: Network Device Monitoring + - description: |- + Configure OAuth2 clients for Datadog. + Supports RFC 7591 Dynamic Client Registration and management of OAuth2 client scopes restrictions. + name: OAuth2 Client Public - description: Auto-generated tag OCI Integration name: OCI Integration - description: |- diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.frozen b/cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..94c48fa60084 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:26.244Z \ No newline at end of file diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.yml b/cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.yml new file mode 100644 index 000000000000..79dea6d428a9 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-a-device-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Tue, 26 May 2026 22:33:26 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/devices/not_found + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Not Found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.frozen b/cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.frozen new file mode 100644 index 000000000000..c79fc24e6148 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.655Z \ No newline at end of file diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.yml b/cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.yml new file mode 100644 index 000000000000..8a9f63c96331 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-all-device-issue-definitions-returns-OK-response.yml @@ -0,0 +1,30 @@ +http_interactions: +- recorded_at: Tue, 26 May 2026 22:33:27 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/issues + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"high-cpu","type":"issue_definitions","attributes":{"category":"cpu","label":"CPU + Usage above 70%","level":"warning"}},{"id":"critical-cpu","type":"issue_definitions","attributes":{"category":"cpu","label":"CPU + Usage above 90%","level":"critical"}},{"id":"high-memory","type":"issue_definitions","attributes":{"category":"memory","label":"Memory + Usage above 75%","level":"warning"}},{"id":"critical-memory","type":"issue_definitions","attributes":{"category":"memory","label":"Memory + Usage above 90%","level":"critical"}},{"id":"high-disk","type":"issue_definitions","attributes":{"category":"disk","label":"Disk + Usage above 80%","level":"warning"}},{"id":"critical-disk","type":"issue_definitions","attributes":{"category":"disk","label":"Disk + Usage above 95%","level":"critical"}},{"id":"low-battery-capacity","type":"issue_definitions","attributes":{"category":"battery","label":"Battery + Capacity below 80%","level":"warning"}},{"id":"critical-battery-capacity","type":"issue_definitions","attributes":{"category":"battery","label":"Battery + Capacity below 70%","level":"critical"}},{"id":"weak-wifi","type":"issue_definitions","attributes":{"category":"wifi","label":"Poor + WiFi Connectivity","level":"warning"}},{"id":"recent-restart","type":"issue_definitions","attributes":{"category":"notable_events","label":"Recent + System Restart","level":"info"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.frozen b/cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.frozen new file mode 100644 index 000000000000..408385be9a51 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.236Z \ No newline at end of file diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.yml b/cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.yml new file mode 100644 index 000000000000..b798a8463982 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-all-devices-returns-OK-response.yml @@ -0,0 +1,37 @@ +http_interactions: +- recorded_at: Tue, 26 May 2026 22:33:27 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/devices + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"LAPTOP-DEMO-001","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_model":"Apple + M1 Pro","cpu_cores":10,"cpu_logical_processors":10,"cpu_usage":11.4,"mem_usage":47.1,"memory_total_kb":16777216,"disk_usage":38.2,"ip_address":"192.0.2.10","issues":[],"kernel_name":"Darwin","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Apple","model_name":"MacBook + Pro","model_number":"MacBookPro18,3","os":"macOS","os_version":"macOS 15.6.1 + arm64","resource_id":"10000000000001","serial_number":"TESTDEVICE001","status":"healthy","type":"laptop","uptime":432000.0,"wlan_bssid":"00:00:5e:00:53:01","wlan_rssi":-55.0,"wlan_ssid":"corp-wifi"}},{"id":"LAPTOP-DEMO-002","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_model":"Intel(R) + Core(TM) i7-1185G7","cpu_cores":4,"cpu_logical_processors":8,"cpu_usage":76.2,"mem_usage":81.5,"memory_total_kb":16777216,"disk_usage":62.4,"ip_address":"192.0.2.11","issues":["high-cpu","high-memory"],"kernel_name":"WindowsNT","last_seen":"2026-05-26T22:48:30Z","manufacturer":"Dell + Inc.","model_name":"Latitude 5420","model_number":"Latitude 5420","os":"Windows","os_version":"Windows + 11 Pro 10.0 Build 22631","resource_id":"10000000000002","serial_number":"TESTDEVICE002","status":"degraded","type":"laptop","uptime":86400.0,"wlan_bssid":"00:00:5e:00:53:02","wlan_rssi":-72.5,"wlan_ssid":"corp-wifi"}},{"id":"LAPTOP-DEMO-003","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.71.0","cpu_model":"Intel(R) + Core(TM) i5-1135G7","cpu_cores":4,"cpu_logical_processors":8,"cpu_usage":92.8,"mem_usage":95.2,"memory_total_kb":8388608,"disk_usage":96.5,"ip_address":"198.51.100.10","issues":["critical-cpu","critical-memory","critical-disk"],"kernel_name":"WindowsNT","last_seen":"2026-05-26T22:47:00Z","manufacturer":"Lenovo","model_name":"ThinkPad + X1 Carbon","model_number":"20XW","os":"Windows","os_version":"Windows 10 Pro + 10.0 Build 19045","resource_id":"10000000000003","serial_number":"TESTDEVICE003","status":"critical","type":"laptop","uptime":7200.0,"wlan_bssid":"00:00:5e:00:53:03","wlan_rssi":-81.0,"wlan_ssid":"guest-network"}},{"id":"DESKTOP-DEMO-001","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_model":"AMD + Ryzen 7 5800X","cpu_cores":8,"cpu_logical_processors":16,"cpu_usage":8.3,"mem_usage":32.0,"memory_total_kb":33554432,"disk_usage":41.7,"ip_address":"192.0.2.20","issues":[],"kernel_name":"WindowsNT","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Custom","model_name":"Workstation","model_number":"","os":"Windows","os_version":"Windows + 11 Pro 10.0 Build 26100","resource_id":"10000000000004","serial_number":"TESTDEVICE004","status":"healthy","type":"desktop","uptime":1209600.0,"wlan_bssid":"","wlan_ssid":""}},{"id":"LAPTOP-DEMO-004","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","battery_max_capacity_pct":73,"cpu_model":"Apple + M2","cpu_cores":8,"cpu_logical_processors":8,"cpu_usage":22.1,"mem_usage":55.0,"memory_total_kb":16777216,"disk_usage":51.0,"ip_address":"192.0.2.21","issues":["low-battery-capacity"],"kernel_name":"Darwin","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Apple","model_name":"MacBook + Air","model_number":"Mac14,2","os":"macOS","os_version":"macOS 26.4.1 arm64","resource_id":"10000000000005","serial_number":"TESTDEVICE005","status":"degraded","type":"laptop","uptime":14400.0,"wlan_bssid":"00:00:5e:00:53:05","wlan_rssi":-62.0,"wlan_ssid":"home-network"}},{"id":"LAPTOP-DEMO-005","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.70.0","ip_address":"203.0.113.10","issues":[],"kernel_name":"WindowsNT","last_seen":"2026-05-20T08:15:00Z","manufacturer":"HP","model_name":"EliteBook + 840","model_number":"G9","os":"Windows","os_version":"Windows 11 Pro 10.0 + Build 22621","resource_id":"10000000000006","serial_number":"TESTDEVICE006","status":"inactive","type":"laptop","wlan_ssid":"","wlan_bssid":""}},{"id":"DESKTOP-DEMO-002","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_cores":16,"cpu_logical_processors":32,"cpu_model":"AMD + Ryzen 9 7950X","cpu_usage":14.6,"mem_usage":28.4,"memory_total_kb":67108864,"disk_usage":22.1,"ip_address":"198.51.100.20","issues":[],"kernel_name":"Linux","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Custom","model_name":"Workstation","model_number":"","os":"linux","os_version":"Ubuntu + 24.04 LTS","resource_id":"10000000000007","serial_number":"TESTDEVICE007","status":"healthy","type":"desktop","uptime":2592000.0}},{"id":"DEVICE-DEMO-UNKNOWN","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.65.0","ip_address":"203.0.113.20","issues":["recent-restart"],"last_seen":"2026-05-26T22:35:00Z","os":"","os_version":"","resource_id":"10000000000008","status":"healthy","type":"unknown"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.frozen b/cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.frozen new file mode 100644 index 000000000000..a51815e9e18b --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.588Z \ No newline at end of file diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.yml b/cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.yml new file mode 100644 index 000000000000..19b3ef0aba61 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-device-counts-grouped-by-attribute-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Tue, 26 May 2026 22:33:27 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/graph?by=os + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"macOS","type":"graph_items","attributes":{"type":"macOS","counts":[{"columnName":"total","count":18},{"columnName":"healthy","count":9},{"columnName":"degraded","count":4},{"columnName":"critical","count":1},{"columnName":"inactive","count":4}]}},{"id":"Windows","type":"graph_items","attributes":{"type":"Windows","counts":[{"columnName":"total","count":112},{"columnName":"healthy","count":48},{"columnName":"degraded","count":17},{"columnName":"critical","count":5},{"columnName":"inactive","count":42}]}},{"id":"linux","type":"graph_items","attributes":{"type":"linux","counts":[{"columnName":"total","count":7},{"columnName":"healthy","count":6},{"columnName":"degraded","count":0},{"columnName":"critical","count":0},{"columnName":"inactive","count":1}]}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.frozen b/cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.frozen new file mode 100644 index 000000000000..0185521c5592 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.698Z \ No newline at end of file diff --git a/cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.yml b/cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.yml new file mode 100644 index 000000000000..0f92aaa5f576 --- /dev/null +++ b/cassettes/features/v2/end_user_device_monitoring/Get-overview-tiles-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Tue, 26 May 2026 22:33:27 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/overview + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"total","type":"overview_items","attributes":{"name":"total","value":0}},{"id":"healthy","type":"overview_items","attributes":{"name":"healthy","value":0}},{"id":"degraded","type":"overview_items","attributes":{"name":"degraded","value":0}},{"id":"critical","type":"overview_items","attributes":{"name":"critical","value":0}},{"id":"inactive","type":"overview_items","attributes":{"name":"inactive","value":0}},{"id":"high-cpu","type":"overview_items","attributes":{"name":"high-cpu","value":0}},{"id":"weak-wifi","type":"overview_items","attributes":{"name":"weak-wifi","value":0}},{"id":"recent-restart","type":"overview_items","attributes":{"name":"recent-restart","value":0}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/end-user-device-monitoring/GetEUDMDevice.rb b/examples/v2/end-user-device-monitoring/GetEUDMDevice.rb new file mode 100644 index 000000000000..79d9ee6e7767 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMDevice.rb @@ -0,0 +1,5 @@ +# Get a device returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::EndUserDeviceMonitoringAPI.new +p api_instance.get_eudm_device("device_id") diff --git a/examples/v2/end-user-device-monitoring/GetEUDMDevices.rb b/examples/v2/end-user-device-monitoring/GetEUDMDevices.rb new file mode 100644 index 000000000000..ae06f81b98b1 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMDevices.rb @@ -0,0 +1,5 @@ +# Get all devices returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::EndUserDeviceMonitoringAPI.new +p api_instance.get_eudm_devices() diff --git a/examples/v2/end-user-device-monitoring/GetEUDMGraph.rb b/examples/v2/end-user-device-monitoring/GetEUDMGraph.rb new file mode 100644 index 000000000000..2c4f79a8c181 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMGraph.rb @@ -0,0 +1,5 @@ +# Get device counts grouped by attribute returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::EndUserDeviceMonitoringAPI.new +p api_instance.get_eudm_graph("by") diff --git a/examples/v2/end-user-device-monitoring/GetEUDMIssues.rb b/examples/v2/end-user-device-monitoring/GetEUDMIssues.rb new file mode 100644 index 000000000000..eb62df2eb333 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMIssues.rb @@ -0,0 +1,5 @@ +# Get all device issue definitions returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::EndUserDeviceMonitoringAPI.new +p api_instance.get_eudm_issues() diff --git a/examples/v2/end-user-device-monitoring/GetEUDMOverview.rb b/examples/v2/end-user-device-monitoring/GetEUDMOverview.rb new file mode 100644 index 000000000000..f015d98dc3b1 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMOverview.rb @@ -0,0 +1,5 @@ +# Get overview tiles returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::EndUserDeviceMonitoringAPI.new +p api_instance.get_eudm_overview() diff --git a/examples/v2/oauth2-client-public/DeleteScopesRestriction.rb b/examples/v2/oauth2-client-public/DeleteScopesRestriction.rb new file mode 100644 index 000000000000..19ef9539a0ad --- /dev/null +++ b/examples/v2/oauth2-client-public/DeleteScopesRestriction.rb @@ -0,0 +1,8 @@ +# Delete an OAuth2 client scopes restriction returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_scopes_restriction".to_sym] = true +end +api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new +api_instance.delete_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001") diff --git a/examples/v2/oauth2-client-public/GetScopesRestriction.rb b/examples/v2/oauth2-client-public/GetScopesRestriction.rb new file mode 100644 index 000000000000..f959d785e912 --- /dev/null +++ b/examples/v2/oauth2-client-public/GetScopesRestriction.rb @@ -0,0 +1,8 @@ +# Get an OAuth2 client scopes restriction returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_scopes_restriction".to_sym] = true +end +api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new +p api_instance.get_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001") diff --git a/examples/v2/oauth2-client-public/RegisterOAuthClient.rb b/examples/v2/oauth2-client-public/RegisterOAuthClient.rb new file mode 100644 index 000000000000..d438389b1248 --- /dev/null +++ b/examples/v2/oauth2-client-public/RegisterOAuthClient.rb @@ -0,0 +1,29 @@ +# Register an OAuth2 client returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.register_o_auth_client".to_sym] = true +end +api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new + +body = DatadogAPIClient::V2::OAuthClientRegistrationRequest.new({ + client_name: "Example MCP Client", + client_uri: "https://example.com", + grant_types: [ + DatadogAPIClient::V2::OAuthClientRegistrationGrantType::AUTHORIZATION_CODE, + DatadogAPIClient::V2::OAuthClientRegistrationGrantType::REFRESH_TOKEN, + ], + jwks_uri: "https://example.com/.well-known/jwks.json", + logo_uri: "https://example.com/logo.png", + policy_uri: "https://example.com/privacy", + redirect_uris: [ + "https://example.com/oauth/callback", + ], + response_types: [ + DatadogAPIClient::V2::OAuthClientRegistrationResponseType::CODE, + ], + scope: "openid profile", + token_endpoint_auth_method: "none", + tos_uri: "https://example.com/tos", +}) +p api_instance.register_o_auth_client(body) diff --git a/examples/v2/oauth2-client-public/UpsertScopesRestriction.rb b/examples/v2/oauth2-client-public/UpsertScopesRestriction.rb new file mode 100644 index 000000000000..157b32764346 --- /dev/null +++ b/examples/v2/oauth2-client-public/UpsertScopesRestriction.rb @@ -0,0 +1,24 @@ +# Upsert an OAuth2 client scopes restriction returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.upsert_scopes_restriction".to_sym] = true +end +api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new + +body = DatadogAPIClient::V2::UpsertOAuthScopesRestrictionRequest.new({ + data: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionData.new({ + attributes: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionDataAttributes.new({ + oidc_scopes: [ + DatadogAPIClient::V2::OAuthOidcScope::OPENID, + DatadogAPIClient::V2::OAuthOidcScope::EMAIL, + ], + permission_scopes: [ + "dashboards_read", + "metrics_read", + ], + }), + type: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionType::UPSERT_SCOPES_RESTRICTION, + }), +}) +p api_instance.upsert_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 95054c25f8dd..9e9d2c3d19ff 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2942,6 +2942,12 @@ "issue_id" => "String", "body" => "IssueUpdateStateRequest", }, + "v2.GetEUDMDevice" => { + "device_id" => "String", + }, + "v2.GetEUDMGraph" => { + "by" => "String", + }, "v2.ListEvents" => { "filter_query" => "String", "filter_from" => "String", @@ -3881,6 +3887,19 @@ "tags" => "String", "limit" => "Integer", }, + "v2.DeleteScopesRestriction" => { + "client_uuid" => "UUID", + }, + "v2.GetScopesRestriction" => { + "client_uuid" => "UUID", + }, + "v2.UpsertScopesRestriction" => { + "client_uuid" => "UUID", + "body" => "UpsertOAuthScopesRestrictionRequest", + }, + "v2.RegisterOAuthClient" => { + "body" => "OAuthClientRegistrationRequest", + }, "v2.ListPipelines" => { "page_size" => "Integer", "page_number" => "Integer", diff --git a/features/v2/end_user_device_monitoring.feature b/features/v2/end_user_device_monitoring.feature new file mode 100644 index 000000000000..00e5433bd70b --- /dev/null +++ b/features/v2/end_user_device_monitoring.feature @@ -0,0 +1,49 @@ +@endpoint(end-user-device-monitoring) @endpoint(end-user-device-monitoring-v2) +Feature: End User Device Monitoring + Inspect devices reported by the Datadog Agent on end-user laptops, + desktops, and mobile devices, including their health, hardware, and + connectivity attributes. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "EndUserDeviceMonitoring" API + + @generated @skip @team:DataDog/windows-products + Scenario: Get a device returns "Not Found" response + Given new "GetEUDMDevice" request + And request contains "device_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/windows-products + Scenario: Get a device returns "OK" response + Given new "GetEUDMDevice" request + And request contains "device_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get all device issue definitions returns "OK" response + Given new "GetEUDMIssues" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get all devices returns "OK" response + Given new "GetEUDMDevices" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get device counts grouped by attribute returns "OK" response + Given new "GetEUDMGraph" request + And request contains "by" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get overview tiles returns "OK" response + Given new "GetEUDMOverview" request + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/eudm.feature b/features/v2/eudm.feature new file mode 100644 index 000000000000..6c929e77a997 --- /dev/null +++ b/features/v2/eudm.feature @@ -0,0 +1,42 @@ +@endpoint(eudm) @endpoint(eudm-v2) +Feature: End User Device Monitoring + Inspect devices reported by the Datadog Agent on end-user laptops, desktops, + and mobile devices, including their health, hardware, and connectivity + attributes. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "EndUserDeviceMonitoring" API + + @team:DataDog/windows-products + Scenario: Get a device returns "Not Found" response + Given new "GetEUDMDevice" request + And request contains "device_id" parameter with value "not_found" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/windows-products + Scenario: Get all devices returns "OK" response + Given new "GetEUDMDevices" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/windows-products + Scenario: Get device counts grouped by attribute returns "OK" response + Given new "GetEUDMGraph" request + And request contains "by" parameter with value "os" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/windows-products + Scenario: Get all device issue definitions returns "OK" response + Given new "GetEUDMIssues" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/windows-products + Scenario: Get overview tiles returns "OK" response + Given new "GetEUDMOverview" request + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/oauth2_client_public.feature b/features/v2/oauth2_client_public.feature new file mode 100644 index 000000000000..a5c7d195efa7 --- /dev/null +++ b/features/v2/oauth2_client_public.feature @@ -0,0 +1,100 @@ +@endpoint(oauth2-client-public) @endpoint(oauth2-client-public-v2) +Feature: OAuth2 Client Public + Configure OAuth2 clients for Datadog. Supports RFC 7591 Dynamic Client + Registration and management of OAuth2 client scopes restrictions. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OAuth2ClientPublic" API + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Delete an OAuth2 client scopes restriction returns "Bad Request" response + Given operation "DeleteScopesRestriction" enabled + And new "DeleteScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Delete an OAuth2 client scopes restriction returns "No Content" response + Given operation "DeleteScopesRestriction" enabled + And new "DeleteScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Delete an OAuth2 client scopes restriction returns "Not Found" response + Given operation "DeleteScopesRestriction" enabled + And new "DeleteScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Get an OAuth2 client scopes restriction returns "Bad Request" response + Given operation "GetScopesRestriction" enabled + And new "GetScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Get an OAuth2 client scopes restriction returns "Not Found" response + Given operation "GetScopesRestriction" enabled + And new "GetScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Get an OAuth2 client scopes restriction returns "OK" response + Given operation "GetScopesRestriction" enabled + And new "GetScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Register an OAuth2 client returns "Bad Request" response + Given operation "RegisterOAuthClient" enabled + And new "RegisterOAuthClient" request + And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Register an OAuth2 client returns "Created" response + Given operation "RegisterOAuthClient" enabled + And new "RegisterOAuthClient" request + And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Upsert an OAuth2 client scopes restriction returns "Bad Request" response + Given operation "UpsertScopesRestriction" enabled + And new "UpsertScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Upsert an OAuth2 client scopes restriction returns "Not Found" response + Given operation "UpsertScopesRestriction" enabled + And new "UpsertScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Upsert an OAuth2 client scopes restriction returns "OK" response + Given operation "UpsertScopesRestriction" enabled + And new "UpsertScopesRestriction" request + And request contains "client_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 0878797ffd8c..05798ab7d632 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2382,6 +2382,36 @@ "type": "idempotent" } }, + "GetEUDMDevices": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMDevice": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMGraph": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMIssues": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMOverview": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, "ListEvents": { "tag": "Events", "undo": { @@ -4678,6 +4708,30 @@ "type": "safe" } }, + "DeleteScopesRestriction": { + "tag": "OAuth2 Client Public", + "undo": { + "type": "idempotent" + } + }, + "GetScopesRestriction": { + "tag": "OAuth2 Client Public", + "undo": { + "type": "safe" + } + }, + "UpsertScopesRestriction": { + "tag": "OAuth2 Client Public", + "undo": { + "type": "idempotent" + } + }, + "RegisterOAuthClient": { + "tag": "OAuth2 Client Public", + "undo": { + "type": "idempotent" + } + }, "ListPipelines": { "tag": "Observability Pipelines", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index bf08354c8d54..19120a954229 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -520,6 +520,10 @@ def initialize "v2.update_monitor_user_template": false, "v2.validate_existing_monitor_user_template": false, "v2.validate_monitor_user_template": false, + "v2.delete_scopes_restriction": false, + "v2.get_scopes_restriction": false, + "v2.register_o_auth_client": false, + "v2.upsert_scopes_restriction": false, "v2.bulk_update_org_group_memberships": false, "v2.create_org_group": false, "v2.create_org_group_policy": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index abbf1654651c..ddf44f1aa6b1 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2687,6 +2687,13 @@ def overrides "v2.detailed_finding_type" => "DetailedFindingType", "v2.device_attributes" => "DeviceAttributes", "v2.device_attributes_interface_statuses" => "DeviceAttributesInterfaceStatuses", + "v2.device_base_array" => "DeviceBaseArray", + "v2.device_base_data" => "DeviceBaseData", + "v2.device_base_data_attributes" => "DeviceBaseDataAttributes", + "v2.device_details" => "DeviceDetails", + "v2.device_details_data" => "DeviceDetailsData", + "v2.device_details_data_attributes" => "DeviceDetailsDataAttributes", + "v2.device_details_data_type" => "DeviceDetailsDataType", "v2.devices_list_data" => "DevicesListData", "v2.dns_metric_key" => "DnsMetricKey", "v2.domain_allowlist" => "DomainAllowlist", @@ -3300,6 +3307,11 @@ def overrides "v2.google_chat_update_organization_handle_request_data" => "GoogleChatUpdateOrganizationHandleRequestData", "v2.google_meet_configuration_reference" => "GoogleMeetConfigurationReference", "v2.google_meet_configuration_reference_data" => "GoogleMeetConfigurationReferenceData", + "v2.graph_item_array" => "GraphItemArray", + "v2.graph_item_data" => "GraphItemData", + "v2.graph_item_data_attributes" => "GraphItemDataAttributes", + "v2.graph_item_data_attributes_counts_items" => "GraphItemDataAttributesCountsItems", + "v2.graph_item_data_type" => "GraphItemDataType", "v2.grey_noise_api_key" => "GreyNoiseAPIKey", "v2.grey_noise_api_key_type" => "GreyNoiseAPIKeyType", "v2.grey_noise_api_key_update" => "GreyNoiseAPIKeyUpdate", @@ -3611,6 +3623,10 @@ def overrides "v2.issue_case_relationship" => "IssueCaseRelationship", "v2.issue_case_relationships" => "IssueCaseRelationships", "v2.issue_case_resource_type" => "IssueCaseResourceType", + "v2.issue_definition_array" => "IssueDefinitionArray", + "v2.issue_definition_data" => "IssueDefinitionData", + "v2.issue_definition_data_attributes" => "IssueDefinitionDataAttributes", + "v2.issue_definition_data_type" => "IssueDefinitionDataType", "v2.issue_included" => "IssueIncluded", "v2.issue_language" => "IssueLanguage", "v2.issue_platform" => "IssuePlatform", @@ -4442,6 +4458,17 @@ def overrides "v2.nullable_relationship_to_user_data" => "NullableRelationshipToUserData", "v2.nullable_user_relationship" => "NullableUserRelationship", "v2.nullable_user_relationship_data" => "NullableUserRelationshipData", + "v2.o_auth_client_registration_error" => "OAuthClientRegistrationError", + "v2.o_auth_client_registration_grant_type" => "OAuthClientRegistrationGrantType", + "v2.o_auth_client_registration_request" => "OAuthClientRegistrationRequest", + "v2.o_auth_client_registration_response" => "OAuthClientRegistrationResponse", + "v2.o_auth_client_registration_response_type" => "OAuthClientRegistrationResponseType", + "v2.o_auth_oidc_scope" => "OAuthOidcScope", + "v2.o_auth_scopes_restriction" => "OAuthScopesRestriction", + "v2.o_auth_scopes_restriction_response" => "OAuthScopesRestrictionResponse", + "v2.o_auth_scopes_restriction_response_attributes" => "OAuthScopesRestrictionResponseAttributes", + "v2.o_auth_scopes_restriction_response_data" => "OAuthScopesRestrictionResponseData", + "v2.o_auth_scopes_restriction_type" => "OAuthScopesRestrictionType", "v2.observability_pipeline" => "ObservabilityPipeline", "v2.observability_pipeline_add_env_vars_processor" => "ObservabilityPipelineAddEnvVarsProcessor", "v2.observability_pipeline_add_env_vars_processor_type" => "ObservabilityPipelineAddEnvVarsProcessorType", @@ -4949,6 +4976,10 @@ def overrides "v2.output_schema" => "OutputSchema", "v2.output_schema_parameters" => "OutputSchemaParameters", "v2.output_schema_parameters_type" => "OutputSchemaParametersType", + "v2.overview_item_array" => "OverviewItemArray", + "v2.overview_item_data" => "OverviewItemData", + "v2.overview_item_data_attributes" => "OverviewItemDataAttributes", + "v2.overview_item_data_type" => "OverviewItemDataType", "v2.overwrite_allocations_request" => "OverwriteAllocationsRequest", "v2.page_urgency" => "PageUrgency", "v2.paginated_response_meta" => "PaginatedResponseMeta", @@ -6832,6 +6863,10 @@ def overrides "v2.upsert_cloud_inventory_sync_config_request" => "UpsertCloudInventorySyncConfigRequest", "v2.upsert_cloud_inventory_sync_config_request_attributes" => "UpsertCloudInventorySyncConfigRequestAttributes", "v2.upsert_cloud_inventory_sync_config_request_data" => "UpsertCloudInventorySyncConfigRequestData", + "v2.upsert_o_auth_scopes_restriction_data" => "UpsertOAuthScopesRestrictionData", + "v2.upsert_o_auth_scopes_restriction_data_attributes" => "UpsertOAuthScopesRestrictionDataAttributes", + "v2.upsert_o_auth_scopes_restriction_request" => "UpsertOAuthScopesRestrictionRequest", + "v2.upsert_o_auth_scopes_restriction_type" => "UpsertOAuthScopesRestrictionType", "v2.urgency" => "Urgency", "v2.url_param" => "UrlParam", "v2.url_param_update" => "UrlParamUpdate", @@ -7071,6 +7106,7 @@ def overrides "v2.domain_allowlist_api" => "DomainAllowlistAPI", "v2.dora_metrics_api" => "DORAMetricsAPI", "v2.downtimes_api" => "DowntimesAPI", + "v2.end_user_device_monitoring_api" => "EndUserDeviceMonitoringAPI", "v2.entity_integration_configs_api" => "EntityIntegrationConfigsAPI", "v2.entity_risk_scores_api" => "EntityRiskScoresAPI", "v2.error_tracking_api" => "ErrorTrackingAPI", @@ -7098,6 +7134,7 @@ def overrides "v2.model_lab_api_api" => "ModelLabAPIAPI", "v2.monitors_api" => "MonitorsAPI", "v2.network_device_monitoring_api" => "NetworkDeviceMonitoringAPI", + "v2.o_auth2_client_public_api" => "OAuth2ClientPublicAPI", "v2.observability_pipelines_api" => "ObservabilityPipelinesAPI", "v2.oci_integration_api" => "OCIIntegrationAPI", "v2.okta_integration_api" => "OktaIntegrationAPI", diff --git a/lib/datadog_api_client/v2/api/end_user_device_monitoring_api.rb b/lib/datadog_api_client/v2/api/end_user_device_monitoring_api.rb new file mode 100644 index 000000000000..312acc3fa378 --- /dev/null +++ b/lib/datadog_api_client/v2/api/end_user_device_monitoring_api.rb @@ -0,0 +1,322 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class EndUserDeviceMonitoringAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Get a device. + # + # @see #get_eudm_device_with_http_info + def get_eudm_device(device_id, opts = {}) + data, _status_code, _headers = get_eudm_device_with_http_info(device_id, opts) + data + end + + # Get a device. + # @param device_id [String] Unique identifier of the device to fetch. Matches the Datadog host identifier. + # @param opts [Hash] the optional parameters + # @return [Array<(DeviceDetails, Integer, Hash)>] DeviceDetails data, response status code and response headers + def get_eudm_device_with_http_info(device_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EndUserDeviceMonitoringAPI.get_eudm_device ...' + end + # verify the required parameter 'device_id' is set + if @api_client.config.client_side_validation && device_id.nil? + fail ArgumentError, "Missing the required parameter 'device_id' when calling EndUserDeviceMonitoringAPI.get_eudm_device" + end + # resource path + local_var_path = '/api/v2/eudm/devices/{device_id}'.sub('{device_id}', CGI.escape(device_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DeviceDetails' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_eudm_device, + :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: EndUserDeviceMonitoringAPI#get_eudm_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all devices. + # + # @see #get_eudm_devices_with_http_info + def get_eudm_devices(opts = {}) + data, _status_code, _headers = get_eudm_devices_with_http_info(opts) + data + end + + # Get all devices. + # @param opts [Hash] the optional parameters + # @return [Array<(DeviceBaseArray, Integer, Hash)>] DeviceBaseArray data, response status code and response headers + def get_eudm_devices_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EndUserDeviceMonitoringAPI.get_eudm_devices ...' + end + # resource path + local_var_path = '/api/v2/eudm/devices' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DeviceBaseArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_eudm_devices, + :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: EndUserDeviceMonitoringAPI#get_eudm_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get device counts grouped by attribute. + # + # @see #get_eudm_graph_with_http_info + def get_eudm_graph(by, opts = {}) + data, _status_code, _headers = get_eudm_graph_with_http_info(by, opts) + data + end + + # Get device counts grouped by attribute. + # @param by [String] Device attribute to group by (for example, `os` or `type`). Determines which column the response counts are bucketed against. + # @param opts [Hash] the optional parameters + # @return [Array<(GraphItemArray, Integer, Hash)>] GraphItemArray data, response status code and response headers + def get_eudm_graph_with_http_info(by, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EndUserDeviceMonitoringAPI.get_eudm_graph ...' + end + # verify the required parameter 'by' is set + if @api_client.config.client_side_validation && by.nil? + fail ArgumentError, "Missing the required parameter 'by' when calling EndUserDeviceMonitoringAPI.get_eudm_graph" + end + # resource path + local_var_path = '/api/v2/eudm/graph' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'by'] = by + + # 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] || 'GraphItemArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_eudm_graph, + :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: EndUserDeviceMonitoringAPI#get_eudm_graph\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all device issue definitions. + # + # @see #get_eudm_issues_with_http_info + def get_eudm_issues(opts = {}) + data, _status_code, _headers = get_eudm_issues_with_http_info(opts) + data + end + + # Get all device issue definitions. + # @param opts [Hash] the optional parameters + # @return [Array<(IssueDefinitionArray, Integer, Hash)>] IssueDefinitionArray data, response status code and response headers + def get_eudm_issues_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EndUserDeviceMonitoringAPI.get_eudm_issues ...' + end + # resource path + local_var_path = '/api/v2/eudm/issues' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'IssueDefinitionArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_eudm_issues, + :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: EndUserDeviceMonitoringAPI#get_eudm_issues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get overview tiles. + # + # @see #get_eudm_overview_with_http_info + def get_eudm_overview(opts = {}) + data, _status_code, _headers = get_eudm_overview_with_http_info(opts) + data + end + + # Get overview tiles. + # @param opts [Hash] the optional parameters + # @return [Array<(OverviewItemArray, Integer, Hash)>] OverviewItemArray data, response status code and response headers + def get_eudm_overview_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EndUserDeviceMonitoringAPI.get_eudm_overview ...' + end + # resource path + local_var_path = '/api/v2/eudm/overview' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OverviewItemArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_eudm_overview, + :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: EndUserDeviceMonitoringAPI#get_eudm_overview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb b/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb new file mode 100644 index 000000000000..1264fef6c088 --- /dev/null +++ b/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb @@ -0,0 +1,319 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class OAuth2ClientPublicAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Delete an OAuth2 client scopes restriction. + # + # @see #delete_scopes_restriction_with_http_info + def delete_scopes_restriction(client_uuid, opts = {}) + delete_scopes_restriction_with_http_info(client_uuid, opts) + nil + end + + # Delete an OAuth2 client scopes restriction. + # + # Delete the scopes restriction configured for the OAuth2 client. + # + # @param client_uuid [UUID] UUID of the OAuth2 client. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_scopes_restriction_with_http_info(client_uuid, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_scopes_restriction".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_scopes_restriction") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_scopes_restriction")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2ClientPublicAPI.delete_scopes_restriction ...' + end + # verify the required parameter 'client_uuid' is set + if @api_client.config.client_side_validation && client_uuid.nil? + fail ArgumentError, "Missing the required parameter 'client_uuid' when calling OAuth2ClientPublicAPI.delete_scopes_restriction" + end + # resource path + local_var_path = '/api/v2/oauth2/clients/{client_uuid}/scopes_restriction'.sub('{client_uuid}', CGI.escape(client_uuid.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_scopes_restriction, + :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::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2ClientPublicAPI#delete_scopes_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an OAuth2 client scopes restriction. + # + # @see #get_scopes_restriction_with_http_info + def get_scopes_restriction(client_uuid, opts = {}) + data, _status_code, _headers = get_scopes_restriction_with_http_info(client_uuid, opts) + data + end + + # Get an OAuth2 client scopes restriction. + # + # Get the scopes restriction configured for the OAuth2 client. + # + # @param client_uuid [UUID] UUID of the OAuth2 client. + # @param opts [Hash] the optional parameters + # @return [Array<(OAuthScopesRestrictionResponse, Integer, Hash)>] OAuthScopesRestrictionResponse data, response status code and response headers + def get_scopes_restriction_with_http_info(client_uuid, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_scopes_restriction".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_scopes_restriction") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_scopes_restriction")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2ClientPublicAPI.get_scopes_restriction ...' + end + # verify the required parameter 'client_uuid' is set + if @api_client.config.client_side_validation && client_uuid.nil? + fail ArgumentError, "Missing the required parameter 'client_uuid' when calling OAuth2ClientPublicAPI.get_scopes_restriction" + end + # resource path + local_var_path = '/api/v2/oauth2/clients/{client_uuid}/scopes_restriction'.sub('{client_uuid}', CGI.escape(client_uuid.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuthScopesRestrictionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_scopes_restriction, + :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: OAuth2ClientPublicAPI#get_scopes_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Register an OAuth2 client. + # + # @see #register_o_auth_client_with_http_info + def register_o_auth_client(body, opts = {}) + data, _status_code, _headers = register_o_auth_client_with_http_info(body, opts) + data + end + + # Register an OAuth2 client. + # + # Register an OAuth2 client using the Dynamic Client Registration protocol defined in RFC 7591. + # + # @param body [OAuthClientRegistrationRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(OAuthClientRegistrationResponse, Integer, Hash)>] OAuthClientRegistrationResponse data, response status code and response headers + def register_o_auth_client_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.register_o_auth_client".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.register_o_auth_client") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.register_o_auth_client")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2ClientPublicAPI.register_o_auth_client ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OAuth2ClientPublicAPI.register_o_auth_client" + end + # resource path + local_var_path = '/api/v2/oauth2/register' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'OAuthClientRegistrationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :register_o_auth_client, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2ClientPublicAPI#register_o_auth_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Upsert an OAuth2 client scopes restriction. + # + # @see #upsert_scopes_restriction_with_http_info + def upsert_scopes_restriction(client_uuid, body, opts = {}) + data, _status_code, _headers = upsert_scopes_restriction_with_http_info(client_uuid, body, opts) + data + end + + # Upsert an OAuth2 client scopes restriction. + # + # Create or update the scopes restriction configured for the OAuth2 client. + # + # @param client_uuid [UUID] UUID of the OAuth2 client. + # @param body [UpsertOAuthScopesRestrictionRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(OAuthScopesRestrictionResponse, Integer, Hash)>] OAuthScopesRestrictionResponse data, response status code and response headers + def upsert_scopes_restriction_with_http_info(client_uuid, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.upsert_scopes_restriction".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.upsert_scopes_restriction") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.upsert_scopes_restriction")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2ClientPublicAPI.upsert_scopes_restriction ...' + end + # verify the required parameter 'client_uuid' is set + if @api_client.config.client_side_validation && client_uuid.nil? + fail ArgumentError, "Missing the required parameter 'client_uuid' when calling OAuth2ClientPublicAPI.upsert_scopes_restriction" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OAuth2ClientPublicAPI.upsert_scopes_restriction" + end + # resource path + local_var_path = '/api/v2/oauth2/clients/{client_uuid}/scopes_restriction'.sub('{client_uuid}', CGI.escape(client_uuid.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'OAuthScopesRestrictionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :upsert_scopes_restriction, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2ClientPublicAPI#upsert_scopes_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/device_base_array.rb b/lib/datadog_api_client/v2/models/device_base_array.rb new file mode 100644 index 000000000000..26737b2d0338 --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_base_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response body for the list devices endpoint. + class DeviceBaseArray + include BaseGenericModel + + # List of devices matching the request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'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::DeviceBaseArray` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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/device_base_data.rb b/lib/datadog_api_client/v2/models/device_base_data.rb new file mode 100644 index 000000000000..620b05cf3faf --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_base_data.rb @@ -0,0 +1,154 @@ +=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 single device entry as returned by the list devices endpoint. + class DeviceBaseData + include BaseGenericModel + + # Common health and identity attributes shared by every End User Device Monitoring device record. + attr_accessor :attributes + + # Unique identifier of the device. Matches the Datadog host identifier. + attr_reader :id + + # Devices resource type. + 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' => :'DeviceBaseDataAttributes', + :'id' => :'String', + :'type' => :'DeviceDetailsDataType' + } + 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::DeviceBaseData` 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # 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/device_base_data_attributes.rb b/lib/datadog_api_client/v2/models/device_base_data_attributes.rb new file mode 100644 index 000000000000..954dd7608ffb --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_base_data_attributes.rb @@ -0,0 +1,369 @@ +=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 + # Common health and identity attributes shared by every End User Device Monitoring device record. + class DeviceBaseDataAttributes + include BaseGenericModel + + # Public key of the Datadog Agent installed on the device. + attr_accessor :agent_key + + # Version of the Datadog Agent installed on the device. + attr_accessor :agent_version + + # Maximum battery capacity expressed as a percentage of the device's design capacity. + attr_accessor :battery_max_capacity_pct + + # Number of physical CPU cores on the device. + attr_accessor :cpu_cores + + # Number of logical CPU processors (hardware threads) on the device. + attr_accessor :cpu_logical_processors + + # Human-readable name of the device's CPU model. + attr_accessor :cpu_model + + # Average CPU usage on the device, as a percentage between 0 and 100. + attr_accessor :cpu_usage + + # Average disk usage on the device, as a percentage between 0 and 100. + attr_accessor :disk_usage + + # Last observed IPv4 or IPv6 address of the device. + attr_accessor :ip_address + + # List of issue identifiers currently affecting the device. + # References entries returned by the issues endpoint. + attr_accessor :issues + + # Name of the operating system kernel running on the device. + attr_accessor :kernel_name + + # Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + attr_accessor :last_seen + + # Manufacturer of the device. + attr_accessor :manufacturer + + # Average memory usage on the device, as a percentage between 0 and 100. + attr_accessor :mem_usage + + # Total amount of physical memory available on the device, in kilobytes. + attr_accessor :memory_total_kb + + # Marketing or product name of the device model. + attr_accessor :model_name + + # Manufacturer-assigned model number of the device. + attr_accessor :model_number + + # Operating system family running on the device (for example, `mac`, `windows`, or `linux`). + attr_accessor :os + + # Operating system version running on the device. + attr_accessor :os_version + + # Datadog resource identifier for the device. + attr_accessor :resource_id + + # Serial number assigned to the device by its manufacturer. + attr_accessor :serial_number + + # Health status of the device computed from its issues and recent telemetry. + attr_accessor :status + + # Hardware type of the device (for example, `laptop`, `desktop`, or `mobile`). + attr_accessor :type + + # Time elapsed since the device last booted, in seconds. + attr_accessor :uptime + + # BSSID (MAC address of the access point) of the wireless network the device is + # currently connected to. + attr_accessor :wlan_bssid + + # Received signal strength indicator of the device's current wireless connection, in dBm. + attr_accessor :wlan_rssi + + # SSID of the wireless network the device is currently connected to. + attr_accessor :wlan_ssid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'agent_key' => :'agent_key', + :'agent_version' => :'agent_version', + :'battery_max_capacity_pct' => :'battery_max_capacity_pct', + :'cpu_cores' => :'cpu_cores', + :'cpu_logical_processors' => :'cpu_logical_processors', + :'cpu_model' => :'cpu_model', + :'cpu_usage' => :'cpu_usage', + :'disk_usage' => :'disk_usage', + :'ip_address' => :'ip_address', + :'issues' => :'issues', + :'kernel_name' => :'kernel_name', + :'last_seen' => :'last_seen', + :'manufacturer' => :'manufacturer', + :'mem_usage' => :'mem_usage', + :'memory_total_kb' => :'memory_total_kb', + :'model_name' => :'model_name', + :'model_number' => :'model_number', + :'os' => :'os', + :'os_version' => :'os_version', + :'resource_id' => :'resource_id', + :'serial_number' => :'serial_number', + :'status' => :'status', + :'type' => :'type', + :'uptime' => :'uptime', + :'wlan_bssid' => :'wlan_bssid', + :'wlan_rssi' => :'wlan_rssi', + :'wlan_ssid' => :'wlan_ssid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'agent_key' => :'String', + :'agent_version' => :'String', + :'battery_max_capacity_pct' => :'Integer', + :'cpu_cores' => :'Integer', + :'cpu_logical_processors' => :'Integer', + :'cpu_model' => :'String', + :'cpu_usage' => :'Float', + :'disk_usage' => :'Float', + :'ip_address' => :'String', + :'issues' => :'Array', + :'kernel_name' => :'String', + :'last_seen' => :'String', + :'manufacturer' => :'String', + :'mem_usage' => :'Float', + :'memory_total_kb' => :'Integer', + :'model_name' => :'String', + :'model_number' => :'String', + :'os' => :'String', + :'os_version' => :'String', + :'resource_id' => :'String', + :'serial_number' => :'String', + :'status' => :'String', + :'type' => :'String', + :'uptime' => :'Float', + :'wlan_bssid' => :'String', + :'wlan_rssi' => :'Float', + :'wlan_ssid' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeviceBaseDataAttributes` 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?(:'agent_key') + self.agent_key = attributes[:'agent_key'] + end + + if attributes.key?(:'agent_version') + self.agent_version = attributes[:'agent_version'] + end + + if attributes.key?(:'battery_max_capacity_pct') + self.battery_max_capacity_pct = attributes[:'battery_max_capacity_pct'] + end + + if attributes.key?(:'cpu_cores') + self.cpu_cores = attributes[:'cpu_cores'] + end + + if attributes.key?(:'cpu_logical_processors') + self.cpu_logical_processors = attributes[:'cpu_logical_processors'] + end + + if attributes.key?(:'cpu_model') + self.cpu_model = attributes[:'cpu_model'] + end + + if attributes.key?(:'cpu_usage') + self.cpu_usage = attributes[:'cpu_usage'] + end + + if attributes.key?(:'disk_usage') + self.disk_usage = attributes[:'disk_usage'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + + if attributes.key?(:'issues') + if (value = attributes[:'issues']).is_a?(Array) + self.issues = value + end + end + + if attributes.key?(:'kernel_name') + self.kernel_name = attributes[:'kernel_name'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'manufacturer') + self.manufacturer = attributes[:'manufacturer'] + end + + if attributes.key?(:'mem_usage') + self.mem_usage = attributes[:'mem_usage'] + end + + if attributes.key?(:'memory_total_kb') + self.memory_total_kb = attributes[:'memory_total_kb'] + end + + if attributes.key?(:'model_name') + self.model_name = attributes[:'model_name'] + end + + if attributes.key?(:'model_number') + self.model_number = attributes[:'model_number'] + end + + if attributes.key?(:'os') + self.os = attributes[:'os'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'resource_id') + self.resource_id = attributes[:'resource_id'] + end + + if attributes.key?(:'serial_number') + self.serial_number = attributes[:'serial_number'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'uptime') + self.uptime = attributes[:'uptime'] + end + + if attributes.key?(:'wlan_bssid') + self.wlan_bssid = attributes[:'wlan_bssid'] + end + + if attributes.key?(:'wlan_rssi') + self.wlan_rssi = attributes[:'wlan_rssi'] + end + + if attributes.key?(:'wlan_ssid') + self.wlan_ssid = attributes[:'wlan_ssid'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + agent_key == o.agent_key && + agent_version == o.agent_version && + battery_max_capacity_pct == o.battery_max_capacity_pct && + cpu_cores == o.cpu_cores && + cpu_logical_processors == o.cpu_logical_processors && + cpu_model == o.cpu_model && + cpu_usage == o.cpu_usage && + disk_usage == o.disk_usage && + ip_address == o.ip_address && + issues == o.issues && + kernel_name == o.kernel_name && + last_seen == o.last_seen && + manufacturer == o.manufacturer && + mem_usage == o.mem_usage && + memory_total_kb == o.memory_total_kb && + model_name == o.model_name && + model_number == o.model_number && + os == o.os && + os_version == o.os_version && + resource_id == o.resource_id && + serial_number == o.serial_number && + status == o.status && + type == o.type && + uptime == o.uptime && + wlan_bssid == o.wlan_bssid && + wlan_rssi == o.wlan_rssi && + wlan_ssid == o.wlan_ssid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [agent_key, agent_version, battery_max_capacity_pct, cpu_cores, cpu_logical_processors, cpu_model, cpu_usage, disk_usage, ip_address, issues, kernel_name, last_seen, manufacturer, mem_usage, memory_total_kb, model_name, model_number, os, os_version, resource_id, serial_number, status, type, uptime, wlan_bssid, wlan_rssi, wlan_ssid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/device_details.rb b/lib/datadog_api_client/v2/models/device_details.rb new file mode 100644 index 000000000000..74f24b9563b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_details.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response body for the get device endpoint, returning a single device with full attribute detail. + class DeviceDetails + include BaseGenericModel + + # A single device entry with full attribute detail. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DeviceDetailsData' + } + 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::DeviceDetails` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/device_details_data.rb b/lib/datadog_api_client/v2/models/device_details_data.rb new file mode 100644 index 000000000000..fefd3c309f42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_details_data.rb @@ -0,0 +1,155 @@ +=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 single device entry with full attribute detail. + class DeviceDetailsData + include BaseGenericModel + + # Extended set of attributes for a single End User Device Monitoring device, + # including detailed network and battery metrics. + attr_accessor :attributes + + # Unique identifier of the device. Matches the Datadog host identifier. + attr_reader :id + + # Devices resource type. + 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' => :'DeviceDetailsDataAttributes', + :'id' => :'String', + :'type' => :'DeviceDetailsDataType' + } + 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::DeviceDetailsData` 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # 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/device_details_data_attributes.rb b/lib/datadog_api_client/v2/models/device_details_data_attributes.rb new file mode 100644 index 000000000000..e3003ca983c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_details_data_attributes.rb @@ -0,0 +1,461 @@ +=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 + # Extended set of attributes for a single End User Device Monitoring device, + # including detailed network and battery metrics. + class DeviceDetailsDataAttributes + include BaseGenericModel + + # Public key of the Datadog Agent installed on the device. + attr_accessor :agent_key + + # Version of the Datadog Agent installed on the device. + attr_accessor :agent_version + + # Current battery charge level as a percentage between 0 and 100. + attr_accessor :battery_charge_pct + + # Rate at which the battery is charging or discharging, in milliamperes. + # Negative values indicate discharge. + attr_accessor :battery_charge_rate + + # Number of full charge cycles the battery has gone through. + attr_accessor :battery_cycle_count + + # Maximum battery capacity expressed as a percentage of the device's design capacity. + attr_accessor :battery_max_capacity_pct + + # Number of physical CPU cores on the device. + attr_accessor :cpu_cores + + # Number of logical CPU processors (hardware threads) on the device. + attr_accessor :cpu_logical_processors + + # Human-readable name of the device's CPU model. + attr_accessor :cpu_model + + # Average CPU usage on the device, as a percentage between 0 and 100. + attr_accessor :cpu_usage + + # Average disk usage on the device, as a percentage between 0 and 100. + attr_accessor :disk_usage + + # Last observed IPv4 or IPv6 address of the device. + attr_accessor :ip_address + + # List of issue identifiers currently affecting the device. + # References entries returned by the issues endpoint. + attr_accessor :issues + + # Name of the operating system kernel running on the device. + attr_accessor :kernel_name + + # Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + attr_accessor :last_seen + + # Manufacturer of the device. + attr_accessor :manufacturer + + # Average memory usage on the device, as a percentage between 0 and 100. + attr_accessor :mem_usage + + # Total amount of physical memory available on the device, in kilobytes. + attr_accessor :memory_total_kb + + # Marketing or product name of the device model. + attr_accessor :model_name + + # Manufacturer-assigned model number of the device. + attr_accessor :model_number + + # Operating system family running on the device (for example, `mac`, `windows`, or `linux`). + attr_accessor :os + + # Operating system version running on the device. + attr_accessor :os_version + + # Average rate of dropped inbound network packets, in packets per second. + attr_accessor :packets_in_drop + + # Average rate of inbound network packets received with errors, in packets per second. + attr_accessor :packets_in_error + + # Average rate of dropped outbound network packets, in packets per second. + attr_accessor :packets_out_drop + + # Average rate of outbound network packets sent with errors, in packets per second. + attr_accessor :packets_out_error + + # Datadog resource identifier for the device. + attr_accessor :resource_id + + # Serial number assigned to the device by its manufacturer. + attr_accessor :serial_number + + # Health status of the device computed from its issues and recent telemetry. + attr_accessor :status + + # Average rate of TCP segments sent by the device, in segments per second. + attr_accessor :tcp_out_segs + + # Average rate of TCP segments retransmitted by the device, in segments per second. + attr_accessor :tcp_retrans_segs + + # Hardware type of the device (for example, `laptop`, `desktop`, or `mobile`). + attr_accessor :type + + # Time elapsed since the device last booted, in seconds. + attr_accessor :uptime + + # BSSID (MAC address of the access point) of the wireless network the device is + # currently connected to. + attr_accessor :wlan_bssid + + # Received signal strength indicator of the device's current wireless connection, in dBm. + attr_accessor :wlan_rssi + + # SSID of the wireless network the device is currently connected to. + attr_accessor :wlan_ssid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'agent_key' => :'agent_key', + :'agent_version' => :'agent_version', + :'battery_charge_pct' => :'battery_charge_pct', + :'battery_charge_rate' => :'battery_charge_rate', + :'battery_cycle_count' => :'battery_cycle_count', + :'battery_max_capacity_pct' => :'battery_max_capacity_pct', + :'cpu_cores' => :'cpu_cores', + :'cpu_logical_processors' => :'cpu_logical_processors', + :'cpu_model' => :'cpu_model', + :'cpu_usage' => :'cpu_usage', + :'disk_usage' => :'disk_usage', + :'ip_address' => :'ip_address', + :'issues' => :'issues', + :'kernel_name' => :'kernel_name', + :'last_seen' => :'last_seen', + :'manufacturer' => :'manufacturer', + :'mem_usage' => :'mem_usage', + :'memory_total_kb' => :'memory_total_kb', + :'model_name' => :'model_name', + :'model_number' => :'model_number', + :'os' => :'os', + :'os_version' => :'os_version', + :'packets_in_drop' => :'packets_in_drop', + :'packets_in_error' => :'packets_in_error', + :'packets_out_drop' => :'packets_out_drop', + :'packets_out_error' => :'packets_out_error', + :'resource_id' => :'resource_id', + :'serial_number' => :'serial_number', + :'status' => :'status', + :'tcp_out_segs' => :'tcp_out_segs', + :'tcp_retrans_segs' => :'tcp_retrans_segs', + :'type' => :'type', + :'uptime' => :'uptime', + :'wlan_bssid' => :'wlan_bssid', + :'wlan_rssi' => :'wlan_rssi', + :'wlan_ssid' => :'wlan_ssid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'agent_key' => :'String', + :'agent_version' => :'String', + :'battery_charge_pct' => :'Integer', + :'battery_charge_rate' => :'Integer', + :'battery_cycle_count' => :'Integer', + :'battery_max_capacity_pct' => :'Integer', + :'cpu_cores' => :'Integer', + :'cpu_logical_processors' => :'Integer', + :'cpu_model' => :'String', + :'cpu_usage' => :'Float', + :'disk_usage' => :'Float', + :'ip_address' => :'String', + :'issues' => :'Array', + :'kernel_name' => :'String', + :'last_seen' => :'String', + :'manufacturer' => :'String', + :'mem_usage' => :'Float', + :'memory_total_kb' => :'Integer', + :'model_name' => :'String', + :'model_number' => :'String', + :'os' => :'String', + :'os_version' => :'String', + :'packets_in_drop' => :'Float', + :'packets_in_error' => :'Float', + :'packets_out_drop' => :'Float', + :'packets_out_error' => :'Float', + :'resource_id' => :'String', + :'serial_number' => :'String', + :'status' => :'String', + :'tcp_out_segs' => :'Float', + :'tcp_retrans_segs' => :'Float', + :'type' => :'String', + :'uptime' => :'Float', + :'wlan_bssid' => :'String', + :'wlan_rssi' => :'Float', + :'wlan_ssid' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeviceDetailsDataAttributes` 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?(:'agent_key') + self.agent_key = attributes[:'agent_key'] + end + + if attributes.key?(:'agent_version') + self.agent_version = attributes[:'agent_version'] + end + + if attributes.key?(:'battery_charge_pct') + self.battery_charge_pct = attributes[:'battery_charge_pct'] + end + + if attributes.key?(:'battery_charge_rate') + self.battery_charge_rate = attributes[:'battery_charge_rate'] + end + + if attributes.key?(:'battery_cycle_count') + self.battery_cycle_count = attributes[:'battery_cycle_count'] + end + + if attributes.key?(:'battery_max_capacity_pct') + self.battery_max_capacity_pct = attributes[:'battery_max_capacity_pct'] + end + + if attributes.key?(:'cpu_cores') + self.cpu_cores = attributes[:'cpu_cores'] + end + + if attributes.key?(:'cpu_logical_processors') + self.cpu_logical_processors = attributes[:'cpu_logical_processors'] + end + + if attributes.key?(:'cpu_model') + self.cpu_model = attributes[:'cpu_model'] + end + + if attributes.key?(:'cpu_usage') + self.cpu_usage = attributes[:'cpu_usage'] + end + + if attributes.key?(:'disk_usage') + self.disk_usage = attributes[:'disk_usage'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + + if attributes.key?(:'issues') + if (value = attributes[:'issues']).is_a?(Array) + self.issues = value + end + end + + if attributes.key?(:'kernel_name') + self.kernel_name = attributes[:'kernel_name'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'manufacturer') + self.manufacturer = attributes[:'manufacturer'] + end + + if attributes.key?(:'mem_usage') + self.mem_usage = attributes[:'mem_usage'] + end + + if attributes.key?(:'memory_total_kb') + self.memory_total_kb = attributes[:'memory_total_kb'] + end + + if attributes.key?(:'model_name') + self.model_name = attributes[:'model_name'] + end + + if attributes.key?(:'model_number') + self.model_number = attributes[:'model_number'] + end + + if attributes.key?(:'os') + self.os = attributes[:'os'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'packets_in_drop') + self.packets_in_drop = attributes[:'packets_in_drop'] + end + + if attributes.key?(:'packets_in_error') + self.packets_in_error = attributes[:'packets_in_error'] + end + + if attributes.key?(:'packets_out_drop') + self.packets_out_drop = attributes[:'packets_out_drop'] + end + + if attributes.key?(:'packets_out_error') + self.packets_out_error = attributes[:'packets_out_error'] + end + + if attributes.key?(:'resource_id') + self.resource_id = attributes[:'resource_id'] + end + + if attributes.key?(:'serial_number') + self.serial_number = attributes[:'serial_number'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tcp_out_segs') + self.tcp_out_segs = attributes[:'tcp_out_segs'] + end + + if attributes.key?(:'tcp_retrans_segs') + self.tcp_retrans_segs = attributes[:'tcp_retrans_segs'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'uptime') + self.uptime = attributes[:'uptime'] + end + + if attributes.key?(:'wlan_bssid') + self.wlan_bssid = attributes[:'wlan_bssid'] + end + + if attributes.key?(:'wlan_rssi') + self.wlan_rssi = attributes[:'wlan_rssi'] + end + + if attributes.key?(:'wlan_ssid') + self.wlan_ssid = attributes[:'wlan_ssid'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + agent_key == o.agent_key && + agent_version == o.agent_version && + battery_charge_pct == o.battery_charge_pct && + battery_charge_rate == o.battery_charge_rate && + battery_cycle_count == o.battery_cycle_count && + battery_max_capacity_pct == o.battery_max_capacity_pct && + cpu_cores == o.cpu_cores && + cpu_logical_processors == o.cpu_logical_processors && + cpu_model == o.cpu_model && + cpu_usage == o.cpu_usage && + disk_usage == o.disk_usage && + ip_address == o.ip_address && + issues == o.issues && + kernel_name == o.kernel_name && + last_seen == o.last_seen && + manufacturer == o.manufacturer && + mem_usage == o.mem_usage && + memory_total_kb == o.memory_total_kb && + model_name == o.model_name && + model_number == o.model_number && + os == o.os && + os_version == o.os_version && + packets_in_drop == o.packets_in_drop && + packets_in_error == o.packets_in_error && + packets_out_drop == o.packets_out_drop && + packets_out_error == o.packets_out_error && + resource_id == o.resource_id && + serial_number == o.serial_number && + status == o.status && + tcp_out_segs == o.tcp_out_segs && + tcp_retrans_segs == o.tcp_retrans_segs && + type == o.type && + uptime == o.uptime && + wlan_bssid == o.wlan_bssid && + wlan_rssi == o.wlan_rssi && + wlan_ssid == o.wlan_ssid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [agent_key, agent_version, battery_charge_pct, battery_charge_rate, battery_cycle_count, battery_max_capacity_pct, cpu_cores, cpu_logical_processors, cpu_model, cpu_usage, disk_usage, ip_address, issues, kernel_name, last_seen, manufacturer, mem_usage, memory_total_kb, model_name, model_number, os, os_version, packets_in_drop, packets_in_error, packets_out_drop, packets_out_error, resource_id, serial_number, status, tcp_out_segs, tcp_retrans_segs, type, uptime, wlan_bssid, wlan_rssi, wlan_ssid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/device_details_data_type.rb b/lib/datadog_api_client/v2/models/device_details_data_type.rb new file mode 100644 index 000000000000..7cef28f3b393 --- /dev/null +++ b/lib/datadog_api_client/v2/models/device_details_data_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 + # Devices resource type. + class DeviceDetailsDataType + include BaseEnumModel + + DEVICES = "devices".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/graph_item_array.rb b/lib/datadog_api_client/v2/models/graph_item_array.rb new file mode 100644 index 000000000000..5a409fef804a --- /dev/null +++ b/lib/datadog_api_client/v2/models/graph_item_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response body for the graph endpoint, returning per-grouping device counts. + class GraphItemArray + include BaseGenericModel + + # List of grouping entries with their associated device counts. + 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' => :'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::GraphItemArray` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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/graph_item_data.rb b/lib/datadog_api_client/v2/models/graph_item_data.rb new file mode 100644 index 000000000000..f158252e6c3d --- /dev/null +++ b/lib/datadog_api_client/v2/models/graph_item_data.rb @@ -0,0 +1,154 @@ +=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 single grouping entry in the End User Device Monitoring graph response. + class GraphItemData + include BaseGenericModel + + # Attributes of a single grouping in the End User Device Monitoring graph response. + attr_accessor :attributes + + # Unique identifier of the grouping, derived from the grouping column. + attr_reader :id + + # Graph items resource type. + 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' => :'GraphItemDataAttributes', + :'id' => :'String', + :'type' => :'GraphItemDataType' + } + 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::GraphItemData` 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # 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/graph_item_data_attributes.rb b/lib/datadog_api_client/v2/models/graph_item_data_attributes.rb new file mode 100644 index 000000000000..45f50e9eb0df --- /dev/null +++ b/lib/datadog_api_client/v2/models/graph_item_data_attributes.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a single grouping in the End User Device Monitoring graph response. + class GraphItemDataAttributes + include BaseGenericModel + + # List of per-value counts for the grouping column. + attr_accessor :counts + + # Identifier of the grouping column (for example, `os` or `type`). + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'counts' => :'counts', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'counts' => :'Array', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GraphItemDataAttributes` 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?(:'counts') + if (value = attributes[:'counts']).is_a?(Array) + self.counts = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + counts == o.counts && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [counts, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/graph_item_data_attributes_counts_items.rb b/lib/datadog_api_client/v2/models/graph_item_data_attributes_counts_items.rb new file mode 100644 index 000000000000..8dda22aac4f5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/graph_item_data_attributes_counts_items.rb @@ -0,0 +1,116 @@ +=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 + # Count of devices for a single value of the grouping column in the End User Device Monitoring graph. + class GraphItemDataAttributesCountsItems + include BaseGenericModel + + # Value of the grouping column for this bucket (for example, an operating system + # name or a device type). + attr_accessor :column_name + + # Number of devices that fall into this bucket. + attr_accessor :count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'column_name' => :'columnName', + :'count' => :'count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'column_name' => :'String', + :'count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GraphItemDataAttributesCountsItems` 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?(:'column_name') + self.column_name = attributes[:'column_name'] + end + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + column_name == o.column_name && + count == o.count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [column_name, count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/graph_item_data_type.rb b/lib/datadog_api_client/v2/models/graph_item_data_type.rb new file mode 100644 index 000000000000..8366add3e70e --- /dev/null +++ b/lib/datadog_api_client/v2/models/graph_item_data_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 + # Graph items resource type. + class GraphItemDataType + include BaseEnumModel + + GRAPH_ITEMS = "graph_items".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/issue_definition_array.rb b/lib/datadog_api_client/v2/models/issue_definition_array.rb new file mode 100644 index 000000000000..20b9248ede9f --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_definition_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response body for the issues endpoint, returning all available device issue definitions. + class IssueDefinitionArray + include BaseGenericModel + + # List of available issue definitions. + 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' => :'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::IssueDefinitionArray` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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_definition_data.rb b/lib/datadog_api_client/v2/models/issue_definition_data.rb new file mode 100644 index 000000000000..8c693f290208 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_definition_data.rb @@ -0,0 +1,154 @@ +=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 single issue definition entry returned by the issues endpoint. + class IssueDefinitionData + include BaseGenericModel + + # Attributes of a single End User Device Monitoring issue definition. + attr_accessor :attributes + + # Stable identifier of the issue definition, used in the `issues` field of a device record. + attr_reader :id + + # Issue definitions resource type. + 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' => :'IssueDefinitionDataAttributes', + :'id' => :'String', + :'type' => :'IssueDefinitionDataType' + } + 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::IssueDefinitionData` 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # 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_definition_data_attributes.rb b/lib/datadog_api_client/v2/models/issue_definition_data_attributes.rb new file mode 100644 index 000000000000..7929cc4f23eb --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_definition_data_attributes.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a single End User Device Monitoring issue definition. + class IssueDefinitionDataAttributes + include BaseGenericModel + + # Category of the issue (for example, `battery`, `network`, or `performance`). + attr_reader :category + + # Human-readable label describing the issue, suitable for display in the Datadog UI. + attr_reader :label + + # Severity level of the issue (for example, `warning` or `critical`). + attr_reader :level + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'category' => :'category', + :'label' => :'label', + :'level' => :'level' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'category' => :'String', + :'label' => :'String', + :'level' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IssueDefinitionDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'level') + self.level = attributes[:'level'] + 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 @category.nil? + return false if @label.nil? + return false if @level.nil? + true + end + + # Custom attribute writer method with validation + # @param category [Object] Object to be assigned + # @!visibility private + def category=(category) + if category.nil? + fail ArgumentError, 'invalid value for "category", category cannot be nil.' + end + @category = category + end + + # Custom attribute writer method with validation + # @param label [Object] Object to be assigned + # @!visibility private + def label=(label) + if label.nil? + fail ArgumentError, 'invalid value for "label", label cannot be nil.' + end + @label = label + end + + # Custom attribute writer method with validation + # @param level [Object] Object to be assigned + # @!visibility private + def level=(level) + if level.nil? + fail ArgumentError, 'invalid value for "level", level cannot be nil.' + end + @level = level + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + category == o.category && + label == o.label && + level == o.level && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [category, label, level, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_definition_data_type.rb b/lib/datadog_api_client/v2/models/issue_definition_data_type.rb new file mode 100644 index 000000000000..0049bae46aad --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_definition_data_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 + # Issue definitions resource type. + class IssueDefinitionDataType + include BaseEnumModel + + ISSUE_DEFINITIONS = "issue_definitions".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_client_registration_error.rb b/lib/datadog_api_client/v2/models/o_auth_client_registration_error.rb new file mode 100644 index 000000000000..a6dd8badabd5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_client_registration_error.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Error payload returned by OAuth2 dynamic client registration as defined by RFC 7591. + class OAuthClientRegistrationError + include BaseGenericModel + + # Single ASCII error code per RFC 7591, such as `invalid_request` or `invalid_client_metadata`. + attr_reader :error + + # Human-readable description of the error. + attr_reader :error_description + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error' => :'error', + :'error_description' => :'error_description' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error' => :'String', + :'error_description' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OAuthClientRegistrationError` 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') + self.error = attributes[:'error'] + end + + if attributes.key?(:'error_description') + self.error_description = attributes[:'error_description'] + 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.nil? + return false if @error_description.nil? + true + end + + # Custom attribute writer method with validation + # @param error [Object] Object to be assigned + # @!visibility private + def error=(error) + if error.nil? + fail ArgumentError, 'invalid value for "error", error cannot be nil.' + end + @error = error + end + + # Custom attribute writer method with validation + # @param error_description [Object] Object to be assigned + # @!visibility private + def error_description=(error_description) + if error_description.nil? + fail ArgumentError, 'invalid value for "error_description", error_description cannot be nil.' + end + @error_description = error_description + 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 == o.error && + error_description == o.error_description && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error, error_description, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_client_registration_grant_type.rb b/lib/datadog_api_client/v2/models/o_auth_client_registration_grant_type.rb new file mode 100644 index 000000000000..a8c9a5d5121d --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_client_registration_grant_type.rb @@ -0,0 +1,27 @@ +=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 + # OAuth 2.0 grant type that a registered client may use. + class OAuthClientRegistrationGrantType + include BaseEnumModel + + AUTHORIZATION_CODE = "authorization_code".freeze + REFRESH_TOKEN = "refresh_token".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_client_registration_request.rb b/lib/datadog_api_client/v2/models/o_auth_client_registration_request.rb new file mode 100644 index 000000000000..f6db36a48b4b --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_client_registration_request.rb @@ -0,0 +1,322 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload for OAuth2 dynamic client registration as defined by RFC 7591. + class OAuthClientRegistrationRequest + include BaseGenericModel + + # Human-readable name of the client. Control characters are rejected. + attr_reader :client_name + + # URL of the home page of the client. + attr_reader :client_uri + + # OAuth 2.0 grant types the client may use. + # Defaults to `authorization_code` and `refresh_token` when omitted. + attr_accessor :grant_types + + # URL referencing the client's JSON Web Key Set. + attr_reader :jwks_uri + + # URL referencing a logo for the client. + attr_reader :logo_uri + + # URL pointing to the client's privacy policy. + attr_reader :policy_uri + + # Array of redirection URI strings used by the client in redirect-based flows. + attr_reader :redirect_uris + + # OAuth 2.0 response types the client may use. Only `code` is supported. + attr_accessor :response_types + + # Space-separated list of scope values the client may request. + attr_reader :scope + + # Requested authentication method for the token endpoint. Only `none` is supported. + attr_reader :token_endpoint_auth_method + + # URL pointing to the client's terms of service. + attr_reader :tos_uri + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'client_name' => :'client_name', + :'client_uri' => :'client_uri', + :'grant_types' => :'grant_types', + :'jwks_uri' => :'jwks_uri', + :'logo_uri' => :'logo_uri', + :'policy_uri' => :'policy_uri', + :'redirect_uris' => :'redirect_uris', + :'response_types' => :'response_types', + :'scope' => :'scope', + :'token_endpoint_auth_method' => :'token_endpoint_auth_method', + :'tos_uri' => :'tos_uri' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'client_name' => :'String', + :'client_uri' => :'String', + :'grant_types' => :'Array', + :'jwks_uri' => :'String', + :'logo_uri' => :'String', + :'policy_uri' => :'String', + :'redirect_uris' => :'Array', + :'response_types' => :'Array', + :'scope' => :'String', + :'token_endpoint_auth_method' => :'String', + :'tos_uri' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OAuthClientRegistrationRequest` 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?(:'client_name') + self.client_name = attributes[:'client_name'] + end + + if attributes.key?(:'client_uri') + self.client_uri = attributes[:'client_uri'] + end + + if attributes.key?(:'grant_types') + if (value = attributes[:'grant_types']).is_a?(Array) + self.grant_types = value + end + end + + if attributes.key?(:'jwks_uri') + self.jwks_uri = attributes[:'jwks_uri'] + end + + if attributes.key?(:'logo_uri') + self.logo_uri = attributes[:'logo_uri'] + end + + if attributes.key?(:'policy_uri') + self.policy_uri = attributes[:'policy_uri'] + end + + if attributes.key?(:'redirect_uris') + if (value = attributes[:'redirect_uris']).is_a?(Array) + self.redirect_uris = value + end + end + + if attributes.key?(:'response_types') + if (value = attributes[:'response_types']).is_a?(Array) + self.response_types = value + end + end + + if attributes.key?(:'scope') + self.scope = attributes[:'scope'] + end + + if attributes.key?(:'token_endpoint_auth_method') + self.token_endpoint_auth_method = attributes[:'token_endpoint_auth_method'] + end + + if attributes.key?(:'tos_uri') + self.tos_uri = attributes[:'tos_uri'] + 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 @client_name.nil? + return false if @client_name.to_s.length > 1000 + return false if !@client_uri.nil? && @client_uri.to_s.length > 1000 + return false if !@jwks_uri.nil? && @jwks_uri.to_s.length > 1000 + return false if !@logo_uri.nil? && @logo_uri.to_s.length > 1000 + return false if !@policy_uri.nil? && @policy_uri.to_s.length > 1000 + return false if @redirect_uris.nil? + return false if !@scope.nil? && @scope.to_s.length > 1000 + return false if !@token_endpoint_auth_method.nil? && @token_endpoint_auth_method.to_s.length > 20 + return false if !@tos_uri.nil? && @tos_uri.to_s.length > 1000 + true + end + + # Custom attribute writer method with validation + # @param client_name [Object] Object to be assigned + # @!visibility private + def client_name=(client_name) + if client_name.nil? + fail ArgumentError, 'invalid value for "client_name", client_name cannot be nil.' + end + if client_name.to_s.length > 1000 + fail ArgumentError, 'invalid value for "client_name", the character length must be smaller than or equal to 1000.' + end + @client_name = client_name + end + + # Custom attribute writer method with validation + # @param client_uri [Object] Object to be assigned + # @!visibility private + def client_uri=(client_uri) + if !client_uri.nil? && client_uri.to_s.length > 1000 + fail ArgumentError, 'invalid value for "client_uri", the character length must be smaller than or equal to 1000.' + end + @client_uri = client_uri + end + + # Custom attribute writer method with validation + # @param jwks_uri [Object] Object to be assigned + # @!visibility private + def jwks_uri=(jwks_uri) + if !jwks_uri.nil? && jwks_uri.to_s.length > 1000 + fail ArgumentError, 'invalid value for "jwks_uri", the character length must be smaller than or equal to 1000.' + end + @jwks_uri = jwks_uri + end + + # Custom attribute writer method with validation + # @param logo_uri [Object] Object to be assigned + # @!visibility private + def logo_uri=(logo_uri) + if !logo_uri.nil? && logo_uri.to_s.length > 1000 + fail ArgumentError, 'invalid value for "logo_uri", the character length must be smaller than or equal to 1000.' + end + @logo_uri = logo_uri + end + + # Custom attribute writer method with validation + # @param policy_uri [Object] Object to be assigned + # @!visibility private + def policy_uri=(policy_uri) + if !policy_uri.nil? && policy_uri.to_s.length > 1000 + fail ArgumentError, 'invalid value for "policy_uri", the character length must be smaller than or equal to 1000.' + end + @policy_uri = policy_uri + end + + # Custom attribute writer method with validation + # @param redirect_uris [Object] Object to be assigned + # @!visibility private + def redirect_uris=(redirect_uris) + if redirect_uris.nil? + fail ArgumentError, 'invalid value for "redirect_uris", redirect_uris cannot be nil.' + end + @redirect_uris = redirect_uris + end + + # Custom attribute writer method with validation + # @param scope [Object] Object to be assigned + # @!visibility private + def scope=(scope) + if !scope.nil? && scope.to_s.length > 1000 + fail ArgumentError, 'invalid value for "scope", the character length must be smaller than or equal to 1000.' + end + @scope = scope + end + + # Custom attribute writer method with validation + # @param token_endpoint_auth_method [Object] Object to be assigned + # @!visibility private + def token_endpoint_auth_method=(token_endpoint_auth_method) + if !token_endpoint_auth_method.nil? && token_endpoint_auth_method.to_s.length > 20 + fail ArgumentError, 'invalid value for "token_endpoint_auth_method", the character length must be smaller than or equal to 20.' + end + @token_endpoint_auth_method = token_endpoint_auth_method + end + + # Custom attribute writer method with validation + # @param tos_uri [Object] Object to be assigned + # @!visibility private + def tos_uri=(tos_uri) + if !tos_uri.nil? && tos_uri.to_s.length > 1000 + fail ArgumentError, 'invalid value for "tos_uri", the character length must be smaller than or equal to 1000.' + end + @tos_uri = tos_uri + 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 && + client_name == o.client_name && + client_uri == o.client_uri && + grant_types == o.grant_types && + jwks_uri == o.jwks_uri && + logo_uri == o.logo_uri && + policy_uri == o.policy_uri && + redirect_uris == o.redirect_uris && + response_types == o.response_types && + scope == o.scope && + token_endpoint_auth_method == o.token_endpoint_auth_method && + tos_uri == o.tos_uri && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [client_name, client_uri, grant_types, jwks_uri, logo_uri, policy_uri, redirect_uris, response_types, scope, token_endpoint_auth_method, tos_uri, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_client_registration_response.rb b/lib/datadog_api_client/v2/models/o_auth_client_registration_response.rb new file mode 100644 index 000000000000..4b9ef409a5ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_client_registration_response.rb @@ -0,0 +1,234 @@ +=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 payload for a successful OAuth2 dynamic client registration as defined by RFC 7591. + class OAuthClientRegistrationResponse + include BaseGenericModel + + # Unique identifier assigned to the registered client. + attr_reader :client_id + + # Human-readable name of the client. + attr_reader :client_name + + # OAuth 2.0 grant types registered for the client. + attr_reader :grant_types + + # Redirection URIs registered for the client. + attr_reader :redirect_uris + + # OAuth 2.0 response types registered for the client. + attr_reader :response_types + + # Authentication method registered for the token endpoint. Always `none`. + attr_reader :token_endpoint_auth_method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'client_id' => :'client_id', + :'client_name' => :'client_name', + :'grant_types' => :'grant_types', + :'redirect_uris' => :'redirect_uris', + :'response_types' => :'response_types', + :'token_endpoint_auth_method' => :'token_endpoint_auth_method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'client_id' => :'UUID', + :'client_name' => :'String', + :'grant_types' => :'Array', + :'redirect_uris' => :'Array', + :'response_types' => :'Array', + :'token_endpoint_auth_method' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OAuthClientRegistrationResponse` 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?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'client_name') + self.client_name = attributes[:'client_name'] + end + + if attributes.key?(:'grant_types') + if (value = attributes[:'grant_types']).is_a?(Array) + self.grant_types = value + end + end + + if attributes.key?(:'redirect_uris') + if (value = attributes[:'redirect_uris']).is_a?(Array) + self.redirect_uris = value + end + end + + if attributes.key?(:'response_types') + if (value = attributes[:'response_types']).is_a?(Array) + self.response_types = value + end + end + + if attributes.key?(:'token_endpoint_auth_method') + self.token_endpoint_auth_method = attributes[:'token_endpoint_auth_method'] + 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 @client_id.nil? + return false if @client_name.nil? + return false if @grant_types.nil? + return false if @redirect_uris.nil? + return false if @response_types.nil? + return false if @token_endpoint_auth_method.nil? + true + end + + # Custom attribute writer method with validation + # @param client_id [Object] Object to be assigned + # @!visibility private + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'invalid value for "client_id", client_id cannot be nil.' + end + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param client_name [Object] Object to be assigned + # @!visibility private + def client_name=(client_name) + if client_name.nil? + fail ArgumentError, 'invalid value for "client_name", client_name cannot be nil.' + end + @client_name = client_name + end + + # Custom attribute writer method with validation + # @param grant_types [Object] Object to be assigned + # @!visibility private + def grant_types=(grant_types) + if grant_types.nil? + fail ArgumentError, 'invalid value for "grant_types", grant_types cannot be nil.' + end + @grant_types = grant_types + end + + # Custom attribute writer method with validation + # @param redirect_uris [Object] Object to be assigned + # @!visibility private + def redirect_uris=(redirect_uris) + if redirect_uris.nil? + fail ArgumentError, 'invalid value for "redirect_uris", redirect_uris cannot be nil.' + end + @redirect_uris = redirect_uris + end + + # Custom attribute writer method with validation + # @param response_types [Object] Object to be assigned + # @!visibility private + def response_types=(response_types) + if response_types.nil? + fail ArgumentError, 'invalid value for "response_types", response_types cannot be nil.' + end + @response_types = response_types + end + + # Custom attribute writer method with validation + # @param token_endpoint_auth_method [Object] Object to be assigned + # @!visibility private + def token_endpoint_auth_method=(token_endpoint_auth_method) + if token_endpoint_auth_method.nil? + fail ArgumentError, 'invalid value for "token_endpoint_auth_method", token_endpoint_auth_method cannot be nil.' + end + @token_endpoint_auth_method = token_endpoint_auth_method + 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 && + client_id == o.client_id && + client_name == o.client_name && + grant_types == o.grant_types && + redirect_uris == o.redirect_uris && + response_types == o.response_types && + token_endpoint_auth_method == o.token_endpoint_auth_method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [client_id, client_name, grant_types, redirect_uris, response_types, token_endpoint_auth_method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_client_registration_response_type.rb b/lib/datadog_api_client/v2/models/o_auth_client_registration_response_type.rb new file mode 100644 index 000000000000..6c2847371ff5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_client_registration_response_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # OAuth 2.0 response type that a registered client may use. + class OAuthClientRegistrationResponseType + include BaseEnumModel + + CODE = "code".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_oidc_scope.rb b/lib/datadog_api_client/v2/models/o_auth_oidc_scope.rb new file mode 100644 index 000000000000..4ae4befd6609 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_oidc_scope.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # OIDC scope a client may be restricted to. + class OAuthOidcScope + include BaseEnumModel + + OPENID = "openid".freeze + PROFILE = "profile".freeze + EMAIL = "email".freeze + OFFLINE_ACCESS = "offline_access".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_scopes_restriction.rb b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction.rb new file mode 100644 index 000000000000..5aaf1633b8ea --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction.rb @@ -0,0 +1,148 @@ +=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 + # Allowlist of OIDC and permission scopes enforced for the OAuth2 client. + class OAuthScopesRestriction + include BaseGenericModel + + # OIDC scopes the client is restricted to. + attr_reader :oidc_scopes + + # Datadog permission scopes the client is restricted to. + attr_reader :permission_scopes + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'oidc_scopes' => :'oidc_scopes', + :'permission_scopes' => :'permission_scopes' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'oidc_scopes' => :'Array', + :'permission_scopes' => :'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::OAuthScopesRestriction` 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?(:'oidc_scopes') + if (value = attributes[:'oidc_scopes']).is_a?(Array) + self.oidc_scopes = value + end + end + + if attributes.key?(:'permission_scopes') + if (value = attributes[:'permission_scopes']).is_a?(Array) + self.permission_scopes = 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 @oidc_scopes.nil? + return false if @permission_scopes.nil? + true + end + + # Custom attribute writer method with validation + # @param oidc_scopes [Object] Object to be assigned + # @!visibility private + def oidc_scopes=(oidc_scopes) + if oidc_scopes.nil? + fail ArgumentError, 'invalid value for "oidc_scopes", oidc_scopes cannot be nil.' + end + @oidc_scopes = oidc_scopes + end + + # Custom attribute writer method with validation + # @param permission_scopes [Object] Object to be assigned + # @!visibility private + def permission_scopes=(permission_scopes) + if permission_scopes.nil? + fail ArgumentError, 'invalid value for "permission_scopes", permission_scopes cannot be nil.' + end + @permission_scopes = permission_scopes + 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 && + oidc_scopes == o.oidc_scopes && + permission_scopes == o.permission_scopes && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [oidc_scopes, permission_scopes, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response.rb b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response.rb new file mode 100644 index 000000000000..8808631362e6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_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 payload describing the scopes restriction of an OAuth2 client. + class OAuthScopesRestrictionResponse + include BaseGenericModel + + # Data object of an OAuth2 client scopes restriction response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OAuthScopesRestrictionResponseData' + } + 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::OAuthScopesRestrictionResponse` 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/o_auth_scopes_restriction_response_attributes.rb b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_attributes.rb new file mode 100644 index 000000000000..18c8bdbb4aef --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_attributes.rb @@ -0,0 +1,127 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an OAuth2 client scopes restriction. + class OAuthScopesRestrictionResponseAttributes + include BaseGenericModel + + # Permission scopes automatically required for this client (for example, mobile-app permission scopes). + # Returns `null` when no scopes are required. + attr_accessor :required_permission_scopes + + # Allowlist of OIDC and permission scopes enforced for the OAuth2 client. + attr_accessor :scopes_restriction + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'required_permission_scopes' => :'required_permission_scopes', + :'scopes_restriction' => :'scopes_restriction' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'required_permission_scopes' => :'Array', + :'scopes_restriction' => :'OAuthScopesRestriction' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'required_permission_scopes', + :'scopes_restriction', + ]) + 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::OAuthScopesRestrictionResponseAttributes` 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?(:'required_permission_scopes') + if (value = attributes[:'required_permission_scopes']).is_a?(Array) + self.required_permission_scopes = value + end + end + + if attributes.key?(:'scopes_restriction') + self.scopes_restriction = attributes[:'scopes_restriction'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + required_permission_scopes == o.required_permission_scopes && + scopes_restriction == o.scopes_restriction && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [required_permission_scopes, scopes_restriction, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_data.rb b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_data.rb new file mode 100644 index 000000000000..70c8124753c0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object of an OAuth2 client scopes restriction response. + class OAuthScopesRestrictionResponseData + include BaseGenericModel + + # Attributes of an OAuth2 client scopes restriction. + attr_reader :attributes + + # UUID of the OAuth2 client this restriction applies to. + attr_reader :id + + # JSON:API resource type for an OAuth2 client scopes restriction. + 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' => :'OAuthScopesRestrictionResponseAttributes', + :'id' => :'UUID', + :'type' => :'OAuthScopesRestrictionType' + } + 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::OAuthScopesRestrictionResponseData` 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/o_auth_scopes_restriction_type.rb b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_type.rb new file mode 100644 index 000000000000..0d0808aee801 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth_scopes_restriction_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 + # JSON:API resource type for an OAuth2 client scopes restriction. + class OAuthScopesRestrictionType + include BaseEnumModel + + SCOPES_RESTRICTION = "scopes_restriction".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/overview_item_array.rb b/lib/datadog_api_client/v2/models/overview_item_array.rb new file mode 100644 index 000000000000..5439c67968c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/overview_item_array.rb @@ -0,0 +1,126 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response body for the overview endpoint, returning the tiles shown on the + # End User Device Monitoring overview dashboard. + class OverviewItemArray + include BaseGenericModel + + # List of overview tiles. + 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' => :'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::OverviewItemArray` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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/overview_item_data.rb b/lib/datadog_api_client/v2/models/overview_item_data.rb new file mode 100644 index 000000000000..d86e2e6947ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/overview_item_data.rb @@ -0,0 +1,154 @@ +=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 single tile entry in the End User Device Monitoring overview response. + class OverviewItemData + include BaseGenericModel + + # Attributes of a single tile in the End User Device Monitoring overview dashboard. + attr_accessor :attributes + + # Unique identifier of the overview tile. + attr_reader :id + + # Overview items resource type. + 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' => :'OverviewItemDataAttributes', + :'id' => :'String', + :'type' => :'OverviewItemDataType' + } + 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::OverviewItemData` 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # 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/overview_item_data_attributes.rb b/lib/datadog_api_client/v2/models/overview_item_data_attributes.rb new file mode 100644 index 000000000000..d18aa023bf05 --- /dev/null +++ b/lib/datadog_api_client/v2/models/overview_item_data_attributes.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a single tile in the End User Device Monitoring overview dashboard. + class OverviewItemDataAttributes + include BaseGenericModel + + # Human-readable name of the overview tile. + attr_accessor :name + + # Numeric value displayed on the overview tile. + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'value' => :'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::OverviewItemDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/overview_item_data_type.rb b/lib/datadog_api_client/v2/models/overview_item_data_type.rb new file mode 100644 index 000000000000..fbd6cc616f29 --- /dev/null +++ b/lib/datadog_api_client/v2/models/overview_item_data_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 + # Overview items resource type. + class OverviewItemDataType + include BaseEnumModel + + OVERVIEW_ITEMS = "overview_items".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data.rb b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data.rb new file mode 100644 index 000000000000..6cae03a85eec --- /dev/null +++ b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object of an upsert OAuth2 scopes restriction request. + class UpsertOAuthScopesRestrictionData + include BaseGenericModel + + # Attributes of an upsert OAuth2 scopes restriction request. + attr_accessor :attributes + + # JSON:API resource type for an upsert OAuth2 client scopes restriction request. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpsertOAuthScopesRestrictionDataAttributes', + :'type' => :'UpsertOAuthScopesRestrictionType' + } + 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::UpsertOAuthScopesRestrictionData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data_attributes.rb b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data_attributes.rb new file mode 100644 index 000000000000..992dddb15dd8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_data_attributes.rb @@ -0,0 +1,120 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an upsert OAuth2 scopes restriction request. + class UpsertOAuthScopesRestrictionDataAttributes + include BaseGenericModel + + # OIDC scopes the client is allowed to request. + attr_accessor :oidc_scopes + + # Datadog permission scopes the client is allowed to request. + # Each value must be a valid permission name. + attr_accessor :permission_scopes + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'oidc_scopes' => :'oidc_scopes', + :'permission_scopes' => :'permission_scopes' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'oidc_scopes' => :'Array', + :'permission_scopes' => :'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::UpsertOAuthScopesRestrictionDataAttributes` 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?(:'oidc_scopes') + if (value = attributes[:'oidc_scopes']).is_a?(Array) + self.oidc_scopes = value + end + end + + if attributes.key?(:'permission_scopes') + if (value = attributes[:'permission_scopes']).is_a?(Array) + self.permission_scopes = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + oidc_scopes == o.oidc_scopes && + permission_scopes == o.permission_scopes && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [oidc_scopes, permission_scopes, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_request.rb b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_request.rb new file mode 100644 index 000000000000..03ba65e4f357 --- /dev/null +++ b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload for creating or updating the scopes restriction of an OAuth2 client. + class UpsertOAuthScopesRestrictionRequest + include BaseGenericModel + + # Data object of an upsert OAuth2 scopes restriction request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'UpsertOAuthScopesRestrictionData' + } + 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::UpsertOAuthScopesRestrictionRequest` 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/upsert_o_auth_scopes_restriction_type.rb b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_type.rb new file mode 100644 index 000000000000..ca38a2df07d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/upsert_o_auth_scopes_restriction_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 + # JSON:API resource type for an upsert OAuth2 client scopes restriction request. + class UpsertOAuthScopesRestrictionType + include BaseEnumModel + + UPSERT_SCOPES_RESTRICTION = "upsert_scopes_restriction".freeze + end +end