diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2f8393d08b0..5221d14e9f4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -33171,6 +33171,827 @@ components: type: string x-enum-varnames: - DELETE_TESTS + DemBatchGetJourneysAttributes: + description: Attributes for a batch get journeys request. + properties: + test_suite_ids: + $ref: '#/components/schemas/DemTestSuiteIDs' + required: + - test_suite_ids + type: object + DemBatchGetJourneysData: + description: Data object for a batch get journeys request. + properties: + attributes: + $ref: '#/components/schemas/DemBatchGetJourneysAttributes' + type: + $ref: '#/components/schemas/DemBatchGetJourneysRequestType' + required: + - type + - attributes + type: object + DemBatchGetJourneysRequest: + description: Request body for retrieving DEM journeys by test suite IDs. + properties: + data: + $ref: "#/components/schemas/DemBatchGetJourneysData" + example: + attributes: + test_suite_ids: + - "suite-abc123" + - "suite-def456" + type: "batch_get_journeys_by_test_suite_ids_request" + required: + - data + type: object + DemBatchGetJourneysRequestType: + description: The resource type for a request to retrieve DEM journeys by test suite IDs. + enum: + - batch_get_journeys_by_test_suite_ids_request + example: batch_get_journeys_by_test_suite_ids_request + type: string + x-enum-varnames: + - BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST + DemCreateJourneyTestSuiteAttributes: + description: Attributes for creating a test suite for a DEM journey. + properties: + include_tests_from_journey_coverage: + description: Whether to populate the test suite based on journey coverage data. + example: true + nullable: true + type: boolean + test_suite_name: + description: An optional custom name for the auto-created test suite. + example: "My Custom Suite" + nullable: true + type: string + type: object + DemCreateJourneyTestSuiteData: + description: Data object for a create test suite request. + properties: + attributes: + $ref: '#/components/schemas/DemCreateJourneyTestSuiteAttributes' + type: + $ref: '#/components/schemas/DemCreateJourneyTestSuiteRequestType' + required: + - type + type: object + DemCreateJourneyTestSuiteRequest: + description: Request body for creating a test suite for a DEM journey. + properties: + data: + $ref: "#/components/schemas/DemCreateJourneyTestSuiteData" + example: + attributes: + test_suite_name: "My Custom Suite" + type: "create_test_suite_for_journey_request" + required: + - data + type: object + DemCreateJourneyTestSuiteRequestType: + description: The resource type for a request to create a DEM journey test suite. + enum: + - create_test_suite_for_journey_request + example: create_test_suite_for_journey_request + type: string + x-enum-varnames: + - CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST + DemInferredJourneyCandidateAttributes: + description: Attributes of an inferred journey candidate. + properties: + created_at: + description: Timestamp when the inferred journey was first observed. + example: "2024-01-15T10:30:00Z" + format: date-time + readOnly: true + type: string + description: + description: An optional description of the inferred journey. + example: + nullable: true + type: string + journey_rum: + $ref: '#/components/schemas/DemJourneyRum' + name: + description: The name of the inferred journey. + example: "Checkout Flow" + type: string + org_id: + description: The organization ID that owns this inferred journey. + example: 12345 + format: int64 + readOnly: true + type: integer + rank: + description: Ranking score of the inferred journey candidate. + example: 1 + format: int64 + nullable: true + readOnly: true + type: integer + tags: + $ref: '#/components/schemas/DemTags' + test_suite: + $ref: "#/components/schemas/DemTestSuiteNested" + nullable: true + readOnly: true + variants: + $ref: '#/components/schemas/DemVariants' + required: + - name + - tags + - org_id + - journey_rum + - variants + - created_at + type: object + DemInferredJourneyCandidateData: + description: Data object for an inferred journey candidate. + properties: + attributes: + $ref: '#/components/schemas/DemInferredJourneyCandidateAttributes' + id: + description: The unique identifier of the inferred journey. + example: "inferred-journey-abc123" + type: string + type: + $ref: '#/components/schemas/DemJourneyType' + required: + - id + - type + - attributes + type: object + DemInferredJourneyIgnoredAttributes: + description: Attributes of an ignored inferred journey. + properties: + created_at: + description: Timestamp when the inferred journey was first observed. + example: "2024-01-15T10:30:00Z" + format: date-time + readOnly: true + type: string + description: + description: An optional description of the inferred journey. + example: + nullable: true + type: string + ignored_at: + description: Timestamp when the inferred journey was ignored. + example: "2024-01-15T10:30:00Z" + format: date-time + readOnly: true + type: string + journey_rum: + $ref: '#/components/schemas/DemJourneyRum' + name: + description: The name of the inferred journey. + example: "Checkout Flow" + type: string + org_id: + description: The organization ID that owns this inferred journey. + example: 12345 + format: int64 + readOnly: true + type: integer + tags: + $ref: '#/components/schemas/DemTags' + test_suite: + $ref: "#/components/schemas/DemTestSuiteNested" + nullable: true + readOnly: true + variants: + $ref: '#/components/schemas/DemVariants' + required: + - name + - tags + - org_id + - journey_rum + - variants + - ignored_at + - created_at + type: object + DemInferredJourneyIgnoredData: + description: Data object for an ignored inferred journey. + properties: + attributes: + $ref: '#/components/schemas/DemInferredJourneyIgnoredAttributes' + id: + description: The unique identifier of the ignored inferred journey. + example: "inferred-journey-abc123" + type: string + type: + $ref: '#/components/schemas/DemJourneyType' + required: + - id + - type + - attributes + type: object + DemInferredJourneyStatus: + default: candidate + description: The status of an inferred DEM journey. + enum: + - candidate + - ignored + example: candidate + type: string + x-enum-varnames: + - CANDIDATE + - IGNORED + DemJourneyCreateAttributes: + description: Attributes for creating or updating a DEM journey. + properties: + description: + description: An optional human-readable description of the journey. + example: "Tracks the user checkout flow from cart to confirmation." + type: string + journey_rum: + $ref: '#/components/schemas/DemJourneyRum' + name: + description: The name of the DEM journey. + example: "Checkout Flow" + type: string + tags: + $ref: '#/components/schemas/DemTags' + variants: + $ref: '#/components/schemas/DemVariants' + required: + - name + - tags + - journey_rum + type: object + DemJourneyCreateData: + description: Data object for a DEM journey create or update request. + properties: + attributes: + $ref: '#/components/schemas/DemJourneyCreateAttributes' + type: + $ref: '#/components/schemas/DemJourneyType' + required: + - type + - attributes + type: object + DemJourneyCreateRequest: + description: Request body for creating or updating a DEM journey. + properties: + data: + $ref: "#/components/schemas/DemJourneyCreateData" + example: + attributes: + journey_rum: + rum_steps: + - nodes: + - query: "action.name:'checkout'" + type: start + - nodes: + - query: "action.name:'confirmation'" + type: stop + name: "Checkout Flow" + tags: + - "team:synthetics" + type: journeys + required: + - data + type: object + DemJourneyResponse: + description: Response body for a single DEM journey. + properties: + data: + $ref: '#/components/schemas/DemJourneyResponseData' + required: + - data + type: object + DemJourneyResponseAttributes: + description: Attributes returned in a DEM journey response. + properties: + created_at: + description: The timestamp when the journey was created. + example: "2024-01-15T10:30:00Z" + format: date-time + readOnly: true + type: string + created_by: + $ref: "#/components/schemas/DemUser" + nullable: true + readOnly: true + description: + description: An optional human-readable description of the journey. + example: "Tracks the user checkout flow from cart to confirmation." + nullable: true + type: string + journey_rum: + $ref: '#/components/schemas/DemJourneyRum' + name: + description: The name of the DEM journey. + example: "Checkout Flow" + type: string + org_id: + description: The organization ID that owns this journey. + example: 12345 + format: int64 + readOnly: true + type: integer + tags: + $ref: '#/components/schemas/DemTags' + test_suite: + $ref: "#/components/schemas/DemTestSuiteNested" + nullable: true + readOnly: true + updated_at: + description: The timestamp when the journey was last updated. + example: "2024-01-16T08:00:00Z" + format: date-time + nullable: true + readOnly: true + type: string + updated_by: + $ref: "#/components/schemas/DemUser" + nullable: true + readOnly: true + variants: + $ref: '#/components/schemas/DemVariants' + required: + - name + - description + - tags + - org_id + - journey_rum + - test_suite + - variants + - created_by + - created_at + - updated_by + - updated_at + type: object + DemJourneyResponseData: + description: Data object in a DEM journey response. + properties: + attributes: + $ref: '#/components/schemas/DemJourneyResponseAttributes' + id: + description: The unique identifier of the DEM journey. + example: "journey-abc123" + type: string + type: + $ref: '#/components/schemas/DemJourneyType' + required: + - id + - type + - attributes + type: object + DemJourneyRum: + description: The RUM definition for a DEM journey. + properties: + filter: + description: An optional RUM query filter applied to the entire journey. + example: "env:prod" + type: string + rum_steps: + $ref: "#/components/schemas/DemRumSteps" + example: + - nodes: + - query: "action.name:'checkout'" + type: start + - nodes: + - query: "action.name:'confirmation'" + type: stop + variants: + $ref: '#/components/schemas/DemVariants' + required: + - rum_steps + type: object + DemJourneyTestSuiteResponse: + description: Response body for a DEM journey test suite. + properties: + data: + $ref: '#/components/schemas/DemJourneyTestSuiteResponseData' + required: + - data + type: object + DemJourneyTestSuiteResponseAttributes: + description: Attributes of a DEM journey test suite response. + properties: + created_at: + description: The timestamp when the test suite was created. + example: "2024-01-15T10:30:00Z" + format: date-time + readOnly: true + type: string + dropped_test_ids: + description: Test IDs omitted because the caller lacks read access. + items: + type: string + type: array + name: + description: The name of the test suite. + example: "Checkout Flow Suite" + type: string + required: + - name + - created_at + type: object + DemJourneyTestSuiteResponseData: + description: Data object in a DEM test suite response. + properties: + attributes: + $ref: '#/components/schemas/DemJourneyTestSuiteResponseAttributes' + id: + description: The public ID of the test suite. + example: "suite-abc123" + type: string + type: + $ref: '#/components/schemas/DemJourneyTestSuiteType' + required: + - id + - type + - attributes + type: object + DemJourneyTestSuiteType: + description: The type identifier for DEM journey test suites. + enum: + - journey_test_suite + example: journey_test_suite + type: string + x-enum-varnames: + - JOURNEY_TEST_SUITE + DemJourneyType: + description: The type identifier for DEM journeys. + enum: + - journeys + example: journeys + type: string + x-enum-varnames: + - JOURNEYS + DemJourneysListData: + description: List of DEM journey data objects. + items: + $ref: '#/components/schemas/DemJourneyResponseData' + type: array + DemJourneysListResponse: + description: Response body for a list of DEM journeys. + properties: + data: + $ref: "#/components/schemas/DemJourneysListData" + example: + - attributes: + created_at: "2024-01-15T10:30:00Z" + created_by: + email: "jane.doe@example.com" + handle: "jane.doe" + name: "Jane Doe" + uuid: "00000000-0000-0000-0000-000000000001" + description: "Tracks checkout flow." + journey_rum: + rum_steps: + - nodes: + - query: "action.name:'checkout'" + type: start + - nodes: + - query: "action.name:'confirmation'" + type: stop + name: "Checkout Flow" + org_id: 12345 + tags: + - "team:synthetics" + test_suite: + updated_at: + updated_by: + variants: [] + id: "journey-abc123" + type: journeys + required: + - data + type: object + DemRecommendedTestAttributes: + description: Attributes of an AI-recommended synthetic test for a DEM journey. + properties: + config: + $ref: '#/components/schemas/DemRecommendedTestConfig' + created_at: + description: The time when the recommendation was generated. + example: "2026-08-31T16:00:00Z" + format: date-time + type: string + name: + description: The display name of the recommended test. + example: "Checkout journey" + type: string + result_id: + description: The identifier of the validating sample run, when available. + example: "result-abc123" + type: string + session_id: + description: The RUM session identifier for the validating sample run, when available. + example: "session-abc123" + type: string + source: + description: The pipeline that produced the recommendation. + example: gbt + type: string + type: + description: The type of synthetic test. + example: browser + type: string + variant_id: + description: The variant associated with the recommendation, when applicable. + example: "variant-001" + type: string + required: + - type + - name + - source + - config + - created_at + type: object + DemRecommendedTestConfig: + additionalProperties: {} + description: The browser test configuration that can be used to create the recommended test. + example: + name: "Checkout journey" + type: browser + type: object + DemRecommendedTestData: + description: Data object for a recommended synthetic test. + properties: + attributes: + $ref: '#/components/schemas/DemRecommendedTestAttributes' + id: + description: The identifier of the journey associated with the recommendation. + example: "journey-abc123" + type: string + type: + $ref: '#/components/schemas/DemRecommendedTestType' + required: + - id + - type + - attributes + type: object + DemRecommendedTestType: + description: The type identifier for a recommended synthetic test. + enum: + - recommended_tests + example: recommended_tests + type: string + x-enum-varnames: + - RECOMMENDED_TESTS + DemRecommendedTests: + description: Recommended synthetic tests for a DEM journey. + items: + $ref: '#/components/schemas/DemRecommendedTestData' + type: array + DemRecommendedTestsResponse: + description: Response containing recommended synthetic tests for a DEM journey. + properties: + data: + $ref: '#/components/schemas/DemRecommendedTests' + required: + - data + type: object + DemRumNode: + description: A RUM node within a journey step. + properties: + app_id: + description: The application ID associated with this node. + example: "app-xyz789" + type: string + id: + description: The ID of the RUM node element. + example: "element-id-123" + type: string + query: + description: The RUM query for matching this node. + example: "action.name:'checkout'" + type: string + required: + - query + type: object + DemRumNodes: + description: List of RUM nodes within a journey step. + example: + - query: "action.name:'checkout'" + items: + $ref: '#/components/schemas/DemRumNode' + type: array + DemRumStep: + description: A single step in a RUM journey definition. + properties: + nodes: + $ref: "#/components/schemas/DemRumNodes" + example: + - query: "action.name:'checkout'" + type: + $ref: '#/components/schemas/DemRumStepType' + required: + - type + - nodes + type: object + DemRumStepType: + description: The type of a RUM journey step. + enum: + - start + - stop + - step + example: start + type: string + x-enum-varnames: + - START + - STOP + - STEP + DemRumSteps: + description: List of RUM journey steps. + example: + - nodes: + - query: "action.name:'checkout'" + type: start + - nodes: + - query: "action.name:'confirmation'" + type: stop + items: + $ref: '#/components/schemas/DemRumStep' + type: array + DemSearchInferredJourneysResponse: + description: >- + Response body for searching inferred journeys. Contains either candidate or ignored items depending on the `status` query parameter. + properties: + data: + description: List of inferred journey items matching the search criteria. + items: + anyOf: + - $ref: '#/components/schemas/DemInferredJourneyCandidateData' + - $ref: '#/components/schemas/DemInferredJourneyIgnoredData' + description: A single inferred journey item, either a candidate or an ignored journey. + type: array + required: + - data + type: object + DemTags: + description: List of tags associated with a DEM resource. + example: + - "team:synthetics" + - "env:prod" + items: + description: A tag in the format `key:value`. + type: string + type: array + DemTestSuiteIDs: + description: List of test suite IDs. + example: + - "suite-abc123" + - "suite-def456" + items: + description: A test suite ID. + type: string + type: array + DemTestSuiteNested: + description: A test suite associated with a DEM resource. + properties: + id: + description: The ID of the test suite. + example: "suite-abc123" + type: string + name: + description: The name of the test suite. + example: "My Journey Suite" + type: string + required: + - id + - name + type: object + DemUser: + description: A Datadog user associated with a DEM operation. + properties: + email: + description: The email address of the user. + example: "jane.doe@example.com" + type: string + handle: + description: The handle of the user. + example: "jane.doe" + type: string + name: + description: The display name of the user. + example: "Jane Doe" + type: string + uuid: + description: The UUID of the user. + example: "00000000-0000-0000-0000-000000000001" + type: string + required: + - uuid + - name + - email + - handle + type: object + DemVariant: + description: A variant (sub-funnel) of a DEM journey with its own steps. + properties: + filter: + description: An optional RUM query filter to scope this variant. + example: "device.type:mobile" + type: string + id: + description: The unique identifier of the variant. + example: "variant-001" + readOnly: true + type: string + name: + description: The name of the variant. + example: "Mobile checkout" + type: string + rum_steps: + $ref: "#/components/schemas/DemRumSteps" + example: + - nodes: + - query: "action.name:'checkout'" + type: start + - nodes: + - query: "action.name:'confirmation'" + type: stop + required: + - name + - rum_steps + type: object + DemVariantAttributes: + description: Attributes of a DEM journey variant. + properties: + filter: + description: An optional RUM query filter to scope this variant. + example: "device.type:mobile" + type: string + name: + description: The name of the variant. + example: "Mobile checkout" + type: string + rum_steps: + $ref: '#/components/schemas/DemRumSteps' + required: + - name + - rum_steps + type: object + DemVariantRequest: + description: Request to create or update a DEM journey variant. + properties: + data: + $ref: '#/components/schemas/DemVariantRequestData' + required: + - data + type: object + DemVariantRequestData: + description: Data object for a DEM journey variant request. + properties: + attributes: + $ref: '#/components/schemas/DemVariantAttributes' + type: + $ref: '#/components/schemas/DemVariantType' + required: + - type + - attributes + type: object + DemVariantResponse: + description: Response containing a DEM journey variant. + properties: + data: + $ref: '#/components/schemas/DemVariantResponseData' + required: + - data + type: object + DemVariantResponseData: + description: Data object returned for a DEM journey variant. + properties: + attributes: + $ref: '#/components/schemas/DemVariantAttributes' + id: + description: The unique identifier of the variant. + example: "variant-001" + type: string + type: + $ref: '#/components/schemas/DemVariantType' + required: + - id + - type + - attributes + type: object + DemVariantType: + description: The type identifier for DEM journey variants. + enum: + - variants + example: variants + type: string + x-enum-varnames: + - VARIANTS + DemVariants: + description: List of variants associated with a DEM journey. + example: + - name: "Mobile checkout" + rum_steps: + - nodes: + - query: "action.name:'checkout'" + type: start + - nodes: + - query: "action.name:'confirmation'" + type: stop + items: + $ref: '#/components/schemas/DemVariant' + type: array DependencyLocation: description: Static library vulnerability location. properties: @@ -146391,6 +147212,916 @@ paths: operator: OR permissions: - logs_delete_data + /api/v2/dem/journeys: + post: + description: Create a DEM journey. + operationId: CreateJourney + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Tracks the user checkout flow from cart to confirmation. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + tags: + - team:synthetics + type: journeys + schema: + $ref: '#/components/schemas/DemJourneyCreateRequest' + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: 00000000-0000-0000-0000-000000000001 + description: Tracks checkout flow. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 12345 + tags: + - team:synthetics + test_suite: + updated_at: + updated_by: + variants: [] + id: journey-abc123 + type: journeys + schema: + $ref: '#/components/schemas/DemJourneyResponse' + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/dem/journeys/inferred/ignored/{journey_id}: + delete: + description: Remove an ignored inferred DEM journey, making it eligible to appear as a candidate again. + operationId: DeleteIgnoredInferredJourney + parameters: + - description: The unique identifier of the ignored inferred journey to delete. + example: inferred-abc123 + in: path + name: journey_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 an ignored inferred DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/dem/journeys/inferred/search: + get: + description: >- + Search for inferred DEM journeys by status. Returns candidates (status=candidate, the default) or ignored journeys (status=ignored). Supports optional fuzzy name filtering and app ID filtering. + operationId: SearchInferredJourneys + parameters: + - description: >- + Filter by inferred journey status. Use `candidate` (default) to retrieve journeys suggested for promotion, or `ignored` to retrieve journeys that have been dismissed. + in: query + name: status + required: false + schema: + $ref: '#/components/schemas/DemInferredJourneyStatus' + - description: Fuzzy search query to filter inferred journeys by name. + in: query + name: q + required: false + schema: + type: string + - description: Filter inferred journeys by application ID. + in: query + name: app_id + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + candidates: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + description: + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 12345 + rank: 1 + tags: + - team:synthetics + test_suite: + variants: [] + id: inferred-abc123 + type: journeys + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 123 + rank: 1 + tags: + - team:synthetics + variants: [] + id: inferred-abc123 + type: journeys + ignored: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + description: + ignored_at: "2024-01-16T08:00:00Z" + journey_rum: + rum_steps: + - nodes: + - query: action.name:'login' + type: start + - nodes: + - query: action.name:'dashboard' + type: stop + name: Login Flow + org_id: 12345 + tags: + - team:synthetics + test_suite: + variants: [] + id: inferred-def456 + type: journeys + schema: + $ref: '#/components/schemas/DemSearchInferredJourneysResponse' + 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: Search inferred DEM journeys + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/dem/journeys/inferred/{journey_id}/ignore: + post: + description: Mark an inferred DEM journey as ignored so it no longer appears in the candidate list. + operationId: IgnoreInferredJourney + parameters: + - description: The unique identifier of the inferred journey to ignore. + example: inferred-abc123 + in: path + name: journey_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: Ignore an inferred DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/dem/journeys/search: + get: + description: Search for DEM journeys with optional filtering by query, creator, team, and app. + operationId: SearchJourneys + parameters: + - description: A search query string to filter journeys by name. + in: query + name: query + required: false + schema: + type: string + - description: The offset for pagination. + in: query + name: page[offset] + required: false + schema: + format: int64 + type: integer + - description: The maximum number of results to return. + in: query + name: page[limit] + required: false + schema: + format: int64 + type: integer + - description: Filter journeys by creator handle. + in: query + name: creator + required: false + schema: + type: string + - description: Filter journeys by team tag. + in: query + name: team + required: false + schema: + type: string + - description: Filter journeys by application ID. + in: query + name: app_id + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: 00000000-0000-0000-0000-000000000001 + description: Tracks checkout flow. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 12345 + tags: + - team:synthetics + test_suite: + updated_at: + updated_by: + variants: [] + id: journey-abc123 + type: journeys + schema: + $ref: '#/components/schemas/DemJourneysListResponse' + 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: Search DEM journeys + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/dem/journeys/suites/batch: + post: + description: Return DEM journeys associated with multiple given test suite IDs. + operationId: BatchGetJourneysByTestSuiteIDs + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + test_suite_ids: + - suite-abc123 + - suite-def456 + type: batch_get_journeys_by_test_suite_ids_request + schema: + $ref: '#/components/schemas/DemBatchGetJourneysRequest' + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: 00000000-0000-0000-0000-000000000001 + description: Tracks checkout flow. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 12345 + tags: + - team:synthetics + test_suite: + updated_at: + updated_by: + variants: [] + id: journey-abc123 + type: journeys + schema: + $ref: '#/components/schemas/DemJourneysListResponse' + 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: Batch get DEM journeys by test suite IDs + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/dem/journeys/variants/{variant_id}: + delete: + description: Delete a variant from a DEM journey. + operationId: DeleteJourneyVariant + parameters: + - description: The unique identifier of the variant to delete. + example: "variant-001" + in: path + name: variant_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 DEM journey variant + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + put: + description: Update an existing variant of a DEM journey. + operationId: UpdateJourneyVariant + parameters: + - description: The unique identifier of the variant to update. + example: "variant-001" + in: path + name: variant_id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: device.type:mobile + name: Mobile checkout + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + type: variants + schema: + $ref: '#/components/schemas/DemVariantRequest' + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: device.type:mobile + name: Mobile checkout + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + id: variant-001 + type: variants + schema: + $ref: '#/components/schemas/DemVariantResponse' + 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 DEM journey variant + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/dem/journeys/{journey_id}: + delete: + description: Delete a DEM journey by its ID. + operationId: DeleteJourney + parameters: + - description: The unique identifier of the DEM journey to delete. + example: journey-abc123 + in: path + name: journey_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 DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + get: + description: Retrieve a single DEM journey by its ID. + operationId: GetJourney + parameters: + - description: The unique identifier of the DEM journey. + example: journey-abc123 + in: path + name: journey_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: 00000000-0000-0000-0000-000000000001 + description: Tracks checkout flow. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 12345 + tags: + - team:synthetics + test_suite: + updated_at: + updated_by: + variants: [] + id: journey-abc123 + type: journeys + schema: + $ref: '#/components/schemas/DemJourneyResponse' + description: OK + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_read + put: + description: Update an existing DEM journey by its ID. + operationId: UpdateJourney + parameters: + - description: The unique identifier of the DEM journey to update. + example: journey-abc123 + in: path + name: journey_id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: Tracks the user checkout flow from cart to confirmation. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + tags: + - team:synthetics + type: journeys + schema: + $ref: '#/components/schemas/DemJourneyCreateRequest' + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: 00000000-0000-0000-0000-000000000001 + description: Tracks checkout flow. + journey_rum: + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + name: Checkout Flow + org_id: 12345 + tags: + - team:synthetics + test_suite: + updated_at: "2024-01-16T08:00:00Z" + updated_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: 00000000-0000-0000-0000-000000000001 + variants: [] + id: journey-abc123 + type: journeys + schema: + $ref: '#/components/schemas/DemJourneyResponse' + description: OK + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/dem/journeys/{journey_id}/recommended-tests: + get: + description: >- + Retrieve AI-recommended synthetic tests for a DEM journey. Returns an empty list when no recommendation is available. + operationId: GetJourneyRecommendedTests + parameters: + - description: The unique identifier of the journey. + example: "journey-abc123" + in: path + name: journey_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + config: + name: Checkout journey + type: browser + created_at: "2026-08-31T16:00:00Z" + name: Checkout journey + result_id: result-abc123 + session_id: session-abc123 + source: gbt + type: browser + variant_id: variant-001 + id: journey-abc123 + type: recommended_tests + schema: + $ref: '#/components/schemas/DemRecommendedTestsResponse' + description: OK + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get recommended tests for a DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/dem/journeys/{journey_id}/variants: + post: + description: Create a variant for a DEM journey. + operationId: CreateJourneyVariant + parameters: + - description: The unique identifier of the journey that owns the variant. + example: "journey-abc123" + in: path + name: journey_id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: device.type:mobile + name: Mobile checkout + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + type: variants + schema: + $ref: '#/components/schemas/DemVariantRequest' + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: device.type:mobile + name: Mobile checkout + rum_steps: + - nodes: + - query: action.name:'checkout' + type: start + - nodes: + - query: action.name:'confirmation' + type: stop + id: variant-001 + type: variants + schema: + $ref: '#/components/schemas/DemVariantResponse' + 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: Create a DEM journey variant + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/dem/journeys/{public_journey_id}/suite: + post: + description: Trigger test suite creation for a given DEM journey. + operationId: CreateTestSuiteForJourney + parameters: + - description: The public identifier of the DEM journey for which to create a test suite. + example: journey-abc123 + in: path + name: public_journey_id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + include_tests_from_journey_coverage: true + test_suite_name: Checkout Flow Suite + type: create_test_suite_for_journey_request + schema: + $ref: '#/components/schemas/DemCreateJourneyTestSuiteRequest' + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + name: Checkout Flow Suite + id: suite-abc123 + type: journey_test_suite + schema: + $ref: '#/components/schemas/DemJourneyTestSuiteResponse' + description: Created + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a test suite for a DEM journey + tags: + - DEM + x-permission: + operator: OR + permissions: + - synthetics_write /api/v2/deployment_gates: get: description: |- @@ -223180,6 +224911,8 @@ tags: a `query_id`, and clients poll the fetch endpoint until the response transitions to `completed` with a column-major result set. name: DDSQL + - description: Manage Digital Experience Monitoring journeys. + name: DEM - description: |- Search, send, or delete events for DORA Metrics to measure and improve your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/) for more information. diff --git a/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.java b/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.java new file mode 100644 index 00000000000..5240d1af0eb --- /dev/null +++ b/examples/v2/dem/BatchGetJourneysByTestSuiteIDs.java @@ -0,0 +1,40 @@ +// Batch get DEM journeys by test suite IDs returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemBatchGetJourneysAttributes; +import com.datadog.api.client.v2.model.DemBatchGetJourneysData; +import com.datadog.api.client.v2.model.DemBatchGetJourneysRequest; +import com.datadog.api.client.v2.model.DemBatchGetJourneysRequestType; +import com.datadog.api.client.v2.model.DemJourneysListResponse; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + DemBatchGetJourneysRequest body = + new DemBatchGetJourneysRequest() + .data( + new DemBatchGetJourneysData() + .attributes( + new DemBatchGetJourneysAttributes() + .testSuiteIds(Arrays.asList("suite-abc123", "suite-def456"))) + .type( + DemBatchGetJourneysRequestType + .BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST)); + + try { + DemJourneysListResponse result = apiInstance.batchGetJourneysByTestSuiteIDs(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#batchGetJourneysByTestSuiteIDs"); + 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/dem/CreateJourney.java b/examples/v2/dem/CreateJourney.java new file mode 100644 index 00000000000..bbdf4ac9378 --- /dev/null +++ b/examples/v2/dem/CreateJourney.java @@ -0,0 +1,102 @@ +// Create a DEM journey returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemJourneyCreateAttributes; +import com.datadog.api.client.v2.model.DemJourneyCreateData; +import com.datadog.api.client.v2.model.DemJourneyCreateRequest; +import com.datadog.api.client.v2.model.DemJourneyResponse; +import com.datadog.api.client.v2.model.DemJourneyRum; +import com.datadog.api.client.v2.model.DemJourneyType; +import com.datadog.api.client.v2.model.DemRumNode; +import com.datadog.api.client.v2.model.DemRumStep; +import com.datadog.api.client.v2.model.DemRumStepType; +import com.datadog.api.client.v2.model.DemVariant; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + DemJourneyCreateRequest body = + new DemJourneyCreateRequest() + .data( + new DemJourneyCreateData() + .attributes( + new DemJourneyCreateAttributes() + .description("Tracks the user checkout flow from cart to confirmation.") + .journeyRum( + new DemJourneyRum() + .filter("env:prod") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'confirmation'"))) + .type(DemRumStepType.STOP))) + .variants( + Collections.singletonList( + new DemVariant() + .name("Mobile checkout") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query( + "action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query( + "action.name:'confirmation'"))) + .type(DemRumStepType.STOP)))))) + .name("Checkout Flow") + .tags(Arrays.asList("team:synthetics", "env:prod")) + .variants( + Collections.singletonList( + new DemVariant() + .name("Mobile checkout") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query( + "action.name:'confirmation'"))) + .type(DemRumStepType.STOP)))))) + .type(DemJourneyType.JOURNEYS)); + + try { + DemJourneyResponse result = apiInstance.createJourney(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#createJourney"); + 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/dem/CreateJourneyVariant.java b/examples/v2/dem/CreateJourneyVariant.java new file mode 100644 index 00000000000..7988e6591e5 --- /dev/null +++ b/examples/v2/dem/CreateJourneyVariant.java @@ -0,0 +1,56 @@ +// Create a DEM journey variant returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemRumNode; +import com.datadog.api.client.v2.model.DemRumStep; +import com.datadog.api.client.v2.model.DemRumStepType; +import com.datadog.api.client.v2.model.DemVariantAttributes; +import com.datadog.api.client.v2.model.DemVariantRequest; +import com.datadog.api.client.v2.model.DemVariantRequestData; +import com.datadog.api.client.v2.model.DemVariantResponse; +import com.datadog.api.client.v2.model.DemVariantType; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + DemVariantRequest body = + new DemVariantRequest() + .data( + new DemVariantRequestData() + .attributes( + new DemVariantAttributes() + .filter("device.type:mobile") + .name("Mobile checkout") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode().query("action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'confirmation'"))) + .type(DemRumStepType.STOP)))) + .type(DemVariantType.VARIANTS)); + + try { + DemVariantResponse result = apiInstance.createJourneyVariant("journey-abc123", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#createJourneyVariant"); + 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/dem/CreateTestSuiteForJourney.java b/examples/v2/dem/CreateTestSuiteForJourney.java new file mode 100644 index 00000000000..0722626d0f2 --- /dev/null +++ b/examples/v2/dem/CreateTestSuiteForJourney.java @@ -0,0 +1,41 @@ +// Create a test suite for a DEM journey returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteAttributes; +import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteData; +import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteRequest; +import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteRequestType; +import com.datadog.api.client.v2.model.DemJourneyTestSuiteResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + DemCreateJourneyTestSuiteRequest body = + new DemCreateJourneyTestSuiteRequest() + .data( + new DemCreateJourneyTestSuiteData() + .attributes( + new DemCreateJourneyTestSuiteAttributes() + .includeTestsFromJourneyCoverage(true) + .testSuiteName("My Custom Suite")) + .type( + DemCreateJourneyTestSuiteRequestType + .CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST)); + + try { + DemJourneyTestSuiteResponse result = + apiInstance.createTestSuiteForJourney("journey-abc123", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#createTestSuiteForJourney"); + 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/dem/DeleteIgnoredInferredJourney.java b/examples/v2/dem/DeleteIgnoredInferredJourney.java new file mode 100644 index 00000000000..3be3a59eb71 --- /dev/null +++ b/examples/v2/dem/DeleteIgnoredInferredJourney.java @@ -0,0 +1,22 @@ +// Delete an ignored inferred DEM journey returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + apiInstance.deleteIgnoredInferredJourney("inferred-abc123"); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#deleteIgnoredInferredJourney"); + 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/dem/DeleteJourney.java b/examples/v2/dem/DeleteJourney.java new file mode 100644 index 00000000000..230cbbe522f --- /dev/null +++ b/examples/v2/dem/DeleteJourney.java @@ -0,0 +1,22 @@ +// Delete a DEM journey returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + apiInstance.deleteJourney("journey-abc123"); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#deleteJourney"); + 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/dem/DeleteJourneyVariant.java b/examples/v2/dem/DeleteJourneyVariant.java new file mode 100644 index 00000000000..8e9835afa13 --- /dev/null +++ b/examples/v2/dem/DeleteJourneyVariant.java @@ -0,0 +1,22 @@ +// Delete a DEM journey variant returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + apiInstance.deleteJourneyVariant("variant-001"); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#deleteJourneyVariant"); + 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/dem/GetJourney.java b/examples/v2/dem/GetJourney.java new file mode 100644 index 00000000000..515baa83cf7 --- /dev/null +++ b/examples/v2/dem/GetJourney.java @@ -0,0 +1,24 @@ +// Get a DEM journey returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemJourneyResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + DemJourneyResponse result = apiInstance.getJourney("journey-abc123"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#getJourney"); + 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/dem/GetJourneyRecommendedTests.java b/examples/v2/dem/GetJourneyRecommendedTests.java new file mode 100644 index 00000000000..460626e8236 --- /dev/null +++ b/examples/v2/dem/GetJourneyRecommendedTests.java @@ -0,0 +1,24 @@ +// Get recommended tests for a DEM journey returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemRecommendedTestsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + DemRecommendedTestsResponse result = apiInstance.getJourneyRecommendedTests("journey-abc123"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#getJourneyRecommendedTests"); + 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/dem/IgnoreInferredJourney.java b/examples/v2/dem/IgnoreInferredJourney.java new file mode 100644 index 00000000000..64bd605af0d --- /dev/null +++ b/examples/v2/dem/IgnoreInferredJourney.java @@ -0,0 +1,22 @@ +// Ignore an inferred DEM journey returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + apiInstance.ignoreInferredJourney("inferred-abc123"); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#ignoreInferredJourney"); + 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/dem/SearchInferredJourneys.java b/examples/v2/dem/SearchInferredJourneys.java new file mode 100644 index 00000000000..75ffc93ebbb --- /dev/null +++ b/examples/v2/dem/SearchInferredJourneys.java @@ -0,0 +1,24 @@ +// Search inferred DEM journeys returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemSearchInferredJourneysResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + DemSearchInferredJourneysResponse result = apiInstance.searchInferredJourneys(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#searchInferredJourneys"); + 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/dem/SearchJourneys.java b/examples/v2/dem/SearchJourneys.java new file mode 100644 index 00000000000..4d04acaff32 --- /dev/null +++ b/examples/v2/dem/SearchJourneys.java @@ -0,0 +1,24 @@ +// Search DEM journeys returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemJourneysListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + try { + DemJourneysListResponse result = apiInstance.searchJourneys(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#searchJourneys"); + 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/dem/UpdateJourney.java b/examples/v2/dem/UpdateJourney.java new file mode 100644 index 00000000000..5e04479e3fd --- /dev/null +++ b/examples/v2/dem/UpdateJourney.java @@ -0,0 +1,102 @@ +// Update a DEM journey returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemJourneyCreateAttributes; +import com.datadog.api.client.v2.model.DemJourneyCreateData; +import com.datadog.api.client.v2.model.DemJourneyCreateRequest; +import com.datadog.api.client.v2.model.DemJourneyResponse; +import com.datadog.api.client.v2.model.DemJourneyRum; +import com.datadog.api.client.v2.model.DemJourneyType; +import com.datadog.api.client.v2.model.DemRumNode; +import com.datadog.api.client.v2.model.DemRumStep; +import com.datadog.api.client.v2.model.DemRumStepType; +import com.datadog.api.client.v2.model.DemVariant; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + DemJourneyCreateRequest body = + new DemJourneyCreateRequest() + .data( + new DemJourneyCreateData() + .attributes( + new DemJourneyCreateAttributes() + .description("Tracks the user checkout flow from cart to confirmation.") + .journeyRum( + new DemJourneyRum() + .filter("env:prod") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'confirmation'"))) + .type(DemRumStepType.STOP))) + .variants( + Collections.singletonList( + new DemVariant() + .name("Mobile checkout") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query( + "action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query( + "action.name:'confirmation'"))) + .type(DemRumStepType.STOP)))))) + .name("Checkout Flow") + .tags(Arrays.asList("team:synthetics", "env:prod")) + .variants( + Collections.singletonList( + new DemVariant() + .name("Mobile checkout") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query( + "action.name:'confirmation'"))) + .type(DemRumStepType.STOP)))))) + .type(DemJourneyType.JOURNEYS)); + + try { + DemJourneyResponse result = apiInstance.updateJourney("journey-abc123", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#updateJourney"); + 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/dem/UpdateJourneyVariant.java b/examples/v2/dem/UpdateJourneyVariant.java new file mode 100644 index 00000000000..8c8ea0183fe --- /dev/null +++ b/examples/v2/dem/UpdateJourneyVariant.java @@ -0,0 +1,56 @@ +// Update a DEM journey variant returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DemApi; +import com.datadog.api.client.v2.model.DemRumNode; +import com.datadog.api.client.v2.model.DemRumStep; +import com.datadog.api.client.v2.model.DemRumStepType; +import com.datadog.api.client.v2.model.DemVariantAttributes; +import com.datadog.api.client.v2.model.DemVariantRequest; +import com.datadog.api.client.v2.model.DemVariantRequestData; +import com.datadog.api.client.v2.model.DemVariantResponse; +import com.datadog.api.client.v2.model.DemVariantType; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DemApi apiInstance = new DemApi(defaultClient); + + DemVariantRequest body = + new DemVariantRequest() + .data( + new DemVariantRequestData() + .attributes( + new DemVariantAttributes() + .filter("device.type:mobile") + .name("Mobile checkout") + .rumSteps( + Arrays.asList( + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode().query("action.name:'checkout'"))) + .type(DemRumStepType.START), + new DemRumStep() + .nodes( + Collections.singletonList( + new DemRumNode() + .query("action.name:'confirmation'"))) + .type(DemRumStepType.STOP)))) + .type(DemVariantType.VARIANTS)); + + try { + DemVariantResponse result = apiInstance.updateJourneyVariant("variant-001", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DemApi#updateJourneyVariant"); + 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/v2/api/DemApi.java b/src/main/java/com/datadog/api/client/v2/api/DemApi.java new file mode 100644 index 00000000000..58b61ba9604 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/DemApi.java @@ -0,0 +1,2221 @@ +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.DemBatchGetJourneysRequest; +import com.datadog.api.client.v2.model.DemCreateJourneyTestSuiteRequest; +import com.datadog.api.client.v2.model.DemInferredJourneyStatus; +import com.datadog.api.client.v2.model.DemJourneyCreateRequest; +import com.datadog.api.client.v2.model.DemJourneyResponse; +import com.datadog.api.client.v2.model.DemJourneyTestSuiteResponse; +import com.datadog.api.client.v2.model.DemJourneysListResponse; +import com.datadog.api.client.v2.model.DemRecommendedTestsResponse; +import com.datadog.api.client.v2.model.DemSearchInferredJourneysResponse; +import com.datadog.api.client.v2.model.DemVariantRequest; +import com.datadog.api.client.v2.model.DemVariantResponse; +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.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemApi { + private ApiClient apiClient; + + public DemApi() { + this(ApiClient.getDefaultApiClient()); + } + + public DemApi(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; + } + + /** + * Batch get DEM journeys by test suite IDs. + * + *

