diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index acd63e70a66..01b667f1132 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -31063,9 +31063,17 @@ components: type: string values: description: |- - Column values in row order. The element type matches the column's `type`; - for example a `VARCHAR` column carries strings, a `TIMESTAMP` column carries - Unix-millisecond integers. `null` is allowed for missing values. + Column values in row order, one entry per result row. The element type + follows the column's `type`. The following serialization rules should be + taken into account: + + - `BIGINT` values are encoded as JSON numbers in the signed 64-bit integer range. + - `DECIMAL` values are encoded as JSON numbers with 64-bit double precision. + - `TIMESTAMP` and `DATE` values are encoded as Unix-millisecond integers; a + `DATE` resolves to midnight UTC. + - `JSON` values are returned as a JSON-encoded string. + + `null` is allowed for any column type where a value is missing. example: - web-store - checkout @@ -80291,6 +80299,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. + example: "abc12345-1234-5678-abcd-ef1234567890" + format: uuid + 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: @@ -135602,9 +136182,6 @@ paths: summary: Execute a tabular DDSQL query tags: - DDSQL - 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/ddsql/query/tabular/fetch: post: description: |- @@ -135713,9 +136290,6 @@ paths: summary: Fetch the result of a DDSQL query tags: - DDSQL - 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/deletion/data/{product}: post: description: Creates a data deletion request by providing a query and a timeframe targeting the proper data. @@ -175868,6 +176442,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: |- @@ -204788,6 +206050,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.java b/examples/v2/rum-operations/CreateRUMOperation.java new file mode 100644 index 00000000000..88948593221 --- /dev/null +++ b/examples/v2/rum-operations/CreateRUMOperation.java @@ -0,0 +1,75 @@ +// Create a RUM operation returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationCreateRequest; +import com.datadog.api.client.v2.model.RUMOperationCreateRequestData; +import com.datadog.api.client.v2.model.RUMOperationJourneyCompositeRule; +import com.datadog.api.client.v2.model.RUMOperationJourneyCompositeRuleKind; +import com.datadog.api.client.v2.model.RUMOperationJourneyNode; +import com.datadog.api.client.v2.model.RUMOperationJourneyPredicate; +import com.datadog.api.client.v2.model.RUMOperationJourneyRum; +import com.datadog.api.client.v2.model.RUMOperationJourneyStep; +import com.datadog.api.client.v2.model.RUMOperationJourneyStepType; +import com.datadog.api.client.v2.model.RUMOperationRequestAttributes; +import com.datadog.api.client.v2.model.RUMOperationResponse; +import com.datadog.api.client.v2.model.RUMOperationType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createRUMOperation", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + RUMOperationCreateRequest body = + new RUMOperationCreateRequest() + .data( + new RUMOperationCreateRequestData() + .attributes( + new RUMOperationRequestAttributes() + .applicationId(UUID.fromString("abc12345-1234-5678-abcd-ef1234567890")) + .category(null) + .description(null) + .displayName("Checkout completed") + .journeyRum( + new RUMOperationJourneyRum() + .rumSteps( + Collections.singletonList( + new RUMOperationJourneyStep() + .composite( + new RUMOperationJourneyCompositeRule() + .kind( + RUMOperationJourneyCompositeRuleKind + .ALL_OF) + .maxWindowMs(30000L) + .predicates( + Collections.singletonList( + new RUMOperationJourneyPredicate() + .query( + "@type:action" + + " @action.type:click")))) + .nodes( + Collections.singletonList( + new RUMOperationJourneyNode() + .query( + "@type:action @action.type:click"))) + .type(RUMOperationJourneyStepType.START)))) + .name("checkout_completed") + .tags(Collections.singletonList("team:checkout"))) + .type(RUMOperationType.OPERATIONS)); + + try { + RUMOperationResponse result = apiInstance.createRUMOperation(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#createRUMOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/CreateRUMOperationStrongLink.java b/examples/v2/rum-operations/CreateRUMOperationStrongLink.java new file mode 100644 index 00000000000..23c0ddef5f5 --- /dev/null +++ b/examples/v2/rum-operations/CreateRUMOperationStrongLink.java @@ -0,0 +1,42 @@ +// Create a RUM operation strong link returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkCreateRequest; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkCreateRequestAttributes; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkCreateRequestData; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkResponse; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkStatus; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createRUMOperationStrongLink", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + RUMOperationStrongLinkCreateRequest body = + new RUMOperationStrongLinkCreateRequest() + .data( + new RUMOperationStrongLinkCreateRequestData() + .attributes( + new RUMOperationStrongLinkCreateRequestAttributes() + .description(null) + .featureId("feature-123") + .operationId("abc12345-1234-5678-abcd-ef1234567890") + .status(RUMOperationStrongLinkStatus.CONFIRMED)) + .type(RUMOperationStrongLinkType.STRONG_LINKS)); + + try { + RUMOperationStrongLinkResponse result = apiInstance.createRUMOperationStrongLink(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#createRUMOperationStrongLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/DeleteRUMOperation.java b/examples/v2/rum-operations/DeleteRUMOperation.java new file mode 100644 index 00000000000..a41646ceba8 --- /dev/null +++ b/examples/v2/rum-operations/DeleteRUMOperation.java @@ -0,0 +1,23 @@ +// Delete a RUM operation returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteRUMOperation", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + try { + apiInstance.deleteRUMOperation("rum_operation_id"); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#deleteRUMOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/DeleteRUMOperationStrongLink.java b/examples/v2/rum-operations/DeleteRUMOperationStrongLink.java new file mode 100644 index 00000000000..b265328e439 --- /dev/null +++ b/examples/v2/rum-operations/DeleteRUMOperationStrongLink.java @@ -0,0 +1,23 @@ +// Delete a RUM operation strong link returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteRUMOperationStrongLink", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + try { + apiInstance.deleteRUMOperationStrongLink("rum_operation_id", "feature_id"); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#deleteRUMOperationStrongLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/GetRUMOperation.java b/examples/v2/rum-operations/GetRUMOperation.java new file mode 100644 index 00000000000..55181b89100 --- /dev/null +++ b/examples/v2/rum-operations/GetRUMOperation.java @@ -0,0 +1,25 @@ +// Get a RUM operation returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getRUMOperation", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + try { + RUMOperationResponse result = apiInstance.getRUMOperation("rum_operation_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#getRUMOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/GetRUMOperationByName.java b/examples/v2/rum-operations/GetRUMOperationByName.java new file mode 100644 index 00000000000..8b06bb49e9e --- /dev/null +++ b/examples/v2/rum-operations/GetRUMOperationByName.java @@ -0,0 +1,25 @@ +// Get a RUM operation by name returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getRUMOperationByName", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + try { + RUMOperationResponse result = apiInstance.getRUMOperationByName("name"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#getRUMOperationByName"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/ListRUMOperationStrongLinks.java b/examples/v2/rum-operations/ListRUMOperationStrongLinks.java new file mode 100644 index 00000000000..a4ff1179dfe --- /dev/null +++ b/examples/v2/rum-operations/ListRUMOperationStrongLinks.java @@ -0,0 +1,24 @@ +// List RUM operation strong links returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationStrongLinksListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + try { + RUMOperationStrongLinksListResponse result = apiInstance.listRUMOperationStrongLinks(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#listRUMOperationStrongLinks"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/ListRUMOperations.java b/examples/v2/rum-operations/ListRUMOperations.java new file mode 100644 index 00000000000..8f475baaa4e --- /dev/null +++ b/examples/v2/rum-operations/ListRUMOperations.java @@ -0,0 +1,25 @@ +// Search RUM operations returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationsListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listRUMOperations", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + try { + RUMOperationsListResponse result = apiInstance.listRUMOperations(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#listRUMOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/UpdateRUMOperation.java b/examples/v2/rum-operations/UpdateRUMOperation.java new file mode 100644 index 00000000000..fffa497eca8 --- /dev/null +++ b/examples/v2/rum-operations/UpdateRUMOperation.java @@ -0,0 +1,76 @@ +// Update a RUM operation returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationJourneyCompositeRule; +import com.datadog.api.client.v2.model.RUMOperationJourneyCompositeRuleKind; +import com.datadog.api.client.v2.model.RUMOperationJourneyNode; +import com.datadog.api.client.v2.model.RUMOperationJourneyPredicate; +import com.datadog.api.client.v2.model.RUMOperationJourneyRum; +import com.datadog.api.client.v2.model.RUMOperationJourneyStep; +import com.datadog.api.client.v2.model.RUMOperationJourneyStepType; +import com.datadog.api.client.v2.model.RUMOperationRequestAttributes; +import com.datadog.api.client.v2.model.RUMOperationResponse; +import com.datadog.api.client.v2.model.RUMOperationType; +import com.datadog.api.client.v2.model.RUMOperationUpdateRequest; +import com.datadog.api.client.v2.model.RUMOperationUpdateRequestData; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateRUMOperation", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + RUMOperationUpdateRequest body = + new RUMOperationUpdateRequest() + .data( + new RUMOperationUpdateRequestData() + .attributes( + new RUMOperationRequestAttributes() + .applicationId(UUID.fromString("abc12345-1234-5678-abcd-ef1234567890")) + .category(null) + .description(null) + .displayName("Checkout completed") + .journeyRum( + new RUMOperationJourneyRum() + .rumSteps( + Collections.singletonList( + new RUMOperationJourneyStep() + .composite( + new RUMOperationJourneyCompositeRule() + .kind( + RUMOperationJourneyCompositeRuleKind + .ALL_OF) + .maxWindowMs(30000L) + .predicates( + Collections.singletonList( + new RUMOperationJourneyPredicate() + .query( + "@type:action" + + " @action.type:click")))) + .nodes( + Collections.singletonList( + new RUMOperationJourneyNode() + .query( + "@type:action @action.type:click"))) + .type(RUMOperationJourneyStepType.START)))) + .name("checkout_completed") + .tags(Collections.singletonList("team:checkout"))) + .id("abc12345-1234-5678-abcd-ef1234567890") + .type(RUMOperationType.OPERATIONS)); + + try { + RUMOperationResponse result = apiInstance.updateRUMOperation("rum_operation_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#updateRUMOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-operations/UpdateRUMOperationStrongLink.java b/examples/v2/rum-operations/UpdateRUMOperationStrongLink.java new file mode 100644 index 00000000000..a6836bd5161 --- /dev/null +++ b/examples/v2/rum-operations/UpdateRUMOperationStrongLink.java @@ -0,0 +1,40 @@ +// Update a RUM operation strong link returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumOperationsApi; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkResponse; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkType; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkUpdateRequest; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkUpdateRequestAttributes; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkUpdateRequestData; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkUpdateStatus; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateRUMOperationStrongLink", true); + RumOperationsApi apiInstance = new RumOperationsApi(defaultClient); + + RUMOperationStrongLinkUpdateRequest body = + new RUMOperationStrongLinkUpdateRequest() + .data( + new RUMOperationStrongLinkUpdateRequestData() + .attributes( + new RUMOperationStrongLinkUpdateRequestAttributes() + .status(RUMOperationStrongLinkUpdateStatus.CONFIRMED)) + .type(RUMOperationStrongLinkType.STRONG_LINKS)); + + try { + RUMOperationStrongLinkResponse result = + apiInstance.updateRUMOperationStrongLink("rum_operation_id", "feature_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumOperationsApi#updateRUMOperationStrongLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 471a474d129..e041c29c564 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1004,8 +1004,6 @@ public class ApiClient { put("v2.getAllDatasets", false); put("v2.getDataset", false); put("v2.updateDataset", false); - put("v2.executeDdsqlTabularQuery", false); - put("v2.fetchDdsqlTabularQuery", false); put("v2.cancelDataDeletionRequest", false); put("v2.createDataDeletionRequest", false); put("v2.getDataDeletionRequests", false); @@ -1213,6 +1211,15 @@ public class ApiClient { put("v2.deleteRumRateLimitConfig", false); put("v2.getRumRateLimitConfig", false); put("v2.updateRumRateLimitConfig", false); + put("v2.createRUMOperation", false); + put("v2.createRUMOperationStrongLink", false); + put("v2.deleteRUMOperation", false); + put("v2.deleteRUMOperationStrongLink", false); + put("v2.getRUMOperation", false); + put("v2.getRUMOperationByName", false); + put("v2.listRUMOperations", false); + put("v2.updateRUMOperation", false); + put("v2.updateRUMOperationStrongLink", false); put("v2.queryAggregatedLongTasks", false); put("v2.queryAggregatedSignalsProblems", false); put("v2.queryAggregatedWaterfall", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/DdsqlApi.java b/src/main/java/com/datadog/api/client/v2/api/DdsqlApi.java index 9c5cd2e2348..5576e4dbf42 100644 --- a/src/main/java/com/datadog/api/client/v2/api/DdsqlApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/DdsqlApi.java @@ -97,13 +97,6 @@ public CompletableFuture executeDdsqlTabularQueryAsyn */ public ApiResponse executeDdsqlTabularQueryWithHttpInfo( DdsqlTabularQueryRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "executeDdsqlTabularQuery"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -146,16 +139,6 @@ public ApiResponse executeDdsqlTabularQueryWithHttpIn */ public CompletableFuture> executeDdsqlTabularQueryWithHttpInfoAsync(DdsqlTabularQueryRequest body) { - // Check if unstable operation is enabled - String operationId = "executeDdsqlTabularQuery"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -252,13 +235,6 @@ public CompletableFuture fetchDdsqlTabularQueryAsync( */ public ApiResponse fetchDdsqlTabularQueryWithHttpInfo( DdsqlTabularQueryFetchRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "fetchDdsqlTabularQuery"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -301,16 +277,6 @@ public ApiResponse fetchDdsqlTabularQueryWithHttpInfo */ public CompletableFuture> fetchDdsqlTabularQueryWithHttpInfoAsync(DdsqlTabularQueryFetchRequest body) { - // Check if unstable operation is enabled - String operationId = "fetchDdsqlTabularQuery"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = body; // verify the required parameter 'body' is set diff --git a/src/main/java/com/datadog/api/client/v2/api/RumOperationsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumOperationsApi.java new file mode 100644 index 00000000000..db64c26f8cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumOperationsApi.java @@ -0,0 +1,1909 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.RUMOperationCreateRequest; +import com.datadog.api.client.v2.model.RUMOperationResponse; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkCreateRequest; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkResponse; +import com.datadog.api.client.v2.model.RUMOperationStrongLinkUpdateRequest; +import com.datadog.api.client.v2.model.RUMOperationStrongLinksListResponse; +import com.datadog.api.client.v2.model.RUMOperationUpdateRequest; +import com.datadog.api.client.v2.model.RUMOperationsListResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumOperationsApi { + private ApiClient apiClient; + + public RumOperationsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumOperationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create a RUM operation. + * + *

