diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b507264fb29c..f77a4e1e1483 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -80073,6 +80073,578 @@ components: RUMGroupByTotalString: description: A string to use as the key value for the total bucket. type: string + RUMOperationCreateRequest: + description: The request body for creating a RUM operation. + properties: + data: + $ref: "#/components/schemas/RUMOperationCreateRequestData" + required: + - data + type: object + RUMOperationCreateRequestData: + description: The data object for creating a RUM operation. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationRequestAttributes" + type: + $ref: "#/components/schemas/RUMOperationType" + required: + - type + - attributes + type: object + RUMOperationJourneyCompositeRule: + description: |- + A composite rule combining several predicates. Used as an alternative to `nodes` on a journey + step when several conditions must be matched together, in any order or in a specific order. + properties: + composite_rule_id: + description: The unique identifier of the composite rule. Generated by the server if omitted. + readOnly: true + type: string + config_version: + description: A hash of the composite rule's configuration, computed by the server. + readOnly: true + type: string + kind: + $ref: "#/components/schemas/RUMOperationJourneyCompositeRuleKind" + max_window_ms: + description: The maximum time window, in milliseconds, in which all predicates must match. + example: 30000 + format: int64 + type: integer + predicates: + description: The list of predicates that must be matched by RUM events. + items: + $ref: "#/components/schemas/RUMOperationJourneyPredicate" + type: array + required: + - kind + - predicates + type: object + RUMOperationJourneyCompositeRuleKind: + description: |- + The rule used to combine the composite rule's predicates. `all_of` requires every predicate + to match, in any order. `in_order` requires every predicate to match in the given order. + enum: + - all_of + - in_order + example: all_of + type: string + x-enum-varnames: + - ALL_OF + - IN_ORDER + RUMOperationJourneyNode: + description: A single node within a RUM operation journey step, matching RUM events with a query. + properties: + id: + description: The unique identifier of the node. Generated by the server if omitted. + readOnly: true + type: string + query: + description: The RUM search query used to match events for this node. + example: "@type:action @action.type:click" + type: string + required: + - query + type: object + RUMOperationJourneyPredicate: + description: A single predicate within a composite rule, matching RUM events with a query. + properties: + query: + description: The RUM search query used to match events for this predicate. + example: "@type:action @action.type:click" + type: string + required: + - query + type: object + RUMOperationJourneyRum: + description: The definition of a RUM operation's journey, used to detect it from RUM events. + properties: + rum_steps: + description: The ordered list of steps composing the RUM journey. + items: + $ref: "#/components/schemas/RUMOperationJourneyStep" + type: array + required: + - rum_steps + type: object + RUMOperationJourneyStep: + description: |- + A single step of a RUM operation's journey. Matches RUM events either through a list of `nodes` + or through a `composite` rule; the two are mutually exclusive. + properties: + composite: + $ref: "#/components/schemas/RUMOperationJourneyCompositeRule" + nodes: + description: The list of nodes that can match this step. Mutually exclusive with `composite`. + items: + $ref: "#/components/schemas/RUMOperationJourneyNode" + type: array + type: + $ref: "#/components/schemas/RUMOperationJourneyStepType" + required: + - type + type: object + RUMOperationJourneyStepType: + description: The type of a step within a RUM operation's journey. + enum: + - start + - update + - stop + - error + - abandoned + example: start + type: string + x-enum-varnames: + - START + - UPDATE + - STOP + - ERROR + - ABANDONED + RUMOperationRequestAttributes: + description: Attributes for creating or updating a RUM operation. + properties: + application_id: + description: The RUM application ID the operation belongs to. + format: uuid + nullable: true + type: string + category: + description: The category of the RUM operation. + nullable: true + type: string + description: + description: A description of the RUM operation. + nullable: true + type: string + display_name: + description: A human-readable display name for the RUM operation. + example: Checkout completed + type: string + feature_ids: + description: The list of feature IDs associated with the RUM operation. + items: + type: string + type: array + journey_rum: + $ref: "#/components/schemas/RUMOperationJourneyRum" + name: + description: The unique name of the RUM operation. Must not contain spaces. + example: checkout_completed + type: string + tags: + description: A list of tags associated with the RUM operation. + example: + - "team:checkout" + items: + type: string + type: array + required: + - name + - tags + - journey_rum + type: object + RUMOperationResponse: + description: The response for a single RUM operation. + properties: + data: + $ref: "#/components/schemas/RUMOperationResponseData" + required: + - data + type: object + RUMOperationResponseAttributes: + description: Attributes of a RUM operation response. + properties: + application_id: + description: The RUM application ID the operation belongs to. + format: uuid + nullable: true + type: string + category: + description: The category of the RUM operation. + nullable: true + type: string + created_at: + description: The timestamp when the RUM operation was created. + format: date-time + readOnly: true + type: string + created_by: + $ref: "#/components/schemas/RUMOperationUser" + description: + description: A description of the RUM operation. + nullable: true + type: string + display_name: + description: A human-readable display name for the RUM operation. + example: Checkout completed + type: string + feature_ids: + description: The list of feature IDs associated with the RUM operation. + items: + type: string + type: array + journey_rum: + $ref: "#/components/schemas/RUMOperationJourneyRum" + name: + description: The unique name of the RUM operation. Must not contain spaces. + example: checkout_completed + type: string + org_id: + description: The ID of the organization the RUM operation belongs to. + format: int64 + readOnly: true + type: integer + tags: + description: A list of tags associated with the RUM operation. + example: + - "team:checkout" + items: + type: string + type: array + updated_at: + description: The timestamp when the RUM operation was last updated. + format: date-time + nullable: true + readOnly: true + type: string + updated_by: + $ref: "#/components/schemas/RUMOperationUser" + required: + - name + - tags + - journey_rum + type: object + RUMOperationResponseData: + description: The data object in a RUM operation response. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationResponseAttributes" + id: + description: The unique identifier of the RUM operation. + example: "abc12345-1234-5678-abcd-ef1234567890" + readOnly: true + type: string + type: + $ref: "#/components/schemas/RUMOperationType" + required: + - id + - type + - attributes + type: object + RUMOperationStrongLinkCreateRequest: + description: The request body for creating a RUM operation strong link. + properties: + data: + $ref: "#/components/schemas/RUMOperationStrongLinkCreateRequestData" + required: + - data + type: object + RUMOperationStrongLinkCreateRequestAttributes: + description: Attributes for creating a RUM operation strong link. + properties: + application_id: + description: The RUM application ID used when creating a stub operation from `operation_name`. + format: uuid + type: string + description: + description: A description of the strong link. + nullable: true + type: string + feature_id: + description: The unique identifier of the feature to link. + example: "feature-123" + type: string + operation_id: + description: |- + The unique identifier of the RUM operation to link. Either `operation_id` or + `operation_name` is required. + example: "abc12345-1234-5678-abcd-ef1234567890" + type: string + operation_name: + description: |- + The name of the RUM operation to link. Either `operation_id` or `operation_name` is + required. If no operation with this name exists, a stub operation is created. + type: string + status: + $ref: "#/components/schemas/RUMOperationStrongLinkStatus" + tags: + description: A list of tags associated with the strong link. + items: + type: string + type: array + required: + - feature_id + type: object + RUMOperationStrongLinkCreateRequestData: + description: The data object for creating a RUM operation strong link. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationStrongLinkCreateRequestAttributes" + type: + $ref: "#/components/schemas/RUMOperationStrongLinkType" + required: + - type + - attributes + type: object + RUMOperationStrongLinkResponse: + description: The response for a single RUM operation strong link. + properties: + data: + $ref: "#/components/schemas/RUMOperationStrongLinkResponseData" + required: + - data + type: object + RUMOperationStrongLinkResponseAttributes: + description: Attributes of a RUM operation strong link response. + properties: + created_at: + description: The timestamp when the strong link was created. + format: date-time + readOnly: true + type: string + description: + description: A description of the strong link. + nullable: true + type: string + feature_id: + description: The unique identifier of the linked feature. + example: "feature-123" + readOnly: true + type: string + operation_id: + description: The unique identifier of the linked RUM operation. + example: "abc12345-1234-5678-abcd-ef1234567890" + readOnly: true + type: string + status: + $ref: "#/components/schemas/RUMOperationStrongLinkStatus" + tags: + description: A list of tags associated with the strong link. + items: + type: string + type: array + updated_at: + description: The timestamp when the strong link was last updated. + format: date-time + nullable: true + readOnly: true + type: string + required: + - operation_id + - feature_id + - status + type: object + RUMOperationStrongLinkResponseData: + description: The data object in a RUM operation strong link response. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationStrongLinkResponseAttributes" + id: + description: The unique identifier of the strong link, formatted as `:`. + example: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + readOnly: true + type: string + type: + $ref: "#/components/schemas/RUMOperationStrongLinkType" + required: + - id + - type + - attributes + type: object + RUMOperationStrongLinkStatus: + description: The status of a RUM operation strong link. + enum: + - DRAFT + - CONFIRMED + - REJECTED + example: CONFIRMED + type: string + x-enum-varnames: + - DRAFT + - CONFIRMED + - REJECTED + RUMOperationStrongLinkType: + description: The JSON:API type for RUM operation strong link resources. + enum: + - strong_links + example: strong_links + type: string + x-enum-varnames: + - STRONG_LINKS + RUMOperationStrongLinkUpdateRequest: + description: The request body for updating a RUM operation strong link. + properties: + data: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateRequestData" + required: + - data + type: object + RUMOperationStrongLinkUpdateRequestAttributes: + description: Attributes for updating a RUM operation strong link. + properties: + status: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateStatus" + required: + - status + type: object + RUMOperationStrongLinkUpdateRequestData: + description: The data object for updating a RUM operation strong link. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateRequestAttributes" + type: + $ref: "#/components/schemas/RUMOperationStrongLinkType" + required: + - type + - attributes + type: object + RUMOperationStrongLinkUpdateStatus: + description: The status of a RUM operation strong link. Can only be set to `CONFIRMED` or `REJECTED`. + enum: + - CONFIRMED + - REJECTED + example: CONFIRMED + type: string + x-enum-varnames: + - CONFIRMED + - REJECTED + RUMOperationStrongLinksListResponse: + description: The response for a list of RUM operation strong links. + properties: + data: + items: + $ref: "#/components/schemas/RUMOperationStrongLinkResponseData" + type: array + meta: + $ref: "#/components/schemas/RUMOperationStrongLinksListResponseMeta" + required: + - data + type: object + RUMOperationStrongLinksListResponseMeta: + description: Metadata for a list of RUM operation strong links. + properties: + limit: + description: The pagination limit. + format: int64 + type: integer + offset: + description: The current offset. + format: int64 + type: integer + total: + description: The total number of strong links matching the request. + format: int64 + type: integer + type: object + RUMOperationType: + description: The JSON:API type for RUM operation resources. + enum: + - operations + example: operations + type: string + x-enum-varnames: + - OPERATIONS + RUMOperationUpdateRequest: + description: The request body for updating a RUM operation. + properties: + data: + $ref: "#/components/schemas/RUMOperationUpdateRequestData" + required: + - data + type: object + RUMOperationUpdateRequestData: + description: The data object for updating a RUM operation. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationRequestAttributes" + id: + description: The unique identifier of the RUM operation. Must match the ID in the URL path. + example: "abc12345-1234-5678-abcd-ef1234567890" + type: string + type: + $ref: "#/components/schemas/RUMOperationType" + required: + - id + - type + - attributes + type: object + RUMOperationUser: + description: A Datadog user referenced by a RUM operation. + properties: + email: + description: The email of the user. + readOnly: true + type: string + handle: + description: The handle of the user. + readOnly: true + type: string + name: + description: The name of the user. + readOnly: true + type: string + uuid: + description: The UUID of the user. + readOnly: true + type: string + type: object + RUMOperationsListResponse: + description: The response for a list of RUM operations. + properties: + data: + items: + $ref: "#/components/schemas/RUMOperationResponseData" + type: array + meta: + $ref: "#/components/schemas/RUMOperationsListResponseMeta" + required: + - data + type: object + RUMOperationsListResponseMeta: + description: Metadata for a list of RUM operations. + properties: + page: + $ref: "#/components/schemas/RUMOperationsListResponseMetaPage" + type: object + RUMOperationsListResponseMetaPage: + description: Pagination metadata for a list of RUM operations. + properties: + first_offset: + description: The offset of the first page. + format: int64 + type: integer + last_offset: + description: The offset of the last page. + format: int64 + type: integer + limit: + description: The pagination limit. + format: int64 + type: integer + next_offset: + description: The offset of the next page, if any. + format: int64 + nullable: true + type: integer + offset: + description: The current offset. + format: int64 + type: integer + prev_offset: + description: The offset of the previous page, if any. + format: int64 + nullable: true + type: integer + total: + description: The total number of RUM operations matching the search. + format: int64 + type: integer + type: + description: The type of pagination used. + example: offset + type: string + type: object RUMProductAnalyticsRetentionScale: description: Product Analytics retention scale configuration. properties: @@ -175512,6 +176084,694 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/rum/operations: + post: + description: Create a new RUM operation, defining the journey used to detect it from RUM events. + operationId: CreateRUMOperation + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationCreateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict. An operation with this name already exists. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a RUM operation + tags: + - RUM Operations + 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/rum/operations/by-name/{name}: + get: + description: Retrieve a specific RUM operation by its unique name. + operationId: GetRUMOperationByName + parameters: + - description: The unique name of the RUM operation. + in: path + name: name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + 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 a RUM operation by name + tags: + - RUM Operations + 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/rum/operations/search: + get: + description: Search RUM operations for your organization. Supports filtering by query, creator, team, feature, and application. + operationId: ListRUMOperations + parameters: + - description: A search query to filter operations by name. + in: query + name: query + required: false + schema: + example: "checkout" + type: string + - description: Offset for pagination. + in: query + name: page[offset] + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of items per page. Maximum of 100. + in: query + name: page[limit] + required: false + schema: + default: 50 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Filter operations by the email of their creator. + in: query + name: creator + required: false + schema: + example: user@example.com + type: string + - description: Filter operations by team. Accepts a comma-separated list of teams. + in: query + name: team + required: false + schema: + example: "frontend,checkout" + type: string + - description: Filter operations by feature ID. Accepts a comma-separated list of feature IDs. + in: query + name: feature_id + required: false + schema: + type: string + - description: Filter operations by RUM application ID. + in: query + name: application_id + required: false + schema: + example: "abc12345-1234-5678-abcd-ef1234567890" + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + meta: + page: + first_offset: 0 + last_offset: 0 + limit: 50 + next_offset: + offset: 0 + prev_offset: + total: 1 + type: offset + schema: + $ref: "#/components/schemas/RUMOperationsListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Search RUM operations + tags: + - RUM Operations + 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/rum/operations/strong_links: + get: + description: |- + List strong links between RUM operations and features. A strong link confirms that a feature + belongs to an operation. Provide `operation_id`, `feature_id`, or both to filter results; + at least one is required. + operationId: ListRUMOperationStrongLinks + parameters: + - description: Filter strong links by RUM operation ID. + in: query + name: operation_id + required: false + schema: + type: string + - description: Filter strong links by feature ID. + in: query + name: feature_id + required: false + schema: + type: string + - description: Offset for pagination. + in: query + name: page[offset] + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of items per page. Maximum of 200. + in: query + name: page[limit] + required: false + schema: + default: 50 + format: int64 + maximum: 200 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + description: "Confirmed link between checkout_completed and feature-123." + feature_id: "feature-123" + operation_id: "abc12345-1234-5678-abcd-ef1234567890" + status: CONFIRMED + tags: + - "team:checkout" + updated_at: + id: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + type: strong_links + meta: + limit: 50 + offset: 0 + total: 1 + schema: + $ref: "#/components/schemas/RUMOperationStrongLinksListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List RUM operation strong links + tags: + - RUM Operations + post: + description: |- + Create a strong link between a RUM operation and a feature, confirming that the feature + belongs to the operation. The operation can be identified by `operation_id` or `operation_name`; + if `operation_name` does not match an existing operation, a stub operation is created. + operationId: CreateRUMOperationStrongLink + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + description: "Confirmed link between checkout_completed and feature-123." + feature_id: "feature-123" + operation_id: "abc12345-1234-5678-abcd-ef1234567890" + status: CONFIRMED + tags: + - "team:checkout" + updated_at: + id: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + type: strong_links + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found. The referenced `operation_id` does not exist. + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict. A strong link between this operation and feature already exists. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a RUM operation strong link + tags: + - RUM Operations + 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/rum/operations/strong_links/{rum_operation_id}/{feature_id}: + delete: + description: Delete the strong link between a RUM operation and a feature. + operationId: DeleteRUMOperationStrongLink + parameters: + - description: The unique identifier of the RUM operation. + in: path + name: rum_operation_id + required: true + schema: + type: string + - description: The unique identifier of the feature. + in: path + name: feature_id + required: true + schema: + type: string + responses: + "204": + description: No Content + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a RUM operation strong link + tags: + - RUM Operations + 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/). + put: + description: Update the status of a strong link between a RUM operation and a feature. + operationId: UpdateRUMOperationStrongLink + parameters: + - description: The unique identifier of the RUM operation. + in: path + name: rum_operation_id + required: true + schema: + type: string + - description: The unique identifier of the feature. + in: path + name: feature_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + description: "Confirmed link between checkout_completed and feature-123." + feature_id: "feature-123" + operation_id: "abc12345-1234-5678-abcd-ef1234567890" + status: CONFIRMED + tags: + - "team:checkout" + updated_at: "2024-01-16T09:00:00Z" + id: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + type: strong_links + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkResponse" + 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: Update a RUM operation strong link + tags: + - RUM Operations + 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/rum/operations/{rum_operation_id}: + delete: + description: Delete a RUM operation. + operationId: DeleteRUMOperation + parameters: + - description: The unique identifier of the RUM operation to delete. + in: path + name: rum_operation_id + required: true + schema: + type: string + responses: + "204": + description: No Content + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a RUM operation + tags: + - RUM Operations + 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: Retrieve a specific RUM operation by its unique identifier. + operationId: GetRUMOperation + parameters: + - description: The unique identifier of the RUM operation. + in: path + name: rum_operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a RUM operation + tags: + - RUM Operations + 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/). + put: + description: |- + Update an existing RUM operation. Fields omitted from the request body keep their existing value, + with the exception of `journey_rum`, which is required and fully replaced on every update. + operationId: UpdateRUMOperation + parameters: + - description: The unique identifier of the RUM operation to update. + in: path + name: rum_operation_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: "2024-01-16T09:00:00Z" + updated_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + 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 + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict. An operation with this name already exists. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a RUM operation + tags: + - RUM Operations + 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/rum/query/insight/aggregated_long_tasks: post: description: |- @@ -204421,6 +205681,12 @@ tags: - description: |- Get insights into the performance of your Real User Monitoring (RUM) applications over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information name: RUM Insights + - description: |- + Manage [RUM Operations](https://docs.datadoghq.com/real_user_monitoring/), business + transactions detected from RUM events through a configurable journey, and their strong links + to features. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) + for more information. + name: RUM Operations - description: |- Manage [RUM SDK configurations](https://docs.datadoghq.com/real_user_monitoring/) delivered to RUM applications via Remote Configuration. externalDocs: diff --git a/examples/v2/rum-operations/CreateRUMOperation.rb b/examples/v2/rum-operations/CreateRUMOperation.rb new file mode 100644 index 000000000000..e8e363d8e927 --- /dev/null +++ b/examples/v2/rum-operations/CreateRUMOperation.rb @@ -0,0 +1,46 @@ +# Create a RUM operation returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_rum_operation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new + +body = DatadogAPIClient::V2::RUMOperationCreateRequest.new({ + data: DatadogAPIClient::V2::RUMOperationCreateRequestData.new({ + attributes: DatadogAPIClient::V2::RUMOperationRequestAttributes.new({ + application_id: nil, + category: nil, + description: nil, + display_name: "Checkout completed", + feature_ids: [], + journey_rum: DatadogAPIClient::V2::RUMOperationJourneyRum.new({ + rum_steps: [ + DatadogAPIClient::V2::RUMOperationJourneyStep.new({ + composite: DatadogAPIClient::V2::RUMOperationJourneyCompositeRule.new({ + kind: DatadogAPIClient::V2::RUMOperationJourneyCompositeRuleKind::ALL_OF, + max_window_ms: 30000, + predicates: [ + DatadogAPIClient::V2::RUMOperationJourneyPredicate.new({ + query: "@type:action @action.type:click", + }), + ], + }), + nodes: [ + DatadogAPIClient::V2::RUMOperationJourneyNode.new({ + query: "@type:action @action.type:click", + }), + ], + type: DatadogAPIClient::V2::RUMOperationJourneyStepType::START, + }), + ], + }), + name: "checkout_completed", + tags: [ + "team:checkout", + ], + }), + type: DatadogAPIClient::V2::RUMOperationType::OPERATIONS, + }), +}) +p api_instance.create_rum_operation(body) diff --git a/examples/v2/rum-operations/CreateRUMOperationStrongLink.rb b/examples/v2/rum-operations/CreateRUMOperationStrongLink.rb new file mode 100644 index 000000000000..26112ad40e06 --- /dev/null +++ b/examples/v2/rum-operations/CreateRUMOperationStrongLink.rb @@ -0,0 +1,21 @@ +# Create a RUM operation strong link returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_rum_operation_strong_link".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new + +body = DatadogAPIClient::V2::RUMOperationStrongLinkCreateRequest.new({ + data: DatadogAPIClient::V2::RUMOperationStrongLinkCreateRequestData.new({ + attributes: DatadogAPIClient::V2::RUMOperationStrongLinkCreateRequestAttributes.new({ + description: nil, + feature_id: "feature-123", + operation_id: "abc12345-1234-5678-abcd-ef1234567890", + status: DatadogAPIClient::V2::RUMOperationStrongLinkStatus::CONFIRMED, + tags: [], + }), + type: DatadogAPIClient::V2::RUMOperationStrongLinkType::STRONG_LINKS, + }), +}) +p api_instance.create_rum_operation_strong_link(body) diff --git a/examples/v2/rum-operations/DeleteRUMOperation.rb b/examples/v2/rum-operations/DeleteRUMOperation.rb new file mode 100644 index 000000000000..23fb60229546 --- /dev/null +++ b/examples/v2/rum-operations/DeleteRUMOperation.rb @@ -0,0 +1,8 @@ +# Delete a RUM operation returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_rum_operation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new +api_instance.delete_rum_operation("rum_operation_id") diff --git a/examples/v2/rum-operations/DeleteRUMOperationStrongLink.rb b/examples/v2/rum-operations/DeleteRUMOperationStrongLink.rb new file mode 100644 index 000000000000..2ebb1b2d1fff --- /dev/null +++ b/examples/v2/rum-operations/DeleteRUMOperationStrongLink.rb @@ -0,0 +1,8 @@ +# Delete a RUM operation strong link returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_rum_operation_strong_link".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new +api_instance.delete_rum_operation_strong_link("rum_operation_id", "feature_id") diff --git a/examples/v2/rum-operations/GetRUMOperation.rb b/examples/v2/rum-operations/GetRUMOperation.rb new file mode 100644 index 000000000000..9e31c2cd373b --- /dev/null +++ b/examples/v2/rum-operations/GetRUMOperation.rb @@ -0,0 +1,8 @@ +# Get a RUM operation returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_operation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new +p api_instance.get_rum_operation("rum_operation_id") diff --git a/examples/v2/rum-operations/GetRUMOperationByName.rb b/examples/v2/rum-operations/GetRUMOperationByName.rb new file mode 100644 index 000000000000..0ec5ed3016ff --- /dev/null +++ b/examples/v2/rum-operations/GetRUMOperationByName.rb @@ -0,0 +1,8 @@ +# Get a RUM operation by name returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_operation_by_name".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new +p api_instance.get_rum_operation_by_name("name") diff --git a/examples/v2/rum-operations/ListRUMOperationStrongLinks.rb b/examples/v2/rum-operations/ListRUMOperationStrongLinks.rb new file mode 100644 index 000000000000..e6486aff441d --- /dev/null +++ b/examples/v2/rum-operations/ListRUMOperationStrongLinks.rb @@ -0,0 +1,5 @@ +# List RUM operation strong links returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new +p api_instance.list_rum_operation_strong_links() diff --git a/examples/v2/rum-operations/ListRUMOperations.rb b/examples/v2/rum-operations/ListRUMOperations.rb new file mode 100644 index 000000000000..fd37483e94ca --- /dev/null +++ b/examples/v2/rum-operations/ListRUMOperations.rb @@ -0,0 +1,8 @@ +# Search RUM operations returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_rum_operations".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new +p api_instance.list_rum_operations() diff --git a/examples/v2/rum-operations/UpdateRUMOperation.rb b/examples/v2/rum-operations/UpdateRUMOperation.rb new file mode 100644 index 000000000000..2544b6bfe3cf --- /dev/null +++ b/examples/v2/rum-operations/UpdateRUMOperation.rb @@ -0,0 +1,47 @@ +# Update a RUM operation returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_rum_operation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new + +body = DatadogAPIClient::V2::RUMOperationUpdateRequest.new({ + data: DatadogAPIClient::V2::RUMOperationUpdateRequestData.new({ + attributes: DatadogAPIClient::V2::RUMOperationRequestAttributes.new({ + application_id: nil, + category: nil, + description: nil, + display_name: "Checkout completed", + feature_ids: [], + journey_rum: DatadogAPIClient::V2::RUMOperationJourneyRum.new({ + rum_steps: [ + DatadogAPIClient::V2::RUMOperationJourneyStep.new({ + composite: DatadogAPIClient::V2::RUMOperationJourneyCompositeRule.new({ + kind: DatadogAPIClient::V2::RUMOperationJourneyCompositeRuleKind::ALL_OF, + max_window_ms: 30000, + predicates: [ + DatadogAPIClient::V2::RUMOperationJourneyPredicate.new({ + query: "@type:action @action.type:click", + }), + ], + }), + nodes: [ + DatadogAPIClient::V2::RUMOperationJourneyNode.new({ + query: "@type:action @action.type:click", + }), + ], + type: DatadogAPIClient::V2::RUMOperationJourneyStepType::START, + }), + ], + }), + name: "checkout_completed", + tags: [ + "team:checkout", + ], + }), + id: "abc12345-1234-5678-abcd-ef1234567890", + type: DatadogAPIClient::V2::RUMOperationType::OPERATIONS, + }), +}) +p api_instance.update_rum_operation("rum_operation_id", body) diff --git a/examples/v2/rum-operations/UpdateRUMOperationStrongLink.rb b/examples/v2/rum-operations/UpdateRUMOperationStrongLink.rb new file mode 100644 index 000000000000..e35bc9e50e5a --- /dev/null +++ b/examples/v2/rum-operations/UpdateRUMOperationStrongLink.rb @@ -0,0 +1,17 @@ +# Update a RUM operation strong link returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_rum_operation_strong_link".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RUMOperationsAPI.new + +body = DatadogAPIClient::V2::RUMOperationStrongLinkUpdateRequest.new({ + data: DatadogAPIClient::V2::RUMOperationStrongLinkUpdateRequestData.new({ + attributes: DatadogAPIClient::V2::RUMOperationStrongLinkUpdateRequestAttributes.new({ + status: DatadogAPIClient::V2::RUMOperationStrongLinkUpdateStatus::CONFIRMED, + }), + type: DatadogAPIClient::V2::RUMOperationStrongLinkType::STRONG_LINKS, + }), +}) +p api_instance.update_rum_operation_strong_link("rum_operation_id", "feature_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 2baffea88083..139b6610674a 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -5264,6 +5264,49 @@ "scope_id" => "String", "body" => "RumRateLimitConfigUpdateRequest", }, + "v2.CreateRUMOperation" => { + "body" => "RUMOperationCreateRequest", + }, + "v2.GetRUMOperationByName" => { + "name" => "String", + }, + "v2.ListRUMOperations" => { + "query" => "String", + "page_offset" => "Integer", + "page_limit" => "Integer", + "creator" => "String", + "team" => "String", + "feature_id" => "String", + "application_id" => "UUID", + }, + "v2.ListRUMOperationStrongLinks" => { + "operation_id" => "String", + "feature_id" => "String", + "page_offset" => "Integer", + "page_limit" => "Integer", + }, + "v2.CreateRUMOperationStrongLink" => { + "body" => "RUMOperationStrongLinkCreateRequest", + }, + "v2.DeleteRUMOperationStrongLink" => { + "rum_operation_id" => "String", + "feature_id" => "String", + }, + "v2.UpdateRUMOperationStrongLink" => { + "rum_operation_id" => "String", + "feature_id" => "String", + "body" => "RUMOperationStrongLinkUpdateRequest", + }, + "v2.DeleteRUMOperation" => { + "rum_operation_id" => "String", + }, + "v2.GetRUMOperation" => { + "rum_operation_id" => "String", + }, + "v2.UpdateRUMOperation" => { + "rum_operation_id" => "String", + "body" => "RUMOperationUpdateRequest", + }, "v2.QueryAggregatedLongTasks" => { "body" => "AggregatedLongTasksRequest", }, diff --git a/features/v2/rum_operations.feature b/features/v2/rum_operations.feature new file mode 100644 index 000000000000..fbf1a6a3124f --- /dev/null +++ b/features/v2/rum_operations.feature @@ -0,0 +1,234 @@ +@endpoint(rum-operations) @endpoint(rum-operations-v2) +Feature: RUM Operations + Manage [RUM Operations](https://docs.datadoghq.com/real_user_monitoring/), + business transactions detected from RUM events through a configurable + journey, and their strong links to features. See the [RUM & Session Replay + page](https://docs.datadoghq.com/real_user_monitoring/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMOperations" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation returns "Bad Request" response + Given operation "CreateRUMOperation" enabled + And new "CreateRUMOperation" request + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "type": "operations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation returns "Conflict. An operation with this name already exists." response + Given operation "CreateRUMOperation" enabled + And new "CreateRUMOperation" request + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "type": "operations"}} + When the request is sent + Then the response status is 409 Conflict. An operation with this name already exists. + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation returns "OK" response + Given operation "CreateRUMOperation" enabled + And new "CreateRUMOperation" request + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "type": "operations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Bad Request" response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Conflict. A strong link between this operation and feature already exists." response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 409 Conflict. A strong link between this operation and feature already exists. + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Created" response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Not Found. The referenced `operation_id` does not exist." response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 404 Not Found. The referenced `operation_id` does not exist. + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation returns "No Content" response + Given operation "DeleteRUMOperation" enabled + And new "DeleteRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation returns "Not Found" response + Given operation "DeleteRUMOperation" enabled + And new "DeleteRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation strong link returns "No Content" response + Given operation "DeleteRUMOperationStrongLink" enabled + And new "DeleteRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation strong link returns "Not Found" response + Given operation "DeleteRUMOperationStrongLink" enabled + And new "DeleteRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation by name returns "Bad Request" response + Given operation "GetRUMOperationByName" enabled + And new "GetRUMOperationByName" request + And request contains "name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation by name returns "Not Found" response + Given operation "GetRUMOperationByName" enabled + And new "GetRUMOperationByName" request + And request contains "name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation by name returns "OK" response + Given operation "GetRUMOperationByName" enabled + And new "GetRUMOperationByName" request + And request contains "name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation returns "Not Found" response + Given operation "GetRUMOperation" enabled + And new "GetRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation returns "OK" response + Given operation "GetRUMOperation" enabled + And new "GetRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: List RUM operation strong links returns "Bad Request" response + Given new "ListRUMOperationStrongLinks" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: List RUM operation strong links returns "OK" response + Given new "ListRUMOperationStrongLinks" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Search RUM operations returns "Bad Request" response + Given operation "ListRUMOperations" enabled + And new "ListRUMOperations" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Search RUM operations returns "OK" response + Given operation "ListRUMOperations" enabled + And new "ListRUMOperations" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "Bad Request" response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "Conflict. An operation with this name already exists." response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 409 Conflict. An operation with this name already exists. + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "Not Found" response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "OK" response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": null, "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation strong link returns "Bad Request" response + Given operation "UpdateRUMOperationStrongLink" enabled + And new "UpdateRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "CONFIRMED"}, "type": "strong_links"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation strong link returns "Not Found" response + Given operation "UpdateRUMOperationStrongLink" enabled + And new "UpdateRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "CONFIRMED"}, "type": "strong_links"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation strong link returns "OK" response + Given operation "UpdateRUMOperationStrongLink" enabled + And new "UpdateRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "CONFIRMED"}, "type": "strong_links"}} + 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 10ae8ac71d43..33fa55b33576 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6960,6 +6960,66 @@ "type": "safe" } }, + "CreateRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "unsafe" + } + }, + "GetRUMOperationByName": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "ListRUMOperations": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "ListRUMOperationStrongLinks": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "CreateRUMOperationStrongLink": { + "tag": "RUM Operations", + "undo": { + "type": "unsafe" + } + }, + "DeleteRUMOperationStrongLink": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, + "UpdateRUMOperationStrongLink": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, + "DeleteRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, + "GetRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "UpdateRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, "QueryAggregatedLongTasks": { "tag": "RUM Insights", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index c2ed6cc892b6..d0bc3cb7bb80 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -640,6 +640,15 @@ def initialize "v2.delete_rum_rate_limit_config": false, "v2.get_rum_rate_limit_config": false, "v2.update_rum_rate_limit_config": false, + "v2.create_rum_operation": false, + "v2.create_rum_operation_strong_link": false, + "v2.delete_rum_operation": false, + "v2.delete_rum_operation_strong_link": false, + "v2.get_rum_operation": false, + "v2.get_rum_operation_by_name": false, + "v2.list_rum_operations": false, + "v2.update_rum_operation": false, + "v2.update_rum_operation_strong_link": false, "v2.query_aggregated_long_tasks": false, "v2.query_aggregated_signals_problems": false, "v2.query_aggregated_waterfall": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c9c6d143b082..e7cb670ca649 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6249,6 +6249,40 @@ def overrides "v2.rum_metric_update_compute" => "RumMetricUpdateCompute", "v2.rum_metric_update_data" => "RumMetricUpdateData", "v2.rum_metric_update_request" => "RumMetricUpdateRequest", + "v2.rum_operation_create_request" => "RUMOperationCreateRequest", + "v2.rum_operation_create_request_data" => "RUMOperationCreateRequestData", + "v2.rum_operation_journey_composite_rule" => "RUMOperationJourneyCompositeRule", + "v2.rum_operation_journey_composite_rule_kind" => "RUMOperationJourneyCompositeRuleKind", + "v2.rum_operation_journey_node" => "RUMOperationJourneyNode", + "v2.rum_operation_journey_predicate" => "RUMOperationJourneyPredicate", + "v2.rum_operation_journey_rum" => "RUMOperationJourneyRum", + "v2.rum_operation_journey_step" => "RUMOperationJourneyStep", + "v2.rum_operation_journey_step_type" => "RUMOperationJourneyStepType", + "v2.rum_operation_request_attributes" => "RUMOperationRequestAttributes", + "v2.rum_operation_response" => "RUMOperationResponse", + "v2.rum_operation_response_attributes" => "RUMOperationResponseAttributes", + "v2.rum_operation_response_data" => "RUMOperationResponseData", + "v2.rum_operations_list_response" => "RUMOperationsListResponse", + "v2.rum_operations_list_response_meta" => "RUMOperationsListResponseMeta", + "v2.rum_operations_list_response_meta_page" => "RUMOperationsListResponseMetaPage", + "v2.rum_operation_strong_link_create_request" => "RUMOperationStrongLinkCreateRequest", + "v2.rum_operation_strong_link_create_request_attributes" => "RUMOperationStrongLinkCreateRequestAttributes", + "v2.rum_operation_strong_link_create_request_data" => "RUMOperationStrongLinkCreateRequestData", + "v2.rum_operation_strong_link_response" => "RUMOperationStrongLinkResponse", + "v2.rum_operation_strong_link_response_attributes" => "RUMOperationStrongLinkResponseAttributes", + "v2.rum_operation_strong_link_response_data" => "RUMOperationStrongLinkResponseData", + "v2.rum_operation_strong_links_list_response" => "RUMOperationStrongLinksListResponse", + "v2.rum_operation_strong_links_list_response_meta" => "RUMOperationStrongLinksListResponseMeta", + "v2.rum_operation_strong_link_status" => "RUMOperationStrongLinkStatus", + "v2.rum_operation_strong_link_type" => "RUMOperationStrongLinkType", + "v2.rum_operation_strong_link_update_request" => "RUMOperationStrongLinkUpdateRequest", + "v2.rum_operation_strong_link_update_request_attributes" => "RUMOperationStrongLinkUpdateRequestAttributes", + "v2.rum_operation_strong_link_update_request_data" => "RUMOperationStrongLinkUpdateRequestData", + "v2.rum_operation_strong_link_update_status" => "RUMOperationStrongLinkUpdateStatus", + "v2.rum_operation_type" => "RUMOperationType", + "v2.rum_operation_update_request" => "RUMOperationUpdateRequest", + "v2.rum_operation_update_request_data" => "RUMOperationUpdateRequestData", + "v2.rum_operation_user" => "RUMOperationUser", "v2.rum_permanent_retention_filter_attributes" => "RumPermanentRetentionFilterAttributes", "v2.rum_permanent_retention_filter_data" => "RumPermanentRetentionFilterData", "v2.rum_permanent_retention_filter_editability" => "RumPermanentRetentionFilterEditability", @@ -8289,6 +8323,7 @@ def overrides "v2.rum_audience_management_api" => "RumAudienceManagementAPI", "v2.rum_insights_api" => "RUMInsightsAPI", "v2.rum_metrics_api" => "RumMetricsAPI", + "v2.rum_operations_api" => "RUMOperationsAPI", "v2.rum_rate_limit_api" => "RumRateLimitAPI", "v2.rum_remote_config_api" => "RUMRemoteConfigAPI", "v2.rum_replay_heatmaps_api" => "RumReplayHeatmapsAPI", diff --git a/lib/datadog_api_client/v2/api/rum_operations_api.rb b/lib/datadog_api_client/v2/api/rum_operations_api.rb new file mode 100644 index 000000000000..d164ff4538a8 --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_operations_api.rb @@ -0,0 +1,793 @@ +=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 RUMOperationsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create a RUM operation. + # + # @see #create_rum_operation_with_http_info + def create_rum_operation(body, opts = {}) + data, _status_code, _headers = create_rum_operation_with_http_info(body, opts) + data + end + + # Create a RUM operation. + # + # Create a new RUM operation, defining the journey used to detect it from RUM events. + # + # @param body [RUMOperationCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RUMOperationResponse, Integer, Hash)>] RUMOperationResponse data, response status code and response headers + def create_rum_operation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_rum_operation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_rum_operation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_rum_operation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.create_rum_operation ...' + 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 RUMOperationsAPI.create_rum_operation" + end + # resource path + local_var_path = '/api/v2/rum/operations' + + # 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] || 'RUMOperationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_rum_operation, + :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: RUMOperationsAPI#create_rum_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create a RUM operation strong link. + # + # @see #create_rum_operation_strong_link_with_http_info + def create_rum_operation_strong_link(body, opts = {}) + data, _status_code, _headers = create_rum_operation_strong_link_with_http_info(body, opts) + data + end + + # Create a RUM operation strong link. + # + # Create a strong link between a RUM operation and a feature, confirming that the feature + # belongs to the operation. The operation can be identified by `operation_id` or `operation_name`; + # if `operation_name` does not match an existing operation, a stub operation is created. + # + # @param body [RUMOperationStrongLinkCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RUMOperationStrongLinkResponse, Integer, Hash)>] RUMOperationStrongLinkResponse data, response status code and response headers + def create_rum_operation_strong_link_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_rum_operation_strong_link".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_rum_operation_strong_link") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_rum_operation_strong_link")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.create_rum_operation_strong_link ...' + 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 RUMOperationsAPI.create_rum_operation_strong_link" + end + # resource path + local_var_path = '/api/v2/rum/operations/strong_links' + + # 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] || 'RUMOperationStrongLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_rum_operation_strong_link, + :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: RUMOperationsAPI#create_rum_operation_strong_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a RUM operation. + # + # @see #delete_rum_operation_with_http_info + def delete_rum_operation(rum_operation_id, opts = {}) + delete_rum_operation_with_http_info(rum_operation_id, opts) + nil + end + + # Delete a RUM operation. + # + # Delete a RUM operation. + # + # @param rum_operation_id [String] The unique identifier of the RUM operation to delete. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_rum_operation_with_http_info(rum_operation_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_rum_operation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_rum_operation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_rum_operation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.delete_rum_operation ...' + end + # verify the required parameter 'rum_operation_id' is set + if @api_client.config.client_side_validation && rum_operation_id.nil? + fail ArgumentError, "Missing the required parameter 'rum_operation_id' when calling RUMOperationsAPI.delete_rum_operation" + end + # resource path + local_var_path = '/api/v2/rum/operations/{rum_operation_id}'.sub('{rum_operation_id}', CGI.escape(rum_operation_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(['*/*']) + + # 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_rum_operation, + :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: RUMOperationsAPI#delete_rum_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a RUM operation strong link. + # + # @see #delete_rum_operation_strong_link_with_http_info + def delete_rum_operation_strong_link(rum_operation_id, feature_id, opts = {}) + delete_rum_operation_strong_link_with_http_info(rum_operation_id, feature_id, opts) + nil + end + + # Delete a RUM operation strong link. + # + # Delete the strong link between a RUM operation and a feature. + # + # @param rum_operation_id [String] The unique identifier of the RUM operation. + # @param feature_id [String] The unique identifier of the feature. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_rum_operation_strong_link_with_http_info(rum_operation_id, feature_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_rum_operation_strong_link".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_rum_operation_strong_link") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_rum_operation_strong_link")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.delete_rum_operation_strong_link ...' + end + # verify the required parameter 'rum_operation_id' is set + if @api_client.config.client_side_validation && rum_operation_id.nil? + fail ArgumentError, "Missing the required parameter 'rum_operation_id' when calling RUMOperationsAPI.delete_rum_operation_strong_link" + end + # verify the required parameter 'feature_id' is set + if @api_client.config.client_side_validation && feature_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_id' when calling RUMOperationsAPI.delete_rum_operation_strong_link" + end + # resource path + local_var_path = '/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}'.sub('{rum_operation_id}', CGI.escape(rum_operation_id.to_s).gsub('%2F', '/')).sub('{feature_id}', CGI.escape(feature_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(['*/*']) + + # 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_rum_operation_strong_link, + :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: RUMOperationsAPI#delete_rum_operation_strong_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a RUM operation. + # + # @see #get_rum_operation_with_http_info + def get_rum_operation(rum_operation_id, opts = {}) + data, _status_code, _headers = get_rum_operation_with_http_info(rum_operation_id, opts) + data + end + + # Get a RUM operation. + # + # Retrieve a specific RUM operation by its unique identifier. + # + # @param rum_operation_id [String] The unique identifier of the RUM operation. + # @param opts [Hash] the optional parameters + # @return [Array<(RUMOperationResponse, Integer, Hash)>] RUMOperationResponse data, response status code and response headers + def get_rum_operation_with_http_info(rum_operation_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_operation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_operation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_operation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.get_rum_operation ...' + end + # verify the required parameter 'rum_operation_id' is set + if @api_client.config.client_side_validation && rum_operation_id.nil? + fail ArgumentError, "Missing the required parameter 'rum_operation_id' when calling RUMOperationsAPI.get_rum_operation" + end + # resource path + local_var_path = '/api/v2/rum/operations/{rum_operation_id}'.sub('{rum_operation_id}', CGI.escape(rum_operation_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] || 'RUMOperationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_rum_operation, + :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: RUMOperationsAPI#get_rum_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a RUM operation by name. + # + # @see #get_rum_operation_by_name_with_http_info + def get_rum_operation_by_name(name, opts = {}) + data, _status_code, _headers = get_rum_operation_by_name_with_http_info(name, opts) + data + end + + # Get a RUM operation by name. + # + # Retrieve a specific RUM operation by its unique name. + # + # @param name [String] The unique name of the RUM operation. + # @param opts [Hash] the optional parameters + # @return [Array<(RUMOperationResponse, Integer, Hash)>] RUMOperationResponse data, response status code and response headers + def get_rum_operation_by_name_with_http_info(name, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_operation_by_name".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_operation_by_name") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_operation_by_name")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.get_rum_operation_by_name ...' + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling RUMOperationsAPI.get_rum_operation_by_name" + end + # resource path + local_var_path = '/api/v2/rum/operations/by-name/{name}'.sub('{name}', CGI.escape(name.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] || 'RUMOperationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_rum_operation_by_name, + :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: RUMOperationsAPI#get_rum_operation_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search RUM operations. + # + # @see #list_rum_operations_with_http_info + def list_rum_operations(opts = {}) + data, _status_code, _headers = list_rum_operations_with_http_info(opts) + data + end + + # Search RUM operations. + # + # Search RUM operations for your organization. Supports filtering by query, creator, team, feature, and application. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :query A search query to filter operations by name. + # @option opts [Integer] :page_offset Offset for pagination. + # @option opts [Integer] :page_limit Number of items per page. Maximum of 100. + # @option opts [String] :creator Filter operations by the email of their creator. + # @option opts [String] :team Filter operations by team. Accepts a comma-separated list of teams. + # @option opts [String] :feature_id Filter operations by feature ID. Accepts a comma-separated list of feature IDs. + # @option opts [UUID] :application_id Filter operations by RUM application ID. + # @return [Array<(RUMOperationsListResponse, Integer, Hash)>] RUMOperationsListResponse data, response status code and response headers + def list_rum_operations_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_rum_operations".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_rum_operations") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_rum_operations")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.list_rum_operations ...' + end + if @api_client.config.client_side_validation && !opts[:'page_offset'].nil? && opts[:'page_offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_offset"]" when calling RUMOperationsAPI.list_rum_operations, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling RUMOperationsAPI.list_rum_operations, must be smaller than or equal to 100.' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling RUMOperationsAPI.list_rum_operations, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/rum/operations/search' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'creator'] = opts[:'creator'] if !opts[:'creator'].nil? + query_params[:'team'] = opts[:'team'] if !opts[:'team'].nil? + query_params[:'feature_id'] = opts[:'feature_id'] if !opts[:'feature_id'].nil? + query_params[:'application_id'] = opts[:'application_id'] if !opts[:'application_id'].nil? + + # 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] || 'RUMOperationsListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_rum_operations, + :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: RUMOperationsAPI#list_rum_operations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List RUM operation strong links. + # + # @see #list_rum_operation_strong_links_with_http_info + def list_rum_operation_strong_links(opts = {}) + data, _status_code, _headers = list_rum_operation_strong_links_with_http_info(opts) + data + end + + # List RUM operation strong links. + # + # List strong links between RUM operations and features. A strong link confirms that a feature + # belongs to an operation. Provide `operation_id`, `feature_id`, or both to filter results; + # at least one is required. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :operation_id Filter strong links by RUM operation ID. + # @option opts [String] :feature_id Filter strong links by feature ID. + # @option opts [Integer] :page_offset Offset for pagination. + # @option opts [Integer] :page_limit Number of items per page. Maximum of 200. + # @return [Array<(RUMOperationStrongLinksListResponse, Integer, Hash)>] RUMOperationStrongLinksListResponse data, response status code and response headers + def list_rum_operation_strong_links_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.list_rum_operation_strong_links ...' + end + if @api_client.config.client_side_validation && !opts[:'page_offset'].nil? && opts[:'page_offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_offset"]" when calling RUMOperationsAPI.list_rum_operation_strong_links, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 200 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling RUMOperationsAPI.list_rum_operation_strong_links, must be smaller than or equal to 200.' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling RUMOperationsAPI.list_rum_operation_strong_links, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/rum/operations/strong_links' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'operation_id'] = opts[:'operation_id'] if !opts[:'operation_id'].nil? + query_params[:'feature_id'] = opts[:'feature_id'] if !opts[:'feature_id'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + + # 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] || 'RUMOperationStrongLinksListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_rum_operation_strong_links, + :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: RUMOperationsAPI#list_rum_operation_strong_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a RUM operation. + # + # @see #update_rum_operation_with_http_info + def update_rum_operation(rum_operation_id, body, opts = {}) + data, _status_code, _headers = update_rum_operation_with_http_info(rum_operation_id, body, opts) + data + end + + # Update a RUM operation. + # + # Update an existing RUM operation. Fields omitted from the request body keep their existing value, + # with the exception of `journey_rum`, which is required and fully replaced on every update. + # + # @param rum_operation_id [String] The unique identifier of the RUM operation to update. + # @param body [RUMOperationUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RUMOperationResponse, Integer, Hash)>] RUMOperationResponse data, response status code and response headers + def update_rum_operation_with_http_info(rum_operation_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_rum_operation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_rum_operation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_rum_operation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.update_rum_operation ...' + end + # verify the required parameter 'rum_operation_id' is set + if @api_client.config.client_side_validation && rum_operation_id.nil? + fail ArgumentError, "Missing the required parameter 'rum_operation_id' when calling RUMOperationsAPI.update_rum_operation" + 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 RUMOperationsAPI.update_rum_operation" + end + # resource path + local_var_path = '/api/v2/rum/operations/{rum_operation_id}'.sub('{rum_operation_id}', CGI.escape(rum_operation_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']) + # 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] || 'RUMOperationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_rum_operation, + :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::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMOperationsAPI#update_rum_operation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a RUM operation strong link. + # + # @see #update_rum_operation_strong_link_with_http_info + def update_rum_operation_strong_link(rum_operation_id, feature_id, body, opts = {}) + data, _status_code, _headers = update_rum_operation_strong_link_with_http_info(rum_operation_id, feature_id, body, opts) + data + end + + # Update a RUM operation strong link. + # + # Update the status of a strong link between a RUM operation and a feature. + # + # @param rum_operation_id [String] The unique identifier of the RUM operation. + # @param feature_id [String] The unique identifier of the feature. + # @param body [RUMOperationStrongLinkUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RUMOperationStrongLinkResponse, Integer, Hash)>] RUMOperationStrongLinkResponse data, response status code and response headers + def update_rum_operation_strong_link_with_http_info(rum_operation_id, feature_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_rum_operation_strong_link".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_rum_operation_strong_link") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_rum_operation_strong_link")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMOperationsAPI.update_rum_operation_strong_link ...' + end + # verify the required parameter 'rum_operation_id' is set + if @api_client.config.client_side_validation && rum_operation_id.nil? + fail ArgumentError, "Missing the required parameter 'rum_operation_id' when calling RUMOperationsAPI.update_rum_operation_strong_link" + end + # verify the required parameter 'feature_id' is set + if @api_client.config.client_side_validation && feature_id.nil? + fail ArgumentError, "Missing the required parameter 'feature_id' when calling RUMOperationsAPI.update_rum_operation_strong_link" + 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 RUMOperationsAPI.update_rum_operation_strong_link" + end + # resource path + local_var_path = '/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}'.sub('{rum_operation_id}', CGI.escape(rum_operation_id.to_s).gsub('%2F', '/')).sub('{feature_id}', CGI.escape(feature_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']) + # 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] || 'RUMOperationStrongLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_rum_operation_strong_link, + :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::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMOperationsAPI#update_rum_operation_strong_link\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/rum_operation_create_request.rb b/lib/datadog_api_client/v2/models/rum_operation_create_request.rb new file mode 100644 index 000000000000..49daa287acd7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_create_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 + # The request body for creating a RUM operation. + class RUMOperationCreateRequest + include BaseGenericModel + + # The data object for creating a RUM operation. + 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' => :'RUMOperationCreateRequestData' + } + 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::RUMOperationCreateRequest` 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/rum_operation_create_request_data.rb b/lib/datadog_api_client/v2/models/rum_operation_create_request_data.rb new file mode 100644 index 000000000000..f705d5653811 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_create_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The data object for creating a RUM operation. + class RUMOperationCreateRequestData + include BaseGenericModel + + # Attributes for creating or updating a RUM operation. + attr_reader :attributes + + # The JSON:API type for RUM operation resources. + 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' => :'RUMOperationRequestAttributes', + :'type' => :'RUMOperationType' + } + 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::RUMOperationCreateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_composite_rule.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_composite_rule.rb new file mode 100644 index 000000000000..952977d9bf13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_composite_rule.rb @@ -0,0 +1,178 @@ +=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 composite rule combining several predicates. Used as an alternative to `nodes` on a journey + # step when several conditions must be matched together, in any order or in a specific order. + class RUMOperationJourneyCompositeRule + include BaseGenericModel + + # The unique identifier of the composite rule. Generated by the server if omitted. + attr_accessor :composite_rule_id + + # A hash of the composite rule's configuration, computed by the server. + attr_accessor :config_version + + # The rule used to combine the composite rule's predicates. `all_of` requires every predicate + # to match, in any order. `in_order` requires every predicate to match in the given order. + attr_reader :kind + + # The maximum time window, in milliseconds, in which all predicates must match. + attr_accessor :max_window_ms + + # The list of predicates that must be matched by RUM events. + attr_reader :predicates + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'composite_rule_id' => :'composite_rule_id', + :'config_version' => :'config_version', + :'kind' => :'kind', + :'max_window_ms' => :'max_window_ms', + :'predicates' => :'predicates' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'composite_rule_id' => :'String', + :'config_version' => :'String', + :'kind' => :'RUMOperationJourneyCompositeRuleKind', + :'max_window_ms' => :'Integer', + :'predicates' => :'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::RUMOperationJourneyCompositeRule` 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?(:'composite_rule_id') + self.composite_rule_id = attributes[:'composite_rule_id'] + end + + if attributes.key?(:'config_version') + self.config_version = attributes[:'config_version'] + end + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + end + + if attributes.key?(:'max_window_ms') + self.max_window_ms = attributes[:'max_window_ms'] + end + + if attributes.key?(:'predicates') + if (value = attributes[:'predicates']).is_a?(Array) + self.predicates = 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 @kind.nil? + return false if @predicates.nil? + true + end + + # Custom attribute writer method with validation + # @param kind [Object] Object to be assigned + # @!visibility private + def kind=(kind) + if kind.nil? + fail ArgumentError, 'invalid value for "kind", kind cannot be nil.' + end + @kind = kind + end + + # Custom attribute writer method with validation + # @param predicates [Object] Object to be assigned + # @!visibility private + def predicates=(predicates) + if predicates.nil? + fail ArgumentError, 'invalid value for "predicates", predicates cannot be nil.' + end + @predicates = predicates + 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 && + composite_rule_id == o.composite_rule_id && + config_version == o.config_version && + kind == o.kind && + max_window_ms == o.max_window_ms && + predicates == o.predicates && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [composite_rule_id, config_version, kind, max_window_ms, predicates, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_composite_rule_kind.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_composite_rule_kind.rb new file mode 100644 index 000000000000..11be6c906d7a --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_composite_rule_kind.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The rule used to combine the composite rule's predicates. `all_of` requires every predicate + # to match, in any order. `in_order` requires every predicate to match in the given order. + class RUMOperationJourneyCompositeRuleKind + include BaseEnumModel + + ALL_OF = "all_of".freeze + IN_ORDER = "in_order".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_node.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_node.rb new file mode 100644 index 000000000000..974534cabfc8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_node.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 + # A single node within a RUM operation journey step, matching RUM events with a query. + class RUMOperationJourneyNode + include BaseGenericModel + + # The unique identifier of the node. Generated by the server if omitted. + attr_accessor :id + + # The RUM search query used to match events for this node. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'query' => :'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::RUMOperationJourneyNode` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + 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 @query.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_predicate.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_predicate.rb new file mode 100644 index 000000000000..328bdd27c05c --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_predicate.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 + # A single predicate within a composite rule, matching RUM events with a query. + class RUMOperationJourneyPredicate + include BaseGenericModel + + # The RUM search query used to match events for this predicate. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'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::RUMOperationJourneyPredicate` 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?(:'query') + self.query = attributes[:'query'] + 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 @query.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # 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 && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_rum.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_rum.rb new file mode 100644 index 000000000000..3d58e0bf5732 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_rum.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 + # The definition of a RUM operation's journey, used to detect it from RUM events. + class RUMOperationJourneyRum + include BaseGenericModel + + # The ordered list of steps composing the RUM journey. + attr_reader :rum_steps + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rum_steps' => :'rum_steps' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rum_steps' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMOperationJourneyRum` 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?(:'rum_steps') + if (value = attributes[:'rum_steps']).is_a?(Array) + self.rum_steps = 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 @rum_steps.nil? + true + end + + # Custom attribute writer method with validation + # @param rum_steps [Object] Object to be assigned + # @!visibility private + def rum_steps=(rum_steps) + if rum_steps.nil? + fail ArgumentError, 'invalid value for "rum_steps", rum_steps cannot be nil.' + end + @rum_steps = rum_steps + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rum_steps == o.rum_steps && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rum_steps, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_step.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_step.rb new file mode 100644 index 000000000000..227b509a6052 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_step.rb @@ -0,0 +1,147 @@ +=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 step of a RUM operation's journey. Matches RUM events either through a list of `nodes` + # or through a `composite` rule; the two are mutually exclusive. + class RUMOperationJourneyStep + include BaseGenericModel + + # A composite rule combining several predicates. Used as an alternative to `nodes` on a journey + # step when several conditions must be matched together, in any order or in a specific order. + attr_accessor :composite + + # The list of nodes that can match this step. Mutually exclusive with `composite`. + attr_accessor :nodes + + # The type of a step within a RUM operation's journey. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'composite' => :'composite', + :'nodes' => :'nodes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'composite' => :'RUMOperationJourneyCompositeRule', + :'nodes' => :'Array', + :'type' => :'RUMOperationJourneyStepType' + } + 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::RUMOperationJourneyStep` 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?(:'composite') + self.composite = attributes[:'composite'] + end + + if attributes.key?(:'nodes') + if (value = attributes[:'nodes']).is_a?(Array) + self.nodes = value + end + 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 && + composite == o.composite && + nodes == o.nodes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [composite, nodes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_journey_step_type.rb b/lib/datadog_api_client/v2/models/rum_operation_journey_step_type.rb new file mode 100644 index 000000000000..1663042cc7ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_journey_step_type.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of a step within a RUM operation's journey. + class RUMOperationJourneyStepType + include BaseEnumModel + + START = "start".freeze + UPDATE = "update".freeze + STOP = "stop".freeze + ERROR = "error".freeze + ABANDONED = "abandoned".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_request_attributes.rb b/lib/datadog_api_client/v2/models/rum_operation_request_attributes.rb new file mode 100644 index 000000000000..8a8a042855b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_request_attributes.rb @@ -0,0 +1,229 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating or updating a RUM operation. + class RUMOperationRequestAttributes + include BaseGenericModel + + # The RUM application ID the operation belongs to. + attr_accessor :application_id + + # The category of the RUM operation. + attr_accessor :category + + # A description of the RUM operation. + attr_accessor :description + + # A human-readable display name for the RUM operation. + attr_accessor :display_name + + # The list of feature IDs associated with the RUM operation. + attr_accessor :feature_ids + + # The definition of a RUM operation's journey, used to detect it from RUM events. + attr_reader :journey_rum + + # The unique name of the RUM operation. Must not contain spaces. + attr_reader :name + + # A list of tags associated with the RUM operation. + attr_reader :tags + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'category' => :'category', + :'description' => :'description', + :'display_name' => :'display_name', + :'feature_ids' => :'feature_ids', + :'journey_rum' => :'journey_rum', + :'name' => :'name', + :'tags' => :'tags' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'UUID', + :'category' => :'String', + :'description' => :'String', + :'display_name' => :'String', + :'feature_ids' => :'Array', + :'journey_rum' => :'RUMOperationJourneyRum', + :'name' => :'String', + :'tags' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'application_id', + :'category', + :'description', + ]) + 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::RUMOperationRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'feature_ids') + if (value = attributes[:'feature_ids']).is_a?(Array) + self.feature_ids = value + end + end + + if attributes.key?(:'journey_rum') + self.journey_rum = attributes[:'journey_rum'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = 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 @journey_rum.nil? + return false if @name.nil? + return false if @tags.nil? + true + end + + # Custom attribute writer method with validation + # @param journey_rum [Object] Object to be assigned + # @!visibility private + def journey_rum=(journey_rum) + if journey_rum.nil? + fail ArgumentError, 'invalid value for "journey_rum", journey_rum cannot be nil.' + end + @journey_rum = journey_rum + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + category == o.category && + description == o.description && + display_name == o.display_name && + feature_ids == o.feature_ids && + journey_rum == o.journey_rum && + name == o.name && + tags == o.tags && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, category, description, display_name, feature_ids, journey_rum, name, tags, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_response.rb b/lib/datadog_api_client/v2/models/rum_operation_response.rb new file mode 100644 index 000000000000..9b9854dc6738 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_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 + # The response for a single RUM operation. + class RUMOperationResponse + include BaseGenericModel + + # The data object in a RUM operation 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' => :'RUMOperationResponseData' + } + 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::RUMOperationResponse` 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/rum_operation_response_attributes.rb b/lib/datadog_api_client/v2/models/rum_operation_response_attributes.rb new file mode 100644 index 000000000000..eff1054eec76 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_response_attributes.rb @@ -0,0 +1,280 @@ +=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 RUM operation response. + class RUMOperationResponseAttributes + include BaseGenericModel + + # The RUM application ID the operation belongs to. + attr_accessor :application_id + + # The category of the RUM operation. + attr_accessor :category + + # The timestamp when the RUM operation was created. + attr_accessor :created_at + + # A Datadog user referenced by a RUM operation. + attr_accessor :created_by + + # A description of the RUM operation. + attr_accessor :description + + # A human-readable display name for the RUM operation. + attr_accessor :display_name + + # The list of feature IDs associated with the RUM operation. + attr_accessor :feature_ids + + # The definition of a RUM operation's journey, used to detect it from RUM events. + attr_reader :journey_rum + + # The unique name of the RUM operation. Must not contain spaces. + attr_reader :name + + # The ID of the organization the RUM operation belongs to. + attr_accessor :org_id + + # A list of tags associated with the RUM operation. + attr_reader :tags + + # The timestamp when the RUM operation was last updated. + attr_accessor :updated_at + + # A Datadog user referenced by a RUM operation. + attr_accessor :updated_by + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'category' => :'category', + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'description' => :'description', + :'display_name' => :'display_name', + :'feature_ids' => :'feature_ids', + :'journey_rum' => :'journey_rum', + :'name' => :'name', + :'org_id' => :'org_id', + :'tags' => :'tags', + :'updated_at' => :'updated_at', + :'updated_by' => :'updated_by' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'UUID', + :'category' => :'String', + :'created_at' => :'Time', + :'created_by' => :'RUMOperationUser', + :'description' => :'String', + :'display_name' => :'String', + :'feature_ids' => :'Array', + :'journey_rum' => :'RUMOperationJourneyRum', + :'name' => :'String', + :'org_id' => :'Integer', + :'tags' => :'Array', + :'updated_at' => :'Time', + :'updated_by' => :'RUMOperationUser' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'application_id', + :'category', + :'description', + :'updated_at', + ]) + 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::RUMOperationResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'feature_ids') + if (value = attributes[:'feature_ids']).is_a?(Array) + self.feature_ids = value + end + end + + if attributes.key?(:'journey_rum') + self.journey_rum = attributes[:'journey_rum'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'updated_by') + self.updated_by = attributes[:'updated_by'] + 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 @journey_rum.nil? + return false if @name.nil? + return false if @tags.nil? + true + end + + # Custom attribute writer method with validation + # @param journey_rum [Object] Object to be assigned + # @!visibility private + def journey_rum=(journey_rum) + if journey_rum.nil? + fail ArgumentError, 'invalid value for "journey_rum", journey_rum cannot be nil.' + end + @journey_rum = journey_rum + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + category == o.category && + created_at == o.created_at && + created_by == o.created_by && + description == o.description && + display_name == o.display_name && + feature_ids == o.feature_ids && + journey_rum == o.journey_rum && + name == o.name && + org_id == o.org_id && + tags == o.tags && + updated_at == o.updated_at && + updated_by == o.updated_by && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, category, created_at, created_by, description, display_name, feature_ids, journey_rum, name, org_id, tags, updated_at, updated_by, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_response_data.rb b/lib/datadog_api_client/v2/models/rum_operation_response_data.rb new file mode 100644 index 000000000000..46694a10fe66 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The data object in a RUM operation response. + class RUMOperationResponseData + include BaseGenericModel + + # Attributes of a RUM operation response. + attr_reader :attributes + + # The unique identifier of the RUM operation. + attr_reader :id + + # The JSON:API type for RUM operation resources. + 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' => :'RUMOperationResponseAttributes', + :'id' => :'String', + :'type' => :'RUMOperationType' + } + 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::RUMOperationResponseData` 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/rum_operation_strong_link_create_request.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_request.rb new file mode 100644 index 000000000000..3c7fdb5a8475 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_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 + # The request body for creating a RUM operation strong link. + class RUMOperationStrongLinkCreateRequest + include BaseGenericModel + + # The data object for creating a RUM operation strong link. + 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' => :'RUMOperationStrongLinkCreateRequestData' + } + 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::RUMOperationStrongLinkCreateRequest` 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/rum_operation_strong_link_create_request_attributes.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_request_attributes.rb new file mode 100644 index 000000000000..93e7773dfec9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_request_attributes.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a RUM operation strong link. + class RUMOperationStrongLinkCreateRequestAttributes + include BaseGenericModel + + # The RUM application ID used when creating a stub operation from `operation_name`. + attr_accessor :application_id + + # A description of the strong link. + attr_accessor :description + + # The unique identifier of the feature to link. + attr_reader :feature_id + + # The unique identifier of the RUM operation to link. Either `operation_id` or + # `operation_name` is required. + attr_accessor :operation_id + + # The name of the RUM operation to link. Either `operation_id` or `operation_name` is + # required. If no operation with this name exists, a stub operation is created. + attr_accessor :operation_name + + # The status of a RUM operation strong link. + attr_accessor :status + + # A list of tags associated with the strong link. + attr_accessor :tags + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'description' => :'description', + :'feature_id' => :'feature_id', + :'operation_id' => :'operation_id', + :'operation_name' => :'operation_name', + :'status' => :'status', + :'tags' => :'tags' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'UUID', + :'description' => :'String', + :'feature_id' => :'String', + :'operation_id' => :'String', + :'operation_name' => :'String', + :'status' => :'RUMOperationStrongLinkStatus', + :'tags' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'description', + ]) + 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::RUMOperationStrongLinkCreateRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'feature_id') + self.feature_id = attributes[:'feature_id'] + end + + if attributes.key?(:'operation_id') + self.operation_id = attributes[:'operation_id'] + end + + if attributes.key?(:'operation_name') + self.operation_name = attributes[:'operation_name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = 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 @feature_id.nil? + true + end + + # Custom attribute writer method with validation + # @param feature_id [Object] Object to be assigned + # @!visibility private + def feature_id=(feature_id) + if feature_id.nil? + fail ArgumentError, 'invalid value for "feature_id", feature_id cannot be nil.' + end + @feature_id = feature_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + description == o.description && + feature_id == o.feature_id && + operation_id == o.operation_id && + operation_name == o.operation_name && + status == o.status && + tags == o.tags && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, description, feature_id, operation_id, operation_name, status, tags, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_request_data.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_request_data.rb new file mode 100644 index 000000000000..028ff7516b59 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_create_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The data object for creating a RUM operation strong link. + class RUMOperationStrongLinkCreateRequestData + include BaseGenericModel + + # Attributes for creating a RUM operation strong link. + attr_reader :attributes + + # The JSON:API type for RUM operation strong link resources. + 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' => :'RUMOperationStrongLinkCreateRequestAttributes', + :'type' => :'RUMOperationStrongLinkType' + } + 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::RUMOperationStrongLinkCreateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_response.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_response.rb new file mode 100644 index 000000000000..e8519fde8413 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_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 + # The response for a single RUM operation strong link. + class RUMOperationStrongLinkResponse + include BaseGenericModel + + # The data object in a RUM operation strong link 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' => :'RUMOperationStrongLinkResponseData' + } + 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::RUMOperationStrongLinkResponse` 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/rum_operation_strong_link_response_attributes.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_response_attributes.rb new file mode 100644 index 000000000000..2b03f2483601 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_response_attributes.rb @@ -0,0 +1,216 @@ +=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 RUM operation strong link response. + class RUMOperationStrongLinkResponseAttributes + include BaseGenericModel + + # The timestamp when the strong link was created. + attr_accessor :created_at + + # A description of the strong link. + attr_accessor :description + + # The unique identifier of the linked feature. + attr_reader :feature_id + + # The unique identifier of the linked RUM operation. + attr_reader :operation_id + + # The status of a RUM operation strong link. + attr_reader :status + + # A list of tags associated with the strong link. + attr_accessor :tags + + # The timestamp when the strong link was last updated. + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'description' => :'description', + :'feature_id' => :'feature_id', + :'operation_id' => :'operation_id', + :'status' => :'status', + :'tags' => :'tags', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'description' => :'String', + :'feature_id' => :'String', + :'operation_id' => :'String', + :'status' => :'RUMOperationStrongLinkStatus', + :'tags' => :'Array', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'description', + :'updated_at', + ]) + 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::RUMOperationStrongLinkResponseAttributes` 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'feature_id') + self.feature_id = attributes[:'feature_id'] + end + + if attributes.key?(:'operation_id') + self.operation_id = attributes[:'operation_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + 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 @feature_id.nil? + return false if @operation_id.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param feature_id [Object] Object to be assigned + # @!visibility private + def feature_id=(feature_id) + if feature_id.nil? + fail ArgumentError, 'invalid value for "feature_id", feature_id cannot be nil.' + end + @feature_id = feature_id + end + + # Custom attribute writer method with validation + # @param operation_id [Object] Object to be assigned + # @!visibility private + def operation_id=(operation_id) + if operation_id.nil? + fail ArgumentError, 'invalid value for "operation_id", operation_id cannot be nil.' + end + @operation_id = operation_id + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + 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 && + created_at == o.created_at && + description == o.description && + feature_id == o.feature_id && + operation_id == o.operation_id && + status == o.status && + tags == o.tags && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, description, feature_id, operation_id, status, tags, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_response_data.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_response_data.rb new file mode 100644 index 000000000000..09ca65e71823 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The data object in a RUM operation strong link response. + class RUMOperationStrongLinkResponseData + include BaseGenericModel + + # Attributes of a RUM operation strong link response. + attr_reader :attributes + + # The unique identifier of the strong link, formatted as `:`. + attr_reader :id + + # The JSON:API type for RUM operation strong link resources. + 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' => :'RUMOperationStrongLinkResponseAttributes', + :'id' => :'String', + :'type' => :'RUMOperationStrongLinkType' + } + 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::RUMOperationStrongLinkResponseData` 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/rum_operation_strong_link_status.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_status.rb new file mode 100644 index 000000000000..dc637b87d13f --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_status.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The status of a RUM operation strong link. + class RUMOperationStrongLinkStatus + include BaseEnumModel + + DRAFT = "DRAFT".freeze + CONFIRMED = "CONFIRMED".freeze + REJECTED = "REJECTED".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_type.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_type.rb new file mode 100644 index 000000000000..11f76a113062 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The JSON:API type for RUM operation strong link resources. + class RUMOperationStrongLinkType + include BaseEnumModel + + STRONG_LINKS = "strong_links".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request.rb new file mode 100644 index 000000000000..7ba25efa3173 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_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 + # The request body for updating a RUM operation strong link. + class RUMOperationStrongLinkUpdateRequest + include BaseGenericModel + + # The data object for updating a RUM operation strong link. + 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' => :'RUMOperationStrongLinkUpdateRequestData' + } + 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::RUMOperationStrongLinkUpdateRequest` 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/rum_operation_strong_link_update_request_attributes.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request_attributes.rb new file mode 100644 index 000000000000..3562602e8c92 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request_attributes.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 + # Attributes for updating a RUM operation strong link. + class RUMOperationStrongLinkUpdateRequestAttributes + include BaseGenericModel + + # The status of a RUM operation strong link. Can only be set to `CONFIRMED` or `REJECTED`. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'status' => :'RUMOperationStrongLinkUpdateStatus' + } + 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::RUMOperationStrongLinkUpdateRequestAttributes` 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?(:'status') + self.status = attributes[:'status'] + 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 @status.nil? + true + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + 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 && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request_data.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request_data.rb new file mode 100644 index 000000000000..5f6bb1a0b75e --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The data object for updating a RUM operation strong link. + class RUMOperationStrongLinkUpdateRequestData + include BaseGenericModel + + # Attributes for updating a RUM operation strong link. + attr_reader :attributes + + # The JSON:API type for RUM operation strong link resources. + 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' => :'RUMOperationStrongLinkUpdateRequestAttributes', + :'type' => :'RUMOperationStrongLinkType' + } + 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::RUMOperationStrongLinkUpdateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_status.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_status.rb new file mode 100644 index 000000000000..aa106c97047b --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_link_update_status.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 + # The status of a RUM operation strong link. Can only be set to `CONFIRMED` or `REJECTED`. + class RUMOperationStrongLinkUpdateStatus + include BaseEnumModel + + CONFIRMED = "CONFIRMED".freeze + REJECTED = "REJECTED".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_links_list_response.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_links_list_response.rb new file mode 100644 index 000000000000..06c43f871600 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_links_list_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The response for a list of RUM operation strong links. + class RUMOperationStrongLinksListResponse + include BaseGenericModel + + # + attr_reader :data + + # Metadata for a list of RUM operation strong links. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'RUMOperationStrongLinksListResponseMeta' + } + 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::RUMOperationStrongLinksListResponse` 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_strong_links_list_response_meta.rb b/lib/datadog_api_client/v2/models/rum_operation_strong_links_list_response_meta.rb new file mode 100644 index 000000000000..13b650db6617 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_strong_links_list_response_meta.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 + # Metadata for a list of RUM operation strong links. + class RUMOperationStrongLinksListResponseMeta + include BaseGenericModel + + # The pagination limit. + attr_accessor :limit + + # The current offset. + attr_accessor :offset + + # The total number of strong links matching the request. + attr_accessor :total + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit', + :'offset' => :'offset', + :'total' => :'total' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer', + :'offset' => :'Integer', + :'total' => :'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::RUMOperationStrongLinksListResponseMeta` 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?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + 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 && + limit == o.limit && + offset == o.offset && + total == o.total && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, offset, total, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_type.rb b/lib/datadog_api_client/v2/models/rum_operation_type.rb new file mode 100644 index 000000000000..a9b81599079d --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The JSON:API type for RUM operation resources. + class RUMOperationType + include BaseEnumModel + + OPERATIONS = "operations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operation_update_request.rb b/lib/datadog_api_client/v2/models/rum_operation_update_request.rb new file mode 100644 index 000000000000..caf088c84274 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_update_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 + # The request body for updating a RUM operation. + class RUMOperationUpdateRequest + include BaseGenericModel + + # The data object for updating a RUM operation. + 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' => :'RUMOperationUpdateRequestData' + } + 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::RUMOperationUpdateRequest` 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/rum_operation_update_request_data.rb b/lib/datadog_api_client/v2/models/rum_operation_update_request_data.rb new file mode 100644 index 000000000000..7a36d2bb3d9d --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_update_request_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The data object for updating a RUM operation. + class RUMOperationUpdateRequestData + include BaseGenericModel + + # Attributes for creating or updating a RUM operation. + attr_reader :attributes + + # The unique identifier of the RUM operation. Must match the ID in the URL path. + attr_reader :id + + # The JSON:API type for RUM operation resources. + 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' => :'RUMOperationRequestAttributes', + :'id' => :'String', + :'type' => :'RUMOperationType' + } + 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::RUMOperationUpdateRequestData` 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/rum_operation_user.rb b/lib/datadog_api_client/v2/models/rum_operation_user.rb new file mode 100644 index 000000000000..221c02060230 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operation_user.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A Datadog user referenced by a RUM operation. + class RUMOperationUser + include BaseGenericModel + + # The email of the user. + attr_accessor :email + + # The handle of the user. + attr_accessor :handle + + # The name of the user. + attr_accessor :name + + # The UUID of the user. + attr_accessor :uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'email' => :'email', + :'handle' => :'handle', + :'name' => :'name', + :'uuid' => :'uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'email' => :'String', + :'handle' => :'String', + :'name' => :'String', + :'uuid' => :'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::RUMOperationUser` 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?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + 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 && + email == o.email && + handle == o.handle && + name == o.name && + uuid == o.uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [email, handle, name, uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operations_list_response.rb b/lib/datadog_api_client/v2/models/rum_operations_list_response.rb new file mode 100644 index 000000000000..96ac1ced476e --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operations_list_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The response for a list of RUM operations. + class RUMOperationsListResponse + include BaseGenericModel + + # + attr_reader :data + + # Metadata for a list of RUM operations. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'RUMOperationsListResponseMeta' + } + 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::RUMOperationsListResponse` 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operations_list_response_meta.rb b/lib/datadog_api_client/v2/models/rum_operations_list_response_meta.rb new file mode 100644 index 000000000000..32f210d162d6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operations_list_response_meta.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 + # Metadata for a list of RUM operations. + class RUMOperationsListResponseMeta + include BaseGenericModel + + # Pagination metadata for a list of RUM operations. + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'RUMOperationsListResponseMetaPage' + } + 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::RUMOperationsListResponseMeta` 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?(:'page') + self.page = attributes[:'page'] + 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 && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_operations_list_response_meta_page.rb b/lib/datadog_api_client/v2/models/rum_operations_list_response_meta_page.rb new file mode 100644 index 000000000000..5e9471def0c8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_operations_list_response_meta_page.rb @@ -0,0 +1,184 @@ +=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 + # Pagination metadata for a list of RUM operations. + class RUMOperationsListResponseMetaPage + include BaseGenericModel + + # The offset of the first page. + attr_accessor :first_offset + + # The offset of the last page. + attr_accessor :last_offset + + # The pagination limit. + attr_accessor :limit + + # The offset of the next page, if any. + attr_accessor :next_offset + + # The current offset. + attr_accessor :offset + + # The offset of the previous page, if any. + attr_accessor :prev_offset + + # The total number of RUM operations matching the search. + attr_accessor :total + + # The type of pagination used. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'first_offset' => :'first_offset', + :'last_offset' => :'last_offset', + :'limit' => :'limit', + :'next_offset' => :'next_offset', + :'offset' => :'offset', + :'prev_offset' => :'prev_offset', + :'total' => :'total', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'first_offset' => :'Integer', + :'last_offset' => :'Integer', + :'limit' => :'Integer', + :'next_offset' => :'Integer', + :'offset' => :'Integer', + :'prev_offset' => :'Integer', + :'total' => :'Integer', + :'type' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'next_offset', + :'prev_offset', + ]) + 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::RUMOperationsListResponseMetaPage` 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?(:'first_offset') + self.first_offset = attributes[:'first_offset'] + end + + if attributes.key?(:'last_offset') + self.last_offset = attributes[:'last_offset'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'next_offset') + self.next_offset = attributes[:'next_offset'] + end + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'prev_offset') + self.prev_offset = attributes[:'prev_offset'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + 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 && + first_offset == o.first_offset && + last_offset == o.last_offset && + limit == o.limit && + next_offset == o.next_offset && + offset == o.offset && + prev_offset == o.prev_offset && + total == o.total && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [first_offset, last_offset, limit, next_offset, offset, prev_offset, total, type, additional_properties].hash + end + end +end