See {@link #batchGetJourneysByTestSuiteIDsWithHttpInfo}. + * + * @param body (required) + * @return DemJourneysListResponse + * @throws ApiException if fails to make API call + */ + public DemJourneysListResponse batchGetJourneysByTestSuiteIDs(DemBatchGetJourneysRequest body) + throws ApiException { + return batchGetJourneysByTestSuiteIDsWithHttpInfo(body).getData(); + } + + /** + * Batch get DEM journeys by test suite IDs. + * + *

See {@link #batchGetJourneysByTestSuiteIDsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<DemJourneysListResponse> + */ + public CompletableFuture batchGetJourneysByTestSuiteIDsAsync( + DemBatchGetJourneysRequest body) { + return batchGetJourneysByTestSuiteIDsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Return DEM journeys associated with multiple given test suite IDs. + * + * @param body (required) + * @return ApiResponse<DemJourneysListResponse> + * @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 batchGetJourneysByTestSuiteIDsWithHttpInfo( + DemBatchGetJourneysRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling batchGetJourneysByTestSuiteIDs"); + } + // create path and map variables + String localVarPath = "/api/v2/dem/journeys/suites/batch"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.batchGetJourneysByTestSuiteIDs", + 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() {}); + } + + /** + * Batch get DEM journeys by test suite IDs. + * + *

See {@link #batchGetJourneysByTestSuiteIDsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<DemJourneysListResponse>> + */ + public CompletableFuture> + batchGetJourneysByTestSuiteIDsWithHttpInfoAsync(DemBatchGetJourneysRequest body) { + 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 batchGetJourneysByTestSuiteIDs")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/dem/journeys/suites/batch"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.batchGetJourneysByTestSuiteIDs", + 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 DEM journey. + * + *

See {@link #createJourneyWithHttpInfo}. + * + * @param body (required) + * @return DemJourneyResponse + * @throws ApiException if fails to make API call + */ + public DemJourneyResponse createJourney(DemJourneyCreateRequest body) throws ApiException { + return createJourneyWithHttpInfo(body).getData(); + } + + /** + * Create a DEM journey. + * + *

See {@link #createJourneyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<DemJourneyResponse> + */ + public CompletableFuture createJourneyAsync(DemJourneyCreateRequest body) { + return createJourneyWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a DEM journey. + * + * @param body (required) + * @return ApiResponse<DemJourneyResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse createJourneyWithHttpInfo(DemJourneyCreateRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createJourney"); + } + // create path and map variables + String localVarPath = "/api/v2/dem/journeys"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.createJourney", + 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 DEM journey. + * + *

See {@link #createJourneyWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<DemJourneyResponse>> + */ + public CompletableFuture> createJourneyWithHttpInfoAsync( + DemJourneyCreateRequest body) { + 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 createJourney")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/dem/journeys"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.createJourney", + 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 DEM journey variant. + * + *

See {@link #createJourneyVariantWithHttpInfo}. + * + * @param journeyId The unique identifier of the journey that owns the variant. (required) + * @param body (required) + * @return DemVariantResponse + * @throws ApiException if fails to make API call + */ + public DemVariantResponse createJourneyVariant(String journeyId, DemVariantRequest body) + throws ApiException { + return createJourneyVariantWithHttpInfo(journeyId, body).getData(); + } + + /** + * Create a DEM journey variant. + * + *

See {@link #createJourneyVariantWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the journey that owns the variant. (required) + * @param body (required) + * @return CompletableFuture<DemVariantResponse> + */ + public CompletableFuture createJourneyVariantAsync( + String journeyId, DemVariantRequest body) { + return createJourneyVariantWithHttpInfoAsync(journeyId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a variant for a DEM journey. + * + * @param journeyId The unique identifier of the journey that owns the variant. (required) + * @param body (required) + * @return ApiResponse<DemVariantResponse> + * @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 createJourneyVariantWithHttpInfo( + String journeyId, DemVariantRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'journeyId' when calling createJourneyVariant"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createJourneyVariant"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}/variants" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.createJourneyVariant", + 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 DEM journey variant. + * + *

See {@link #createJourneyVariantWithHttpInfo}. + * + * @param journeyId The unique identifier of the journey that owns the variant. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<DemVariantResponse>> + */ + public CompletableFuture> createJourneyVariantWithHttpInfoAsync( + String journeyId, DemVariantRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'journeyId' when calling createJourneyVariant")); + 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 createJourneyVariant")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}/variants" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.createJourneyVariant", + 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 test suite for a DEM journey. + * + *

See {@link #createTestSuiteForJourneyWithHttpInfo}. + * + * @param publicJourneyId The public identifier of the DEM journey for which to create a test + * suite. (required) + * @param body (required) + * @return DemJourneyTestSuiteResponse + * @throws ApiException if fails to make API call + */ + public DemJourneyTestSuiteResponse createTestSuiteForJourney( + String publicJourneyId, DemCreateJourneyTestSuiteRequest body) throws ApiException { + return createTestSuiteForJourneyWithHttpInfo(publicJourneyId, body).getData(); + } + + /** + * Create a test suite for a DEM journey. + * + *

See {@link #createTestSuiteForJourneyWithHttpInfoAsync}. + * + * @param publicJourneyId The public identifier of the DEM journey for which to create a test + * suite. (required) + * @param body (required) + * @return CompletableFuture<DemJourneyTestSuiteResponse> + */ + public CompletableFuture createTestSuiteForJourneyAsync( + String publicJourneyId, DemCreateJourneyTestSuiteRequest body) { + return createTestSuiteForJourneyWithHttpInfoAsync(publicJourneyId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Trigger test suite creation for a given DEM journey. + * + * @param publicJourneyId The public identifier of the DEM journey for which to create a test + * suite. (required) + * @param body (required) + * @return ApiResponse<DemJourneyTestSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse createTestSuiteForJourneyWithHttpInfo( + String publicJourneyId, DemCreateJourneyTestSuiteRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'publicJourneyId' is set + if (publicJourneyId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'publicJourneyId' when calling" + + " createTestSuiteForJourney"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createTestSuiteForJourney"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{public_journey_id}/suite" + .replaceAll( + "\\{" + "public_journey_id" + "\\}", + apiClient.escapeString(publicJourneyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.createTestSuiteForJourney", + 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 test suite for a DEM journey. + * + *

See {@link #createTestSuiteForJourneyWithHttpInfo}. + * + * @param publicJourneyId The public identifier of the DEM journey for which to create a test + * suite. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<DemJourneyTestSuiteResponse>> + */ + public CompletableFuture> + createTestSuiteForJourneyWithHttpInfoAsync( + String publicJourneyId, DemCreateJourneyTestSuiteRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'publicJourneyId' is set + if (publicJourneyId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'publicJourneyId' when calling" + + " createTestSuiteForJourney")); + 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 createTestSuiteForJourney")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{public_journey_id}/suite" + .replaceAll( + "\\{" + "public_journey_id" + "\\}", + apiClient.escapeString(publicJourneyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.createTestSuiteForJourney", + 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 an ignored inferred DEM journey. + * + *

See {@link #deleteIgnoredInferredJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the ignored inferred journey to delete. (required) + * @throws ApiException if fails to make API call + */ + public void deleteIgnoredInferredJourney(String journeyId) throws ApiException { + deleteIgnoredInferredJourneyWithHttpInfo(journeyId); + } + + /** + * Delete an ignored inferred DEM journey. + * + *

See {@link #deleteIgnoredInferredJourneyWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the ignored inferred journey to delete. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteIgnoredInferredJourneyAsync(String journeyId) { + return deleteIgnoredInferredJourneyWithHttpInfoAsync(journeyId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Remove an ignored inferred DEM journey, making it eligible to appear as a candidate again. + * + * @param journeyId The unique identifier of the ignored inferred journey 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 deleteIgnoredInferredJourneyWithHttpInfo(String journeyId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'journeyId' when calling deleteIgnoredInferredJourney"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/inferred/ignored/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.deleteIgnoredInferredJourney", + 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 an ignored inferred DEM journey. + * + *

See {@link #deleteIgnoredInferredJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the ignored inferred journey to delete. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteIgnoredInferredJourneyWithHttpInfoAsync( + String journeyId) { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'journeyId' when calling" + + " deleteIgnoredInferredJourney")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/inferred/ignored/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.deleteIgnoredInferredJourney", + 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 DEM journey. + * + *

See {@link #deleteJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the DEM journey to delete. (required) + * @throws ApiException if fails to make API call + */ + public void deleteJourney(String journeyId) throws ApiException { + deleteJourneyWithHttpInfo(journeyId); + } + + /** + * Delete a DEM journey. + * + *

See {@link #deleteJourneyWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the DEM journey to delete. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteJourneyAsync(String journeyId) { + return deleteJourneyWithHttpInfoAsync(journeyId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a DEM journey by its ID. + * + * @param journeyId The unique identifier of the DEM journey 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 deleteJourneyWithHttpInfo(String journeyId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'journeyId' when calling deleteJourney"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.deleteJourney", + 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 DEM journey. + * + *

See {@link #deleteJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the DEM journey to delete. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteJourneyWithHttpInfoAsync(String journeyId) { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'journeyId' when calling deleteJourney")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.deleteJourney", + 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 DEM journey variant. + * + *

See {@link #deleteJourneyVariantWithHttpInfo}. + * + * @param variantId The unique identifier of the variant to delete. (required) + * @throws ApiException if fails to make API call + */ + public void deleteJourneyVariant(String variantId) throws ApiException { + deleteJourneyVariantWithHttpInfo(variantId); + } + + /** + * Delete a DEM journey variant. + * + *

See {@link #deleteJourneyVariantWithHttpInfoAsync}. + * + * @param variantId The unique identifier of the variant to delete. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteJourneyVariantAsync(String variantId) { + return deleteJourneyVariantWithHttpInfoAsync(variantId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a variant from a DEM journey. + * + * @param variantId The unique identifier of the variant 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 deleteJourneyVariantWithHttpInfo(String variantId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'variantId' is set + if (variantId == null) { + throw new ApiException( + 400, "Missing the required parameter 'variantId' when calling deleteJourneyVariant"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/variants/{variant_id}" + .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.deleteJourneyVariant", + 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 DEM journey variant. + * + *

See {@link #deleteJourneyVariantWithHttpInfo}. + * + * @param variantId The unique identifier of the variant to delete. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteJourneyVariantWithHttpInfoAsync( + String variantId) { + Object localVarPostBody = null; + + // verify the required parameter 'variantId' is set + if (variantId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'variantId' when calling deleteJourneyVariant")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/variants/{variant_id}" + .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.deleteJourneyVariant", + 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 DEM journey. + * + *

See {@link #getJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the DEM journey. (required) + * @return DemJourneyResponse + * @throws ApiException if fails to make API call + */ + public DemJourneyResponse getJourney(String journeyId) throws ApiException { + return getJourneyWithHttpInfo(journeyId).getData(); + } + + /** + * Get a DEM journey. + * + *

See {@link #getJourneyWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the DEM journey. (required) + * @return CompletableFuture<DemJourneyResponse> + */ + public CompletableFuture getJourneyAsync(String journeyId) { + return getJourneyWithHttpInfoAsync(journeyId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a single DEM journey by its ID. + * + * @param journeyId The unique identifier of the DEM journey. (required) + * @return ApiResponse<DemJourneyResponse> + * @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 getJourneyWithHttpInfo(String journeyId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'journeyId' when calling getJourney"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.getJourney", + 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 DEM journey. + * + *

See {@link #getJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the DEM journey. (required) + * @return CompletableFuture<ApiResponse<DemJourneyResponse>> + */ + public CompletableFuture> getJourneyWithHttpInfoAsync( + String journeyId) { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'journeyId' when calling getJourney")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.getJourney", + 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 recommended tests for a DEM journey. + * + *

See {@link #getJourneyRecommendedTestsWithHttpInfo}. + * + * @param journeyId The unique identifier of the journey. (required) + * @return DemRecommendedTestsResponse + * @throws ApiException if fails to make API call + */ + public DemRecommendedTestsResponse getJourneyRecommendedTests(String journeyId) + throws ApiException { + return getJourneyRecommendedTestsWithHttpInfo(journeyId).getData(); + } + + /** + * Get recommended tests for a DEM journey. + * + *

See {@link #getJourneyRecommendedTestsWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the journey. (required) + * @return CompletableFuture<DemRecommendedTestsResponse> + */ + public CompletableFuture getJourneyRecommendedTestsAsync( + String journeyId) { + return getJourneyRecommendedTestsWithHttpInfoAsync(journeyId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve AI-recommended synthetic tests for a DEM journey. Returns an empty list when no + * recommendation is available. + * + * @param journeyId The unique identifier of the journey. (required) + * @return ApiResponse<DemRecommendedTestsResponse> + * @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 getJourneyRecommendedTestsWithHttpInfo( + String journeyId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'journeyId' when calling getJourneyRecommendedTests"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}/recommended-tests" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.getJourneyRecommendedTests", + 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 recommended tests for a DEM journey. + * + *

See {@link #getJourneyRecommendedTestsWithHttpInfo}. + * + * @param journeyId The unique identifier of the journey. (required) + * @return CompletableFuture<ApiResponse<DemRecommendedTestsResponse>> + */ + public CompletableFuture> + getJourneyRecommendedTestsWithHttpInfoAsync(String journeyId) { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'journeyId' when calling" + + " getJourneyRecommendedTests")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}/recommended-tests" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.getJourneyRecommendedTests", + 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() {}); + } + + /** + * Ignore an inferred DEM journey. + * + *

See {@link #ignoreInferredJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the inferred journey to ignore. (required) + * @throws ApiException if fails to make API call + */ + public void ignoreInferredJourney(String journeyId) throws ApiException { + ignoreInferredJourneyWithHttpInfo(journeyId); + } + + /** + * Ignore an inferred DEM journey. + * + *

See {@link #ignoreInferredJourneyWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the inferred journey to ignore. (required) + * @return CompletableFuture + */ + public CompletableFuture ignoreInferredJourneyAsync(String journeyId) { + return ignoreInferredJourneyWithHttpInfoAsync(journeyId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Mark an inferred DEM journey as ignored so it no longer appears in the candidate list. + * + * @param journeyId The unique identifier of the inferred journey to ignore. (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 ignoreInferredJourneyWithHttpInfo(String journeyId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'journeyId' when calling ignoreInferredJourney"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/inferred/{journey_id}/ignore" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.ignoreInferredJourney", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Ignore an inferred DEM journey. + * + *

See {@link #ignoreInferredJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the inferred journey to ignore. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> ignoreInferredJourneyWithHttpInfoAsync( + String journeyId) { + Object localVarPostBody = null; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'journeyId' when calling ignoreInferredJourney")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/inferred/{journey_id}/ignore" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.ignoreInferredJourney", + 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( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** Manage optional parameters to searchInferredJourneys. */ + public static class SearchInferredJourneysOptionalParameters { + private DemInferredJourneyStatus status; + private String q; + private String appId; + + /** + * Set status. + * + * @param status Filter by inferred journey status. Use candidate (default) to + * retrieve journeys suggested for promotion, or ignored to retrieve journeys + * that have been dismissed. (optional, default to "candidate") + * @return SearchInferredJourneysOptionalParameters + */ + public SearchInferredJourneysOptionalParameters status(DemInferredJourneyStatus status) { + this.status = status; + return this; + } + + /** + * Set q. + * + * @param q Fuzzy search query to filter inferred journeys by name. (optional) + * @return SearchInferredJourneysOptionalParameters + */ + public SearchInferredJourneysOptionalParameters q(String q) { + this.q = q; + return this; + } + + /** + * Set appId. + * + * @param appId Filter inferred journeys by application ID. (optional) + * @return SearchInferredJourneysOptionalParameters + */ + public SearchInferredJourneysOptionalParameters appId(String appId) { + this.appId = appId; + return this; + } + } + + /** + * Search inferred DEM journeys. + * + *

See {@link #searchInferredJourneysWithHttpInfo}. + * + * @return DemSearchInferredJourneysResponse + * @throws ApiException if fails to make API call + */ + public DemSearchInferredJourneysResponse searchInferredJourneys() throws ApiException { + return searchInferredJourneysWithHttpInfo(new SearchInferredJourneysOptionalParameters()) + .getData(); + } + + /** + * Search inferred DEM journeys. + * + *

See {@link #searchInferredJourneysWithHttpInfoAsync}. + * + * @return CompletableFuture<DemSearchInferredJourneysResponse> + */ + public CompletableFuture searchInferredJourneysAsync() { + return searchInferredJourneysWithHttpInfoAsync(new SearchInferredJourneysOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search inferred DEM journeys. + * + *

See {@link #searchInferredJourneysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return DemSearchInferredJourneysResponse + * @throws ApiException if fails to make API call + */ + public DemSearchInferredJourneysResponse searchInferredJourneys( + SearchInferredJourneysOptionalParameters parameters) throws ApiException { + return searchInferredJourneysWithHttpInfo(parameters).getData(); + } + + /** + * Search inferred DEM journeys. + * + *

See {@link #searchInferredJourneysWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<DemSearchInferredJourneysResponse> + */ + public CompletableFuture searchInferredJourneysAsync( + SearchInferredJourneysOptionalParameters parameters) { + return searchInferredJourneysWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for inferred DEM journeys by status. Returns candidates (status=candidate, the default) + * or ignored journeys (status=ignored). Supports optional fuzzy name filtering and app ID + * filtering. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<DemSearchInferredJourneysResponse> + * @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 searchInferredJourneysWithHttpInfo( + SearchInferredJourneysOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + DemInferredJourneyStatus status = parameters.status; + String q = parameters.q; + String appId = parameters.appId; + // create path and map variables + String localVarPath = "/api/v2/dem/journeys/inferred/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "app_id", appId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.searchInferredJourneys", + 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 inferred DEM journeys. + * + *

See {@link #searchInferredJourneysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<DemSearchInferredJourneysResponse>> + */ + public CompletableFuture> + searchInferredJourneysWithHttpInfoAsync(SearchInferredJourneysOptionalParameters parameters) { + Object localVarPostBody = null; + DemInferredJourneyStatus status = parameters.status; + String q = parameters.q; + String appId = parameters.appId; + // create path and map variables + String localVarPath = "/api/v2/dem/journeys/inferred/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "app_id", appId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.searchInferredJourneys", + 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 searchJourneys. */ + public static class SearchJourneysOptionalParameters { + private String query; + private Long pageOffset; + private Long pageLimit; + private String creator; + private String team; + private String appId; + + /** + * Set query. + * + * @param query A search query string to filter journeys by name. (optional) + * @return SearchJourneysOptionalParameters + */ + public SearchJourneysOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset The offset for pagination. (optional) + * @return SearchJourneysOptionalParameters + */ + public SearchJourneysOptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit The maximum number of results to return. (optional) + * @return SearchJourneysOptionalParameters + */ + public SearchJourneysOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set creator. + * + * @param creator Filter journeys by creator handle. (optional) + * @return SearchJourneysOptionalParameters + */ + public SearchJourneysOptionalParameters creator(String creator) { + this.creator = creator; + return this; + } + + /** + * Set team. + * + * @param team Filter journeys by team tag. (optional) + * @return SearchJourneysOptionalParameters + */ + public SearchJourneysOptionalParameters team(String team) { + this.team = team; + return this; + } + + /** + * Set appId. + * + * @param appId Filter journeys by application ID. (optional) + * @return SearchJourneysOptionalParameters + */ + public SearchJourneysOptionalParameters appId(String appId) { + this.appId = appId; + return this; + } + } + + /** + * Search DEM journeys. + * + *

See {@link #searchJourneysWithHttpInfo}. + * + * @return DemJourneysListResponse + * @throws ApiException if fails to make API call + */ + public DemJourneysListResponse searchJourneys() throws ApiException { + return searchJourneysWithHttpInfo(new SearchJourneysOptionalParameters()).getData(); + } + + /** + * Search DEM journeys. + * + *

See {@link #searchJourneysWithHttpInfoAsync}. + * + * @return CompletableFuture<DemJourneysListResponse> + */ + public CompletableFuture searchJourneysAsync() { + return searchJourneysWithHttpInfoAsync(new SearchJourneysOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search DEM journeys. + * + *

See {@link #searchJourneysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return DemJourneysListResponse + * @throws ApiException if fails to make API call + */ + public DemJourneysListResponse searchJourneys(SearchJourneysOptionalParameters parameters) + throws ApiException { + return searchJourneysWithHttpInfo(parameters).getData(); + } + + /** + * Search DEM journeys. + * + *

See {@link #searchJourneysWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<DemJourneysListResponse> + */ + public CompletableFuture searchJourneysAsync( + SearchJourneysOptionalParameters parameters) { + return searchJourneysWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for DEM journeys with optional filtering by query, creator, team, and app. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<DemJourneysListResponse> + * @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 searchJourneysWithHttpInfo( + SearchJourneysOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String query = parameters.query; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; + String creator = parameters.creator; + String team = parameters.team; + String appId = parameters.appId; + // create path and map variables + String localVarPath = "/api/v2/dem/journeys/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("", "app_id", appId)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.searchJourneys", + 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 DEM journeys. + * + *

See {@link #searchJourneysWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<DemJourneysListResponse>> + */ + public CompletableFuture> searchJourneysWithHttpInfoAsync( + SearchJourneysOptionalParameters parameters) { + Object localVarPostBody = null; + String query = parameters.query; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; + String creator = parameters.creator; + String team = parameters.team; + String appId = parameters.appId; + // create path and map variables + String localVarPath = "/api/v2/dem/journeys/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("", "app_id", appId)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.searchJourneys", + 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 DEM journey. + * + *

See {@link #updateJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the DEM journey to update. (required) + * @param body (required) + * @return DemJourneyResponse + * @throws ApiException if fails to make API call + */ + public DemJourneyResponse updateJourney(String journeyId, DemJourneyCreateRequest body) + throws ApiException { + return updateJourneyWithHttpInfo(journeyId, body).getData(); + } + + /** + * Update a DEM journey. + * + *

See {@link #updateJourneyWithHttpInfoAsync}. + * + * @param journeyId The unique identifier of the DEM journey to update. (required) + * @param body (required) + * @return CompletableFuture<DemJourneyResponse> + */ + public CompletableFuture updateJourneyAsync( + String journeyId, DemJourneyCreateRequest body) { + return updateJourneyWithHttpInfoAsync(journeyId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing DEM journey by its ID. + * + * @param journeyId The unique identifier of the DEM journey to update. (required) + * @param body (required) + * @return ApiResponse<DemJourneyResponse> + * @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 updateJourneyWithHttpInfo( + String journeyId, DemJourneyCreateRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'journeyId' when calling updateJourney"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateJourney"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.updateJourney", + 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 DEM journey. + * + *

See {@link #updateJourneyWithHttpInfo}. + * + * @param journeyId The unique identifier of the DEM journey to update. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<DemJourneyResponse>> + */ + public CompletableFuture> updateJourneyWithHttpInfoAsync( + String journeyId, DemJourneyCreateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'journeyId' is set + if (journeyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'journeyId' when calling updateJourney")); + 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 updateJourney")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/{journey_id}" + .replaceAll("\\{" + "journey_id" + "\\}", apiClient.escapeString(journeyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.updateJourney", + 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 DEM journey variant. + * + *

See {@link #updateJourneyVariantWithHttpInfo}. + * + * @param variantId The unique identifier of the variant to update. (required) + * @param body (required) + * @return DemVariantResponse + * @throws ApiException if fails to make API call + */ + public DemVariantResponse updateJourneyVariant(String variantId, DemVariantRequest body) + throws ApiException { + return updateJourneyVariantWithHttpInfo(variantId, body).getData(); + } + + /** + * Update a DEM journey variant. + * + *

See {@link #updateJourneyVariantWithHttpInfoAsync}. + * + * @param variantId The unique identifier of the variant to update. (required) + * @param body (required) + * @return CompletableFuture<DemVariantResponse> + */ + public CompletableFuture updateJourneyVariantAsync( + String variantId, DemVariantRequest body) { + return updateJourneyVariantWithHttpInfoAsync(variantId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing variant of a DEM journey. + * + * @param variantId The unique identifier of the variant to update. (required) + * @param body (required) + * @return ApiResponse<DemVariantResponse> + * @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 updateJourneyVariantWithHttpInfo( + String variantId, DemVariantRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'variantId' is set + if (variantId == null) { + throw new ApiException( + 400, "Missing the required parameter 'variantId' when calling updateJourneyVariant"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateJourneyVariant"); + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/variants/{variant_id}" + .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DemApi.updateJourneyVariant", + 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 DEM journey variant. + * + *

See {@link #updateJourneyVariantWithHttpInfo}. + * + * @param variantId The unique identifier of the variant to update. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<DemVariantResponse>> + */ + public CompletableFuture> updateJourneyVariantWithHttpInfoAsync( + String variantId, DemVariantRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'variantId' is set + if (variantId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'variantId' when calling updateJourneyVariant")); + 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 updateJourneyVariant")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dem/journeys/variants/{variant_id}" + .replaceAll("\\{" + "variant_id" + "\\}", apiClient.escapeString(variantId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DemApi.updateJourneyVariant", + 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/DemBatchGetJourneysAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysAttributes.java new file mode 100644 index 00000000000..ae5ff82ad75 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysAttributes.java @@ -0,0 +1,152 @@ +/* + * 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; + +/** Attributes for a batch get journeys request. */ +@JsonPropertyOrder({DemBatchGetJourneysAttributes.JSON_PROPERTY_TEST_SUITE_IDS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemBatchGetJourneysAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TEST_SUITE_IDS = "test_suite_ids"; + private List testSuiteIds = new ArrayList<>(); + + public DemBatchGetJourneysAttributes() {} + + @JsonCreator + public DemBatchGetJourneysAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TEST_SUITE_IDS) + List testSuiteIds) { + this.testSuiteIds = testSuiteIds; + } + + public DemBatchGetJourneysAttributes testSuiteIds(List testSuiteIds) { + this.testSuiteIds = testSuiteIds; + return this; + } + + public DemBatchGetJourneysAttributes addTestSuiteIdsItem(String testSuiteIdsItem) { + this.testSuiteIds.add(testSuiteIdsItem); + return this; + } + + /** + * List of test suite IDs. + * + * @return testSuiteIds + */ + @JsonProperty(JSON_PROPERTY_TEST_SUITE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTestSuiteIds() { + return testSuiteIds; + } + + public void setTestSuiteIds(List testSuiteIds) { + this.testSuiteIds = testSuiteIds; + } + + /** + * 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 DemBatchGetJourneysAttributes + */ + @JsonAnySetter + public DemBatchGetJourneysAttributes 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 DemBatchGetJourneysAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemBatchGetJourneysAttributes demBatchGetJourneysAttributes = (DemBatchGetJourneysAttributes) o; + return Objects.equals(this.testSuiteIds, demBatchGetJourneysAttributes.testSuiteIds) + && Objects.equals( + this.additionalProperties, demBatchGetJourneysAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(testSuiteIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemBatchGetJourneysAttributes {\n"); + sb.append(" testSuiteIds: ").append(toIndentedString(testSuiteIds)).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/DemBatchGetJourneysData.java b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysData.java new file mode 100644 index 00000000000..6cb42d35ea1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysData.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; + +/** Data object for a batch get journeys request. */ +@JsonPropertyOrder({ + DemBatchGetJourneysData.JSON_PROPERTY_ATTRIBUTES, + DemBatchGetJourneysData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemBatchGetJourneysData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemBatchGetJourneysAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemBatchGetJourneysRequestType type; + + public DemBatchGetJourneysData() {} + + @JsonCreator + public DemBatchGetJourneysData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemBatchGetJourneysAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + DemBatchGetJourneysRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemBatchGetJourneysData attributes(DemBatchGetJourneysAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for a batch get journeys request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemBatchGetJourneysAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemBatchGetJourneysAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemBatchGetJourneysData type(DemBatchGetJourneysRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a request to retrieve DEM journeys by test suite IDs. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemBatchGetJourneysRequestType getType() { + return type; + } + + public void setType(DemBatchGetJourneysRequestType 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 DemBatchGetJourneysData + */ + @JsonAnySetter + public DemBatchGetJourneysData 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 DemBatchGetJourneysData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemBatchGetJourneysData demBatchGetJourneysData = (DemBatchGetJourneysData) o; + return Objects.equals(this.attributes, demBatchGetJourneysData.attributes) + && Objects.equals(this.type, demBatchGetJourneysData.type) + && Objects.equals(this.additionalProperties, demBatchGetJourneysData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemBatchGetJourneysData {\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/DemBatchGetJourneysRequest.java b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysRequest.java new file mode 100644 index 00000000000..d28ba6dfa69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysRequest.java @@ -0,0 +1,149 @@ +/* + * 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; + +/** Request body for retrieving DEM journeys by test suite IDs. */ +@JsonPropertyOrder({DemBatchGetJourneysRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemBatchGetJourneysRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemBatchGetJourneysData data; + + public DemBatchGetJourneysRequest() {} + + @JsonCreator + public DemBatchGetJourneysRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DemBatchGetJourneysData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemBatchGetJourneysRequest data(DemBatchGetJourneysData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a batch get journeys request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemBatchGetJourneysData getData() { + return data; + } + + public void setData(DemBatchGetJourneysData 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 DemBatchGetJourneysRequest + */ + @JsonAnySetter + public DemBatchGetJourneysRequest 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 DemBatchGetJourneysRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemBatchGetJourneysRequest demBatchGetJourneysRequest = (DemBatchGetJourneysRequest) o; + return Objects.equals(this.data, demBatchGetJourneysRequest.data) + && Objects.equals( + this.additionalProperties, demBatchGetJourneysRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemBatchGetJourneysRequest {\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/DemBatchGetJourneysRequestType.java b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysRequestType.java new file mode 100644 index 00000000000..b3ea7006712 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemBatchGetJourneysRequestType.java @@ -0,0 +1,58 @@ +/* + * 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 resource type for a request to retrieve DEM journeys by test suite IDs. */ +@JsonSerialize( + using = DemBatchGetJourneysRequestType.DemBatchGetJourneysRequestTypeSerializer.class) +public class DemBatchGetJourneysRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("batch_get_journeys_by_test_suite_ids_request")); + + public static final DemBatchGetJourneysRequestType BATCH_GET_JOURNEYS_BY_TEST_SUITE_IDS_REQUEST = + new DemBatchGetJourneysRequestType("batch_get_journeys_by_test_suite_ids_request"); + + DemBatchGetJourneysRequestType(String value) { + super(value, allowedValues); + } + + public static class DemBatchGetJourneysRequestTypeSerializer + extends StdSerializer { + public DemBatchGetJourneysRequestTypeSerializer(Class t) { + super(t); + } + + public DemBatchGetJourneysRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DemBatchGetJourneysRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemBatchGetJourneysRequestType fromValue(String value) { + return new DemBatchGetJourneysRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteAttributes.java new file mode 100644 index 00000000000..c823dfb02bf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteAttributes.java @@ -0,0 +1,196 @@ +/* + * 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; + +/** Attributes for creating a test suite for a DEM journey. */ +@JsonPropertyOrder({ + DemCreateJourneyTestSuiteAttributes.JSON_PROPERTY_INCLUDE_TESTS_FROM_JOURNEY_COVERAGE, + DemCreateJourneyTestSuiteAttributes.JSON_PROPERTY_TEST_SUITE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemCreateJourneyTestSuiteAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCLUDE_TESTS_FROM_JOURNEY_COVERAGE = + "include_tests_from_journey_coverage"; + private JsonNullable includeTestsFromJourneyCoverage = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TEST_SUITE_NAME = "test_suite_name"; + private JsonNullable testSuiteName = JsonNullable.undefined(); + + public DemCreateJourneyTestSuiteAttributes includeTestsFromJourneyCoverage( + Boolean includeTestsFromJourneyCoverage) { + this.includeTestsFromJourneyCoverage = + JsonNullable.of(includeTestsFromJourneyCoverage); + return this; + } + + /** + * Whether to populate the test suite based on journey coverage data. + * + * @return includeTestsFromJourneyCoverage + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getIncludeTestsFromJourneyCoverage() { + return includeTestsFromJourneyCoverage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_TESTS_FROM_JOURNEY_COVERAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIncludeTestsFromJourneyCoverage_JsonNullable() { + return includeTestsFromJourneyCoverage; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_TESTS_FROM_JOURNEY_COVERAGE) + public void setIncludeTestsFromJourneyCoverage_JsonNullable( + JsonNullable includeTestsFromJourneyCoverage) { + this.includeTestsFromJourneyCoverage = includeTestsFromJourneyCoverage; + } + + public void setIncludeTestsFromJourneyCoverage(Boolean includeTestsFromJourneyCoverage) { + this.includeTestsFromJourneyCoverage = + JsonNullable.of(includeTestsFromJourneyCoverage); + } + + public DemCreateJourneyTestSuiteAttributes testSuiteName(String testSuiteName) { + this.testSuiteName = JsonNullable.of(testSuiteName); + return this; + } + + /** + * An optional custom name for the auto-created test suite. + * + * @return testSuiteName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTestSuiteName() { + return testSuiteName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEST_SUITE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTestSuiteName_JsonNullable() { + return testSuiteName; + } + + @JsonProperty(JSON_PROPERTY_TEST_SUITE_NAME) + public void setTestSuiteName_JsonNullable(JsonNullable testSuiteName) { + this.testSuiteName = testSuiteName; + } + + public void setTestSuiteName(String testSuiteName) { + this.testSuiteName = JsonNullable.of(testSuiteName); + } + + /** + * 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 DemCreateJourneyTestSuiteAttributes + */ + @JsonAnySetter + public DemCreateJourneyTestSuiteAttributes 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 DemCreateJourneyTestSuiteAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemCreateJourneyTestSuiteAttributes demCreateJourneyTestSuiteAttributes = + (DemCreateJourneyTestSuiteAttributes) o; + return Objects.equals( + this.includeTestsFromJourneyCoverage, + demCreateJourneyTestSuiteAttributes.includeTestsFromJourneyCoverage) + && Objects.equals(this.testSuiteName, demCreateJourneyTestSuiteAttributes.testSuiteName) + && Objects.equals( + this.additionalProperties, demCreateJourneyTestSuiteAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(includeTestsFromJourneyCoverage, testSuiteName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemCreateJourneyTestSuiteAttributes {\n"); + sb.append(" includeTestsFromJourneyCoverage: ") + .append(toIndentedString(includeTestsFromJourneyCoverage)) + .append("\n"); + sb.append(" testSuiteName: ").append(toIndentedString(testSuiteName)).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/DemCreateJourneyTestSuiteData.java b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteData.java new file mode 100644 index 00000000000..12c78f1ef5e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteData.java @@ -0,0 +1,183 @@ +/* + * 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; + +/** Data object for a create test suite request. */ +@JsonPropertyOrder({ + DemCreateJourneyTestSuiteData.JSON_PROPERTY_ATTRIBUTES, + DemCreateJourneyTestSuiteData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemCreateJourneyTestSuiteData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemCreateJourneyTestSuiteAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemCreateJourneyTestSuiteRequestType type; + + public DemCreateJourneyTestSuiteData() {} + + @JsonCreator + public DemCreateJourneyTestSuiteData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + DemCreateJourneyTestSuiteRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemCreateJourneyTestSuiteData attributes(DemCreateJourneyTestSuiteAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a test suite for a DEM journey. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DemCreateJourneyTestSuiteAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemCreateJourneyTestSuiteAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemCreateJourneyTestSuiteData type(DemCreateJourneyTestSuiteRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a request to create a DEM journey test suite. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemCreateJourneyTestSuiteRequestType getType() { + return type; + } + + public void setType(DemCreateJourneyTestSuiteRequestType 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 DemCreateJourneyTestSuiteData + */ + @JsonAnySetter + public DemCreateJourneyTestSuiteData 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 DemCreateJourneyTestSuiteData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemCreateJourneyTestSuiteData demCreateJourneyTestSuiteData = (DemCreateJourneyTestSuiteData) o; + return Objects.equals(this.attributes, demCreateJourneyTestSuiteData.attributes) + && Objects.equals(this.type, demCreateJourneyTestSuiteData.type) + && Objects.equals( + this.additionalProperties, demCreateJourneyTestSuiteData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemCreateJourneyTestSuiteData {\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/DemCreateJourneyTestSuiteRequest.java b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteRequest.java new file mode 100644 index 00000000000..ded5b5c71d3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteRequest.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; + +/** Request body for creating a test suite for a DEM journey. */ +@JsonPropertyOrder({DemCreateJourneyTestSuiteRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemCreateJourneyTestSuiteRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemCreateJourneyTestSuiteData data; + + public DemCreateJourneyTestSuiteRequest() {} + + @JsonCreator + public DemCreateJourneyTestSuiteRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DemCreateJourneyTestSuiteData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemCreateJourneyTestSuiteRequest data(DemCreateJourneyTestSuiteData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a create test suite request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemCreateJourneyTestSuiteData getData() { + return data; + } + + public void setData(DemCreateJourneyTestSuiteData 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 DemCreateJourneyTestSuiteRequest + */ + @JsonAnySetter + public DemCreateJourneyTestSuiteRequest 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 DemCreateJourneyTestSuiteRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemCreateJourneyTestSuiteRequest demCreateJourneyTestSuiteRequest = + (DemCreateJourneyTestSuiteRequest) o; + return Objects.equals(this.data, demCreateJourneyTestSuiteRequest.data) + && Objects.equals( + this.additionalProperties, demCreateJourneyTestSuiteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemCreateJourneyTestSuiteRequest {\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/DemCreateJourneyTestSuiteRequestType.java b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteRequestType.java new file mode 100644 index 00000000000..6bce80b74fb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemCreateJourneyTestSuiteRequestType.java @@ -0,0 +1,60 @@ +/* + * 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 resource type for a request to create a DEM journey test suite. */ +@JsonSerialize( + using = + DemCreateJourneyTestSuiteRequestType.DemCreateJourneyTestSuiteRequestTypeSerializer.class) +public class DemCreateJourneyTestSuiteRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("create_test_suite_for_journey_request")); + + public static final DemCreateJourneyTestSuiteRequestType CREATE_TEST_SUITE_FOR_JOURNEY_REQUEST = + new DemCreateJourneyTestSuiteRequestType("create_test_suite_for_journey_request"); + + DemCreateJourneyTestSuiteRequestType(String value) { + super(value, allowedValues); + } + + public static class DemCreateJourneyTestSuiteRequestTypeSerializer + extends StdSerializer { + public DemCreateJourneyTestSuiteRequestTypeSerializer( + Class t) { + super(t); + } + + public DemCreateJourneyTestSuiteRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DemCreateJourneyTestSuiteRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemCreateJourneyTestSuiteRequestType fromValue(String value) { + return new DemCreateJourneyTestSuiteRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyCandidateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyCandidateAttributes.java new file mode 100644 index 00000000000..f83a4d4df19 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyCandidateAttributes.java @@ -0,0 +1,410 @@ +/* + * 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 an inferred journey candidate. */ +@JsonPropertyOrder({ + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_CREATED_AT, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_DESCRIPTION, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_JOURNEY_RUM, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_NAME, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_ORG_ID, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_RANK, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_TAGS, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_TEST_SUITE, + DemInferredJourneyCandidateAttributes.JSON_PROPERTY_VARIANTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemInferredJourneyCandidateAttributes { + @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_JOURNEY_RUM = "journey_rum"; + private DemJourneyRum 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_RANK = "rank"; + private JsonNullable rank = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = new ArrayList<>(); + + public static final String JSON_PROPERTY_TEST_SUITE = "test_suite"; + private DemTestSuiteNested testSuite; + + public static final String JSON_PROPERTY_VARIANTS = "variants"; + private List variants = new ArrayList<>(); + + public DemInferredJourneyCandidateAttributes() {} + + @JsonCreator + public DemInferredJourneyCandidateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_JOURNEY_RUM) DemJourneyRum journeyRum, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags, + @JsonProperty(required = true, value = JSON_PROPERTY_VARIANTS) List variants) { + this.createdAt = createdAt; + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + this.name = name; + this.orgId = orgId; + this.tags = tags; + this.variants = variants; + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + } + + /** + * Timestamp when the inferred journey was first observed. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public DemInferredJourneyCandidateAttributes description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * An optional description of the inferred journey. + * + * @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 DemInferredJourneyCandidateAttributes journeyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + return this; + } + + /** + * The RUM definition for a DEM journey. + * + * @return journeyRum + */ + @JsonProperty(JSON_PROPERTY_JOURNEY_RUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyRum getJourneyRum() { + return journeyRum; + } + + public void setJourneyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + if (journeyRum != null) { + this.unparsed |= journeyRum.unparsed; + } + } + + public DemInferredJourneyCandidateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the inferred journey. + * + * @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 organization ID that owns this inferred journey. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + /** + * Ranking score of the inferred journey candidate. + * + * @return rank + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getRank() { + + if (rank == null) { + rank = JsonNullable.undefined(); + } + return rank.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRank_JsonNullable() { + return rank; + } + + @JsonProperty(JSON_PROPERTY_RANK) + private void setRank_JsonNullable(JsonNullable rank) { + this.rank = rank; + } + + public DemInferredJourneyCandidateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public DemInferredJourneyCandidateAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags associated with a DEM resource. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public DemInferredJourneyCandidateAttributes testSuite(DemTestSuiteNested testSuite) { + this.testSuite = testSuite; + this.unparsed |= testSuite.unparsed; + return this; + } + + /** + * A test suite associated with a DEM resource. + * + * @return testSuite + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_SUITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DemTestSuiteNested getTestSuite() { + return testSuite; + } + + public void setTestSuite(DemTestSuiteNested testSuite) { + this.testSuite = testSuite; + if (testSuite != null) { + this.unparsed |= testSuite.unparsed; + } + } + + public DemInferredJourneyCandidateAttributes variants(List variants) { + this.variants = variants; + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemInferredJourneyCandidateAttributes addVariantsItem(DemVariant variantsItem) { + this.variants.add(variantsItem); + this.unparsed |= variantsItem.unparsed; + return this; + } + + /** + * List of variants associated with a DEM journey. + * + * @return variants + */ + @JsonProperty(JSON_PROPERTY_VARIANTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVariants() { + return variants; + } + + public void setVariants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + 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 DemInferredJourneyCandidateAttributes + */ + @JsonAnySetter + public DemInferredJourneyCandidateAttributes 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 DemInferredJourneyCandidateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemInferredJourneyCandidateAttributes demInferredJourneyCandidateAttributes = + (DemInferredJourneyCandidateAttributes) o; + return Objects.equals(this.createdAt, demInferredJourneyCandidateAttributes.createdAt) + && Objects.equals(this.description, demInferredJourneyCandidateAttributes.description) + && Objects.equals(this.journeyRum, demInferredJourneyCandidateAttributes.journeyRum) + && Objects.equals(this.name, demInferredJourneyCandidateAttributes.name) + && Objects.equals(this.orgId, demInferredJourneyCandidateAttributes.orgId) + && Objects.equals(this.rank, demInferredJourneyCandidateAttributes.rank) + && Objects.equals(this.tags, demInferredJourneyCandidateAttributes.tags) + && Objects.equals(this.testSuite, demInferredJourneyCandidateAttributes.testSuite) + && Objects.equals(this.variants, demInferredJourneyCandidateAttributes.variants) + && Objects.equals( + this.additionalProperties, demInferredJourneyCandidateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + journeyRum, + name, + orgId, + rank, + tags, + testSuite, + variants, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemInferredJourneyCandidateAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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(" rank: ").append(toIndentedString(rank)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" testSuite: ").append(toIndentedString(testSuite)).append("\n"); + sb.append(" variants: ").append(toIndentedString(variants)).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/DemInferredJourneyCandidateData.java b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyCandidateData.java new file mode 100644 index 00000000000..0b9d9d3d3cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyCandidateData.java @@ -0,0 +1,215 @@ +/* + * 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; + +/** Data object for an inferred journey candidate. */ +@JsonPropertyOrder({ + DemInferredJourneyCandidateData.JSON_PROPERTY_ATTRIBUTES, + DemInferredJourneyCandidateData.JSON_PROPERTY_ID, + DemInferredJourneyCandidateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemInferredJourneyCandidateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemInferredJourneyCandidateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemJourneyType type; + + public DemInferredJourneyCandidateData() {} + + @JsonCreator + public DemInferredJourneyCandidateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemInferredJourneyCandidateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemJourneyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemInferredJourneyCandidateData attributes( + DemInferredJourneyCandidateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an inferred journey candidate. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemInferredJourneyCandidateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemInferredJourneyCandidateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemInferredJourneyCandidateData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the inferred journey. + * + * @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 DemInferredJourneyCandidateData type(DemJourneyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journeys. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyType getType() { + return type; + } + + public void setType(DemJourneyType 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 DemInferredJourneyCandidateData + */ + @JsonAnySetter + public DemInferredJourneyCandidateData 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 DemInferredJourneyCandidateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemInferredJourneyCandidateData demInferredJourneyCandidateData = + (DemInferredJourneyCandidateData) o; + return Objects.equals(this.attributes, demInferredJourneyCandidateData.attributes) + && Objects.equals(this.id, demInferredJourneyCandidateData.id) + && Objects.equals(this.type, demInferredJourneyCandidateData.type) + && Objects.equals( + this.additionalProperties, demInferredJourneyCandidateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemInferredJourneyCandidateData {\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/DemInferredJourneyIgnoredAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyIgnoredAttributes.java new file mode 100644 index 00000000000..7f4a815d7e9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyIgnoredAttributes.java @@ -0,0 +1,397 @@ +/* + * 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 an ignored inferred journey. */ +@JsonPropertyOrder({ + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_CREATED_AT, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_DESCRIPTION, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_IGNORED_AT, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_JOURNEY_RUM, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_NAME, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_ORG_ID, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_TAGS, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_TEST_SUITE, + DemInferredJourneyIgnoredAttributes.JSON_PROPERTY_VARIANTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemInferredJourneyIgnoredAttributes { + @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_IGNORED_AT = "ignored_at"; + private OffsetDateTime ignoredAt; + + public static final String JSON_PROPERTY_JOURNEY_RUM = "journey_rum"; + private DemJourneyRum 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_TEST_SUITE = "test_suite"; + private DemTestSuiteNested testSuite; + + public static final String JSON_PROPERTY_VARIANTS = "variants"; + private List variants = new ArrayList<>(); + + public DemInferredJourneyIgnoredAttributes() {} + + @JsonCreator + public DemInferredJourneyIgnoredAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_IGNORED_AT) OffsetDateTime ignoredAt, + @JsonProperty(required = true, value = JSON_PROPERTY_JOURNEY_RUM) DemJourneyRum journeyRum, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags, + @JsonProperty(required = true, value = JSON_PROPERTY_VARIANTS) List variants) { + this.createdAt = createdAt; + this.ignoredAt = ignoredAt; + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + this.name = name; + this.orgId = orgId; + this.tags = tags; + this.variants = variants; + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + } + + /** + * Timestamp when the inferred journey was first observed. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public DemInferredJourneyIgnoredAttributes description(String description) { + this.description = JsonNullable.of(description); + return this; + } + + /** + * An optional description of the inferred journey. + * + * @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); + } + + /** + * Timestamp when the inferred journey was ignored. + * + * @return ignoredAt + */ + @JsonProperty(JSON_PROPERTY_IGNORED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getIgnoredAt() { + return ignoredAt; + } + + public DemInferredJourneyIgnoredAttributes journeyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + return this; + } + + /** + * The RUM definition for a DEM journey. + * + * @return journeyRum + */ + @JsonProperty(JSON_PROPERTY_JOURNEY_RUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyRum getJourneyRum() { + return journeyRum; + } + + public void setJourneyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + if (journeyRum != null) { + this.unparsed |= journeyRum.unparsed; + } + } + + public DemInferredJourneyIgnoredAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the inferred journey. + * + * @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 organization ID that owns this inferred journey. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public DemInferredJourneyIgnoredAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public DemInferredJourneyIgnoredAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags associated with a DEM resource. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public DemInferredJourneyIgnoredAttributes testSuite(DemTestSuiteNested testSuite) { + this.testSuite = testSuite; + this.unparsed |= testSuite.unparsed; + return this; + } + + /** + * A test suite associated with a DEM resource. + * + * @return testSuite + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEST_SUITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DemTestSuiteNested getTestSuite() { + return testSuite; + } + + public void setTestSuite(DemTestSuiteNested testSuite) { + this.testSuite = testSuite; + if (testSuite != null) { + this.unparsed |= testSuite.unparsed; + } + } + + public DemInferredJourneyIgnoredAttributes variants(List variants) { + this.variants = variants; + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemInferredJourneyIgnoredAttributes addVariantsItem(DemVariant variantsItem) { + this.variants.add(variantsItem); + this.unparsed |= variantsItem.unparsed; + return this; + } + + /** + * List of variants associated with a DEM journey. + * + * @return variants + */ + @JsonProperty(JSON_PROPERTY_VARIANTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVariants() { + return variants; + } + + public void setVariants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + 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 DemInferredJourneyIgnoredAttributes + */ + @JsonAnySetter + public DemInferredJourneyIgnoredAttributes 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 DemInferredJourneyIgnoredAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemInferredJourneyIgnoredAttributes demInferredJourneyIgnoredAttributes = + (DemInferredJourneyIgnoredAttributes) o; + return Objects.equals(this.createdAt, demInferredJourneyIgnoredAttributes.createdAt) + && Objects.equals(this.description, demInferredJourneyIgnoredAttributes.description) + && Objects.equals(this.ignoredAt, demInferredJourneyIgnoredAttributes.ignoredAt) + && Objects.equals(this.journeyRum, demInferredJourneyIgnoredAttributes.journeyRum) + && Objects.equals(this.name, demInferredJourneyIgnoredAttributes.name) + && Objects.equals(this.orgId, demInferredJourneyIgnoredAttributes.orgId) + && Objects.equals(this.tags, demInferredJourneyIgnoredAttributes.tags) + && Objects.equals(this.testSuite, demInferredJourneyIgnoredAttributes.testSuite) + && Objects.equals(this.variants, demInferredJourneyIgnoredAttributes.variants) + && Objects.equals( + this.additionalProperties, demInferredJourneyIgnoredAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + ignoredAt, + journeyRum, + name, + orgId, + tags, + testSuite, + variants, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemInferredJourneyIgnoredAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ignoredAt: ").append(toIndentedString(ignoredAt)).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(" testSuite: ").append(toIndentedString(testSuite)).append("\n"); + sb.append(" variants: ").append(toIndentedString(variants)).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/DemInferredJourneyIgnoredData.java b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyIgnoredData.java new file mode 100644 index 00000000000..c3d2f9b2a05 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyIgnoredData.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; + +/** Data object for an ignored inferred journey. */ +@JsonPropertyOrder({ + DemInferredJourneyIgnoredData.JSON_PROPERTY_ATTRIBUTES, + DemInferredJourneyIgnoredData.JSON_PROPERTY_ID, + DemInferredJourneyIgnoredData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemInferredJourneyIgnoredData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemInferredJourneyIgnoredAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemJourneyType type; + + public DemInferredJourneyIgnoredData() {} + + @JsonCreator + public DemInferredJourneyIgnoredData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemInferredJourneyIgnoredAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemJourneyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemInferredJourneyIgnoredData attributes(DemInferredJourneyIgnoredAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an ignored inferred journey. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemInferredJourneyIgnoredAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemInferredJourneyIgnoredAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemInferredJourneyIgnoredData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the ignored inferred journey. + * + * @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 DemInferredJourneyIgnoredData type(DemJourneyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journeys. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyType getType() { + return type; + } + + public void setType(DemJourneyType 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 DemInferredJourneyIgnoredData + */ + @JsonAnySetter + public DemInferredJourneyIgnoredData 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 DemInferredJourneyIgnoredData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemInferredJourneyIgnoredData demInferredJourneyIgnoredData = (DemInferredJourneyIgnoredData) o; + return Objects.equals(this.attributes, demInferredJourneyIgnoredData.attributes) + && Objects.equals(this.id, demInferredJourneyIgnoredData.id) + && Objects.equals(this.type, demInferredJourneyIgnoredData.type) + && Objects.equals( + this.additionalProperties, demInferredJourneyIgnoredData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemInferredJourneyIgnoredData {\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/DemInferredJourneyStatus.java b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyStatus.java new file mode 100644 index 00000000000..15797baeeaf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemInferredJourneyStatus.java @@ -0,0 +1,58 @@ +/* + * 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 an inferred DEM journey. */ +@JsonSerialize(using = DemInferredJourneyStatus.DemInferredJourneyStatusSerializer.class) +public class DemInferredJourneyStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("candidate", "ignored")); + + public static final DemInferredJourneyStatus CANDIDATE = + new DemInferredJourneyStatus("candidate"); + public static final DemInferredJourneyStatus IGNORED = new DemInferredJourneyStatus("ignored"); + + DemInferredJourneyStatus(String value) { + super(value, allowedValues); + } + + public static class DemInferredJourneyStatusSerializer + extends StdSerializer { + public DemInferredJourneyStatusSerializer(Class t) { + super(t); + } + + public DemInferredJourneyStatusSerializer() { + this(null); + } + + @Override + public void serialize( + DemInferredJourneyStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemInferredJourneyStatus fromValue(String value) { + return new DemInferredJourneyStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateAttributes.java new file mode 100644 index 00000000000..b8787db6284 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateAttributes.java @@ -0,0 +1,287 @@ +/* + * 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; + +/** Attributes for creating or updating a DEM journey. */ +@JsonPropertyOrder({ + DemJourneyCreateAttributes.JSON_PROPERTY_DESCRIPTION, + DemJourneyCreateAttributes.JSON_PROPERTY_JOURNEY_RUM, + DemJourneyCreateAttributes.JSON_PROPERTY_NAME, + DemJourneyCreateAttributes.JSON_PROPERTY_TAGS, + DemJourneyCreateAttributes.JSON_PROPERTY_VARIANTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_JOURNEY_RUM = "journey_rum"; + private DemJourneyRum 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 static final String JSON_PROPERTY_VARIANTS = "variants"; + private List variants = null; + + public DemJourneyCreateAttributes() {} + + @JsonCreator + public DemJourneyCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_JOURNEY_RUM) DemJourneyRum 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 DemJourneyCreateAttributes description(String description) { + this.description = description; + return this; + } + + /** + * An optional human-readable description of the journey. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public DemJourneyCreateAttributes journeyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + return this; + } + + /** + * The RUM definition for a DEM journey. + * + * @return journeyRum + */ + @JsonProperty(JSON_PROPERTY_JOURNEY_RUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyRum getJourneyRum() { + return journeyRum; + } + + public void setJourneyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + if (journeyRum != null) { + this.unparsed |= journeyRum.unparsed; + } + } + + public DemJourneyCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the DEM journey. + * + * @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 DemJourneyCreateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public DemJourneyCreateAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags associated with a DEM resource. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public DemJourneyCreateAttributes variants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public DemJourneyCreateAttributes addVariantsItem(DemVariant variantsItem) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add(variantsItem); + this.unparsed |= variantsItem.unparsed; + return this; + } + + /** + * List of variants associated with a DEM journey. + * + * @return variants + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getVariants() { + return variants; + } + + public void setVariants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + 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 DemJourneyCreateAttributes + */ + @JsonAnySetter + public DemJourneyCreateAttributes 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 DemJourneyCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyCreateAttributes demJourneyCreateAttributes = (DemJourneyCreateAttributes) o; + return Objects.equals(this.description, demJourneyCreateAttributes.description) + && Objects.equals(this.journeyRum, demJourneyCreateAttributes.journeyRum) + && Objects.equals(this.name, demJourneyCreateAttributes.name) + && Objects.equals(this.tags, demJourneyCreateAttributes.tags) + && Objects.equals(this.variants, demJourneyCreateAttributes.variants) + && Objects.equals( + this.additionalProperties, demJourneyCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, journeyRum, name, tags, variants, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyCreateAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).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(" variants: ").append(toIndentedString(variants)).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/DemJourneyCreateData.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateData.java new file mode 100644 index 00000000000..71ca9f7d5ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateData.java @@ -0,0 +1,184 @@ +/* + * 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; + +/** Data object for a DEM journey create or update request. */ +@JsonPropertyOrder({ + DemJourneyCreateData.JSON_PROPERTY_ATTRIBUTES, + DemJourneyCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemJourneyCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemJourneyType type; + + public DemJourneyCreateData() {} + + @JsonCreator + public DemJourneyCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemJourneyCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemJourneyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemJourneyCreateData attributes(DemJourneyCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a DEM journey. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemJourneyCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemJourneyCreateData type(DemJourneyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journeys. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyType getType() { + return type; + } + + public void setType(DemJourneyType 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 DemJourneyCreateData + */ + @JsonAnySetter + public DemJourneyCreateData 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 DemJourneyCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyCreateData demJourneyCreateData = (DemJourneyCreateData) o; + return Objects.equals(this.attributes, demJourneyCreateData.attributes) + && Objects.equals(this.type, demJourneyCreateData.type) + && Objects.equals(this.additionalProperties, demJourneyCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyCreateData {\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/DemJourneyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateRequest.java new file mode 100644 index 00000000000..46568455b1a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyCreateRequest.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; + +/** Request body for creating or updating a DEM journey. */ +@JsonPropertyOrder({DemJourneyCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemJourneyCreateData data; + + public DemJourneyCreateRequest() {} + + @JsonCreator + public DemJourneyCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DemJourneyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemJourneyCreateRequest data(DemJourneyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a DEM journey create or update request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyCreateData getData() { + return data; + } + + public void setData(DemJourneyCreateData 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 DemJourneyCreateRequest + */ + @JsonAnySetter + public DemJourneyCreateRequest 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 DemJourneyCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyCreateRequest demJourneyCreateRequest = (DemJourneyCreateRequest) o; + return Objects.equals(this.data, demJourneyCreateRequest.data) + && Objects.equals(this.additionalProperties, demJourneyCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyCreateRequest {\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/DemJourneyResponse.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyResponse.java new file mode 100644 index 00000000000..ab9aeae040c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyResponse.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; + +/** Response body for a single DEM journey. */ +@JsonPropertyOrder({DemJourneyResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemJourneyResponseData data; + + public DemJourneyResponse() {} + + @JsonCreator + public DemJourneyResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DemJourneyResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemJourneyResponse data(DemJourneyResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object in a DEM journey response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyResponseData getData() { + return data; + } + + public void setData(DemJourneyResponseData 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 DemJourneyResponse + */ + @JsonAnySetter + public DemJourneyResponse 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 DemJourneyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyResponse demJourneyResponse = (DemJourneyResponse) o; + return Objects.equals(this.data, demJourneyResponse.data) + && Objects.equals(this.additionalProperties, demJourneyResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyResponse {\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/DemJourneyResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyResponseAttributes.java new file mode 100644 index 00000000000..cd8f501e374 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyResponseAttributes.java @@ -0,0 +1,461 @@ +/* + * 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; + +/** Attributes returned in a DEM journey response. */ +@JsonPropertyOrder({ + DemJourneyResponseAttributes.JSON_PROPERTY_CREATED_AT, + DemJourneyResponseAttributes.JSON_PROPERTY_CREATED_BY, + DemJourneyResponseAttributes.JSON_PROPERTY_DESCRIPTION, + DemJourneyResponseAttributes.JSON_PROPERTY_JOURNEY_RUM, + DemJourneyResponseAttributes.JSON_PROPERTY_NAME, + DemJourneyResponseAttributes.JSON_PROPERTY_ORG_ID, + DemJourneyResponseAttributes.JSON_PROPERTY_TAGS, + DemJourneyResponseAttributes.JSON_PROPERTY_TEST_SUITE, + DemJourneyResponseAttributes.JSON_PROPERTY_UPDATED_AT, + DemJourneyResponseAttributes.JSON_PROPERTY_UPDATED_BY, + DemJourneyResponseAttributes.JSON_PROPERTY_VARIANTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private DemUser createdBy; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_JOURNEY_RUM = "journey_rum"; + private DemJourneyRum 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_TEST_SUITE = "test_suite"; + private DemTestSuiteNested testSuite; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private DemUser updatedBy; + + public static final String JSON_PROPERTY_VARIANTS = "variants"; + private List variants = new ArrayList<>(); + + public DemJourneyResponseAttributes() {} + + @JsonCreator + public DemJourneyResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) DemUser createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_JOURNEY_RUM) DemJourneyRum journeyRum, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags, + @JsonProperty(required = true, value = JSON_PROPERTY_TEST_SUITE) DemTestSuiteNested testSuite, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_BY) DemUser updatedBy, + @JsonProperty(required = true, value = JSON_PROPERTY_VARIANTS) List variants) { + this.createdAt = createdAt; + this.createdBy = createdBy; + this.unparsed |= createdBy.unparsed; + this.description = description; + if (description != null) {} + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + this.name = name; + this.orgId = orgId; + this.tags = tags; + this.testSuite = testSuite; + this.unparsed |= testSuite.unparsed; + this.updatedAt = updatedAt; + if (updatedAt != null) {} + this.updatedBy = updatedBy; + this.unparsed |= updatedBy.unparsed; + this.variants = variants; + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + } + + /** + * The timestamp when the journey was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public DemJourneyResponseAttributes createdBy(DemUser createdBy) { + this.createdBy = createdBy; + this.unparsed |= createdBy.unparsed; + return this; + } + + /** + * A Datadog user associated with a DEM operation. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemUser getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(DemUser createdBy) { + this.createdBy = createdBy; + if (createdBy != null) { + this.unparsed |= createdBy.unparsed; + } + } + + public DemJourneyResponseAttributes description(String description) { + this.description = description; + if (description != null) {} + return this; + } + + /** + * An optional human-readable description of the journey. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public DemJourneyResponseAttributes journeyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + this.unparsed |= journeyRum.unparsed; + return this; + } + + /** + * The RUM definition for a DEM journey. + * + * @return journeyRum + */ + @JsonProperty(JSON_PROPERTY_JOURNEY_RUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyRum getJourneyRum() { + return journeyRum; + } + + public void setJourneyRum(DemJourneyRum journeyRum) { + this.journeyRum = journeyRum; + if (journeyRum != null) { + this.unparsed |= journeyRum.unparsed; + } + } + + public DemJourneyResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the DEM journey. + * + * @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 organization ID that owns this journey. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public DemJourneyResponseAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public DemJourneyResponseAttributes addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags associated with a DEM resource. + * + * @return tags + */ + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public DemJourneyResponseAttributes testSuite(DemTestSuiteNested testSuite) { + this.testSuite = testSuite; + this.unparsed |= testSuite.unparsed; + return this; + } + + /** + * A test suite associated with a DEM resource. + * + * @return testSuite + */ + @JsonProperty(JSON_PROPERTY_TEST_SUITE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemTestSuiteNested getTestSuite() { + return testSuite; + } + + public void setTestSuite(DemTestSuiteNested testSuite) { + this.testSuite = testSuite; + if (testSuite != null) { + this.unparsed |= testSuite.unparsed; + } + } + + /** + * The timestamp when the journey was last updated. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public DemJourneyResponseAttributes updatedBy(DemUser updatedBy) { + this.updatedBy = updatedBy; + this.unparsed |= updatedBy.unparsed; + return this; + } + + /** + * A Datadog user associated with a DEM operation. + * + * @return updatedBy + */ + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemUser getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(DemUser updatedBy) { + this.updatedBy = updatedBy; + if (updatedBy != null) { + this.unparsed |= updatedBy.unparsed; + } + } + + public DemJourneyResponseAttributes variants(List variants) { + this.variants = variants; + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemJourneyResponseAttributes addVariantsItem(DemVariant variantsItem) { + this.variants.add(variantsItem); + this.unparsed |= variantsItem.unparsed; + return this; + } + + /** + * List of variants associated with a DEM journey. + * + * @return variants + */ + @JsonProperty(JSON_PROPERTY_VARIANTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVariants() { + return variants; + } + + public void setVariants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + 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 DemJourneyResponseAttributes + */ + @JsonAnySetter + public DemJourneyResponseAttributes 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 DemJourneyResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyResponseAttributes demJourneyResponseAttributes = (DemJourneyResponseAttributes) o; + return Objects.equals(this.createdAt, demJourneyResponseAttributes.createdAt) + && Objects.equals(this.createdBy, demJourneyResponseAttributes.createdBy) + && Objects.equals(this.description, demJourneyResponseAttributes.description) + && Objects.equals(this.journeyRum, demJourneyResponseAttributes.journeyRum) + && Objects.equals(this.name, demJourneyResponseAttributes.name) + && Objects.equals(this.orgId, demJourneyResponseAttributes.orgId) + && Objects.equals(this.tags, demJourneyResponseAttributes.tags) + && Objects.equals(this.testSuite, demJourneyResponseAttributes.testSuite) + && Objects.equals(this.updatedAt, demJourneyResponseAttributes.updatedAt) + && Objects.equals(this.updatedBy, demJourneyResponseAttributes.updatedBy) + && Objects.equals(this.variants, demJourneyResponseAttributes.variants) + && Objects.equals( + this.additionalProperties, demJourneyResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + description, + journeyRum, + name, + orgId, + tags, + testSuite, + updatedAt, + updatedBy, + variants, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyResponseAttributes {\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(" 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(" testSuite: ").append(toIndentedString(testSuite)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" variants: ").append(toIndentedString(variants)).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/DemJourneyResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyResponseData.java new file mode 100644 index 00000000000..6e90c53772f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyResponseData.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** Data object in a DEM journey response. */ +@JsonPropertyOrder({ + DemJourneyResponseData.JSON_PROPERTY_ATTRIBUTES, + DemJourneyResponseData.JSON_PROPERTY_ID, + DemJourneyResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemJourneyResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemJourneyType type; + + public DemJourneyResponseData() {} + + @JsonCreator + public DemJourneyResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemJourneyResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemJourneyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemJourneyResponseData attributes(DemJourneyResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes returned in a DEM journey response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemJourneyResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemJourneyResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the DEM journey. + * + * @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 DemJourneyResponseData type(DemJourneyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journeys. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyType getType() { + return type; + } + + public void setType(DemJourneyType 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 DemJourneyResponseData + */ + @JsonAnySetter + public DemJourneyResponseData 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 DemJourneyResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyResponseData demJourneyResponseData = (DemJourneyResponseData) o; + return Objects.equals(this.attributes, demJourneyResponseData.attributes) + && Objects.equals(this.id, demJourneyResponseData.id) + && Objects.equals(this.type, demJourneyResponseData.type) + && Objects.equals(this.additionalProperties, demJourneyResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyResponseData {\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/DemJourneyRum.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyRum.java new file mode 100644 index 00000000000..8350c076846 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyRum.java @@ -0,0 +1,237 @@ +/* + * 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 RUM definition for a DEM journey. */ +@JsonPropertyOrder({ + DemJourneyRum.JSON_PROPERTY_FILTER, + DemJourneyRum.JSON_PROPERTY_RUM_STEPS, + DemJourneyRum.JSON_PROPERTY_VARIANTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyRum { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILTER = "filter"; + private String filter; + + public static final String JSON_PROPERTY_RUM_STEPS = "rum_steps"; + private List rumSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_VARIANTS = "variants"; + private List variants = null; + + public DemJourneyRum() {} + + @JsonCreator + public DemJourneyRum( + @JsonProperty(required = true, value = JSON_PROPERTY_RUM_STEPS) List rumSteps) { + this.rumSteps = rumSteps; + for (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + } + + public DemJourneyRum filter(String filter) { + this.filter = filter; + return this; + } + + /** + * An optional RUM query filter applied to the entire journey. + * + * @return filter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilter() { + return filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public DemJourneyRum rumSteps(List rumSteps) { + this.rumSteps = rumSteps; + for (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemJourneyRum addRumStepsItem(DemRumStep rumStepsItem) { + this.rumSteps.add(rumStepsItem); + this.unparsed |= rumStepsItem.unparsed; + return this; + } + + /** + * List of RUM journey steps. + * + * @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 (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + } + } + + public DemJourneyRum variants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public DemJourneyRum addVariantsItem(DemVariant variantsItem) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add(variantsItem); + this.unparsed |= variantsItem.unparsed; + return this; + } + + /** + * List of variants associated with a DEM journey. + * + * @return variants + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getVariants() { + return variants; + } + + public void setVariants(List variants) { + this.variants = variants; + if (variants != null) { + for (DemVariant item : variants) { + 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 DemJourneyRum + */ + @JsonAnySetter + public DemJourneyRum 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 DemJourneyRum object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyRum demJourneyRum = (DemJourneyRum) o; + return Objects.equals(this.filter, demJourneyRum.filter) + && Objects.equals(this.rumSteps, demJourneyRum.rumSteps) + && Objects.equals(this.variants, demJourneyRum.variants) + && Objects.equals(this.additionalProperties, demJourneyRum.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, rumSteps, variants, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyRum {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" rumSteps: ").append(toIndentedString(rumSteps)).append("\n"); + sb.append(" variants: ").append(toIndentedString(variants)).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/DemJourneyTestSuiteResponse.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteResponse.java new file mode 100644 index 00000000000..32e67f0e347 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteResponse.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; + +/** Response body for a DEM journey test suite. */ +@JsonPropertyOrder({DemJourneyTestSuiteResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyTestSuiteResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemJourneyTestSuiteResponseData data; + + public DemJourneyTestSuiteResponse() {} + + @JsonCreator + public DemJourneyTestSuiteResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DemJourneyTestSuiteResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemJourneyTestSuiteResponse data(DemJourneyTestSuiteResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object in a DEM test suite response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyTestSuiteResponseData getData() { + return data; + } + + public void setData(DemJourneyTestSuiteResponseData 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 DemJourneyTestSuiteResponse + */ + @JsonAnySetter + public DemJourneyTestSuiteResponse 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 DemJourneyTestSuiteResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyTestSuiteResponse demJourneyTestSuiteResponse = (DemJourneyTestSuiteResponse) o; + return Objects.equals(this.data, demJourneyTestSuiteResponse.data) + && Objects.equals( + this.additionalProperties, demJourneyTestSuiteResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyTestSuiteResponse {\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/DemJourneyTestSuiteResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteResponseAttributes.java new file mode 100644 index 00000000000..51d7d3dc482 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteResponseAttributes.java @@ -0,0 +1,204 @@ +/* + * 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; + +/** Attributes of a DEM journey test suite response. */ +@JsonPropertyOrder({ + DemJourneyTestSuiteResponseAttributes.JSON_PROPERTY_CREATED_AT, + DemJourneyTestSuiteResponseAttributes.JSON_PROPERTY_DROPPED_TEST_IDS, + DemJourneyTestSuiteResponseAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyTestSuiteResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DROPPED_TEST_IDS = "dropped_test_ids"; + private List droppedTestIds = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DemJourneyTestSuiteResponseAttributes() {} + + @JsonCreator + public DemJourneyTestSuiteResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.createdAt = createdAt; + this.name = name; + } + + /** + * The timestamp when the test suite was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public DemJourneyTestSuiteResponseAttributes droppedTestIds(List droppedTestIds) { + this.droppedTestIds = droppedTestIds; + return this; + } + + public DemJourneyTestSuiteResponseAttributes addDroppedTestIdsItem(String droppedTestIdsItem) { + if (this.droppedTestIds == null) { + this.droppedTestIds = new ArrayList<>(); + } + this.droppedTestIds.add(droppedTestIdsItem); + return this; + } + + /** + * Test IDs omitted because the caller lacks read access. + * + * @return droppedTestIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DROPPED_TEST_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDroppedTestIds() { + return droppedTestIds; + } + + public void setDroppedTestIds(List droppedTestIds) { + this.droppedTestIds = droppedTestIds; + } + + public DemJourneyTestSuiteResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the test suite. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * 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 DemJourneyTestSuiteResponseAttributes + */ + @JsonAnySetter + public DemJourneyTestSuiteResponseAttributes 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 DemJourneyTestSuiteResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyTestSuiteResponseAttributes demJourneyTestSuiteResponseAttributes = + (DemJourneyTestSuiteResponseAttributes) o; + return Objects.equals(this.createdAt, demJourneyTestSuiteResponseAttributes.createdAt) + && Objects.equals(this.droppedTestIds, demJourneyTestSuiteResponseAttributes.droppedTestIds) + && Objects.equals(this.name, demJourneyTestSuiteResponseAttributes.name) + && Objects.equals( + this.additionalProperties, demJourneyTestSuiteResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, droppedTestIds, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyTestSuiteResponseAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" droppedTestIds: ").append(toIndentedString(droppedTestIds)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/DemJourneyTestSuiteResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteResponseData.java new file mode 100644 index 00000000000..ab5c8dec785 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteResponseData.java @@ -0,0 +1,215 @@ +/* + * 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; + +/** Data object in a DEM test suite response. */ +@JsonPropertyOrder({ + DemJourneyTestSuiteResponseData.JSON_PROPERTY_ATTRIBUTES, + DemJourneyTestSuiteResponseData.JSON_PROPERTY_ID, + DemJourneyTestSuiteResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneyTestSuiteResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemJourneyTestSuiteResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemJourneyTestSuiteType type; + + public DemJourneyTestSuiteResponseData() {} + + @JsonCreator + public DemJourneyTestSuiteResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemJourneyTestSuiteResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemJourneyTestSuiteType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemJourneyTestSuiteResponseData attributes( + DemJourneyTestSuiteResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a DEM journey test suite response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyTestSuiteResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemJourneyTestSuiteResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemJourneyTestSuiteResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The public ID of the test suite. + * + * @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 DemJourneyTestSuiteResponseData type(DemJourneyTestSuiteType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journey test suites. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemJourneyTestSuiteType getType() { + return type; + } + + public void setType(DemJourneyTestSuiteType 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 DemJourneyTestSuiteResponseData + */ + @JsonAnySetter + public DemJourneyTestSuiteResponseData 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 DemJourneyTestSuiteResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneyTestSuiteResponseData demJourneyTestSuiteResponseData = + (DemJourneyTestSuiteResponseData) o; + return Objects.equals(this.attributes, demJourneyTestSuiteResponseData.attributes) + && Objects.equals(this.id, demJourneyTestSuiteResponseData.id) + && Objects.equals(this.type, demJourneyTestSuiteResponseData.type) + && Objects.equals( + this.additionalProperties, demJourneyTestSuiteResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneyTestSuiteResponseData {\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/DemJourneyTestSuiteType.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteType.java new file mode 100644 index 00000000000..845d25cb491 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyTestSuiteType.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 type identifier for DEM journey test suites. */ +@JsonSerialize(using = DemJourneyTestSuiteType.DemJourneyTestSuiteTypeSerializer.class) +public class DemJourneyTestSuiteType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("journey_test_suite")); + + public static final DemJourneyTestSuiteType JOURNEY_TEST_SUITE = + new DemJourneyTestSuiteType("journey_test_suite"); + + DemJourneyTestSuiteType(String value) { + super(value, allowedValues); + } + + public static class DemJourneyTestSuiteTypeSerializer + extends StdSerializer { + public DemJourneyTestSuiteTypeSerializer(Class t) { + super(t); + } + + public DemJourneyTestSuiteTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DemJourneyTestSuiteType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemJourneyTestSuiteType fromValue(String value) { + return new DemJourneyTestSuiteType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemJourneyType.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneyType.java new file mode 100644 index 00000000000..17007252f3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneyType.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 type identifier for DEM journeys. */ +@JsonSerialize(using = DemJourneyType.DemJourneyTypeSerializer.class) +public class DemJourneyType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("journeys")); + + public static final DemJourneyType JOURNEYS = new DemJourneyType("journeys"); + + DemJourneyType(String value) { + super(value, allowedValues); + } + + public static class DemJourneyTypeSerializer extends StdSerializer { + public DemJourneyTypeSerializer(Class t) { + super(t); + } + + public DemJourneyTypeSerializer() { + this(null); + } + + @Override + public void serialize(DemJourneyType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemJourneyType fromValue(String value) { + return new DemJourneyType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemJourneysListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DemJourneysListResponse.java new file mode 100644 index 00000000000..8f4edc82b69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemJourneysListResponse.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; + +/** Response body for a list of DEM journeys. */ +@JsonPropertyOrder({DemJourneysListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemJourneysListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public DemJourneysListResponse() {} + + @JsonCreator + public DemJourneysListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (DemJourneyResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public DemJourneysListResponse data(List data) { + this.data = data; + for (DemJourneyResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemJourneysListResponse addDataItem(DemJourneyResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of DEM journey data objects. + * + * @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 (DemJourneyResponseData item : data) { + 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 DemJourneysListResponse + */ + @JsonAnySetter + public DemJourneysListResponse 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 DemJourneysListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemJourneysListResponse demJourneysListResponse = (DemJourneysListResponse) o; + return Objects.equals(this.data, demJourneysListResponse.data) + && Objects.equals(this.additionalProperties, demJourneysListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemJourneysListResponse {\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/DemRecommendedTestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestAttributes.java new file mode 100644 index 00000000000..413e2371585 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestAttributes.java @@ -0,0 +1,354 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an AI-recommended synthetic test for a DEM journey. */ +@JsonPropertyOrder({ + DemRecommendedTestAttributes.JSON_PROPERTY_CONFIG, + DemRecommendedTestAttributes.JSON_PROPERTY_CREATED_AT, + DemRecommendedTestAttributes.JSON_PROPERTY_NAME, + DemRecommendedTestAttributes.JSON_PROPERTY_RESULT_ID, + DemRecommendedTestAttributes.JSON_PROPERTY_SESSION_ID, + DemRecommendedTestAttributes.JSON_PROPERTY_SOURCE, + DemRecommendedTestAttributes.JSON_PROPERTY_TYPE, + DemRecommendedTestAttributes.JSON_PROPERTY_VARIANT_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemRecommendedTestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG = "config"; + private Map config = new HashMap(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RESULT_ID = "result_id"; + private String resultId; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private String source; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_VARIANT_ID = "variant_id"; + private String variantId; + + public DemRecommendedTestAttributes() {} + + @JsonCreator + public DemRecommendedTestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG) Map config, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.config = config; + this.createdAt = createdAt; + this.name = name; + this.source = source; + this.type = type; + } + + public DemRecommendedTestAttributes config(Map config) { + this.config = config; + return this; + } + + public DemRecommendedTestAttributes putConfigItem(String key, Object configItem) { + this.config.put(key, configItem); + return this; + } + + /** + * The browser test configuration that can be used to create the recommended test. + * + * @return config + */ + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + + public DemRecommendedTestAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time when the recommendation was generated. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public DemRecommendedTestAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name of the recommended test. + * + * @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 DemRecommendedTestAttributes resultId(String resultId) { + this.resultId = resultId; + return this; + } + + /** + * The identifier of the validating sample run, when available. + * + * @return resultId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResultId() { + return resultId; + } + + public void setResultId(String resultId) { + this.resultId = resultId; + } + + public DemRecommendedTestAttributes sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * The RUM session identifier for the validating sample run, when available. + * + * @return sessionId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public DemRecommendedTestAttributes source(String source) { + this.source = source; + return this; + } + + /** + * The pipeline that produced the recommendation. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public DemRecommendedTestAttributes type(String type) { + this.type = type; + return this; + } + + /** + * The type of synthetic test. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DemRecommendedTestAttributes variantId(String variantId) { + this.variantId = variantId; + return this; + } + + /** + * The variant associated with the recommendation, when applicable. + * + * @return variantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVariantId() { + return variantId; + } + + public void setVariantId(String variantId) { + this.variantId = variantId; + } + + /** + * 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 DemRecommendedTestAttributes + */ + @JsonAnySetter + public DemRecommendedTestAttributes 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 DemRecommendedTestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemRecommendedTestAttributes demRecommendedTestAttributes = (DemRecommendedTestAttributes) o; + return Objects.equals(this.config, demRecommendedTestAttributes.config) + && Objects.equals(this.createdAt, demRecommendedTestAttributes.createdAt) + && Objects.equals(this.name, demRecommendedTestAttributes.name) + && Objects.equals(this.resultId, demRecommendedTestAttributes.resultId) + && Objects.equals(this.sessionId, demRecommendedTestAttributes.sessionId) + && Objects.equals(this.source, demRecommendedTestAttributes.source) + && Objects.equals(this.type, demRecommendedTestAttributes.type) + && Objects.equals(this.variantId, demRecommendedTestAttributes.variantId) + && Objects.equals( + this.additionalProperties, demRecommendedTestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + config, + createdAt, + name, + resultId, + sessionId, + source, + type, + variantId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemRecommendedTestAttributes {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" resultId: ").append(toIndentedString(resultId)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" variantId: ").append(toIndentedString(variantId)).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/DemRecommendedTestData.java b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestData.java new file mode 100644 index 00000000000..0dd2f362708 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestData.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** Data object for a recommended synthetic test. */ +@JsonPropertyOrder({ + DemRecommendedTestData.JSON_PROPERTY_ATTRIBUTES, + DemRecommendedTestData.JSON_PROPERTY_ID, + DemRecommendedTestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemRecommendedTestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemRecommendedTestAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemRecommendedTestType type; + + public DemRecommendedTestData() {} + + @JsonCreator + public DemRecommendedTestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemRecommendedTestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemRecommendedTestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemRecommendedTestData attributes(DemRecommendedTestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an AI-recommended synthetic test for a DEM journey. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemRecommendedTestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemRecommendedTestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemRecommendedTestData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the journey associated with the recommendation. + * + * @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 DemRecommendedTestData type(DemRecommendedTestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for a recommended synthetic test. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemRecommendedTestType getType() { + return type; + } + + public void setType(DemRecommendedTestType 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 DemRecommendedTestData + */ + @JsonAnySetter + public DemRecommendedTestData 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 DemRecommendedTestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemRecommendedTestData demRecommendedTestData = (DemRecommendedTestData) o; + return Objects.equals(this.attributes, demRecommendedTestData.attributes) + && Objects.equals(this.id, demRecommendedTestData.id) + && Objects.equals(this.type, demRecommendedTestData.type) + && Objects.equals(this.additionalProperties, demRecommendedTestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemRecommendedTestData {\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/DemRecommendedTestType.java b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestType.java new file mode 100644 index 00000000000..0b880c45442 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestType.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 type identifier for a recommended synthetic test. */ +@JsonSerialize(using = DemRecommendedTestType.DemRecommendedTestTypeSerializer.class) +public class DemRecommendedTestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("recommended_tests")); + + public static final DemRecommendedTestType RECOMMENDED_TESTS = + new DemRecommendedTestType("recommended_tests"); + + DemRecommendedTestType(String value) { + super(value, allowedValues); + } + + public static class DemRecommendedTestTypeSerializer + extends StdSerializer { + public DemRecommendedTestTypeSerializer(Class t) { + super(t); + } + + public DemRecommendedTestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DemRecommendedTestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemRecommendedTestType fromValue(String value) { + return new DemRecommendedTestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestsResponse.java new file mode 100644 index 00000000000..edde54bedbf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRecommendedTestsResponse.java @@ -0,0 +1,164 @@ +/* + * 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; + +/** Response containing recommended synthetic tests for a DEM journey. */ +@JsonPropertyOrder({DemRecommendedTestsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemRecommendedTestsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public DemRecommendedTestsResponse() {} + + @JsonCreator + public DemRecommendedTestsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (DemRecommendedTestData item : data) { + this.unparsed |= item.unparsed; + } + } + + public DemRecommendedTestsResponse data(List data) { + this.data = data; + for (DemRecommendedTestData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemRecommendedTestsResponse addDataItem(DemRecommendedTestData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Recommended synthetic tests for a DEM journey. + * + * @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 (DemRecommendedTestData item : data) { + 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 DemRecommendedTestsResponse + */ + @JsonAnySetter + public DemRecommendedTestsResponse 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 DemRecommendedTestsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemRecommendedTestsResponse demRecommendedTestsResponse = (DemRecommendedTestsResponse) o; + return Objects.equals(this.data, demRecommendedTestsResponse.data) + && Objects.equals( + this.additionalProperties, demRecommendedTestsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemRecommendedTestsResponse {\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/DemRumNode.java b/src/main/java/com/datadog/api/client/v2/model/DemRumNode.java new file mode 100644 index 00000000000..0cd76e5d378 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRumNode.java @@ -0,0 +1,198 @@ +/* + * 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 RUM node within a journey step. */ +@JsonPropertyOrder({ + DemRumNode.JSON_PROPERTY_APP_ID, + DemRumNode.JSON_PROPERTY_ID, + DemRumNode.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemRumNode { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APP_ID = "app_id"; + private String appId; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public DemRumNode() {} + + @JsonCreator + public DemRumNode(@JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.query = query; + } + + public DemRumNode appId(String appId) { + this.appId = appId; + return this; + } + + /** + * The application ID associated with this node. + * + * @return appId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public DemRumNode id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the RUM node element. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DemRumNode query(String query) { + this.query = query; + return this; + } + + /** + * The RUM query for matching 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 DemRumNode + */ + @JsonAnySetter + public DemRumNode 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 DemRumNode object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemRumNode demRumNode = (DemRumNode) o; + return Objects.equals(this.appId, demRumNode.appId) + && Objects.equals(this.id, demRumNode.id) + && Objects.equals(this.query, demRumNode.query) + && Objects.equals(this.additionalProperties, demRumNode.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(appId, id, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemRumNode {\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\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/DemRumStep.java b/src/main/java/com/datadog/api/client/v2/model/DemRumStep.java new file mode 100644 index 00000000000..8122cd8a694 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRumStep.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.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 in a RUM journey definition. */ +@JsonPropertyOrder({DemRumStep.JSON_PROPERTY_NODES, DemRumStep.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemRumStep { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NODES = "nodes"; + private List nodes = new ArrayList<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemRumStepType type; + + public DemRumStep() {} + + @JsonCreator + public DemRumStep( + @JsonProperty(required = true, value = JSON_PROPERTY_NODES) List nodes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemRumStepType type) { + this.nodes = nodes; + for (DemRumNode item : nodes) { + this.unparsed |= item.unparsed; + } + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemRumStep nodes(List nodes) { + this.nodes = nodes; + for (DemRumNode item : nodes) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemRumStep addNodesItem(DemRumNode nodesItem) { + this.nodes.add(nodesItem); + this.unparsed |= nodesItem.unparsed; + return this; + } + + /** + * List of RUM nodes within a journey step. + * + * @return nodes + */ + @JsonProperty(JSON_PROPERTY_NODES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getNodes() { + return nodes; + } + + public void setNodes(List nodes) { + this.nodes = nodes; + if (nodes != null) { + for (DemRumNode item : nodes) { + this.unparsed |= item.unparsed; + } + } + } + + public DemRumStep type(DemRumStepType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of a RUM journey step. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemRumStepType getType() { + return type; + } + + public void setType(DemRumStepType 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 DemRumStep + */ + @JsonAnySetter + public DemRumStep 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 DemRumStep object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemRumStep demRumStep = (DemRumStep) o; + return Objects.equals(this.nodes, demRumStep.nodes) + && Objects.equals(this.type, demRumStep.type) + && Objects.equals(this.additionalProperties, demRumStep.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nodes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemRumStep {\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/DemRumStepType.java b/src/main/java/com/datadog/api/client/v2/model/DemRumStepType.java new file mode 100644 index 00000000000..e46a3bddde7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemRumStepType.java @@ -0,0 +1,56 @@ +/* + * 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 RUM journey step. */ +@JsonSerialize(using = DemRumStepType.DemRumStepTypeSerializer.class) +public class DemRumStepType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("start", "stop", "step")); + + public static final DemRumStepType START = new DemRumStepType("start"); + public static final DemRumStepType STOP = new DemRumStepType("stop"); + public static final DemRumStepType STEP = new DemRumStepType("step"); + + DemRumStepType(String value) { + super(value, allowedValues); + } + + public static class DemRumStepTypeSerializer extends StdSerializer { + public DemRumStepTypeSerializer(Class t) { + super(t); + } + + public DemRumStepTypeSerializer() { + this(null); + } + + @Override + public void serialize(DemRumStepType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemRumStepType fromValue(String value) { + return new DemRumStepType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DemSearchInferredJourneysResponse.java b/src/main/java/com/datadog/api/client/v2/model/DemSearchInferredJourneysResponse.java new file mode 100644 index 00000000000..fe2f94d333b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemSearchInferredJourneysResponse.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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Response body for searching inferred journeys. Contains either candidate or ignored items + * depending on the status query parameter. + */ +@JsonPropertyOrder({DemSearchInferredJourneysResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemSearchInferredJourneysResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public DemSearchInferredJourneysResponse() {} + + @JsonCreator + public DemSearchInferredJourneysResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public DemSearchInferredJourneysResponse data(List data) { + this.data = data; + return this; + } + + public DemSearchInferredJourneysResponse addDataItem(Object dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * List of inferred journey items matching the search criteria. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * 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 DemSearchInferredJourneysResponse + */ + @JsonAnySetter + public DemSearchInferredJourneysResponse 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 DemSearchInferredJourneysResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemSearchInferredJourneysResponse demSearchInferredJourneysResponse = + (DemSearchInferredJourneysResponse) o; + return Objects.equals(this.data, demSearchInferredJourneysResponse.data) + && Objects.equals( + this.additionalProperties, demSearchInferredJourneysResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemSearchInferredJourneysResponse {\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/DemSearchInferredJourneysResponse_dataItem.java b/src/main/java/com/datadog/api/client/v2/model/DemSearchInferredJourneysResponse_dataItem.java new file mode 100644 index 00000000000..062faf75c07 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemSearchInferredJourneysResponse_dataItem.java @@ -0,0 +1,108 @@ +/* + * 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.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single inferred journey item, either a candidate or an ignored journey. */ +@JsonPropertyOrder({}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemSearchInferredJourneysResponse_dataItem { + @JsonIgnore public boolean unparsed = false; + + /** + * 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 DemSearchInferredJourneysResponse_dataItem + */ + @JsonAnySetter + public DemSearchInferredJourneysResponse_dataItem 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 DemSearchInferredJourneysResponse_dataItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemSearchInferredJourneysResponse_dataItem {\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/DemTestSuiteNested.java b/src/main/java/com/datadog/api/client/v2/model/DemTestSuiteNested.java new file mode 100644 index 00000000000..1a601357493 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemTestSuiteNested.java @@ -0,0 +1,170 @@ +/* + * 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 test suite associated with a DEM resource. */ +@JsonPropertyOrder({DemTestSuiteNested.JSON_PROPERTY_ID, DemTestSuiteNested.JSON_PROPERTY_NAME}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemTestSuiteNested { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DemTestSuiteNested() {} + + @JsonCreator + public DemTestSuiteNested( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.id = id; + this.name = name; + } + + public DemTestSuiteNested id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the test suite. + * + * @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 DemTestSuiteNested name(String name) { + this.name = name; + return this; + } + + /** + * The name of the test suite. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * 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 DemTestSuiteNested + */ + @JsonAnySetter + public DemTestSuiteNested 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 DemTestSuiteNested object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemTestSuiteNested demTestSuiteNested = (DemTestSuiteNested) o; + return Objects.equals(this.id, demTestSuiteNested.id) + && Objects.equals(this.name, demTestSuiteNested.name) + && Objects.equals(this.additionalProperties, demTestSuiteNested.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemTestSuiteNested {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/DemUser.java b/src/main/java/com/datadog/api/client/v2/model/DemUser.java new file mode 100644 index 00000000000..217bf2fa98d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemUser.java @@ -0,0 +1,229 @@ +/* + * 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 Datadog user associated with a DEM operation. */ +@JsonPropertyOrder({ + DemUser.JSON_PROPERTY_EMAIL, + DemUser.JSON_PROPERTY_HANDLE, + DemUser.JSON_PROPERTY_NAME, + DemUser.JSON_PROPERTY_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemUser { + @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; + + public DemUser() {} + + @JsonCreator + public DemUser( + @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email, + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_UUID) String uuid) { + this.email = email; + this.handle = handle; + this.name = name; + this.uuid = uuid; + } + + public DemUser email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the user. + * + * @return email + */ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public DemUser handle(String handle) { + this.handle = handle; + return this; + } + + /** + * The handle of the user. + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public DemUser name(String name) { + this.name = name; + return this; + } + + /** + * The display name of the user. + * + * @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 DemUser uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * The UUID of the user. + * + * @return uuid + */ + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = 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 DemUser + */ + @JsonAnySetter + public DemUser 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 DemUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemUser demUser = (DemUser) o; + return Objects.equals(this.email, demUser.email) + && Objects.equals(this.handle, demUser.handle) + && Objects.equals(this.name, demUser.name) + && Objects.equals(this.uuid, demUser.uuid) + && Objects.equals(this.additionalProperties, demUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, handle, name, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemUser {\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/DemVariant.java b/src/main/java/com/datadog/api/client/v2/model/DemVariant.java new file mode 100644 index 00000000000..a45362800c5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariant.java @@ -0,0 +1,237 @@ +/* + * 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 variant (sub-funnel) of a DEM journey with its own steps. */ +@JsonPropertyOrder({ + DemVariant.JSON_PROPERTY_FILTER, + DemVariant.JSON_PROPERTY_ID, + DemVariant.JSON_PROPERTY_NAME, + DemVariant.JSON_PROPERTY_RUM_STEPS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemVariant { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILTER = "filter"; + private String filter; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RUM_STEPS = "rum_steps"; + private List rumSteps = new ArrayList<>(); + + public DemVariant() {} + + @JsonCreator + public DemVariant( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_RUM_STEPS) List rumSteps) { + this.name = name; + this.rumSteps = rumSteps; + for (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + } + + public DemVariant filter(String filter) { + this.filter = filter; + return this; + } + + /** + * An optional RUM query filter to scope this variant. + * + * @return filter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilter() { + return filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + /** + * The unique identifier of the variant. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public DemVariant name(String name) { + this.name = name; + return this; + } + + /** + * The name of the variant. + * + * @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 DemVariant rumSteps(List rumSteps) { + this.rumSteps = rumSteps; + for (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemVariant addRumStepsItem(DemRumStep rumStepsItem) { + this.rumSteps.add(rumStepsItem); + this.unparsed |= rumStepsItem.unparsed; + return this; + } + + /** + * List of RUM journey steps. + * + * @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 (DemRumStep 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 DemVariant + */ + @JsonAnySetter + public DemVariant 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 DemVariant object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemVariant demVariant = (DemVariant) o; + return Objects.equals(this.filter, demVariant.filter) + && Objects.equals(this.id, demVariant.id) + && Objects.equals(this.name, demVariant.name) + && Objects.equals(this.rumSteps, demVariant.rumSteps) + && Objects.equals(this.additionalProperties, demVariant.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, id, name, rumSteps, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemVariant {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\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/DemVariantAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DemVariantAttributes.java new file mode 100644 index 00000000000..3a87f94332d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariantAttributes.java @@ -0,0 +1,219 @@ +/* + * 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; + +/** Attributes of a DEM journey variant. */ +@JsonPropertyOrder({ + DemVariantAttributes.JSON_PROPERTY_FILTER, + DemVariantAttributes.JSON_PROPERTY_NAME, + DemVariantAttributes.JSON_PROPERTY_RUM_STEPS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemVariantAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILTER = "filter"; + private String filter; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RUM_STEPS = "rum_steps"; + private List rumSteps = new ArrayList<>(); + + public DemVariantAttributes() {} + + @JsonCreator + public DemVariantAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_RUM_STEPS) List rumSteps) { + this.name = name; + this.rumSteps = rumSteps; + for (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + } + + public DemVariantAttributes filter(String filter) { + this.filter = filter; + return this; + } + + /** + * An optional RUM query filter to scope this variant. + * + * @return filter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilter() { + return filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public DemVariantAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the variant. + * + * @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 DemVariantAttributes rumSteps(List rumSteps) { + this.rumSteps = rumSteps; + for (DemRumStep item : rumSteps) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DemVariantAttributes addRumStepsItem(DemRumStep rumStepsItem) { + this.rumSteps.add(rumStepsItem); + this.unparsed |= rumStepsItem.unparsed; + return this; + } + + /** + * List of RUM journey steps. + * + * @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 (DemRumStep 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 DemVariantAttributes + */ + @JsonAnySetter + public DemVariantAttributes 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 DemVariantAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemVariantAttributes demVariantAttributes = (DemVariantAttributes) o; + return Objects.equals(this.filter, demVariantAttributes.filter) + && Objects.equals(this.name, demVariantAttributes.name) + && Objects.equals(this.rumSteps, demVariantAttributes.rumSteps) + && Objects.equals(this.additionalProperties, demVariantAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, name, rumSteps, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemVariantAttributes {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\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/DemVariantRequest.java b/src/main/java/com/datadog/api/client/v2/model/DemVariantRequest.java new file mode 100644 index 00000000000..506686f4a57 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariantRequest.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; + +/** Request to create or update a DEM journey variant. */ +@JsonPropertyOrder({DemVariantRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemVariantRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemVariantRequestData data; + + public DemVariantRequest() {} + + @JsonCreator + public DemVariantRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DemVariantRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemVariantRequest data(DemVariantRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a DEM journey variant request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemVariantRequestData getData() { + return data; + } + + public void setData(DemVariantRequestData 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 DemVariantRequest + */ + @JsonAnySetter + public DemVariantRequest 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 DemVariantRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemVariantRequest demVariantRequest = (DemVariantRequest) o; + return Objects.equals(this.data, demVariantRequest.data) + && Objects.equals(this.additionalProperties, demVariantRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemVariantRequest {\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/DemVariantRequestData.java b/src/main/java/com/datadog/api/client/v2/model/DemVariantRequestData.java new file mode 100644 index 00000000000..3cf219dbacc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariantRequestData.java @@ -0,0 +1,184 @@ +/* + * 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; + +/** Data object for a DEM journey variant request. */ +@JsonPropertyOrder({ + DemVariantRequestData.JSON_PROPERTY_ATTRIBUTES, + DemVariantRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemVariantRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemVariantAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemVariantType type; + + public DemVariantRequestData() {} + + @JsonCreator + public DemVariantRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemVariantAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemVariantType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemVariantRequestData attributes(DemVariantAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a DEM journey variant. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemVariantAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemVariantAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemVariantRequestData type(DemVariantType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journey variants. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemVariantType getType() { + return type; + } + + public void setType(DemVariantType 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 DemVariantRequestData + */ + @JsonAnySetter + public DemVariantRequestData 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 DemVariantRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemVariantRequestData demVariantRequestData = (DemVariantRequestData) o; + return Objects.equals(this.attributes, demVariantRequestData.attributes) + && Objects.equals(this.type, demVariantRequestData.type) + && Objects.equals(this.additionalProperties, demVariantRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemVariantRequestData {\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/DemVariantResponse.java b/src/main/java/com/datadog/api/client/v2/model/DemVariantResponse.java new file mode 100644 index 00000000000..26d8073bb3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariantResponse.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; + +/** Response containing a DEM journey variant. */ +@JsonPropertyOrder({DemVariantResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemVariantResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DemVariantResponseData data; + + public DemVariantResponse() {} + + @JsonCreator + public DemVariantResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DemVariantResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DemVariantResponse data(DemVariantResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object returned for a DEM journey variant. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemVariantResponseData getData() { + return data; + } + + public void setData(DemVariantResponseData 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 DemVariantResponse + */ + @JsonAnySetter + public DemVariantResponse 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 DemVariantResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemVariantResponse demVariantResponse = (DemVariantResponse) o; + return Objects.equals(this.data, demVariantResponse.data) + && Objects.equals(this.additionalProperties, demVariantResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemVariantResponse {\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/DemVariantResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DemVariantResponseData.java new file mode 100644 index 00000000000..e6e1557b0eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariantResponseData.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** Data object returned for a DEM journey variant. */ +@JsonPropertyOrder({ + DemVariantResponseData.JSON_PROPERTY_ATTRIBUTES, + DemVariantResponseData.JSON_PROPERTY_ID, + DemVariantResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DemVariantResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DemVariantAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DemVariantType type; + + public DemVariantResponseData() {} + + @JsonCreator + public DemVariantResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DemVariantAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DemVariantType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DemVariantResponseData attributes(DemVariantAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a DEM journey variant. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemVariantAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DemVariantAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DemVariantResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the variant. + * + * @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 DemVariantResponseData type(DemVariantType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for DEM journey variants. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DemVariantType getType() { + return type; + } + + public void setType(DemVariantType 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 DemVariantResponseData + */ + @JsonAnySetter + public DemVariantResponseData 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 DemVariantResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DemVariantResponseData demVariantResponseData = (DemVariantResponseData) o; + return Objects.equals(this.attributes, demVariantResponseData.attributes) + && Objects.equals(this.id, demVariantResponseData.id) + && Objects.equals(this.type, demVariantResponseData.type) + && Objects.equals(this.additionalProperties, demVariantResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DemVariantResponseData {\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/DemVariantType.java b/src/main/java/com/datadog/api/client/v2/model/DemVariantType.java new file mode 100644 index 00000000000..d1e4161954b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DemVariantType.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 type identifier for DEM journey variants. */ +@JsonSerialize(using = DemVariantType.DemVariantTypeSerializer.class) +public class DemVariantType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("variants")); + + public static final DemVariantType VARIANTS = new DemVariantType("variants"); + + DemVariantType(String value) { + super(value, allowedValues); + } + + public static class DemVariantTypeSerializer extends StdSerializer { + public DemVariantTypeSerializer(Class t) { + super(t); + } + + public DemVariantTypeSerializer() { + this(null); + } + + @Override + public void serialize(DemVariantType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DemVariantType fromValue(String value) { + return new DemVariantType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/dem.feature b/src/test/resources/com/datadog/api/client/v2/api/dem.feature new file mode 100644 index 00000000000..c596de0c343 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/dem.feature @@ -0,0 +1,236 @@ +@endpoint(dem) @endpoint(dem-v2) +Feature: DEM + Manage Digital Experience Monitoring journeys. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DEM" API + + @generated @skip @team:DataDog/dem-features + Scenario: Batch get DEM journeys by test suite IDs returns "Bad Request" response + Given new "BatchGetJourneysByTestSuiteIDs" request + And body with value {"data": {"attributes": {"test_suite_ids": ["suite-abc123", "suite-def456"]}, "type": "batch_get_journeys_by_test_suite_ids_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Batch get DEM journeys by test suite IDs returns "Not Found" response + Given new "BatchGetJourneysByTestSuiteIDs" request + And body with value {"data": {"attributes": {"test_suite_ids": ["suite-abc123", "suite-def456"]}, "type": "batch_get_journeys_by_test_suite_ids_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Batch get DEM journeys by test suite IDs returns "OK" response + Given new "BatchGetJourneysByTestSuiteIDs" request + And body with value {"data": {"attributes": {"test_suite_ids": ["suite-abc123", "suite-def456"]}, "type": "batch_get_journeys_by_test_suite_ids_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey returns "OK" response + Given new "CreateJourney" request + And body with value {"data": {"attributes": {"description": "Tracks the user checkout flow from cart to confirmation.", "journey_rum": {"filter": "env:prod", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "name": "Checkout Flow", "tags": ["team:synthetics", "env:prod"], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "type": "journeys"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey variant returns "Bad Request" response + Given new "CreateJourneyVariant" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": "device.type:mobile", "name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}, "type": "variants"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey variant returns "Not Found" response + Given new "CreateJourneyVariant" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": "device.type:mobile", "name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}, "type": "variants"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Create a DEM journey variant returns "OK" response + Given new "CreateJourneyVariant" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": "device.type:mobile", "name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}, "type": "variants"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Create a test suite for a DEM journey returns "Created" response + Given new "CreateTestSuiteForJourney" request + And request contains "public_journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"include_tests_from_journey_coverage": true, "test_suite_name": "My Custom Suite"}, "type": "create_test_suite_for_journey_request"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/dem-features + Scenario: Create a test suite for a DEM journey returns "Not Found" response + Given new "CreateTestSuiteForJourney" request + And request contains "public_journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"include_tests_from_journey_coverage": true, "test_suite_name": "My Custom Suite"}, "type": "create_test_suite_for_journey_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey returns "No Content" response + Given new "DeleteJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey returns "Not Found" response + Given new "DeleteJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey variant returns "No Content" response + Given new "DeleteJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Delete a DEM journey variant returns "Not Found" response + Given new "DeleteJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Delete an ignored inferred DEM journey returns "No Content" response + Given new "DeleteIgnoredInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Delete an ignored inferred DEM journey returns "Not Found" response + Given new "DeleteIgnoredInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Get a DEM journey returns "Not Found" response + Given new "GetJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Get a DEM journey returns "OK" response + Given new "GetJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Get recommended tests for a DEM journey returns "Not Found" response + Given new "GetJourneyRecommendedTests" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Get recommended tests for a DEM journey returns "OK" response + Given new "GetJourneyRecommendedTests" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Ignore an inferred DEM journey returns "No Content" response + Given new "IgnoreInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dem-features + Scenario: Ignore an inferred DEM journey returns "Not Found" response + Given new "IgnoreInferredJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Search DEM journeys returns "Bad Request" response + Given new "SearchJourneys" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Search DEM journeys returns "Not Found" response + Given new "SearchJourneys" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Search DEM journeys returns "OK" response + Given new "SearchJourneys" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Search inferred DEM journeys returns "Bad Request" response + Given new "SearchInferredJourneys" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Search inferred DEM journeys returns "Not Found" response + Given new "SearchInferredJourneys" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Search inferred DEM journeys returns "OK" response + Given new "SearchInferredJourneys" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey returns "Not Found" response + Given new "UpdateJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Tracks the user checkout flow from cart to confirmation.", "journey_rum": {"filter": "env:prod", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "name": "Checkout Flow", "tags": ["team:synthetics", "env:prod"], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "type": "journeys"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey returns "OK" response + Given new "UpdateJourney" request + And request contains "journey_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "Tracks the user checkout flow from cart to confirmation.", "journey_rum": {"filter": "env:prod", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "name": "Checkout Flow", "tags": ["team:synthetics", "env:prod"], "variants": [{"name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}]}, "type": "journeys"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey variant returns "Bad Request" response + Given new "UpdateJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": "device.type:mobile", "name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}, "type": "variants"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey variant returns "Not Found" response + Given new "UpdateJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": "device.type:mobile", "name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}, "type": "variants"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dem-features + Scenario: Update a DEM journey variant returns "OK" response + Given new "UpdateJourneyVariant" request + And request contains "variant_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": "device.type:mobile", "name": "Mobile checkout", "rum_steps": [{"nodes": [{"query": "action.name:'checkout'"}], "type": "start"}, {"nodes": [{"query": "action.name:'confirmation'"}], "type": "stop"}]}, "type": "variants"}} + 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 960023eb2f2..be4ddd2f98e 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 @@ -2309,6 +2309,112 @@ "type": "idempotent" } }, + "CreateJourney": { + "tag": "DEM", + "undo": { + "operationId": "DeleteJourney", + "parameters": [ + { + "name": "journey_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteIgnoredInferredJourney": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "SearchInferredJourneys": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "IgnoreInferredJourney": { + "tag": "DEM", + "undo": { + "operationId": "DeleteIgnoredInferredJourney", + "parameters": [ + { + "name": "journey_id", + "origin": "path", + "source": "journey_id" + } + ], + "type": "unsafe" + } + }, + "SearchJourneys": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "BatchGetJourneysByTestSuiteIDs": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "DeleteJourneyVariant": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "UpdateJourneyVariant": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "DeleteJourney": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "GetJourney": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "UpdateJourney": { + "tag": "DEM", + "undo": { + "type": "idempotent" + } + }, + "GetJourneyRecommendedTests": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, + "CreateJourneyVariant": { + "tag": "DEM", + "undo": { + "operationId": "DeleteJourneyVariant", + "parameters": [ + { + "name": "variant_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "CreateTestSuiteForJourney": { + "tag": "DEM", + "undo": { + "type": "safe" + } + }, "ListDeploymentGates": { "tag": "Deployment Gates", "undo": {