See {@link #createRUMOperationWithHttpInfo}. + * + * @param body (required) + * @return RUMOperationResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationResponse createRUMOperation(RUMOperationCreateRequest body) + throws ApiException { + return createRUMOperationWithHttpInfo(body).getData(); + } + + /** + * Create a RUM operation. + * + *

See {@link #createRUMOperationWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RUMOperationResponse> + */ + public CompletableFuture createRUMOperationAsync( + RUMOperationCreateRequest body) { + return createRUMOperationWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new RUM operation, defining the journey used to detect it from RUM events. + * + * @param body (required) + * @return ApiResponse<RUMOperationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
409 Conflict. An operation with this name already exists. -
429 Too many requests -
+ */ + public ApiResponse createRUMOperationWithHttpInfo( + RUMOperationCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createRUMOperation"); + } + // create path and map variables + String localVarPath = "/api/v2/rum/operations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.createRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a RUM operation. + * + *

See {@link #createRUMOperationWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<RUMOperationResponse>> + */ + public CompletableFuture> createRUMOperationWithHttpInfoAsync( + RUMOperationCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createRUMOperation")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/rum/operations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.createRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a RUM operation strong link. + * + *

See {@link #createRUMOperationStrongLinkWithHttpInfo}. + * + * @param body (required) + * @return RUMOperationStrongLinkResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationStrongLinkResponse createRUMOperationStrongLink( + RUMOperationStrongLinkCreateRequest body) throws ApiException { + return createRUMOperationStrongLinkWithHttpInfo(body).getData(); + } + + /** + * Create a RUM operation strong link. + * + *

See {@link #createRUMOperationStrongLinkWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RUMOperationStrongLinkResponse> + */ + public CompletableFuture createRUMOperationStrongLinkAsync( + RUMOperationStrongLinkCreateRequest body) { + return createRUMOperationStrongLinkWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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 (required) + * @return ApiResponse<RUMOperationStrongLinkResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
404 Not Found. The referenced `operation_id` does not exist. -
409 Conflict. A strong link between this operation and feature already exists. -
429 Too many requests -
+ */ + public ApiResponse createRUMOperationStrongLinkWithHttpInfo( + RUMOperationStrongLinkCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createRUMOperationStrongLink"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createRUMOperationStrongLink"); + } + // create path and map variables + String localVarPath = "/api/v2/rum/operations/strong_links"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.createRUMOperationStrongLink", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a RUM operation strong link. + * + *

See {@link #createRUMOperationStrongLinkWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<RUMOperationStrongLinkResponse>> + */ + public CompletableFuture> + createRUMOperationStrongLinkWithHttpInfoAsync(RUMOperationStrongLinkCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createRUMOperationStrongLink"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling createRUMOperationStrongLink")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/rum/operations/strong_links"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.createRUMOperationStrongLink", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete a RUM operation. + * + *

See {@link #deleteRUMOperationWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation to delete. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRUMOperation(String rumOperationId) throws ApiException { + deleteRUMOperationWithHttpInfo(rumOperationId); + } + + /** + * Delete a RUM operation. + * + *

See {@link #deleteRUMOperationWithHttpInfoAsync}. + * + * @param rumOperationId The unique identifier of the RUM operation to delete. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteRUMOperationAsync(String rumOperationId) { + return deleteRUMOperationWithHttpInfoAsync(rumOperationId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a RUM operation. + * + * @param rumOperationId The unique identifier of the RUM operation to delete. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteRUMOperationWithHttpInfo(String rumOperationId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + throw new ApiException( + 400, "Missing the required parameter 'rumOperationId' when calling deleteRUMOperation"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/{rum_operation_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.deleteRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a RUM operation. + * + *

See {@link #deleteRUMOperationWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation to delete. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteRUMOperationWithHttpInfoAsync( + String rumOperationId) { + // Check if unstable operation is enabled + String operationId = "deleteRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'rumOperationId' when calling deleteRUMOperation")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/{rum_operation_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.deleteRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a RUM operation strong link. + * + *

See {@link #deleteRUMOperationStrongLinkWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRUMOperationStrongLink(String rumOperationId, String featureId) + throws ApiException { + deleteRUMOperationStrongLinkWithHttpInfo(rumOperationId, featureId); + } + + /** + * Delete a RUM operation strong link. + * + *

See {@link #deleteRUMOperationStrongLinkWithHttpInfoAsync}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteRUMOperationStrongLinkAsync( + String rumOperationId, String featureId) { + return deleteRUMOperationStrongLinkWithHttpInfoAsync(rumOperationId, featureId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete the strong link between a RUM operation and a feature. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteRUMOperationStrongLinkWithHttpInfo( + String rumOperationId, String featureId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteRUMOperationStrongLink"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'rumOperationId' when calling" + + " deleteRUMOperationStrongLink"); + } + + // verify the required parameter 'featureId' is set + if (featureId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'featureId' when calling deleteRUMOperationStrongLink"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())) + .replaceAll("\\{" + "feature_id" + "\\}", apiClient.escapeString(featureId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.deleteRUMOperationStrongLink", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a RUM operation strong link. + * + *

See {@link #deleteRUMOperationStrongLinkWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteRUMOperationStrongLinkWithHttpInfoAsync( + String rumOperationId, String featureId) { + // Check if unstable operation is enabled + String operationId = "deleteRUMOperationStrongLink"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'rumOperationId' when calling" + + " deleteRUMOperationStrongLink")); + return result; + } + + // verify the required parameter 'featureId' is set + if (featureId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'featureId' when calling" + + " deleteRUMOperationStrongLink")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())) + .replaceAll("\\{" + "feature_id" + "\\}", apiClient.escapeString(featureId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.deleteRUMOperationStrongLink", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get a RUM operation. + * + *

See {@link #getRUMOperationWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @return RUMOperationResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationResponse getRUMOperation(String rumOperationId) throws ApiException { + return getRUMOperationWithHttpInfo(rumOperationId).getData(); + } + + /** + * Get a RUM operation. + * + *

See {@link #getRUMOperationWithHttpInfoAsync}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @return CompletableFuture<RUMOperationResponse> + */ + public CompletableFuture getRUMOperationAsync(String rumOperationId) { + return getRUMOperationWithHttpInfoAsync(rumOperationId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a specific RUM operation by its unique identifier. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @return ApiResponse<RUMOperationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getRUMOperationWithHttpInfo(String rumOperationId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + throw new ApiException( + 400, "Missing the required parameter 'rumOperationId' when calling getRUMOperation"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/{rum_operation_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.getRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a RUM operation. + * + *

See {@link #getRUMOperationWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @return CompletableFuture<ApiResponse<RUMOperationResponse>> + */ + public CompletableFuture> getRUMOperationWithHttpInfoAsync( + String rumOperationId) { + // Check if unstable operation is enabled + String operationId = "getRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'rumOperationId' when calling getRUMOperation")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/{rum_operation_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.getRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a RUM operation by name. + * + *

See {@link #getRUMOperationByNameWithHttpInfo}. + * + * @param name The unique name of the RUM operation. (required) + * @return RUMOperationResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationResponse getRUMOperationByName(String name) throws ApiException { + return getRUMOperationByNameWithHttpInfo(name).getData(); + } + + /** + * Get a RUM operation by name. + * + *

See {@link #getRUMOperationByNameWithHttpInfoAsync}. + * + * @param name The unique name of the RUM operation. (required) + * @return CompletableFuture<RUMOperationResponse> + */ + public CompletableFuture getRUMOperationByNameAsync(String name) { + return getRUMOperationByNameWithHttpInfoAsync(name) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a specific RUM operation by its unique name. + * + * @param name The unique name of the RUM operation. (required) + * @return ApiResponse<RUMOperationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getRUMOperationByNameWithHttpInfo(String name) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getRUMOperationByName"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException( + 400, "Missing the required parameter 'name' when calling getRUMOperationByName"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/by-name/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.getRUMOperationByName", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a RUM operation by name. + * + *

See {@link #getRUMOperationByNameWithHttpInfo}. + * + * @param name The unique name of the RUM operation. (required) + * @return CompletableFuture<ApiResponse<RUMOperationResponse>> + */ + public CompletableFuture> + getRUMOperationByNameWithHttpInfoAsync(String name) { + // Check if unstable operation is enabled + String operationId = "getRUMOperationByName"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'name' is set + if (name == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'name' when calling getRUMOperationByName")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/by-name/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.getRUMOperationByName", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listRUMOperations. */ + public static class ListRUMOperationsOptionalParameters { + private String query; + private Long pageOffset; + private Long pageLimit; + private String creator; + private String team; + private String featureId; + private UUID applicationId; + + /** + * Set query. + * + * @param query A search query to filter operations by name. (optional) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset Offset for pagination. (optional, default to 0) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Number of items per page. Maximum of 100. (optional, default to 50) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set creator. + * + * @param creator Filter operations by the email of their creator. (optional) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters creator(String creator) { + this.creator = creator; + return this; + } + + /** + * Set team. + * + * @param team Filter operations by team. Accepts a comma-separated list of teams. (optional) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters team(String team) { + this.team = team; + return this; + } + + /** + * Set featureId. + * + * @param featureId Filter operations by feature ID. Accepts a comma-separated list of feature + * IDs. (optional) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters featureId(String featureId) { + this.featureId = featureId; + return this; + } + + /** + * Set applicationId. + * + * @param applicationId Filter operations by RUM application ID. (optional) + * @return ListRUMOperationsOptionalParameters + */ + public ListRUMOperationsOptionalParameters applicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + } + + /** + * Search RUM operations. + * + *

See {@link #listRUMOperationsWithHttpInfo}. + * + * @return RUMOperationsListResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationsListResponse listRUMOperations() throws ApiException { + return listRUMOperationsWithHttpInfo(new ListRUMOperationsOptionalParameters()).getData(); + } + + /** + * Search RUM operations. + * + *

See {@link #listRUMOperationsWithHttpInfoAsync}. + * + * @return CompletableFuture<RUMOperationsListResponse> + */ + public CompletableFuture listRUMOperationsAsync() { + return listRUMOperationsWithHttpInfoAsync(new ListRUMOperationsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search RUM operations. + * + *

See {@link #listRUMOperationsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return RUMOperationsListResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationsListResponse listRUMOperations(ListRUMOperationsOptionalParameters parameters) + throws ApiException { + return listRUMOperationsWithHttpInfo(parameters).getData(); + } + + /** + * Search RUM operations. + * + *

See {@link #listRUMOperationsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RUMOperationsListResponse> + */ + public CompletableFuture listRUMOperationsAsync( + ListRUMOperationsOptionalParameters parameters) { + return listRUMOperationsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search RUM operations for your organization. Supports filtering by query, creator, team, + * feature, and application. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<RUMOperationsListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listRUMOperationsWithHttpInfo( + ListRUMOperationsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listRUMOperations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String query = parameters.query; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; + String creator = parameters.creator; + String team = parameters.team; + String featureId = parameters.featureId; + UUID applicationId = parameters.applicationId; + // create path and map variables + String localVarPath = "/api/v2/rum/operations/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "creator", creator)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "team", team)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "feature_id", featureId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "application_id", applicationId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.listRUMOperations", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Search RUM operations. + * + *

See {@link #listRUMOperationsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<RUMOperationsListResponse>> + */ + public CompletableFuture> + listRUMOperationsWithHttpInfoAsync(ListRUMOperationsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listRUMOperations"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String query = parameters.query; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; + String creator = parameters.creator; + String team = parameters.team; + String featureId = parameters.featureId; + UUID applicationId = parameters.applicationId; + // create path and map variables + String localVarPath = "/api/v2/rum/operations/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "creator", creator)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "team", team)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "feature_id", featureId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "application_id", applicationId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.listRUMOperations", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listRUMOperationStrongLinks. */ + public static class ListRUMOperationStrongLinksOptionalParameters { + private String operationId; + private String featureId; + private Long pageOffset; + private Long pageLimit; + + /** + * Set operationId. + * + * @param operationId Filter strong links by RUM operation ID. (optional) + * @return ListRUMOperationStrongLinksOptionalParameters + */ + public ListRUMOperationStrongLinksOptionalParameters operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * Set featureId. + * + * @param featureId Filter strong links by feature ID. (optional) + * @return ListRUMOperationStrongLinksOptionalParameters + */ + public ListRUMOperationStrongLinksOptionalParameters featureId(String featureId) { + this.featureId = featureId; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset Offset for pagination. (optional, default to 0) + * @return ListRUMOperationStrongLinksOptionalParameters + */ + public ListRUMOperationStrongLinksOptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Number of items per page. Maximum of 200. (optional, default to 50) + * @return ListRUMOperationStrongLinksOptionalParameters + */ + public ListRUMOperationStrongLinksOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + } + + /** + * List RUM operation strong links. + * + *

See {@link #listRUMOperationStrongLinksWithHttpInfo}. + * + * @return RUMOperationStrongLinksListResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationStrongLinksListResponse listRUMOperationStrongLinks() throws ApiException { + return listRUMOperationStrongLinksWithHttpInfo( + new ListRUMOperationStrongLinksOptionalParameters()) + .getData(); + } + + /** + * List RUM operation strong links. + * + *

See {@link #listRUMOperationStrongLinksWithHttpInfoAsync}. + * + * @return CompletableFuture<RUMOperationStrongLinksListResponse> + */ + public CompletableFuture listRUMOperationStrongLinksAsync() { + return listRUMOperationStrongLinksWithHttpInfoAsync( + new ListRUMOperationStrongLinksOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List RUM operation strong links. + * + *

See {@link #listRUMOperationStrongLinksWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return RUMOperationStrongLinksListResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationStrongLinksListResponse listRUMOperationStrongLinks( + ListRUMOperationStrongLinksOptionalParameters parameters) throws ApiException { + return listRUMOperationStrongLinksWithHttpInfo(parameters).getData(); + } + + /** + * List RUM operation strong links. + * + *

See {@link #listRUMOperationStrongLinksWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RUMOperationStrongLinksListResponse> + */ + public CompletableFuture listRUMOperationStrongLinksAsync( + ListRUMOperationStrongLinksOptionalParameters parameters) { + return listRUMOperationStrongLinksWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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 parameters Optional parameters for the request. + * @return ApiResponse<RUMOperationStrongLinksListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listRUMOperationStrongLinksWithHttpInfo( + ListRUMOperationStrongLinksOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String operationId = parameters.operationId; + String featureId = parameters.featureId; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/rum/operations/strong_links"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "operation_id", operationId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "feature_id", featureId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.listRUMOperationStrongLinks", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List RUM operation strong links. + * + *

See {@link #listRUMOperationStrongLinksWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<RUMOperationStrongLinksListResponse>> + */ + public CompletableFuture> + listRUMOperationStrongLinksWithHttpInfoAsync( + ListRUMOperationStrongLinksOptionalParameters parameters) { + Object localVarPostBody = null; + String operationId = parameters.operationId; + String featureId = parameters.featureId; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/rum/operations/strong_links"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "operation_id", operationId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "feature_id", featureId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.listRUMOperationStrongLinks", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a RUM operation. + * + *

See {@link #updateRUMOperationWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation to update. (required) + * @param body (required) + * @return RUMOperationResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationResponse updateRUMOperation( + String rumOperationId, RUMOperationUpdateRequest body) throws ApiException { + return updateRUMOperationWithHttpInfo(rumOperationId, body).getData(); + } + + /** + * Update a RUM operation. + * + *

See {@link #updateRUMOperationWithHttpInfoAsync}. + * + * @param rumOperationId The unique identifier of the RUM operation to update. (required) + * @param body (required) + * @return CompletableFuture<RUMOperationResponse> + */ + public CompletableFuture updateRUMOperationAsync( + String rumOperationId, RUMOperationUpdateRequest body) { + return updateRUMOperationWithHttpInfoAsync(rumOperationId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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 rumOperationId The unique identifier of the RUM operation to update. (required) + * @param body (required) + * @return ApiResponse<RUMOperationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
409 Conflict. An operation with this name already exists. -
429 Too many requests -
+ */ + public ApiResponse updateRUMOperationWithHttpInfo( + String rumOperationId, RUMOperationUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + throw new ApiException( + 400, "Missing the required parameter 'rumOperationId' when calling updateRUMOperation"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateRUMOperation"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/{rum_operation_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.updateRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a RUM operation. + * + *

See {@link #updateRUMOperationWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation to update. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<RUMOperationResponse>> + */ + public CompletableFuture> updateRUMOperationWithHttpInfoAsync( + String rumOperationId, RUMOperationUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateRUMOperation"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'rumOperationId' when calling updateRUMOperation")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateRUMOperation")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/{rum_operation_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.updateRUMOperation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a RUM operation strong link. + * + *

See {@link #updateRUMOperationStrongLinkWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @param body (required) + * @return RUMOperationStrongLinkResponse + * @throws ApiException if fails to make API call + */ + public RUMOperationStrongLinkResponse updateRUMOperationStrongLink( + String rumOperationId, String featureId, RUMOperationStrongLinkUpdateRequest body) + throws ApiException { + return updateRUMOperationStrongLinkWithHttpInfo(rumOperationId, featureId, body).getData(); + } + + /** + * Update a RUM operation strong link. + * + *

See {@link #updateRUMOperationStrongLinkWithHttpInfoAsync}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @param body (required) + * @return CompletableFuture<RUMOperationStrongLinkResponse> + */ + public CompletableFuture updateRUMOperationStrongLinkAsync( + String rumOperationId, String featureId, RUMOperationStrongLinkUpdateRequest body) { + return updateRUMOperationStrongLinkWithHttpInfoAsync(rumOperationId, featureId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update the status of a strong link between a RUM operation and a feature. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @param body (required) + * @return ApiResponse<RUMOperationStrongLinkResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateRUMOperationStrongLinkWithHttpInfo( + String rumOperationId, String featureId, RUMOperationStrongLinkUpdateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateRUMOperationStrongLink"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'rumOperationId' when calling" + + " updateRUMOperationStrongLink"); + } + + // verify the required parameter 'featureId' is set + if (featureId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'featureId' when calling updateRUMOperationStrongLink"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateRUMOperationStrongLink"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())) + .replaceAll("\\{" + "feature_id" + "\\}", apiClient.escapeString(featureId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumOperationsApi.updateRUMOperationStrongLink", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a RUM operation strong link. + * + *

See {@link #updateRUMOperationStrongLinkWithHttpInfo}. + * + * @param rumOperationId The unique identifier of the RUM operation. (required) + * @param featureId The unique identifier of the feature. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<RUMOperationStrongLinkResponse>> + */ + public CompletableFuture> + updateRUMOperationStrongLinkWithHttpInfoAsync( + String rumOperationId, String featureId, RUMOperationStrongLinkUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateRUMOperationStrongLink"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'rumOperationId' is set + if (rumOperationId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'rumOperationId' when calling" + + " updateRUMOperationStrongLink")); + return result; + } + + // verify the required parameter 'featureId' is set + if (featureId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'featureId' when calling" + + " updateRUMOperationStrongLink")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateRUMOperationStrongLink")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}" + .replaceAll( + "\\{" + "rum_operation_id" + "\\}", + apiClient.escapeString(rumOperationId.toString())) + .replaceAll("\\{" + "feature_id" + "\\}", apiClient.escapeString(featureId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumOperationsApi.updateRUMOperationStrongLink", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DdsqlTabularQueryColumn.java b/src/main/java/com/datadog/api/client/v2/model/DdsqlTabularQueryColumn.java index 3c509ab5747..13e827f49f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DdsqlTabularQueryColumn.java +++ b/src/main/java/com/datadog/api/client/v2/model/DdsqlTabularQueryColumn.java @@ -105,9 +105,19 @@ public DdsqlTabularQueryColumn addValuesItem(Object valuesItem) { } /** - * Column values in row order. The element type matches the column's type; for - * example a VARCHAR column carries strings, a TIMESTAMP column carries - * Unix-millisecond integers. null is allowed for missing values. + * Column values in row order, one entry per result row. The element type follows the column's + * type. The following serialization rules should be taken into account: + * + *

    + *
  • BIGINT values are encoded as JSON numbers in the signed 64-bit integer + * range. + *
  • DECIMAL values are encoded as JSON numbers with 64-bit double precision. + *
  • TIMESTAMP and DATE values are encoded as Unix-millisecond + * integers; a DATE resolves to midnight UTC. + *
  • JSON values are returned as a JSON-encoded string. + *
+ * + *

null is allowed for any column type where a value is missing. * * @return values */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationCreateRequest.java new file mode 100644 index 00000000000..fcdce22adad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationCreateRequest.java @@ -0,0 +1,150 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The request body for creating a RUM operation. */ +@JsonPropertyOrder({RUMOperationCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RUMOperationCreateRequestData data; + + public RUMOperationCreateRequest() {} + + @JsonCreator + public RUMOperationCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RUMOperationCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RUMOperationCreateRequest data(RUMOperationCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for creating a RUM operation. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationCreateRequestData getData() { + return data; + } + + public void setData(RUMOperationCreateRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationCreateRequest + */ + @JsonAnySetter + public RUMOperationCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationCreateRequest rumOperationCreateRequest = (RUMOperationCreateRequest) o; + return Objects.equals(this.data, rumOperationCreateRequest.data) + && Objects.equals( + this.additionalProperties, rumOperationCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationCreateRequestData.java new file mode 100644 index 00000000000..86c5e2f16ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationCreateRequestData.java @@ -0,0 +1,185 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object for creating a RUM operation. */ +@JsonPropertyOrder({ + RUMOperationCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + RUMOperationCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RUMOperationRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationType type; + + public RUMOperationCreateRequestData() {} + + @JsonCreator + public RUMOperationCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RUMOperationRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationCreateRequestData attributes(RUMOperationRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a RUM operation. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RUMOperationRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RUMOperationCreateRequestData type(RUMOperationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for RUM operation resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationType getType() { + return type; + } + + public void setType(RUMOperationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationCreateRequestData + */ + @JsonAnySetter + public RUMOperationCreateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationCreateRequestData rumOperationCreateRequestData = (RUMOperationCreateRequestData) o; + return Objects.equals(this.attributes, rumOperationCreateRequestData.attributes) + && Objects.equals(this.type, rumOperationCreateRequestData.type) + && Objects.equals( + this.additionalProperties, rumOperationCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationCreateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyCompositeRule.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyCompositeRule.java new file mode 100644 index 00000000000..38e416736fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyCompositeRule.java @@ -0,0 +1,273 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * 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. + */ +@JsonPropertyOrder({ + RUMOperationJourneyCompositeRule.JSON_PROPERTY_COMPOSITE_RULE_ID, + RUMOperationJourneyCompositeRule.JSON_PROPERTY_CONFIG_VERSION, + RUMOperationJourneyCompositeRule.JSON_PROPERTY_KIND, + RUMOperationJourneyCompositeRule.JSON_PROPERTY_MAX_WINDOW_MS, + RUMOperationJourneyCompositeRule.JSON_PROPERTY_PREDICATES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationJourneyCompositeRule { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPOSITE_RULE_ID = "composite_rule_id"; + private String compositeRuleId; + + public static final String JSON_PROPERTY_CONFIG_VERSION = "config_version"; + private String configVersion; + + public static final String JSON_PROPERTY_KIND = "kind"; + private RUMOperationJourneyCompositeRuleKind kind; + + public static final String JSON_PROPERTY_MAX_WINDOW_MS = "max_window_ms"; + private Long maxWindowMs; + + public static final String JSON_PROPERTY_PREDICATES = "predicates"; + private List predicates = new ArrayList<>(); + + public RUMOperationJourneyCompositeRule() {} + + @JsonCreator + public RUMOperationJourneyCompositeRule( + @JsonProperty(required = true, value = JSON_PROPERTY_KIND) + RUMOperationJourneyCompositeRuleKind kind, + @JsonProperty(required = true, value = JSON_PROPERTY_PREDICATES) + List predicates) { + this.kind = kind; + this.unparsed |= !kind.isValid(); + this.predicates = predicates; + for (RUMOperationJourneyPredicate item : predicates) { + this.unparsed |= item.unparsed; + } + } + + /** + * The unique identifier of the composite rule. Generated by the server if omitted. + * + * @return compositeRuleId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE_RULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompositeRuleId() { + return compositeRuleId; + } + + /** + * A hash of the composite rule's configuration, computed by the server. + * + * @return configVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getConfigVersion() { + return configVersion; + } + + public RUMOperationJourneyCompositeRule kind(RUMOperationJourneyCompositeRuleKind kind) { + this.kind = kind; + this.unparsed |= !kind.isValid(); + return this; + } + + /** + * 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. + * + * @return kind + */ + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationJourneyCompositeRuleKind getKind() { + return kind; + } + + public void setKind(RUMOperationJourneyCompositeRuleKind kind) { + if (!kind.isValid()) { + this.unparsed = true; + } + this.kind = kind; + } + + public RUMOperationJourneyCompositeRule maxWindowMs(Long maxWindowMs) { + this.maxWindowMs = maxWindowMs; + return this; + } + + /** + * The maximum time window, in milliseconds, in which all predicates must match. + * + * @return maxWindowMs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_WINDOW_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxWindowMs() { + return maxWindowMs; + } + + public void setMaxWindowMs(Long maxWindowMs) { + this.maxWindowMs = maxWindowMs; + } + + public RUMOperationJourneyCompositeRule predicates( + List predicates) { + this.predicates = predicates; + for (RUMOperationJourneyPredicate item : predicates) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RUMOperationJourneyCompositeRule addPredicatesItem( + RUMOperationJourneyPredicate predicatesItem) { + this.predicates.add(predicatesItem); + this.unparsed |= predicatesItem.unparsed; + return this; + } + + /** + * The list of predicates that must be matched by RUM events. + * + * @return predicates + */ + @JsonProperty(JSON_PROPERTY_PREDICATES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPredicates() { + return predicates; + } + + public void setPredicates(List predicates) { + this.predicates = predicates; + if (predicates != null) { + for (RUMOperationJourneyPredicate item : predicates) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationJourneyCompositeRule + */ + @JsonAnySetter + public RUMOperationJourneyCompositeRule putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationJourneyCompositeRule object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationJourneyCompositeRule rumOperationJourneyCompositeRule = + (RUMOperationJourneyCompositeRule) o; + return Objects.equals(this.compositeRuleId, rumOperationJourneyCompositeRule.compositeRuleId) + && Objects.equals(this.configVersion, rumOperationJourneyCompositeRule.configVersion) + && Objects.equals(this.kind, rumOperationJourneyCompositeRule.kind) + && Objects.equals(this.maxWindowMs, rumOperationJourneyCompositeRule.maxWindowMs) + && Objects.equals(this.predicates, rumOperationJourneyCompositeRule.predicates) + && Objects.equals( + this.additionalProperties, rumOperationJourneyCompositeRule.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + compositeRuleId, configVersion, kind, maxWindowMs, predicates, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationJourneyCompositeRule {\n"); + sb.append(" compositeRuleId: ").append(toIndentedString(compositeRuleId)).append("\n"); + sb.append(" configVersion: ").append(toIndentedString(configVersion)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" maxWindowMs: ").append(toIndentedString(maxWindowMs)).append("\n"); + sb.append(" predicates: ").append(toIndentedString(predicates)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyCompositeRuleKind.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyCompositeRuleKind.java new file mode 100644 index 00000000000..ddb0dfcb9dc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyCompositeRuleKind.java @@ -0,0 +1,66 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * 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. + */ +@JsonSerialize( + using = + RUMOperationJourneyCompositeRuleKind.RUMOperationJourneyCompositeRuleKindSerializer.class) +public class RUMOperationJourneyCompositeRuleKind extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("all_of", "in_order")); + + public static final RUMOperationJourneyCompositeRuleKind ALL_OF = + new RUMOperationJourneyCompositeRuleKind("all_of"); + public static final RUMOperationJourneyCompositeRuleKind IN_ORDER = + new RUMOperationJourneyCompositeRuleKind("in_order"); + + RUMOperationJourneyCompositeRuleKind(String value) { + super(value, allowedValues); + } + + public static class RUMOperationJourneyCompositeRuleKindSerializer + extends StdSerializer { + public RUMOperationJourneyCompositeRuleKindSerializer( + Class t) { + super(t); + } + + public RUMOperationJourneyCompositeRuleKindSerializer() { + this(null); + } + + @Override + public void serialize( + RUMOperationJourneyCompositeRuleKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMOperationJourneyCompositeRuleKind fromValue(String value) { + return new RUMOperationJourneyCompositeRuleKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyNode.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyNode.java new file mode 100644 index 00000000000..f2c68167785 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyNode.java @@ -0,0 +1,163 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single node within a RUM operation journey step, matching RUM events with a query. */ +@JsonPropertyOrder({ + RUMOperationJourneyNode.JSON_PROPERTY_ID, + RUMOperationJourneyNode.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationJourneyNode { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public RUMOperationJourneyNode() {} + + @JsonCreator + public RUMOperationJourneyNode( + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.query = query; + } + + /** + * The unique identifier of the node. Generated by the server if omitted. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public RUMOperationJourneyNode query(String query) { + this.query = query; + return this; + } + + /** + * The RUM search query used to match events for this node. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationJourneyNode + */ + @JsonAnySetter + public RUMOperationJourneyNode putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationJourneyNode object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationJourneyNode rumOperationJourneyNode = (RUMOperationJourneyNode) o; + return Objects.equals(this.id, rumOperationJourneyNode.id) + && Objects.equals(this.query, rumOperationJourneyNode.query) + && Objects.equals(this.additionalProperties, rumOperationJourneyNode.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationJourneyNode {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyPredicate.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyPredicate.java new file mode 100644 index 00000000000..940da2550a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyPredicate.java @@ -0,0 +1,144 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single predicate within a composite rule, matching RUM events with a query. */ +@JsonPropertyOrder({RUMOperationJourneyPredicate.JSON_PROPERTY_QUERY}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationJourneyPredicate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public RUMOperationJourneyPredicate() {} + + @JsonCreator + public RUMOperationJourneyPredicate( + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.query = query; + } + + public RUMOperationJourneyPredicate query(String query) { + this.query = query; + return this; + } + + /** + * The RUM search query used to match events for this predicate. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationJourneyPredicate + */ + @JsonAnySetter + public RUMOperationJourneyPredicate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationJourneyPredicate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationJourneyPredicate rumOperationJourneyPredicate = (RUMOperationJourneyPredicate) o; + return Objects.equals(this.query, rumOperationJourneyPredicate.query) + && Objects.equals( + this.additionalProperties, rumOperationJourneyPredicate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationJourneyPredicate {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyRum.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyRum.java new file mode 100644 index 00000000000..17a116262cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyRum.java @@ -0,0 +1,163 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of a RUM operation's journey, used to detect it from RUM events. */ +@JsonPropertyOrder({RUMOperationJourneyRum.JSON_PROPERTY_RUM_STEPS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationJourneyRum { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RUM_STEPS = "rum_steps"; + private List rumSteps = new ArrayList<>(); + + public RUMOperationJourneyRum() {} + + @JsonCreator + public RUMOperationJourneyRum( + @JsonProperty(required = true, value = JSON_PROPERTY_RUM_STEPS) + List rumSteps) { + this.rumSteps = rumSteps; + for (RUMOperationJourneyStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + } + + public RUMOperationJourneyRum rumSteps(List rumSteps) { + this.rumSteps = rumSteps; + for (RUMOperationJourneyStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RUMOperationJourneyRum addRumStepsItem(RUMOperationJourneyStep rumStepsItem) { + this.rumSteps.add(rumStepsItem); + this.unparsed |= rumStepsItem.unparsed; + return this; + } + + /** + * The ordered list of steps composing the RUM journey. + * + * @return rumSteps + */ + @JsonProperty(JSON_PROPERTY_RUM_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRumSteps() { + return rumSteps; + } + + public void setRumSteps(List rumSteps) { + this.rumSteps = rumSteps; + if (rumSteps != null) { + for (RUMOperationJourneyStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationJourneyRum + */ + @JsonAnySetter + public RUMOperationJourneyRum putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationJourneyRum object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationJourneyRum rumOperationJourneyRum = (RUMOperationJourneyRum) o; + return Objects.equals(this.rumSteps, rumOperationJourneyRum.rumSteps) + && Objects.equals(this.additionalProperties, rumOperationJourneyRum.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(rumSteps, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationJourneyRum {\n"); + sb.append(" rumSteps: ").append(toIndentedString(rumSteps)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyStep.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyStep.java new file mode 100644 index 00000000000..7ffdd30ed10 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyStep.java @@ -0,0 +1,234 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * 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. + */ +@JsonPropertyOrder({ + RUMOperationJourneyStep.JSON_PROPERTY_COMPOSITE, + RUMOperationJourneyStep.JSON_PROPERTY_NODES, + RUMOperationJourneyStep.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationJourneyStep { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPOSITE = "composite"; + private RUMOperationJourneyCompositeRule composite; + + public static final String JSON_PROPERTY_NODES = "nodes"; + private List nodes = null; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationJourneyStepType type; + + public RUMOperationJourneyStep() {} + + @JsonCreator + public RUMOperationJourneyStep( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationJourneyStepType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationJourneyStep composite(RUMOperationJourneyCompositeRule composite) { + this.composite = composite; + this.unparsed |= composite.unparsed; + return this; + } + + /** + * 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. + * + * @return composite + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPOSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationJourneyCompositeRule getComposite() { + return composite; + } + + public void setComposite(RUMOperationJourneyCompositeRule composite) { + this.composite = composite; + if (composite != null) { + this.unparsed |= composite.unparsed; + } + } + + public RUMOperationJourneyStep nodes(List nodes) { + this.nodes = nodes; + if (nodes != null) { + for (RUMOperationJourneyNode item : nodes) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public RUMOperationJourneyStep addNodesItem(RUMOperationJourneyNode nodesItem) { + if (this.nodes == null) { + this.nodes = new ArrayList<>(); + } + this.nodes.add(nodesItem); + this.unparsed |= nodesItem.unparsed; + return this; + } + + /** + * The list of nodes that can match this step. Mutually exclusive with composite. + * + * @return nodes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNodes() { + return nodes; + } + + public void setNodes(List nodes) { + this.nodes = nodes; + if (nodes != null) { + for (RUMOperationJourneyNode item : nodes) { + this.unparsed |= item.unparsed; + } + } + } + + public RUMOperationJourneyStep type(RUMOperationJourneyStepType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of a step within a RUM operation's journey. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationJourneyStepType getType() { + return type; + } + + public void setType(RUMOperationJourneyStepType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationJourneyStep + */ + @JsonAnySetter + public RUMOperationJourneyStep putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationJourneyStep object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationJourneyStep rumOperationJourneyStep = (RUMOperationJourneyStep) o; + return Objects.equals(this.composite, rumOperationJourneyStep.composite) + && Objects.equals(this.nodes, rumOperationJourneyStep.nodes) + && Objects.equals(this.type, rumOperationJourneyStep.type) + && Objects.equals(this.additionalProperties, rumOperationJourneyStep.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(composite, nodes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationJourneyStep {\n"); + sb.append(" composite: ").append(toIndentedString(composite)).append("\n"); + sb.append(" nodes: ").append(toIndentedString(nodes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyStepType.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyStepType.java new file mode 100644 index 00000000000..d9f9660b662 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationJourneyStepType.java @@ -0,0 +1,62 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of a step within a RUM operation's journey. */ +@JsonSerialize(using = RUMOperationJourneyStepType.RUMOperationJourneyStepTypeSerializer.class) +public class RUMOperationJourneyStepType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("start", "update", "stop", "error", "abandoned")); + + public static final RUMOperationJourneyStepType START = new RUMOperationJourneyStepType("start"); + public static final RUMOperationJourneyStepType UPDATE = + new RUMOperationJourneyStepType("update"); + public static final RUMOperationJourneyStepType STOP = new RUMOperationJourneyStepType("stop"); + public static final RUMOperationJourneyStepType ERROR = new RUMOperationJourneyStepType("error"); + public static final RUMOperationJourneyStepType ABANDONED = + new RUMOperationJourneyStepType("abandoned"); + + RUMOperationJourneyStepType(String value) { + super(value, allowedValues); + } + + public static class RUMOperationJourneyStepTypeSerializer + extends StdSerializer { + public RUMOperationJourneyStepTypeSerializer(Class t) { + super(t); + } + + public RUMOperationJourneyStepTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RUMOperationJourneyStepType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMOperationJourneyStepType fromValue(String value) { + return new RUMOperationJourneyStepType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationRequestAttributes.java new file mode 100644 index 00000000000..347b0da725b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationRequestAttributes.java @@ -0,0 +1,389 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for creating or updating a RUM operation. */ +@JsonPropertyOrder({ + RUMOperationRequestAttributes.JSON_PROPERTY_APPLICATION_ID, + RUMOperationRequestAttributes.JSON_PROPERTY_CATEGORY, + RUMOperationRequestAttributes.JSON_PROPERTY_DESCRIPTION, + RUMOperationRequestAttributes.JSON_PROPERTY_DISPLAY_NAME, + RUMOperationRequestAttributes.JSON_PROPERTY_FEATURE_IDS, + RUMOperationRequestAttributes.JSON_PROPERTY_JOURNEY_RUM, + RUMOperationRequestAttributes.JSON_PROPERTY_NAME, + RUMOperationRequestAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private UUID applicationId; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private JsonNullable category = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_FEATURE_IDS = "feature_ids"; + private List featureIds = null; + + public static final String JSON_PROPERTY_JOURNEY_RUM = "journey_rum"; + private RUMOperationJourneyRum journeyRum; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = new ArrayList<>(); + + public RUMOperationRequestAttributes() {} + + @JsonCreator + public RUMOperationRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_JOURNEY_RUM) + RUMOperationJourneyRum journeyRum, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + this.name = name; + this.tags = tags; + } + + public RUMOperationRequestAttributes applicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The RUM application ID the operation belongs to. + * + * @return applicationId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getApplicationId() { + return applicationId; + } + + public void setApplicationId(UUID applicationId) { + this.applicationId = applicationId; + } + + public RUMOperationRequestAttributes category(String category) { + this.category = JsonNullable.of(category); + return this; + } + + /** + * The category of the RUM operation. + * + * @return category + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCategory_JsonNullable() { + return category; + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + public void setCategory_JsonNullable(JsonNullable category) { + this.category = category; + } + + public void setCategory(String category) { + this.category = JsonNullable.of(category); + } + + public RUMOperationRequestAttributes description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the RUM operation. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + public RUMOperationRequestAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A human-readable display name for the RUM operation. + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public RUMOperationRequestAttributes featureIds(List featureIds) { + this.featureIds = featureIds; + return this; + } + + public RUMOperationRequestAttributes addFeatureIdsItem(String featureIdsItem) { + if (this.featureIds == null) { + this.featureIds = new ArrayList<>(); + } + this.featureIds.add(featureIdsItem); + return this; + } + + /** + * The list of feature IDs associated with the RUM operation. + * + * @return featureIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEATURE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFeatureIds() { + return featureIds; + } + + public void setFeatureIds(List featureIds) { + this.featureIds = featureIds; + } + + public RUMOperationRequestAttributes journeyRum(RUMOperationJourneyRum journeyRum) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + return this; + } + + /** + * The definition of a RUM operation's journey, used to detect it from RUM events. + * + * @return journeyRum + */ + @JsonProperty(JSON_PROPERTY_JOURNEY_RUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationJourneyRum getJourneyRum() { + return journeyRum; + } + + public void setJourneyRum(RUMOperationJourneyRum journeyRum) { + this.journeyRum = journeyRum; + if (journeyRum != null) { + this.unparsed |= journeyRum.unparsed; + } + } + + public RUMOperationRequestAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The unique name of the RUM operation. Must not contain spaces. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RUMOperationRequestAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public RUMOperationRequestAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags associated with the RUM operation. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationRequestAttributes + */ + @JsonAnySetter + public RUMOperationRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationRequestAttributes rumOperationRequestAttributes = (RUMOperationRequestAttributes) o; + return Objects.equals(this.applicationId, rumOperationRequestAttributes.applicationId) + && Objects.equals(this.category, rumOperationRequestAttributes.category) + && Objects.equals(this.description, rumOperationRequestAttributes.description) + && Objects.equals(this.displayName, rumOperationRequestAttributes.displayName) + && Objects.equals(this.featureIds, rumOperationRequestAttributes.featureIds) + && Objects.equals(this.journeyRum, rumOperationRequestAttributes.journeyRum) + && Objects.equals(this.name, rumOperationRequestAttributes.name) + && Objects.equals(this.tags, rumOperationRequestAttributes.tags) + && Objects.equals( + this.additionalProperties, rumOperationRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationId, + category, + description, + displayName, + featureIds, + journeyRum, + name, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationRequestAttributes {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" featureIds: ").append(toIndentedString(featureIds)).append("\n"); + sb.append(" journeyRum: ").append(toIndentedString(journeyRum)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponse.java new file mode 100644 index 00000000000..44dab04865a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponse.java @@ -0,0 +1,148 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response for a single RUM operation. */ +@JsonPropertyOrder({RUMOperationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RUMOperationResponseData data; + + public RUMOperationResponse() {} + + @JsonCreator + public RUMOperationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RUMOperationResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RUMOperationResponse data(RUMOperationResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object in a RUM operation response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationResponseData getData() { + return data; + } + + public void setData(RUMOperationResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationResponse + */ + @JsonAnySetter + public RUMOperationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationResponse rumOperationResponse = (RUMOperationResponse) o; + return Objects.equals(this.data, rumOperationResponse.data) + && Objects.equals(this.additionalProperties, rumOperationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponseAttributes.java new file mode 100644 index 00000000000..4b9abeb3395 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponseAttributes.java @@ -0,0 +1,536 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a RUM operation response. */ +@JsonPropertyOrder({ + RUMOperationResponseAttributes.JSON_PROPERTY_APPLICATION_ID, + RUMOperationResponseAttributes.JSON_PROPERTY_CATEGORY, + RUMOperationResponseAttributes.JSON_PROPERTY_CREATED_AT, + RUMOperationResponseAttributes.JSON_PROPERTY_CREATED_BY, + RUMOperationResponseAttributes.JSON_PROPERTY_DESCRIPTION, + RUMOperationResponseAttributes.JSON_PROPERTY_DISPLAY_NAME, + RUMOperationResponseAttributes.JSON_PROPERTY_FEATURE_IDS, + RUMOperationResponseAttributes.JSON_PROPERTY_JOURNEY_RUM, + RUMOperationResponseAttributes.JSON_PROPERTY_NAME, + RUMOperationResponseAttributes.JSON_PROPERTY_ORG_ID, + RUMOperationResponseAttributes.JSON_PROPERTY_TAGS, + RUMOperationResponseAttributes.JSON_PROPERTY_UPDATED_AT, + RUMOperationResponseAttributes.JSON_PROPERTY_UPDATED_BY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private JsonNullable applicationId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private JsonNullable category = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private RUMOperationUser createdBy; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_FEATURE_IDS = "feature_ids"; + private List featureIds = null; + + public static final String JSON_PROPERTY_JOURNEY_RUM = "journey_rum"; + private RUMOperationJourneyRum journeyRum; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private JsonNullable updatedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private RUMOperationUser updatedBy; + + public RUMOperationResponseAttributes() {} + + @JsonCreator + public RUMOperationResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_JOURNEY_RUM) + RUMOperationJourneyRum journeyRum, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + this.name = name; + this.tags = tags; + } + + public RUMOperationResponseAttributes applicationId(UUID applicationId) { + this.applicationId = JsonNullable.of(applicationId); + return this; + } + + /** + * The RUM application ID the operation belongs to. + * + * @return applicationId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UUID getApplicationId() { + return applicationId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getApplicationId_JsonNullable() { + return applicationId; + } + + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + public void setApplicationId_JsonNullable(JsonNullable applicationId) { + this.applicationId = applicationId; + } + + public void setApplicationId(UUID applicationId) { + this.applicationId = JsonNullable.of(applicationId); + } + + public RUMOperationResponseAttributes category(String category) { + this.category = JsonNullable.of(category); + return this; + } + + /** + * The category of the RUM operation. + * + * @return category + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCategory_JsonNullable() { + return category; + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + public void setCategory_JsonNullable(JsonNullable category) { + this.category = category; + } + + public void setCategory(String category) { + this.category = JsonNullable.of(category); + } + + /** + * The timestamp when the RUM operation was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public RUMOperationResponseAttributes createdBy(RUMOperationUser createdBy) { + this.createdBy = createdBy; + this.unparsed |= createdBy.unparsed; + return this; + } + + /** + * A Datadog user referenced by a RUM operation. + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationUser getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(RUMOperationUser createdBy) { + this.createdBy = createdBy; + if (createdBy != null) { + this.unparsed |= createdBy.unparsed; + } + } + + public RUMOperationResponseAttributes description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the RUM operation. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + public RUMOperationResponseAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A human-readable display name for the RUM operation. + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public RUMOperationResponseAttributes featureIds(List featureIds) { + this.featureIds = featureIds; + return this; + } + + public RUMOperationResponseAttributes addFeatureIdsItem(String featureIdsItem) { + if (this.featureIds == null) { + this.featureIds = new ArrayList<>(); + } + this.featureIds.add(featureIdsItem); + return this; + } + + /** + * The list of feature IDs associated with the RUM operation. + * + * @return featureIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEATURE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFeatureIds() { + return featureIds; + } + + public void setFeatureIds(List featureIds) { + this.featureIds = featureIds; + } + + public RUMOperationResponseAttributes journeyRum(RUMOperationJourneyRum journeyRum) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + return this; + } + + /** + * The definition of a RUM operation's journey, used to detect it from RUM events. + * + * @return journeyRum + */ + @JsonProperty(JSON_PROPERTY_JOURNEY_RUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationJourneyRum getJourneyRum() { + return journeyRum; + } + + public void setJourneyRum(RUMOperationJourneyRum journeyRum) { + this.journeyRum = journeyRum; + if (journeyRum != null) { + this.unparsed |= journeyRum.unparsed; + } + } + + public RUMOperationResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The unique name of the RUM operation. Must not contain spaces. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * The ID of the organization the RUM operation belongs to. + * + * @return orgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrgId() { + return orgId; + } + + public RUMOperationResponseAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public RUMOperationResponseAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags associated with the RUM operation. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * The timestamp when the RUM operation was last updated. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getUpdatedAt() { + + if (updatedAt == null) { + updatedAt = JsonNullable.undefined(); + } + return updatedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUpdatedAt_JsonNullable() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + private void setUpdatedAt_JsonNullable(JsonNullable updatedAt) { + this.updatedAt = updatedAt; + } + + public RUMOperationResponseAttributes updatedBy(RUMOperationUser updatedBy) { + this.updatedBy = updatedBy; + this.unparsed |= updatedBy.unparsed; + return this; + } + + /** + * A Datadog user referenced by a RUM operation. + * + * @return updatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationUser getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(RUMOperationUser updatedBy) { + this.updatedBy = updatedBy; + if (updatedBy != null) { + this.unparsed |= updatedBy.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationResponseAttributes + */ + @JsonAnySetter + public RUMOperationResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationResponseAttributes rumOperationResponseAttributes = + (RUMOperationResponseAttributes) o; + return Objects.equals(this.applicationId, rumOperationResponseAttributes.applicationId) + && Objects.equals(this.category, rumOperationResponseAttributes.category) + && Objects.equals(this.createdAt, rumOperationResponseAttributes.createdAt) + && Objects.equals(this.createdBy, rumOperationResponseAttributes.createdBy) + && Objects.equals(this.description, rumOperationResponseAttributes.description) + && Objects.equals(this.displayName, rumOperationResponseAttributes.displayName) + && Objects.equals(this.featureIds, rumOperationResponseAttributes.featureIds) + && Objects.equals(this.journeyRum, rumOperationResponseAttributes.journeyRum) + && Objects.equals(this.name, rumOperationResponseAttributes.name) + && Objects.equals(this.orgId, rumOperationResponseAttributes.orgId) + && Objects.equals(this.tags, rumOperationResponseAttributes.tags) + && Objects.equals(this.updatedAt, rumOperationResponseAttributes.updatedAt) + && Objects.equals(this.updatedBy, rumOperationResponseAttributes.updatedBy) + && Objects.equals( + this.additionalProperties, rumOperationResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationId, + category, + createdAt, + createdBy, + description, + displayName, + featureIds, + journeyRum, + name, + orgId, + tags, + updatedAt, + updatedBy, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationResponseAttributes {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" featureIds: ").append(toIndentedString(featureIds)).append("\n"); + sb.append(" journeyRum: ").append(toIndentedString(journeyRum)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponseData.java new file mode 100644 index 00000000000..0d5762064fa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationResponseData.java @@ -0,0 +1,203 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object in a RUM operation response. */ +@JsonPropertyOrder({ + RUMOperationResponseData.JSON_PROPERTY_ATTRIBUTES, + RUMOperationResponseData.JSON_PROPERTY_ID, + RUMOperationResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RUMOperationResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationType type; + + public RUMOperationResponseData() {} + + @JsonCreator + public RUMOperationResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RUMOperationResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationResponseData attributes(RUMOperationResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a RUM operation response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RUMOperationResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * The unique identifier of the RUM operation. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public RUMOperationResponseData type(RUMOperationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for RUM operation resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationType getType() { + return type; + } + + public void setType(RUMOperationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationResponseData + */ + @JsonAnySetter + public RUMOperationResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationResponseData rumOperationResponseData = (RUMOperationResponseData) o; + return Objects.equals(this.attributes, rumOperationResponseData.attributes) + && Objects.equals(this.id, rumOperationResponseData.id) + && Objects.equals(this.type, rumOperationResponseData.type) + && Objects.equals(this.additionalProperties, rumOperationResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequest.java new file mode 100644 index 00000000000..44b60f1cdd5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequest.java @@ -0,0 +1,151 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The request body for creating a RUM operation strong link. */ +@JsonPropertyOrder({RUMOperationStrongLinkCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RUMOperationStrongLinkCreateRequestData data; + + public RUMOperationStrongLinkCreateRequest() {} + + @JsonCreator + public RUMOperationStrongLinkCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RUMOperationStrongLinkCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RUMOperationStrongLinkCreateRequest data(RUMOperationStrongLinkCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for creating a RUM operation strong link. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkCreateRequestData getData() { + return data; + } + + public void setData(RUMOperationStrongLinkCreateRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkCreateRequest + */ + @JsonAnySetter + public RUMOperationStrongLinkCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkCreateRequest rumOperationStrongLinkCreateRequest = + (RUMOperationStrongLinkCreateRequest) o; + return Objects.equals(this.data, rumOperationStrongLinkCreateRequest.data) + && Objects.equals( + this.additionalProperties, rumOperationStrongLinkCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequestAttributes.java new file mode 100644 index 00000000000..1fb81b78883 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequestAttributes.java @@ -0,0 +1,351 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes for creating a RUM operation strong link. */ +@JsonPropertyOrder({ + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_APPLICATION_ID, + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_DESCRIPTION, + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_FEATURE_ID, + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_OPERATION_ID, + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_OPERATION_NAME, + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_STATUS, + RUMOperationStrongLinkCreateRequestAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkCreateRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private UUID applicationId; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FEATURE_ID = "feature_id"; + private String featureId; + + public static final String JSON_PROPERTY_OPERATION_ID = "operation_id"; + private String operationId; + + public static final String JSON_PROPERTY_OPERATION_NAME = "operation_name"; + private String operationName; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RUMOperationStrongLinkStatus status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public RUMOperationStrongLinkCreateRequestAttributes() {} + + @JsonCreator + public RUMOperationStrongLinkCreateRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FEATURE_ID) String featureId) { + this.featureId = featureId; + } + + public RUMOperationStrongLinkCreateRequestAttributes applicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The RUM application ID used when creating a stub operation from operation_name. + * + * @return applicationId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getApplicationId() { + return applicationId; + } + + public void setApplicationId(UUID applicationId) { + this.applicationId = applicationId; + } + + public RUMOperationStrongLinkCreateRequestAttributes description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the strong link. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + public RUMOperationStrongLinkCreateRequestAttributes featureId(String featureId) { + this.featureId = featureId; + return this; + } + + /** + * The unique identifier of the feature to link. + * + * @return featureId + */ + @JsonProperty(JSON_PROPERTY_FEATURE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFeatureId() { + return featureId; + } + + public void setFeatureId(String featureId) { + this.featureId = featureId; + } + + public RUMOperationStrongLinkCreateRequestAttributes operationId(String operationId) { + this.operationId = operationId; + return this; + } + + /** + * The unique identifier of the RUM operation to link. Either operation_id or + * operation_name is required. + * + * @return operationId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOperationId() { + return operationId; + } + + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + public RUMOperationStrongLinkCreateRequestAttributes operationName(String operationName) { + this.operationName = operationName; + return this; + } + + /** + * 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. + * + * @return operationName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATION_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOperationName() { + return operationName; + } + + public void setOperationName(String operationName) { + this.operationName = operationName; + } + + public RUMOperationStrongLinkCreateRequestAttributes status(RUMOperationStrongLinkStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of a RUM operation strong link. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationStrongLinkStatus getStatus() { + return status; + } + + public void setStatus(RUMOperationStrongLinkStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public RUMOperationStrongLinkCreateRequestAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public RUMOperationStrongLinkCreateRequestAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags associated with the strong link. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkCreateRequestAttributes + */ + @JsonAnySetter + public RUMOperationStrongLinkCreateRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkCreateRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkCreateRequestAttributes rumOperationStrongLinkCreateRequestAttributes = + (RUMOperationStrongLinkCreateRequestAttributes) o; + return Objects.equals( + this.applicationId, rumOperationStrongLinkCreateRequestAttributes.applicationId) + && Objects.equals( + this.description, rumOperationStrongLinkCreateRequestAttributes.description) + && Objects.equals(this.featureId, rumOperationStrongLinkCreateRequestAttributes.featureId) + && Objects.equals( + this.operationId, rumOperationStrongLinkCreateRequestAttributes.operationId) + && Objects.equals( + this.operationName, rumOperationStrongLinkCreateRequestAttributes.operationName) + && Objects.equals(this.status, rumOperationStrongLinkCreateRequestAttributes.status) + && Objects.equals(this.tags, rumOperationStrongLinkCreateRequestAttributes.tags) + && Objects.equals( + this.additionalProperties, + rumOperationStrongLinkCreateRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationId, + description, + featureId, + operationId, + operationName, + status, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkCreateRequestAttributes {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" featureId: ").append(toIndentedString(featureId)).append("\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" operationName: ").append(toIndentedString(operationName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequestData.java new file mode 100644 index 00000000000..0078cfb56a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkCreateRequestData.java @@ -0,0 +1,188 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object for creating a RUM operation strong link. */ +@JsonPropertyOrder({ + RUMOperationStrongLinkCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + RUMOperationStrongLinkCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RUMOperationStrongLinkCreateRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationStrongLinkType type; + + public RUMOperationStrongLinkCreateRequestData() {} + + @JsonCreator + public RUMOperationStrongLinkCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RUMOperationStrongLinkCreateRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationStrongLinkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationStrongLinkCreateRequestData attributes( + RUMOperationStrongLinkCreateRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a RUM operation strong link. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkCreateRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RUMOperationStrongLinkCreateRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RUMOperationStrongLinkCreateRequestData type(RUMOperationStrongLinkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for RUM operation strong link resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkType getType() { + return type; + } + + public void setType(RUMOperationStrongLinkType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkCreateRequestData + */ + @JsonAnySetter + public RUMOperationStrongLinkCreateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkCreateRequestData rumOperationStrongLinkCreateRequestData = + (RUMOperationStrongLinkCreateRequestData) o; + return Objects.equals(this.attributes, rumOperationStrongLinkCreateRequestData.attributes) + && Objects.equals(this.type, rumOperationStrongLinkCreateRequestData.type) + && Objects.equals( + this.additionalProperties, + rumOperationStrongLinkCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkCreateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponse.java new file mode 100644 index 00000000000..77d827fb67b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponse.java @@ -0,0 +1,151 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response for a single RUM operation strong link. */ +@JsonPropertyOrder({RUMOperationStrongLinkResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RUMOperationStrongLinkResponseData data; + + public RUMOperationStrongLinkResponse() {} + + @JsonCreator + public RUMOperationStrongLinkResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RUMOperationStrongLinkResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RUMOperationStrongLinkResponse data(RUMOperationStrongLinkResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object in a RUM operation strong link response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkResponseData getData() { + return data; + } + + public void setData(RUMOperationStrongLinkResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkResponse + */ + @JsonAnySetter + public RUMOperationStrongLinkResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkResponse rumOperationStrongLinkResponse = + (RUMOperationStrongLinkResponse) o; + return Objects.equals(this.data, rumOperationStrongLinkResponse.data) + && Objects.equals( + this.additionalProperties, rumOperationStrongLinkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponseAttributes.java new file mode 100644 index 00000000000..6a0c4683016 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponseAttributes.java @@ -0,0 +1,326 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a RUM operation strong link response. */ +@JsonPropertyOrder({ + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_CREATED_AT, + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_DESCRIPTION, + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_FEATURE_ID, + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_OPERATION_ID, + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_STATUS, + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_TAGS, + RUMOperationStrongLinkResponseAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private JsonNullable description = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FEATURE_ID = "feature_id"; + private String featureId; + + public static final String JSON_PROPERTY_OPERATION_ID = "operation_id"; + private String operationId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RUMOperationStrongLinkStatus status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private JsonNullable updatedAt = JsonNullable.undefined(); + + public RUMOperationStrongLinkResponseAttributes() {} + + @JsonCreator + public RUMOperationStrongLinkResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FEATURE_ID) String featureId, + @JsonProperty(required = true, value = JSON_PROPERTY_OPERATION_ID) String operationId, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + RUMOperationStrongLinkStatus status) { + this.featureId = featureId; + this.operationId = operationId; + this.status = status; + this.unparsed |= !status.isValid(); + } + + /** + * The timestamp when the strong link was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public RUMOperationStrongLinkResponseAttributes description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * A description of the strong link. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDescription() { + return description.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDescription_JsonNullable() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + public void setDescription_JsonNullable(JsonNullable description) { + this.description = description; + } + + public void setDescription(String description) { + this.description = JsonNullable.of(description); + } + + /** + * The unique identifier of the linked feature. + * + * @return featureId + */ + @JsonProperty(JSON_PROPERTY_FEATURE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFeatureId() { + return featureId; + } + + /** + * The unique identifier of the linked RUM operation. + * + * @return operationId + */ + @JsonProperty(JSON_PROPERTY_OPERATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOperationId() { + return operationId; + } + + public RUMOperationStrongLinkResponseAttributes status(RUMOperationStrongLinkStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of a RUM operation strong link. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkStatus getStatus() { + return status; + } + + public void setStatus(RUMOperationStrongLinkStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public RUMOperationStrongLinkResponseAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public RUMOperationStrongLinkResponseAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags associated with the strong link. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * The timestamp when the strong link was last updated. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getUpdatedAt() { + + if (updatedAt == null) { + updatedAt = JsonNullable.undefined(); + } + return updatedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUpdatedAt_JsonNullable() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + private void setUpdatedAt_JsonNullable(JsonNullable updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkResponseAttributes + */ + @JsonAnySetter + public RUMOperationStrongLinkResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkResponseAttributes rumOperationStrongLinkResponseAttributes = + (RUMOperationStrongLinkResponseAttributes) o; + return Objects.equals(this.createdAt, rumOperationStrongLinkResponseAttributes.createdAt) + && Objects.equals(this.description, rumOperationStrongLinkResponseAttributes.description) + && Objects.equals(this.featureId, rumOperationStrongLinkResponseAttributes.featureId) + && Objects.equals(this.operationId, rumOperationStrongLinkResponseAttributes.operationId) + && Objects.equals(this.status, rumOperationStrongLinkResponseAttributes.status) + && Objects.equals(this.tags, rumOperationStrongLinkResponseAttributes.tags) + && Objects.equals(this.updatedAt, rumOperationStrongLinkResponseAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, + rumOperationStrongLinkResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + featureId, + operationId, + status, + tags, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkResponseAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" featureId: ").append(toIndentedString(featureId)).append("\n"); + sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponseData.java new file mode 100644 index 00000000000..9207111acde --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkResponseData.java @@ -0,0 +1,207 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object in a RUM operation strong link response. */ +@JsonPropertyOrder({ + RUMOperationStrongLinkResponseData.JSON_PROPERTY_ATTRIBUTES, + RUMOperationStrongLinkResponseData.JSON_PROPERTY_ID, + RUMOperationStrongLinkResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RUMOperationStrongLinkResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationStrongLinkType type; + + public RUMOperationStrongLinkResponseData() {} + + @JsonCreator + public RUMOperationStrongLinkResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RUMOperationStrongLinkResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationStrongLinkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationStrongLinkResponseData attributes( + RUMOperationStrongLinkResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a RUM operation strong link response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RUMOperationStrongLinkResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * The unique identifier of the strong link, formatted as + * <operation_id>:<feature_id>. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public RUMOperationStrongLinkResponseData type(RUMOperationStrongLinkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for RUM operation strong link resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkType getType() { + return type; + } + + public void setType(RUMOperationStrongLinkType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkResponseData + */ + @JsonAnySetter + public RUMOperationStrongLinkResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkResponseData rumOperationStrongLinkResponseData = + (RUMOperationStrongLinkResponseData) o; + return Objects.equals(this.attributes, rumOperationStrongLinkResponseData.attributes) + && Objects.equals(this.id, rumOperationStrongLinkResponseData.id) + && Objects.equals(this.type, rumOperationStrongLinkResponseData.type) + && Objects.equals( + this.additionalProperties, rumOperationStrongLinkResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkStatus.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkStatus.java new file mode 100644 index 00000000000..be52a10db1d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkStatus.java @@ -0,0 +1,61 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The status of a RUM operation strong link. */ +@JsonSerialize(using = RUMOperationStrongLinkStatus.RUMOperationStrongLinkStatusSerializer.class) +public class RUMOperationStrongLinkStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("DRAFT", "CONFIRMED", "REJECTED")); + + public static final RUMOperationStrongLinkStatus DRAFT = + new RUMOperationStrongLinkStatus("DRAFT"); + public static final RUMOperationStrongLinkStatus CONFIRMED = + new RUMOperationStrongLinkStatus("CONFIRMED"); + public static final RUMOperationStrongLinkStatus REJECTED = + new RUMOperationStrongLinkStatus("REJECTED"); + + RUMOperationStrongLinkStatus(String value) { + super(value, allowedValues); + } + + public static class RUMOperationStrongLinkStatusSerializer + extends StdSerializer { + public RUMOperationStrongLinkStatusSerializer(Class t) { + super(t); + } + + public RUMOperationStrongLinkStatusSerializer() { + this(null); + } + + @Override + public void serialize( + RUMOperationStrongLinkStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMOperationStrongLinkStatus fromValue(String value) { + return new RUMOperationStrongLinkStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkType.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkType.java new file mode 100644 index 00000000000..4125fb0f95a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The JSON:API type for RUM operation strong link resources. */ +@JsonSerialize(using = RUMOperationStrongLinkType.RUMOperationStrongLinkTypeSerializer.class) +public class RUMOperationStrongLinkType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("strong_links")); + + public static final RUMOperationStrongLinkType STRONG_LINKS = + new RUMOperationStrongLinkType("strong_links"); + + RUMOperationStrongLinkType(String value) { + super(value, allowedValues); + } + + public static class RUMOperationStrongLinkTypeSerializer + extends StdSerializer { + public RUMOperationStrongLinkTypeSerializer(Class t) { + super(t); + } + + public RUMOperationStrongLinkTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RUMOperationStrongLinkType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMOperationStrongLinkType fromValue(String value) { + return new RUMOperationStrongLinkType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequest.java new file mode 100644 index 00000000000..c8a670ea4e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequest.java @@ -0,0 +1,151 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The request body for updating a RUM operation strong link. */ +@JsonPropertyOrder({RUMOperationStrongLinkUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RUMOperationStrongLinkUpdateRequestData data; + + public RUMOperationStrongLinkUpdateRequest() {} + + @JsonCreator + public RUMOperationStrongLinkUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RUMOperationStrongLinkUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RUMOperationStrongLinkUpdateRequest data(RUMOperationStrongLinkUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for updating a RUM operation strong link. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkUpdateRequestData getData() { + return data; + } + + public void setData(RUMOperationStrongLinkUpdateRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkUpdateRequest + */ + @JsonAnySetter + public RUMOperationStrongLinkUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkUpdateRequest rumOperationStrongLinkUpdateRequest = + (RUMOperationStrongLinkUpdateRequest) o; + return Objects.equals(this.data, rumOperationStrongLinkUpdateRequest.data) + && Objects.equals( + this.additionalProperties, rumOperationStrongLinkUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequestAttributes.java new file mode 100644 index 00000000000..addfe38bfba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequestAttributes.java @@ -0,0 +1,155 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for updating a RUM operation strong link. */ +@JsonPropertyOrder({RUMOperationStrongLinkUpdateRequestAttributes.JSON_PROPERTY_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkUpdateRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_STATUS = "status"; + private RUMOperationStrongLinkUpdateStatus status; + + public RUMOperationStrongLinkUpdateRequestAttributes() {} + + @JsonCreator + public RUMOperationStrongLinkUpdateRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + RUMOperationStrongLinkUpdateStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public RUMOperationStrongLinkUpdateRequestAttributes status( + RUMOperationStrongLinkUpdateStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of a RUM operation strong link. Can only be set to CONFIRMED or + * REJECTED. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkUpdateStatus getStatus() { + return status; + } + + public void setStatus(RUMOperationStrongLinkUpdateStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkUpdateRequestAttributes + */ + @JsonAnySetter + public RUMOperationStrongLinkUpdateRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkUpdateRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkUpdateRequestAttributes rumOperationStrongLinkUpdateRequestAttributes = + (RUMOperationStrongLinkUpdateRequestAttributes) o; + return Objects.equals(this.status, rumOperationStrongLinkUpdateRequestAttributes.status) + && Objects.equals( + this.additionalProperties, + rumOperationStrongLinkUpdateRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkUpdateRequestAttributes {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequestData.java new file mode 100644 index 00000000000..3b25103ab40 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateRequestData.java @@ -0,0 +1,188 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object for updating a RUM operation strong link. */ +@JsonPropertyOrder({ + RUMOperationStrongLinkUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, + RUMOperationStrongLinkUpdateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinkUpdateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RUMOperationStrongLinkUpdateRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationStrongLinkType type; + + public RUMOperationStrongLinkUpdateRequestData() {} + + @JsonCreator + public RUMOperationStrongLinkUpdateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RUMOperationStrongLinkUpdateRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationStrongLinkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationStrongLinkUpdateRequestData attributes( + RUMOperationStrongLinkUpdateRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating a RUM operation strong link. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkUpdateRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RUMOperationStrongLinkUpdateRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RUMOperationStrongLinkUpdateRequestData type(RUMOperationStrongLinkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for RUM operation strong link resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationStrongLinkType getType() { + return type; + } + + public void setType(RUMOperationStrongLinkType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinkUpdateRequestData + */ + @JsonAnySetter + public RUMOperationStrongLinkUpdateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinkUpdateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinkUpdateRequestData rumOperationStrongLinkUpdateRequestData = + (RUMOperationStrongLinkUpdateRequestData) o; + return Objects.equals(this.attributes, rumOperationStrongLinkUpdateRequestData.attributes) + && Objects.equals(this.type, rumOperationStrongLinkUpdateRequestData.type) + && Objects.equals( + this.additionalProperties, + rumOperationStrongLinkUpdateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinkUpdateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateStatus.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateStatus.java new file mode 100644 index 00000000000..420768cf292 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinkUpdateStatus.java @@ -0,0 +1,64 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The status of a RUM operation strong link. Can only be set to CONFIRMED or + * REJECTED. + */ +@JsonSerialize( + using = RUMOperationStrongLinkUpdateStatus.RUMOperationStrongLinkUpdateStatusSerializer.class) +public class RUMOperationStrongLinkUpdateStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("CONFIRMED", "REJECTED")); + + public static final RUMOperationStrongLinkUpdateStatus CONFIRMED = + new RUMOperationStrongLinkUpdateStatus("CONFIRMED"); + public static final RUMOperationStrongLinkUpdateStatus REJECTED = + new RUMOperationStrongLinkUpdateStatus("REJECTED"); + + RUMOperationStrongLinkUpdateStatus(String value) { + super(value, allowedValues); + } + + public static class RUMOperationStrongLinkUpdateStatusSerializer + extends StdSerializer { + public RUMOperationStrongLinkUpdateStatusSerializer( + Class t) { + super(t); + } + + public RUMOperationStrongLinkUpdateStatusSerializer() { + this(null); + } + + @Override + public void serialize( + RUMOperationStrongLinkUpdateStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMOperationStrongLinkUpdateStatus fromValue(String value) { + return new RUMOperationStrongLinkUpdateStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinksListResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinksListResponse.java new file mode 100644 index 00000000000..1fa27121f0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinksListResponse.java @@ -0,0 +1,199 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response for a list of RUM operation strong links. */ +@JsonPropertyOrder({ + RUMOperationStrongLinksListResponse.JSON_PROPERTY_DATA, + RUMOperationStrongLinksListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinksListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private RUMOperationStrongLinksListResponseMeta meta; + + public RUMOperationStrongLinksListResponse() {} + + @JsonCreator + public RUMOperationStrongLinksListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (RUMOperationStrongLinkResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public RUMOperationStrongLinksListResponse data(List data) { + this.data = data; + for (RUMOperationStrongLinkResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RUMOperationStrongLinksListResponse addDataItem( + RUMOperationStrongLinkResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (RUMOperationStrongLinkResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public RUMOperationStrongLinksListResponse meta(RUMOperationStrongLinksListResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for a list of RUM operation strong links. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationStrongLinksListResponseMeta getMeta() { + return meta; + } + + public void setMeta(RUMOperationStrongLinksListResponseMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinksListResponse + */ + @JsonAnySetter + public RUMOperationStrongLinksListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinksListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinksListResponse rumOperationStrongLinksListResponse = + (RUMOperationStrongLinksListResponse) o; + return Objects.equals(this.data, rumOperationStrongLinksListResponse.data) + && Objects.equals(this.meta, rumOperationStrongLinksListResponse.meta) + && Objects.equals( + this.additionalProperties, rumOperationStrongLinksListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinksListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinksListResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinksListResponseMeta.java new file mode 100644 index 00000000000..650c92d2477 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationStrongLinksListResponseMeta.java @@ -0,0 +1,194 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Metadata for a list of RUM operation strong links. */ +@JsonPropertyOrder({ + RUMOperationStrongLinksListResponseMeta.JSON_PROPERTY_LIMIT, + RUMOperationStrongLinksListResponseMeta.JSON_PROPERTY_OFFSET, + RUMOperationStrongLinksListResponseMeta.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationStrongLinksListResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Long offset; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Long total; + + public RUMOperationStrongLinksListResponseMeta limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * The pagination limit. + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public RUMOperationStrongLinksListResponseMeta offset(Long offset) { + this.offset = offset; + return this; + } + + /** + * The current offset. + * + * @return offset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public RUMOperationStrongLinksListResponseMeta total(Long total) { + this.total = total; + return this; + } + + /** + * The total number of strong links matching the request. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotal() { + return total; + } + + public void setTotal(Long total) { + this.total = total; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationStrongLinksListResponseMeta + */ + @JsonAnySetter + public RUMOperationStrongLinksListResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationStrongLinksListResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationStrongLinksListResponseMeta rumOperationStrongLinksListResponseMeta = + (RUMOperationStrongLinksListResponseMeta) o; + return Objects.equals(this.limit, rumOperationStrongLinksListResponseMeta.limit) + && Objects.equals(this.offset, rumOperationStrongLinksListResponseMeta.offset) + && Objects.equals(this.total, rumOperationStrongLinksListResponseMeta.total) + && Objects.equals( + this.additionalProperties, + rumOperationStrongLinksListResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(limit, offset, total, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationStrongLinksListResponseMeta {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationType.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationType.java new file mode 100644 index 00000000000..ead141fad93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationType.java @@ -0,0 +1,53 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The JSON:API type for RUM operation resources. */ +@JsonSerialize(using = RUMOperationType.RUMOperationTypeSerializer.class) +public class RUMOperationType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("operations")); + + public static final RUMOperationType OPERATIONS = new RUMOperationType("operations"); + + RUMOperationType(String value) { + super(value, allowedValues); + } + + public static class RUMOperationTypeSerializer extends StdSerializer { + public RUMOperationTypeSerializer(Class t) { + super(t); + } + + public RUMOperationTypeSerializer() { + this(null); + } + + @Override + public void serialize(RUMOperationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMOperationType fromValue(String value) { + return new RUMOperationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationUpdateRequest.java new file mode 100644 index 00000000000..491ad3d3a8b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationUpdateRequest.java @@ -0,0 +1,150 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The request body for updating a RUM operation. */ +@JsonPropertyOrder({RUMOperationUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RUMOperationUpdateRequestData data; + + public RUMOperationUpdateRequest() {} + + @JsonCreator + public RUMOperationUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RUMOperationUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RUMOperationUpdateRequest data(RUMOperationUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for updating a RUM operation. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationUpdateRequestData getData() { + return data; + } + + public void setData(RUMOperationUpdateRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationUpdateRequest + */ + @JsonAnySetter + public RUMOperationUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationUpdateRequest rumOperationUpdateRequest = (RUMOperationUpdateRequest) o; + return Objects.equals(this.data, rumOperationUpdateRequest.data) + && Objects.equals( + this.additionalProperties, rumOperationUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationUpdateRequestData.java new file mode 100644 index 00000000000..6ba8298dda5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationUpdateRequestData.java @@ -0,0 +1,213 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object for updating a RUM operation. */ +@JsonPropertyOrder({ + RUMOperationUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, + RUMOperationUpdateRequestData.JSON_PROPERTY_ID, + RUMOperationUpdateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationUpdateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RUMOperationRequestAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RUMOperationType type; + + public RUMOperationUpdateRequestData() {} + + @JsonCreator + public RUMOperationUpdateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RUMOperationRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RUMOperationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RUMOperationUpdateRequestData attributes(RUMOperationRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a RUM operation. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RUMOperationRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RUMOperationUpdateRequestData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the RUM operation. Must match the ID in the URL path. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RUMOperationUpdateRequestData type(RUMOperationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for RUM operation resources. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RUMOperationType getType() { + return type; + } + + public void setType(RUMOperationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationUpdateRequestData + */ + @JsonAnySetter + public RUMOperationUpdateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationUpdateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationUpdateRequestData rumOperationUpdateRequestData = (RUMOperationUpdateRequestData) o; + return Objects.equals(this.attributes, rumOperationUpdateRequestData.attributes) + && Objects.equals(this.id, rumOperationUpdateRequestData.id) + && Objects.equals(this.type, rumOperationUpdateRequestData.type) + && Objects.equals( + this.additionalProperties, rumOperationUpdateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationUpdateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationUser.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationUser.java new file mode 100644 index 00000000000..903b2177e59 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationUser.java @@ -0,0 +1,182 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A Datadog user referenced by a RUM operation. */ +@JsonPropertyOrder({ + RUMOperationUser.JSON_PROPERTY_EMAIL, + RUMOperationUser.JSON_PROPERTY_HANDLE, + RUMOperationUser.JSON_PROPERTY_NAME, + RUMOperationUser.JSON_PROPERTY_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + /** + * The email of the user. + * + * @return email + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + /** + * The handle of the user. + * + * @return handle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } + + /** + * The name of the user. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The UUID of the user. + * + * @return uuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUuid() { + return uuid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationUser + */ + @JsonAnySetter + public RUMOperationUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationUser rumOperationUser = (RUMOperationUser) o; + return Objects.equals(this.email, rumOperationUser.email) + && Objects.equals(this.handle, rumOperationUser.handle) + && Objects.equals(this.name, rumOperationUser.name) + && Objects.equals(this.uuid, rumOperationUser.uuid) + && Objects.equals(this.additionalProperties, rumOperationUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, handle, name, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationUser {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponse.java new file mode 100644 index 00000000000..6c5f36b4a6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponse.java @@ -0,0 +1,197 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response for a list of RUM operations. */ +@JsonPropertyOrder({ + RUMOperationsListResponse.JSON_PROPERTY_DATA, + RUMOperationsListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationsListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private RUMOperationsListResponseMeta meta; + + public RUMOperationsListResponse() {} + + @JsonCreator + public RUMOperationsListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (RUMOperationResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public RUMOperationsListResponse data(List data) { + this.data = data; + for (RUMOperationResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RUMOperationsListResponse addDataItem(RUMOperationResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (RUMOperationResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public RUMOperationsListResponse meta(RUMOperationsListResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for a list of RUM operations. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationsListResponseMeta getMeta() { + return meta; + } + + public void setMeta(RUMOperationsListResponseMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationsListResponse + */ + @JsonAnySetter + public RUMOperationsListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationsListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationsListResponse rumOperationsListResponse = (RUMOperationsListResponse) o; + return Objects.equals(this.data, rumOperationsListResponse.data) + && Objects.equals(this.meta, rumOperationsListResponse.meta) + && Objects.equals( + this.additionalProperties, rumOperationsListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponseMeta.java new file mode 100644 index 00000000000..fc30b5a7c5a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponseMeta.java @@ -0,0 +1,140 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Metadata for a list of RUM operations. */ +@JsonPropertyOrder({RUMOperationsListResponseMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationsListResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private RUMOperationsListResponseMetaPage page; + + public RUMOperationsListResponseMeta page(RUMOperationsListResponseMetaPage page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Pagination metadata for a list of RUM operations. + * + * @return page + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMOperationsListResponseMetaPage getPage() { + return page; + } + + public void setPage(RUMOperationsListResponseMetaPage page) { + this.page = page; + if (page != null) { + this.unparsed |= page.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationsListResponseMeta + */ + @JsonAnySetter + public RUMOperationsListResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationsListResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationsListResponseMeta rumOperationsListResponseMeta = (RUMOperationsListResponseMeta) o; + return Objects.equals(this.page, rumOperationsListResponseMeta.page) + && Objects.equals( + this.additionalProperties, rumOperationsListResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationsListResponseMeta {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponseMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponseMetaPage.java new file mode 100644 index 00000000000..731a0ebe647 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMOperationsListResponseMetaPage.java @@ -0,0 +1,358 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Pagination metadata for a list of RUM operations. */ +@JsonPropertyOrder({ + RUMOperationsListResponseMetaPage.JSON_PROPERTY_FIRST_OFFSET, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_LAST_OFFSET, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_LIMIT, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_NEXT_OFFSET, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_OFFSET, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_PREV_OFFSET, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_TOTAL, + RUMOperationsListResponseMetaPage.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMOperationsListResponseMetaPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIRST_OFFSET = "first_offset"; + private Long firstOffset; + + public static final String JSON_PROPERTY_LAST_OFFSET = "last_offset"; + private Long lastOffset; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_NEXT_OFFSET = "next_offset"; + private JsonNullable nextOffset = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Long offset; + + public static final String JSON_PROPERTY_PREV_OFFSET = "prev_offset"; + private JsonNullable prevOffset = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Long total; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public RUMOperationsListResponseMetaPage firstOffset(Long firstOffset) { + this.firstOffset = firstOffset; + return this; + } + + /** + * The offset of the first page. + * + * @return firstOffset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFirstOffset() { + return firstOffset; + } + + public void setFirstOffset(Long firstOffset) { + this.firstOffset = firstOffset; + } + + public RUMOperationsListResponseMetaPage lastOffset(Long lastOffset) { + this.lastOffset = lastOffset; + return this; + } + + /** + * The offset of the last page. + * + * @return lastOffset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastOffset() { + return lastOffset; + } + + public void setLastOffset(Long lastOffset) { + this.lastOffset = lastOffset; + } + + public RUMOperationsListResponseMetaPage limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * The pagination limit. + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public RUMOperationsListResponseMetaPage nextOffset(Long nextOffset) { + this.nextOffset = JsonNullable.of(nextOffset); + return this; + } + + /** + * The offset of the next page, if any. + * + * @return nextOffset + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getNextOffset() { + return nextOffset.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNextOffset_JsonNullable() { + return nextOffset; + } + + @JsonProperty(JSON_PROPERTY_NEXT_OFFSET) + public void setNextOffset_JsonNullable(JsonNullable nextOffset) { + this.nextOffset = nextOffset; + } + + public void setNextOffset(Long nextOffset) { + this.nextOffset = JsonNullable.of(nextOffset); + } + + public RUMOperationsListResponseMetaPage offset(Long offset) { + this.offset = offset; + return this; + } + + /** + * The current offset. + * + * @return offset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public RUMOperationsListResponseMetaPage prevOffset(Long prevOffset) { + this.prevOffset = JsonNullable.of(prevOffset); + return this; + } + + /** + * The offset of the previous page, if any. + * + * @return prevOffset + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getPrevOffset() { + return prevOffset.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREV_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrevOffset_JsonNullable() { + return prevOffset; + } + + @JsonProperty(JSON_PROPERTY_PREV_OFFSET) + public void setPrevOffset_JsonNullable(JsonNullable prevOffset) { + this.prevOffset = prevOffset; + } + + public void setPrevOffset(Long prevOffset) { + this.prevOffset = JsonNullable.of(prevOffset); + } + + public RUMOperationsListResponseMetaPage total(Long total) { + this.total = total; + return this; + } + + /** + * The total number of RUM operations matching the search. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotal() { + return total; + } + + public void setTotal(Long total) { + this.total = total; + } + + public RUMOperationsListResponseMetaPage type(String type) { + this.type = type; + return this; + } + + /** + * The type of pagination used. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMOperationsListResponseMetaPage + */ + @JsonAnySetter + public RUMOperationsListResponseMetaPage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMOperationsListResponseMetaPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMOperationsListResponseMetaPage rumOperationsListResponseMetaPage = + (RUMOperationsListResponseMetaPage) o; + return Objects.equals(this.firstOffset, rumOperationsListResponseMetaPage.firstOffset) + && Objects.equals(this.lastOffset, rumOperationsListResponseMetaPage.lastOffset) + && Objects.equals(this.limit, rumOperationsListResponseMetaPage.limit) + && Objects.equals(this.nextOffset, rumOperationsListResponseMetaPage.nextOffset) + && Objects.equals(this.offset, rumOperationsListResponseMetaPage.offset) + && Objects.equals(this.prevOffset, rumOperationsListResponseMetaPage.prevOffset) + && Objects.equals(this.total, rumOperationsListResponseMetaPage.total) + && Objects.equals(this.type, rumOperationsListResponseMetaPage.type) + && Objects.equals( + this.additionalProperties, rumOperationsListResponseMetaPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + firstOffset, + lastOffset, + limit, + nextOffset, + offset, + prevOffset, + total, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMOperationsListResponseMetaPage {\n"); + sb.append(" firstOffset: ").append(toIndentedString(firstOffset)).append("\n"); + sb.append(" lastOffset: ").append(toIndentedString(lastOffset)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" nextOffset: ").append(toIndentedString(nextOffset)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" prevOffset: ").append(toIndentedString(prevOffset)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_operations.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_operations.feature new file mode 100644 index 00000000000..e2e2043ed77 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/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": "abc12345-1234-5678-abcd-ef1234567890", "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": "abc12345-1234-5678-abcd-ef1234567890", "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": "abc12345-1234-5678-abcd-ef1234567890", "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": "abc12345-1234-5678-abcd-ef1234567890", "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": "abc12345-1234-5678-abcd-ef1234567890", "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": "abc12345-1234-5678-abcd-ef1234567890", "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": "abc12345-1234-5678-abcd-ef1234567890", "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/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 2a7fb64a0a9..5218885f7c5 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -6966,6 +6966,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": {