From 3285345b76f92590f0f36e8927a559b8cf0ae96a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 27 Mar 2026 17:35:55 +0000 Subject: [PATCH] Regenerate client from commit e98f66e of spec repo --- .generator/schemas/v2/openapi.yaml | 1287 +++++++++++++++++ docs/datadog_api_client.v2.api.rst | 7 + docs/datadog_api_client.v2.model.rst | 322 +++++ .../GetApiMultistepSubtestParents.py | 15 + .../v2/synthetics/GetApiMultistepSubtests.py | 15 + .../v2/synthetics/GetSyntheticsTestVersion.py | 16 + examples/v2/synthetics/GetTestParentSuites.py | 15 + .../synthetics/ListSyntheticsTestVersions.py | 15 + examples/v2/synthetics/PatchTestSuite.py | 33 + examples/v2/widgets/CreateWidget.py | 32 + examples/v2/widgets/DeleteWidget.py | 16 + examples/v2/widgets/GetWidget.py | 18 + examples/v2/widgets/SearchWidgets.py | 16 + examples/v2/widgets/UpdateWidget.py | 35 + .../v2/api/synthetics_api.py | 328 +++++ src/datadog_api_client/v2/api/widgets_api.py | 377 +++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../model/create_or_update_widget_request.py | 40 + ...ate_or_update_widget_request_attributes.py | 50 + .../create_or_update_widget_request_data.py | 50 + .../v2/model/suite_json_patch_request.py | 40 + .../v2/model/suite_json_patch_request_data.py | 58 + ...uite_json_patch_request_data_attributes.py | 42 + .../v2/model/suite_json_patch_type.py | 35 + ...cs_api_multistep_parent_test_attributes.py | 88 ++ ...nthetics_api_multistep_parent_test_data.py | 72 + ...nthetics_api_multistep_parent_test_type.py | 35 + ...ics_api_multistep_parent_tests_response.py | 46 + ...hetics_api_multistep_subtest_attributes.py | 43 + .../synthetics_api_multistep_subtest_data.py | 68 + .../synthetics_api_multistep_subtest_type.py | 35 + ...thetics_api_multistep_subtests_response.py | 42 + ...synthetics_test_parent_suite_attributes.py | 88 ++ .../synthetics_test_parent_suite_data.py | 66 + .../synthetics_test_parent_suite_type.py | 35 + .../synthetics_test_parent_suites_response.py | 42 + ...synthetics_test_version_action_metadata.py | 96 ++ .../synthetics_test_version_attributes.py | 96 ++ .../model/synthetics_test_version_author.py | 64 + ...nthetics_test_version_change_attributes.py | 75 + .../synthetics_test_version_change_data.py | 68 + ...etics_test_version_change_metadata_item.py | 56 + .../synthetics_test_version_change_type.py | 35 + .../v2/model/synthetics_test_version_data.py | 64 + ...synthetics_test_version_diff_patch_diff.py | 43 + .../synthetics_test_version_diff_patches.py | 80 + .../synthetics_test_version_history_meta.py | 50 + ...ynthetics_test_version_history_response.py | 56 + .../model/synthetics_test_version_response.py | 42 + .../v2/model/synthetics_test_version_type.py | 35 + .../v2/model/widget_attributes.py | 73 + .../v2/model/widget_data.py | 70 + .../v2/model/widget_definition.py | 54 + .../v2/model/widget_experience_type.py | 44 + .../v2/model/widget_included_user.py | 57 + .../model/widget_included_user_attributes.py | 46 + .../v2/model/widget_list_response.py | 66 + .../v2/model/widget_relationship_data.py | 39 + .../v2/model/widget_relationship_item.py | 42 + .../v2/model/widget_relationships.py | 54 + .../v2/model/widget_response.py | 51 + .../v2/model/widget_search_meta.py | 64 + .../v2/model/widget_type.py | 78 + src/datadog_api_client/v2/models/__init__.py | 102 ++ tests/v2/features/synthetics.feature | 81 ++ tests/v2/features/undo.json | 77 + tests/v2/features/widgets.feature | 115 ++ 67 files changed, 5497 insertions(+) create mode 100644 examples/v2/synthetics/GetApiMultistepSubtestParents.py create mode 100644 examples/v2/synthetics/GetApiMultistepSubtests.py create mode 100644 examples/v2/synthetics/GetSyntheticsTestVersion.py create mode 100644 examples/v2/synthetics/GetTestParentSuites.py create mode 100644 examples/v2/synthetics/ListSyntheticsTestVersions.py create mode 100644 examples/v2/synthetics/PatchTestSuite.py create mode 100644 examples/v2/widgets/CreateWidget.py create mode 100644 examples/v2/widgets/DeleteWidget.py create mode 100644 examples/v2/widgets/GetWidget.py create mode 100644 examples/v2/widgets/SearchWidgets.py create mode 100644 examples/v2/widgets/UpdateWidget.py create mode 100644 src/datadog_api_client/v2/api/widgets_api.py create mode 100644 src/datadog_api_client/v2/model/create_or_update_widget_request.py create mode 100644 src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py create mode 100644 src/datadog_api_client/v2/model/create_or_update_widget_request_data.py create mode 100644 src/datadog_api_client/v2/model/suite_json_patch_request.py create mode 100644 src/datadog_api_client/v2/model/suite_json_patch_request_data.py create mode 100644 src/datadog_api_client/v2/model/suite_json_patch_request_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/suite_json_patch_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_parent_tests_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_api_multistep_subtests_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_parent_suite_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_parent_suite_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_parent_suite_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_parent_suites_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_action_metadata.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_author.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_change_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_change_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_change_metadata_item.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_change_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_diff_patch_diff.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_diff_patches.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_history_meta.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_history_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_version_type.py create mode 100644 src/datadog_api_client/v2/model/widget_attributes.py create mode 100644 src/datadog_api_client/v2/model/widget_data.py create mode 100644 src/datadog_api_client/v2/model/widget_definition.py create mode 100644 src/datadog_api_client/v2/model/widget_experience_type.py create mode 100644 src/datadog_api_client/v2/model/widget_included_user.py create mode 100644 src/datadog_api_client/v2/model/widget_included_user_attributes.py create mode 100644 src/datadog_api_client/v2/model/widget_list_response.py create mode 100644 src/datadog_api_client/v2/model/widget_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/widget_relationship_item.py create mode 100644 src/datadog_api_client/v2/model/widget_relationships.py create mode 100644 src/datadog_api_client/v2/model/widget_response.py create mode 100644 src/datadog_api_client/v2/model/widget_search_meta.py create mode 100644 src/datadog_api_client/v2/model/widget_type.py create mode 100644 tests/v2/features/widgets.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f45d9a1cc9..f1ef3930ee 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15324,6 +15324,41 @@ components: id: $ref: "#/components/schemas/ApiID" type: object + CreateOrUpdateWidgetRequest: + description: Request body for creating or updating a widget. + properties: + data: + $ref: "#/components/schemas/CreateOrUpdateWidgetRequestData" + required: + - data + type: object + CreateOrUpdateWidgetRequestAttributes: + description: Attributes for creating or updating a widget. + properties: + definition: + $ref: "#/components/schemas/WidgetDefinition" + tags: + description: User-defined tags for organizing the widget. + items: + type: string + nullable: true + type: array + required: + - definition + type: object + CreateOrUpdateWidgetRequestData: + description: Data for creating or updating a widget. + properties: + attributes: + $ref: "#/components/schemas/CreateOrUpdateWidgetRequestAttributes" + type: + description: Widgets resource type. + example: widgets + type: string + required: + - type + - attributes + type: object CreatePageRequest: description: Full request to trigger an On-Call Page. example: @@ -64427,6 +64462,40 @@ components: required: - data type: object + SuiteJsonPatchRequest: + description: JSON Patch request for a Synthetic test suite. + properties: + data: + $ref: "#/components/schemas/SuiteJsonPatchRequestData" + required: + - data + type: object + SuiteJsonPatchRequestData: + description: Data object for a JSON Patch request on a Synthetic test suite. + properties: + attributes: + $ref: "#/components/schemas/SuiteJsonPatchRequestDataAttributes" + type: + $ref: "#/components/schemas/SuiteJsonPatchType" + type: object + SuiteJsonPatchRequestDataAttributes: + description: Attributes for a JSON Patch request on a Synthetic test suite. + properties: + json_patch: + description: JSON Patch operations following RFC 6902. + items: + $ref: "#/components/schemas/JsonPatchOperation" + type: array + type: object + SuiteJsonPatchType: + default: suites_json_patch + description: Type for a JSON Patch request on a Synthetic test suite, `suites_json_patch`. + enum: + - suites_json_patch + example: suites_json_patch + type: string + x-enum-varnames: + - SUITES_JSON_PATCH SuiteSearchResponseType: default: suites_search description: Type for the Synthetics suites search response, `suites_search`. @@ -64486,6 +64555,114 @@ components: description: The direction and type of synchronization for this property. type: string type: object + SyntheticsApiMultistepParentTestAttributes: + description: Attributes of a parent API multistep test. + properties: + child_name: + description: The name of the child subtest. + example: My API Subtest + type: string + child_public_id: + description: The public ID of the child subtest. + example: xyz-uvw-789 + type: string + monitor_id: + description: The associated monitor ID. + example: 12345678 + format: int64 + type: integer + name: + description: Name of the parent test. + example: My Multistep Test + type: string + overall_state: + description: The overall state of the parent test. + example: 0 + format: int64 + type: integer + overall_state_modified: + description: Timestamp of when the overall state was last modified. + example: "2024-01-01T00:00:00+00:00" + type: string + public_id: + description: The public ID of the parent test. + example: abc-def-123 + type: string + type: object + SyntheticsApiMultistepParentTestData: + description: Data object for a parent API multistep test. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsApiMultistepParentTestAttributes" + id: + description: The public ID of the parent test. + example: abc-def-123 + type: string + type: + $ref: "#/components/schemas/SyntheticsApiMultistepParentTestType" + type: object + SyntheticsApiMultistepParentTestType: + default: parent_test + description: Type of the parent test resource. + enum: + - parent_test + example: parent_test + type: string + x-enum-varnames: + - PARENT_TEST + SyntheticsApiMultistepParentTestsResponse: + description: |- + Response containing the list of parent tests for an API multistep subtest. + properties: + data: + description: List of parent tests that include this subtest. + items: + $ref: "#/components/schemas/SyntheticsApiMultistepParentTestData" + type: array + type: object + SyntheticsApiMultistepSubtestAttributes: + description: Attributes of a Synthetic API multistep subtest. + properties: + name: + description: Name of the subtest. + example: My API Test + type: string + public_id: + description: The public ID of the subtest. + example: abc-def-123 + type: string + type: object + SyntheticsApiMultistepSubtestData: + description: Data object for a Synthetic API multistep subtest. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsApiMultistepSubtestAttributes" + id: + description: The public ID of the subtest. + example: abc-def-123 + type: string + type: + $ref: "#/components/schemas/SyntheticsApiMultistepSubtestType" + type: object + SyntheticsApiMultistepSubtestType: + default: subtest + description: Type of the subtest resource. + enum: + - subtest + example: subtest + type: string + x-enum-varnames: + - SUBTEST + SyntheticsApiMultistepSubtestsResponse: + description: |- + Response containing the list of available subtests for an API multistep test. + properties: + data: + description: List of API tests that can be added as subtests. + items: + $ref: "#/components/schemas/SyntheticsApiMultistepSubtestData" + type: array + type: object SyntheticsFastTestAssertionResult: additionalProperties: {} description: Result of a single assertion evaluated during a fast test run. @@ -65466,6 +65643,70 @@ components: - from - to type: object + SyntheticsTestParentSuiteAttributes: + description: Object containing details about a parent suite of a Synthetic test. + properties: + child_name: + description: The name of the child test within the suite. + example: My API Test + type: string + child_public_id: + description: The public ID of the child test within the suite. + example: xyz-uvw-789 + type: string + monitor_id: + description: The associated monitor ID. + example: 12345678 + format: int64 + type: integer + name: + description: Name of the parent suite. + example: My Suite + type: string + overall_state: + description: The overall state of the parent suite. + example: 0 + format: int64 + type: integer + overall_state_modified: + description: Timestamp of when the overall state was last modified. + example: "2024-01-01T00:00:00+00:00" + type: string + public_id: + description: The public ID of the parent suite. + example: abc-def-123 + type: string + type: object + SyntheticsTestParentSuiteData: + description: Data object for a parent suite. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsTestParentSuiteAttributes" + id: + description: The public ID of the parent suite. + example: abc-def-123 + type: string + type: + $ref: "#/components/schemas/SyntheticsTestParentSuiteType" + type: object + SyntheticsTestParentSuiteType: + default: parent_suite + description: Type of the parent suite resource. + enum: + - parent_suite + example: parent_suite + type: string + x-enum-varnames: + - PARENT_SUITE + SyntheticsTestParentSuitesResponse: + description: Response containing the list of parent suites for a Synthetic test. + properties: + data: + description: List of parent suites for the given test. + items: + $ref: "#/components/schemas/SyntheticsTestParentSuiteData" + type: array + type: object SyntheticsTestPauseStatus: description: |- Define whether you want to start (`live`) or pause (`paused`) a @@ -65478,6 +65719,208 @@ components: x-enum-varnames: - LIVE - PAUSED + SyntheticsTestVersionActionMetadata: + description: Object containing metadata about a change action. + properties: + after_value: + description: The value of the property after the change. + before_value: + description: The value of the property before the change. + diff_patches: + description: List of diff patches for text changes. + items: + $ref: "#/components/schemas/SyntheticsTestVersionDiffPatches" + nullable: true + type: array + property_path: + description: The dot-separated path of the property that was changed. + type: string + type: object + SyntheticsTestVersionAttributes: + description: Attributes of a specific Synthetic test version. + properties: + author: + $ref: "#/components/schemas/SyntheticsTestVersionAuthor" + change_metadata: + description: |- + List of metadata describing individual changes in this version. + Only returned when the `include_change_metadata` query parameter is `true`. + items: + $ref: "#/components/schemas/SyntheticsTestVersionChangeMetadataItem" + type: array + payload: + additionalProperties: {} + description: The full test configuration at this version. + type: object + version_payload_created_at: + description: Timestamp of when this version was created. + example: "2024-01-01T00:00:00+00:00" + format: date-time + type: string + type: object + SyntheticsTestVersionAuthor: + description: Object describing the author of a test version. + properties: + email: + description: Email address of the author. + example: john.doe@example.com + type: string + handle: + description: The author's Datadog handle (login username). + example: john.doe + type: string + id: + description: UUID of the author. + example: "00000000-0000-0000-0000-000000000000" + type: string + name: + description: Display name of the author. + example: John Doe + type: string + type: object + SyntheticsTestVersionChangeAttributes: + description: Attributes of a version change record. + properties: + author_uuid: + description: UUID of the user who created this version. + example: "00000000-0000-0000-0000-000000000000" + type: string + change_metadata: + description: List of metadata describing individual changes in this version. + items: + $ref: "#/components/schemas/SyntheticsTestVersionChangeMetadataItem" + type: array + version_number: + description: The sequential version number. + example: 5 + format: int64 + type: integer + version_payload_created_at: + description: Timestamp of when this version was created. + example: "2024-01-01T00:00:00+00:00" + format: date-time + type: string + type: object + SyntheticsTestVersionChangeData: + description: Data object for a version change record. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsTestVersionChangeAttributes" + id: + description: UUID of the version change record. + example: "00000000-0000-0000-0000-000000000000" + type: string + type: + $ref: "#/components/schemas/SyntheticsTestVersionChangeType" + type: object + SyntheticsTestVersionChangeMetadataItem: + description: Object describing a single change within a version. + properties: + action: + description: The action that was performed (for example, `updated` or `created`). + type: string + action_metadata: + $ref: "#/components/schemas/SyntheticsTestVersionActionMetadata" + type: object + SyntheticsTestVersionChangeType: + default: version_metadata + description: Type of the version metadata resource. + enum: + - version_metadata + example: version_metadata + type: string + x-enum-varnames: + - VERSION_METADATA + SyntheticsTestVersionData: + description: Data object for a specific Synthetic test version. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsTestVersionAttributes" + id: + description: UUID of the version record. + example: "00000000-0000-0000-0000-000000000000" + type: string + type: + $ref: "#/components/schemas/SyntheticsTestVersionType" + type: object + SyntheticsTestVersionDiffPatchDiff: + description: Object describing a single text diff operation. + properties: + change_text: + description: The text that was changed. + type: string + operation: + description: The diff operation applied. + type: string + type: object + SyntheticsTestVersionDiffPatches: + description: Object describing a patch in the diff. + properties: + diffs: + description: List of individual diff operations. + items: + $ref: "#/components/schemas/SyntheticsTestVersionDiffPatchDiff" + type: array + length1: + description: Length of the original text segment. + format: int64 + type: integer + length2: + description: Length of the modified text segment. + format: int64 + type: integer + start1: + description: Start position in the original text. + format: int64 + type: integer + start2: + description: Start position in the modified text. + format: int64 + type: integer + type: object + SyntheticsTestVersionHistoryMeta: + description: Pagination metadata for a version history response. + properties: + next_last_version_number: + description: |- + The version number to use as the `last_version_number` query parameter + to fetch the next page. `null` indicates there are no more pages. + example: 3 + format: int64 + nullable: true + type: integer + retention_period_in_days: + description: The number of days that version history is retained. + example: 30 + format: int64 + type: integer + type: object + SyntheticsTestVersionHistoryResponse: + description: Response containing the paginated version history for a Synthetic test. + properties: + data: + description: List of version change records. + items: + $ref: "#/components/schemas/SyntheticsTestVersionChangeData" + type: array + meta: + $ref: "#/components/schemas/SyntheticsTestVersionHistoryMeta" + type: object + SyntheticsTestVersionResponse: + description: Response containing a specific version of a Synthetic test. + properties: + data: + $ref: "#/components/schemas/SyntheticsTestVersionData" + type: object + SyntheticsTestVersionType: + default: version + description: Type of the version resource. + enum: + - version + example: version + type: string + x-enum-varnames: + - VERSION SyntheticsVariableParser: description: Details of the parser to use for the global variable. example: @@ -71675,6 +72118,136 @@ components: - FRIDAY - SATURDAY - SUNDAY + WidgetAttributes: + description: Attributes of a widget resource. + properties: + created_at: + description: ISO 8601 timestamp of when the widget was created. + example: "2024-01-15T00:00:00.000Z" + type: string + definition: + $ref: "#/components/schemas/WidgetDefinition" + is_favorited: + description: "Will be implemented soon. Currently always returns false." + example: false + type: boolean + modified_at: + description: ISO 8601 timestamp of when the widget was last modified. + example: "2024-01-15T00:00:00.000Z" + type: string + tags: + description: User-defined tags for organizing widgets. + example: + - "team:my-team" + items: + type: string + nullable: true + type: array + required: + - definition + - tags + - is_favorited + - created_at + - modified_at + type: object + WidgetData: + description: A widget resource object. + properties: + attributes: + $ref: "#/components/schemas/WidgetAttributes" + id: + description: The unique identifier of the widget. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + relationships: + $ref: "#/components/schemas/WidgetRelationships" + type: + description: Widgets resource type. + example: widgets + type: string + required: + - id + - type + - attributes + type: object + WidgetDefinition: + additionalProperties: {} + description: The definition of a widget, including its type and configuration. + properties: + title: + description: The display title of the widget. + example: My Widget + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/WidgetType" + required: + - type + - title + type: object + WidgetExperienceType: + description: Widget experience types that differentiate between the products using the specific widget. + enum: + - ccm_reports + - logs_reports + - csv_reports + - product_analytics + example: ccm_reports + type: string + x-enum-varnames: + - CCM_REPORTS + - LOGS_REPORTS + - CSV_REPORTS + - PRODUCT_ANALYTICS + WidgetIncludedUser: + description: A user resource included in the response. + properties: + attributes: + $ref: "#/components/schemas/WidgetIncludedUserAttributes" + id: + description: The unique identifier of the user. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: + description: Users resource type. + example: users + type: string + required: + - id + - type + type: object + WidgetIncludedUserAttributes: + description: Attributes of an included user resource. + properties: + handle: + description: The email handle of the user. + example: "john.doe@example.com" + type: string + name: + description: The display name of the user. + example: "John Doe" + nullable: true + type: string + type: object + WidgetListResponse: + description: Response containing a list of widgets. + properties: + data: + description: List of widget resources. + items: + $ref: "#/components/schemas/WidgetData" + type: array + included: + description: Array of user resources related to the widgets. + items: + $ref: "#/components/schemas/WidgetIncludedUser" + type: array + meta: + $ref: "#/components/schemas/WidgetSearchMeta" + required: + - data + type: object WidgetLiveSpan: description: The available timeframes depend on the widget you are using. enum: @@ -71711,6 +72284,108 @@ components: - PAST_SIX_MONTHS - PAST_ONE_YEAR - ALERT + WidgetRelationshipData: + description: Relationship data referencing a user resource. + properties: + id: + description: The unique identifier of the user. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: + description: Users resource type. + example: users + type: string + required: + - id + - type + type: object + WidgetRelationshipItem: + description: A JSON:API relationship to a user. + properties: + data: + $ref: "#/components/schemas/WidgetRelationshipData" + type: object + WidgetRelationships: + description: Relationships of the widget resource. + properties: + created_by: + $ref: "#/components/schemas/WidgetRelationshipItem" + description: The user who created the widget. + modified_by: + $ref: "#/components/schemas/WidgetRelationshipItem" + description: The user who last modified the widget. + type: object + WidgetResponse: + description: Response containing a single widget. + properties: + data: + $ref: "#/components/schemas/WidgetData" + included: + description: Array of user resources related to the widget. + items: + $ref: "#/components/schemas/WidgetIncludedUser" + type: array + required: + - data + type: object + WidgetSearchMeta: + description: Metadata about the search results. + properties: + created_by_anyone_total: + description: Total number of widgets created by anyone. + format: int64 + type: integer + created_by_you_total: + description: Total number of widgets created by the current user. + format: int64 + type: integer + favorited_by_you_total: + description: Total number of widgets favorited by the current user. + format: int64 + type: integer + filtered_total: + description: Total number of widgets matching the current filter criteria. + format: int64 + type: integer + type: object + WidgetType: + description: |- + Widget types that are allowed to be stored as individual records. + This is not a complete list of dashboard and notebook widget types. + enum: + - bar_chart + - change + - cloud_cost_summary + - cohort + - funnel + - geomap + - list_stream + - query_table + - query_value + - retention_curve + - sankey + - sunburst + - timeseries + - toplist + - treemap + example: bar_chart + type: string + x-enum-varnames: + - BAR_CHART + - CHANGE + - CLOUD_COST_SUMMARY + - COHORT + - FUNNEL + - GEOMAP + - LIST_STREAM + - QUERY_TABLE + - QUERY_VALUE + - RETENTION_CURVE + - SANKEY + - SUNBURST + - TIMESERIES + - TOPLIST + - TREEMAP WorkflowData: description: Data related to the workflow. properties: @@ -106105,6 +106780,80 @@ paths: operator: AND permissions: - status_pages_incident_write + /api/v2/synthetics/api-multistep/subtests/{public_id}: + get: + description: |- + Get the list of API tests that can be added as subtests to a given API multistep test. + The current test is excluded from the list since a test cannot be a subtest of itself. + operationId: GetApiMultistepSubtests + parameters: + - description: The public ID of the API multistep test. + in: path + name: public_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SyntheticsApiMultistepSubtestsResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get available subtests for a multistep test + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/api-multistep/subtests/{public_id}/parents: + get: + description: |- + Get the list of API multistep tests that include a given subtest, + along with their monitor status. + operationId: GetApiMultistepSubtestParents + parameters: + - description: The public ID of the subtest. + in: path + name: public_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SyntheticsApiMultistepParentTestsResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get parent tests for a subtest + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read /api/v2/synthetics/settings/on_demand_concurrency_cap: get: description: Get the on-demand concurrency cap. @@ -106373,6 +107122,61 @@ paths: operator: OR permissions: - synthetics_write + /api/v2/synthetics/suites/{public_id}/jsonpatch: + patch: + description: |- + Patch a Synthetic test suite using JSON Patch (RFC 6902). + Use partial updates to modify only specific fields of a test suite. + + Common operations include: + - Replace field values: `{"op": "replace", "path": "/name", "value": "new_name"}` + - Add/update tags: `{"op": "add", "path": "/tags/-", "value": "new_tag"}` + - Remove fields: `{"op": "remove", "path": "/message"}` + operationId: PatchTestSuite + parameters: + - description: The public ID of the Synthetic test suite to patch. + in: path + name: public_id + required: true + schema: + example: 123-abc-456 + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SuiteJsonPatchRequest" + description: JSON Patch document with operations to apply. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SyntheticsSuiteResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Patch a test suite + tags: + - Synthetics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - synthetics_write + - synthetics_create_edit_trigger /api/v2/synthetics/tests/bulk-delete: post: operationId: DeleteSyntheticsTests @@ -106589,6 +107393,162 @@ paths: permissions: - synthetics_write - synthetics_create_edit_trigger + /api/v2/synthetics/tests/{public_id}/parent-suites: + get: + description: Get the list of parent suites and their status for a given Synthetic test. + operationId: GetTestParentSuites + parameters: + - description: The public ID of the Synthetic test. + in: path + name: public_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SyntheticsTestParentSuitesResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get parent suites for a test + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/tests/{public_id}/version_history: + get: + description: Get the paginated version history for a Synthetic test. + operationId: ListSyntheticsTestVersions + parameters: + - description: The public ID of the Synthetic test. + in: path + name: public_id + required: true + schema: + type: string + - description: The version number of the last item from the previous page. Omit to get the first page. + in: query + name: last_version_number + required: false + schema: + format: int64 + type: integer + - description: Maximum number of version records to return per page. + in: query + name: limit + required: false + schema: + format: int64 + maximum: 50 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SyntheticsTestVersionHistoryResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get version history of a test + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/tests/{public_id}/version_history/{version_number}: + get: + description: Get a specific version of a Synthetic test by its version number. + operationId: GetSyntheticsTestVersion + parameters: + - description: The public ID of the Synthetic test. + in: path + name: public_id + required: true + schema: + type: string + - description: The version number to retrieve. + in: path + name: version_number + required: true + schema: + format: int64 + type: integer + - description: If `true`, include change metadata in the response. + in: query + name: include_change_metadata + required: false + schema: + type: boolean + - description: |- + If `true`, only check whether the version exists without returning its full payload. + Returns an empty object if the version exists, or 404 if not. + in: query + name: only_check_existence + required: false + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SyntheticsTestVersionResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get a specific version of a test + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read /api/v2/synthetics/variables/{variable_id}/jsonpatch: patch: description: |- @@ -109866,6 +110826,328 @@ paths: operator: OR permissions: - teams_read + /api/v2/widgets/{experience_type}: + get: + description: Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. + operationId: SearchWidgets + parameters: + - description: The experience type for the widget. + in: path + name: experience_type + required: true + schema: + $ref: "#/components/schemas/WidgetExperienceType" + - description: Filter widgets by widget type. + in: query + name: filter[widgetType] + schema: + $ref: "#/components/schemas/WidgetType" + - description: Filter widgets by the email handle of the creator. + in: query + name: filter[creatorHandle] + schema: + example: "john.doe@example.com" + type: string + - description: Filter to only widgets favorited by the current user. + in: query + name: filter[isFavorited] + schema: + type: boolean + - description: Filter widgets by title (substring match). + in: query + name: filter[title] + schema: + type: string + - description: Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`. + in: query + name: filter[tags] + schema: + type: string + - description: |- + Sort field for the results. Prefix with `-` for descending order. + Allowed values: `title`, `created_at`, `modified_at`. + in: query + name: sort + schema: + default: "-modified_at" + example: "-modified_at" + type: string + - description: Page number for pagination (0-indexed). + in: query + name: page[number] + schema: + default: 0 + minimum: 0 + type: integer + - description: Number of widgets per page. + in: query + name: page[size] + schema: + default: 50 + maximum: 100 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WidgetListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Search widgets + tags: + - Widgets + x-permission: + operator: OR + permissions: + - cloud_cost_management_read + - generate_log_reports + - manage_log_reports + - product_analytics_saved_widgets_read + post: + description: Create a new widget for a given experience type. + operationId: CreateWidget + parameters: + - description: The experience type for the widget. + in: path + name: experience_type + required: true + schema: + $ref: "#/components/schemas/WidgetExperienceType" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" + description: Widget request body. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WidgetResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a widget + tags: + - Widgets + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + - generate_log_reports + - manage_log_reports + - product_analytics_saved_widgets_write + /api/v2/widgets/{experience_type}/{uuid}: + delete: + description: Soft-delete a widget by its UUID for a given experience type. + operationId: DeleteWidget + parameters: + - description: The experience type for the widget. + in: path + name: experience_type + required: true + schema: + $ref: "#/components/schemas/WidgetExperienceType" + - description: The UUID of the widget. + in: path + name: uuid + required: true + schema: + format: uuid + type: string + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a widget + tags: + - Widgets + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + - generate_log_reports + - manage_log_reports + - product_analytics_saved_widgets_write + get: + description: Retrieve a widget by its UUID for a given experience type. + operationId: GetWidget + parameters: + - description: The experience type for the widget. + in: path + name: experience_type + required: true + schema: + $ref: "#/components/schemas/WidgetExperienceType" + - description: The UUID of the widget. + in: path + name: uuid + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WidgetResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a widget + tags: + - Widgets + x-permission: + operator: OR + permissions: + - cloud_cost_management_read + - generate_log_reports + - manage_log_reports + - product_analytics_saved_widgets_read + put: + description: Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition. + operationId: UpdateWidget + parameters: + - description: The experience type for the widget. + in: path + name: experience_type + required: true + schema: + $ref: "#/components/schemas/WidgetExperienceType" + - description: The UUID of the widget. + in: path + name: uuid + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" + description: Widget request body. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WidgetResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a widget + tags: + - Widgets + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + - generate_log_reports + - manage_log_reports + - product_analytics_saved_widgets_write /api/v2/workflows: post: description: Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). @@ -110716,6 +111998,11 @@ tags: externalDocs: url: https://docs.datadoghq.com/account_management/users name: Users + - description: |- + Create, read, update, and delete saved widgets. Widgets are reusable + visualization components stored independently from any dashboard or notebook, + partitioned by experience type and identified by a UUID. + name: Widgets - description: |- Datadog Workflow Automation allows you to automate your end-to-end processes by connecting Datadog with the rest of your tech stack. Build workflows to auto-remediate your alerts, streamline your incident and security processes, and reduce manual toil. Workflow Automation supports over 1,000+ OOTB actions, including AWS, JIRA, ServiceNow, GitHub, and OpenAI. Learn more in our Workflow Automation docs [here](https://docs.datadoghq.com/service_management/workflows/). externalDocs: diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 35a19fc43c..c3be7e8838 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -725,6 +725,13 @@ datadog\_api\_client.v2.api.users\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.widgets\_api module +----------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.widgets_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.workflow\_automation\_api module ------------------------------------------------------------ diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 868e840142..aff4489c6a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6444,6 +6444,27 @@ datadog\_api\_client.v2.model.create\_open\_api\_response\_data module :members: :show-inheritance: +datadog\_api\_client.v2.model.create\_or\_update\_widget\_request module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_or_update_widget_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_or\_update\_widget\_request\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_or_update_widget_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_or\_update\_widget\_request\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_or_update_widget_request_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.create\_page\_request module ---------------------------------------------------------- @@ -29257,6 +29278,34 @@ datadog\_api\_client.v2.model.suite\_create\_edit\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.suite\_json\_patch\_request module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_json_patch_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_json\_patch\_request\_data module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_json_patch_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_json\_patch\_request\_data\_attributes module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_json_patch_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.suite\_json\_patch\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.suite_json_patch_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.suite\_search\_response\_type module ------------------------------------------------------------------ @@ -29292,6 +29341,62 @@ datadog\_api\_client.v2.model.sync\_property\_with\_mapping module :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_parent\_test\_attributes module +----------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_parent_test_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_parent\_test\_data module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_parent_test_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_parent\_test\_type module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_parent_test_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_parent\_tests\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_parent_tests_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_subtest\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_subtest_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_subtest\_data module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_subtest_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_subtest\_type module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_subtest_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_api\_multistep\_subtests\_response module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_api_multistep_subtests_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_fast\_test\_assertion\_result module ------------------------------------------------------------------------------ @@ -29705,6 +29810,34 @@ datadog\_api\_client.v2.model.synthetics\_test\_options\_scheduling\_timeframe m :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_test\_parent\_suite\_attributes module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_parent_suite_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_parent\_suite\_data module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_parent_suite_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_parent\_suite\_type module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_parent_suite_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_parent\_suites\_response module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_parent_suites_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_test\_pause\_status module -------------------------------------------------------------------- @@ -29712,6 +29845,104 @@ datadog\_api\_client.v2.model.synthetics\_test\_pause\_status module :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_test\_version\_action\_metadata module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_action_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_attributes module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_author module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_author + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_change\_attributes module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_change_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_change\_data module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_change_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_change\_metadata\_item module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_change_metadata_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_change\_type module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_change_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_data module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_diff\_patch\_diff module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_diff_patch_diff + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_diff\_patches module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_diff_patches + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_history\_meta module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_history_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_history\_response module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_history_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_version\_type module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_version_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_variable\_parser module ----------------------------------------------------------------- @@ -32617,6 +32848,55 @@ datadog\_api\_client.v2.model.weekday module :members: :show-inheritance: +datadog\_api\_client.v2.model.widget\_attributes module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_data module +------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_definition module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_definition + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_experience\_type module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_experience_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_included\_user module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_included_user + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_included\_user\_attributes module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_included_user_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_list\_response module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_list_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.widget\_live\_span module ------------------------------------------------------- @@ -32624,6 +32904,48 @@ datadog\_api\_client.v2.model.widget\_live\_span module :members: :show-inheritance: +datadog\_api\_client.v2.model.widget\_relationship\_data module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_relationship_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_relationship\_item module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_relationship_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_relationships module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_response module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_search\_meta module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_search_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.widget\_type module +------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.widget_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.workflow\_data module --------------------------------------------------- diff --git a/examples/v2/synthetics/GetApiMultistepSubtestParents.py b/examples/v2/synthetics/GetApiMultistepSubtestParents.py new file mode 100644 index 0000000000..5b0e5869dd --- /dev/null +++ b/examples/v2/synthetics/GetApiMultistepSubtestParents.py @@ -0,0 +1,15 @@ +""" +Get parent tests for a subtest returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_api_multistep_subtest_parents( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/GetApiMultistepSubtests.py b/examples/v2/synthetics/GetApiMultistepSubtests.py new file mode 100644 index 0000000000..a26b290316 --- /dev/null +++ b/examples/v2/synthetics/GetApiMultistepSubtests.py @@ -0,0 +1,15 @@ +""" +Get available subtests for a multistep test returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_api_multistep_subtests( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/GetSyntheticsTestVersion.py b/examples/v2/synthetics/GetSyntheticsTestVersion.py new file mode 100644 index 0000000000..733a6a6cc3 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsTestVersion.py @@ -0,0 +1,16 @@ +""" +Get a specific version of a test returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_synthetics_test_version( + public_id="public_id", + version_number=9223372036854775807, + ) + + print(response) diff --git a/examples/v2/synthetics/GetTestParentSuites.py b/examples/v2/synthetics/GetTestParentSuites.py new file mode 100644 index 0000000000..a5a25b6053 --- /dev/null +++ b/examples/v2/synthetics/GetTestParentSuites.py @@ -0,0 +1,15 @@ +""" +Get parent suites for a test returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_test_parent_suites( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/ListSyntheticsTestVersions.py b/examples/v2/synthetics/ListSyntheticsTestVersions.py new file mode 100644 index 0000000000..a0d65ebc1b --- /dev/null +++ b/examples/v2/synthetics/ListSyntheticsTestVersions.py @@ -0,0 +1,15 @@ +""" +Get version history of a test returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.list_synthetics_test_versions( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/PatchTestSuite.py b/examples/v2/synthetics/PatchTestSuite.py new file mode 100644 index 0000000000..588148ed29 --- /dev/null +++ b/examples/v2/synthetics/PatchTestSuite.py @@ -0,0 +1,33 @@ +""" +Patch a test suite returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi +from datadog_api_client.v2.model.json_patch_operation import JsonPatchOperation +from datadog_api_client.v2.model.json_patch_operation_op import JsonPatchOperationOp +from datadog_api_client.v2.model.suite_json_patch_request import SuiteJsonPatchRequest +from datadog_api_client.v2.model.suite_json_patch_request_data import SuiteJsonPatchRequestData +from datadog_api_client.v2.model.suite_json_patch_request_data_attributes import SuiteJsonPatchRequestDataAttributes +from datadog_api_client.v2.model.suite_json_patch_type import SuiteJsonPatchType + +body = SuiteJsonPatchRequest( + data=SuiteJsonPatchRequestData( + attributes=SuiteJsonPatchRequestDataAttributes( + json_patch=[ + JsonPatchOperation( + op=JsonPatchOperationOp.ADD, + path="/name", + ), + ], + ), + type=SuiteJsonPatchType.SUITES_JSON_PATCH, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.patch_test_suite(public_id="123-abc-456", body=body) + + print(response) diff --git a/examples/v2/widgets/CreateWidget.py b/examples/v2/widgets/CreateWidget.py new file mode 100644 index 0000000000..a240c0ca20 --- /dev/null +++ b/examples/v2/widgets/CreateWidget.py @@ -0,0 +1,32 @@ +""" +Create a widget returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.widgets_api import WidgetsApi +from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest +from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes +from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData +from datadog_api_client.v2.model.widget_definition import WidgetDefinition +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType +from datadog_api_client.v2.model.widget_type import WidgetType + +body = CreateOrUpdateWidgetRequest( + data=CreateOrUpdateWidgetRequestData( + attributes=CreateOrUpdateWidgetRequestAttributes( + definition=WidgetDefinition( + title="My Widget", + type=WidgetType.BAR_CHART, + ), + tags=[], + ), + type="widgets", + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = WidgetsApi(api_client) + response = api_instance.create_widget(experience_type=WidgetExperienceType.CCM_REPORTS, body=body) + + print(response) diff --git a/examples/v2/widgets/DeleteWidget.py b/examples/v2/widgets/DeleteWidget.py new file mode 100644 index 0000000000..b24fb38df6 --- /dev/null +++ b/examples/v2/widgets/DeleteWidget.py @@ -0,0 +1,16 @@ +""" +Delete a widget returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.widgets_api import WidgetsApi +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType +from uuid import UUID + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = WidgetsApi(api_client) + api_instance.delete_widget( + experience_type=WidgetExperienceType.CCM_REPORTS, + uuid=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + ) diff --git a/examples/v2/widgets/GetWidget.py b/examples/v2/widgets/GetWidget.py new file mode 100644 index 0000000000..eefcaadf52 --- /dev/null +++ b/examples/v2/widgets/GetWidget.py @@ -0,0 +1,18 @@ +""" +Get a widget returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.widgets_api import WidgetsApi +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType +from uuid import UUID + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = WidgetsApi(api_client) + response = api_instance.get_widget( + experience_type=WidgetExperienceType.CCM_REPORTS, + uuid=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + ) + + print(response) diff --git a/examples/v2/widgets/SearchWidgets.py b/examples/v2/widgets/SearchWidgets.py new file mode 100644 index 0000000000..f71b82a3b5 --- /dev/null +++ b/examples/v2/widgets/SearchWidgets.py @@ -0,0 +1,16 @@ +""" +Search widgets returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.widgets_api import WidgetsApi +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = WidgetsApi(api_client) + response = api_instance.search_widgets( + experience_type=WidgetExperienceType.CCM_REPORTS, + ) + + print(response) diff --git a/examples/v2/widgets/UpdateWidget.py b/examples/v2/widgets/UpdateWidget.py new file mode 100644 index 0000000000..26fc139ad2 --- /dev/null +++ b/examples/v2/widgets/UpdateWidget.py @@ -0,0 +1,35 @@ +""" +Update a widget returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.widgets_api import WidgetsApi +from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest +from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes +from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData +from datadog_api_client.v2.model.widget_definition import WidgetDefinition +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType +from datadog_api_client.v2.model.widget_type import WidgetType +from uuid import UUID + +body = CreateOrUpdateWidgetRequest( + data=CreateOrUpdateWidgetRequestData( + attributes=CreateOrUpdateWidgetRequestAttributes( + definition=WidgetDefinition( + title="My Widget", + type=WidgetType.BAR_CHART, + ), + tags=[], + ), + type="widgets", + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = WidgetsApi(api_client) + response = api_instance.update_widget( + experience_type=WidgetExperienceType.CCM_REPORTS, uuid=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/synthetics_api.py b/src/datadog_api_client/v2/api/synthetics_api.py index bb490fe2b0..537f6d0737 100644 --- a/src/datadog_api_client/v2/api/synthetics_api.py +++ b/src/datadog_api_client/v2/api/synthetics_api.py @@ -11,6 +11,12 @@ UnsetType, unset, ) +from datadog_api_client.v2.model.synthetics_api_multistep_subtests_response import ( + SyntheticsApiMultistepSubtestsResponse, +) +from datadog_api_client.v2.model.synthetics_api_multistep_parent_tests_response import ( + SyntheticsApiMultistepParentTestsResponse, +) from datadog_api_client.v2.model.on_demand_concurrency_cap_response import OnDemandConcurrencyCapResponse from datadog_api_client.v2.model.on_demand_concurrency_cap_attributes import OnDemandConcurrencyCapAttributes from datadog_api_client.v2.model.synthetics_suite_response import SyntheticsSuiteResponse @@ -18,11 +24,15 @@ from datadog_api_client.v2.model.deleted_suites_response import DeletedSuitesResponse from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest from datadog_api_client.v2.model.synthetics_suite_search_response import SyntheticsSuiteSearchResponse +from datadog_api_client.v2.model.suite_json_patch_request import SuiteJsonPatchRequest from datadog_api_client.v2.model.deleted_tests_response import DeletedTestsResponse from datadog_api_client.v2.model.deleted_tests_request_delete_request import DeletedTestsRequestDeleteRequest from datadog_api_client.v2.model.synthetics_fast_test_result import SyntheticsFastTestResult from datadog_api_client.v2.model.synthetics_network_test_response import SyntheticsNetworkTestResponse from datadog_api_client.v2.model.synthetics_network_test_edit_request import SyntheticsNetworkTestEditRequest +from datadog_api_client.v2.model.synthetics_test_parent_suites_response import SyntheticsTestParentSuitesResponse +from datadog_api_client.v2.model.synthetics_test_version_history_response import SyntheticsTestVersionHistoryResponse +from datadog_api_client.v2.model.synthetics_test_version_response import SyntheticsTestVersionResponse from datadog_api_client.v2.model.global_variable_response import GlobalVariableResponse from datadog_api_client.v2.model.global_variable_json_patch_request import GlobalVariableJsonPatchRequest @@ -150,6 +160,52 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_api_multistep_subtest_parents_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsApiMultistepParentTestsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/api-multistep/subtests/{public_id}/parents", + "operation_id": "get_api_multistep_subtest_parents", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_api_multistep_subtests_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsApiMultistepSubtestsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/api-multistep/subtests/{public_id}", + "operation_id": "get_api_multistep_subtests", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_on_demand_concurrency_cap_endpoint = _Endpoint( settings={ "response_type": (OnDemandConcurrencyCapResponse,), @@ -235,6 +291,104 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_synthetics_test_version_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestVersionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/{public_id}/version_history/{version_number}", + "operation_id": "get_synthetics_test_version", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "version_number": { + "required": True, + "openapi_types": (int,), + "attribute": "version_number", + "location": "path", + }, + "include_change_metadata": { + "openapi_types": (bool,), + "attribute": "include_change_metadata", + "location": "query", + }, + "only_check_existence": { + "openapi_types": (bool,), + "attribute": "only_check_existence", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_test_parent_suites_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestParentSuitesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/{public_id}/parent-suites", + "operation_id": "get_test_parent_suites", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_synthetics_test_versions_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestVersionHistoryResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/{public_id}/version_history", + "operation_id": "list_synthetics_test_versions", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "last_version_number": { + "openapi_types": (int,), + "attribute": "last_version_number", + "location": "query", + }, + "limit": { + "validation": { + "inclusive_maximum": 50, + }, + "openapi_types": (int,), + "attribute": "limit", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._patch_global_variable_endpoint = _Endpoint( settings={ "response_type": (GlobalVariableResponse,), @@ -261,6 +415,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._patch_test_suite_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsSuiteResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/suites/{public_id}/jsonpatch", + "operation_id": "patch_test_suite", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (SuiteJsonPatchRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._search_suites_endpoint = _Endpoint( settings={ "response_type": (SyntheticsSuiteSearchResponse,), @@ -425,6 +605,42 @@ def edit_synthetics_suite( return self._edit_synthetics_suite_endpoint.call_with_http_info(**kwargs) + def get_api_multistep_subtest_parents( + self, + public_id: str, + ) -> SyntheticsApiMultistepParentTestsResponse: + """Get parent tests for a subtest. + + Get the list of API multistep tests that include a given subtest, + along with their monitor status. + + :param public_id: The public ID of the subtest. + :type public_id: str + :rtype: SyntheticsApiMultistepParentTestsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + return self._get_api_multistep_subtest_parents_endpoint.call_with_http_info(**kwargs) + + def get_api_multistep_subtests( + self, + public_id: str, + ) -> SyntheticsApiMultistepSubtestsResponse: + """Get available subtests for a multistep test. + + Get the list of API tests that can be added as subtests to a given API multistep test. + The current test is excluded from the list since a test cannot be a subtest of itself. + + :param public_id: The public ID of the API multistep test. + :type public_id: str + :rtype: SyntheticsApiMultistepSubtestsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + return self._get_api_multistep_subtests_endpoint.call_with_http_info(**kwargs) + def get_on_demand_concurrency_cap( self, ) -> OnDemandConcurrencyCapResponse: @@ -482,6 +698,89 @@ def get_synthetics_suite( return self._get_synthetics_suite_endpoint.call_with_http_info(**kwargs) + def get_synthetics_test_version( + self, + public_id: str, + version_number: int, + *, + include_change_metadata: Union[bool, UnsetType] = unset, + only_check_existence: Union[bool, UnsetType] = unset, + ) -> SyntheticsTestVersionResponse: + """Get a specific version of a test. + + Get a specific version of a Synthetic test by its version number. + + :param public_id: The public ID of the Synthetic test. + :type public_id: str + :param version_number: The version number to retrieve. + :type version_number: int + :param include_change_metadata: If ``true`` , include change metadata in the response. + :type include_change_metadata: bool, optional + :param only_check_existence: If ``true`` , only check whether the version exists without returning its full payload. + Returns an empty object if the version exists, or 404 if not. + :type only_check_existence: bool, optional + :rtype: SyntheticsTestVersionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + kwargs["version_number"] = version_number + + if include_change_metadata is not unset: + kwargs["include_change_metadata"] = include_change_metadata + + if only_check_existence is not unset: + kwargs["only_check_existence"] = only_check_existence + + return self._get_synthetics_test_version_endpoint.call_with_http_info(**kwargs) + + def get_test_parent_suites( + self, + public_id: str, + ) -> SyntheticsTestParentSuitesResponse: + """Get parent suites for a test. + + Get the list of parent suites and their status for a given Synthetic test. + + :param public_id: The public ID of the Synthetic test. + :type public_id: str + :rtype: SyntheticsTestParentSuitesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + return self._get_test_parent_suites_endpoint.call_with_http_info(**kwargs) + + def list_synthetics_test_versions( + self, + public_id: str, + *, + last_version_number: Union[int, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + ) -> SyntheticsTestVersionHistoryResponse: + """Get version history of a test. + + Get the paginated version history for a Synthetic test. + + :param public_id: The public ID of the Synthetic test. + :type public_id: str + :param last_version_number: The version number of the last item from the previous page. Omit to get the first page. + :type last_version_number: int, optional + :param limit: Maximum number of version records to return per page. + :type limit: int, optional + :rtype: SyntheticsTestVersionHistoryResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + if last_version_number is not unset: + kwargs["last_version_number"] = last_version_number + + if limit is not unset: + kwargs["limit"] = limit + + return self._list_synthetics_test_versions_endpoint.call_with_http_info(**kwargs) + def patch_global_variable( self, variable_id: str, @@ -512,6 +811,35 @@ def patch_global_variable( return self._patch_global_variable_endpoint.call_with_http_info(**kwargs) + def patch_test_suite( + self, + public_id: str, + body: SuiteJsonPatchRequest, + ) -> SyntheticsSuiteResponse: + """Patch a test suite. + + Patch a Synthetic test suite using JSON Patch (RFC 6902). + Use partial updates to modify only specific fields of a test suite. + + Common operations include: + + * Replace field values: ``{"op": "replace", "path": "/name", "value": "new_name"}`` + * Add/update tags: ``{"op": "add", "path": "/tags/-", "value": "new_tag"}`` + * Remove fields: ``{"op": "remove", "path": "/message"}`` + + :param public_id: The public ID of the Synthetic test suite to patch. + :type public_id: str + :param body: JSON Patch document with operations to apply. + :type body: SuiteJsonPatchRequest + :rtype: SyntheticsSuiteResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + kwargs["body"] = body + + return self._patch_test_suite_endpoint.call_with_http_info(**kwargs) + def search_suites( self, *, diff --git a/src/datadog_api_client/v2/api/widgets_api.py b/src/datadog_api_client/v2/api/widgets_api.py new file mode 100644 index 0000000000..05e80ee428 --- /dev/null +++ b/src/datadog_api_client/v2/api/widgets_api.py @@ -0,0 +1,377 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, + UUID, +) +from datadog_api_client.v2.model.widget_list_response import WidgetListResponse +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType +from datadog_api_client.v2.model.widget_type import WidgetType +from datadog_api_client.v2.model.widget_response import WidgetResponse +from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest + + +class WidgetsApi: + """ + Create, read, update, and delete saved widgets. Widgets are reusable + visualization components stored independently from any dashboard or notebook, + partitioned by experience type and identified by a UUID. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._create_widget_endpoint = _Endpoint( + settings={ + "response_type": (WidgetResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/widgets/{experience_type}", + "operation_id": "create_widget", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "experience_type": { + "required": True, + "openapi_types": (WidgetExperienceType,), + "attribute": "experience_type", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (CreateOrUpdateWidgetRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_widget_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/widgets/{experience_type}/{uuid}", + "operation_id": "delete_widget", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "experience_type": { + "required": True, + "openapi_types": (WidgetExperienceType,), + "attribute": "experience_type", + "location": "path", + }, + "uuid": { + "required": True, + "openapi_types": (UUID,), + "attribute": "uuid", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._get_widget_endpoint = _Endpoint( + settings={ + "response_type": (WidgetResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/widgets/{experience_type}/{uuid}", + "operation_id": "get_widget", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "experience_type": { + "required": True, + "openapi_types": (WidgetExperienceType,), + "attribute": "experience_type", + "location": "path", + }, + "uuid": { + "required": True, + "openapi_types": (UUID,), + "attribute": "uuid", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._search_widgets_endpoint = _Endpoint( + settings={ + "response_type": (WidgetListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/widgets/{experience_type}", + "operation_id": "search_widgets", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "experience_type": { + "required": True, + "openapi_types": (WidgetExperienceType,), + "attribute": "experience_type", + "location": "path", + }, + "filter_widget_type": { + "openapi_types": (WidgetType,), + "attribute": "filter[widgetType]", + "location": "query", + }, + "filter_creator_handle": { + "openapi_types": (str,), + "attribute": "filter[creatorHandle]", + "location": "query", + }, + "filter_is_favorited": { + "openapi_types": (bool,), + "attribute": "filter[isFavorited]", + "location": "query", + }, + "filter_title": { + "openapi_types": (str,), + "attribute": "filter[title]", + "location": "query", + }, + "filter_tags": { + "openapi_types": (str,), + "attribute": "filter[tags]", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "page_number": { + "validation": { + "inclusive_minimum": 0, + }, + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + "page_size": { + "validation": { + "inclusive_maximum": 100, + }, + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._update_widget_endpoint = _Endpoint( + settings={ + "response_type": (WidgetResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/widgets/{experience_type}/{uuid}", + "operation_id": "update_widget", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "experience_type": { + "required": True, + "openapi_types": (WidgetExperienceType,), + "attribute": "experience_type", + "location": "path", + }, + "uuid": { + "required": True, + "openapi_types": (UUID,), + "attribute": "uuid", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (CreateOrUpdateWidgetRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def create_widget( + self, + experience_type: WidgetExperienceType, + body: CreateOrUpdateWidgetRequest, + ) -> WidgetResponse: + """Create a widget. + + Create a new widget for a given experience type. + + :param experience_type: The experience type for the widget. + :type experience_type: WidgetExperienceType + :param body: Widget request body. + :type body: CreateOrUpdateWidgetRequest + :rtype: WidgetResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["experience_type"] = experience_type + + kwargs["body"] = body + + return self._create_widget_endpoint.call_with_http_info(**kwargs) + + def delete_widget( + self, + experience_type: WidgetExperienceType, + uuid: UUID, + ) -> None: + """Delete a widget. + + Soft-delete a widget by its UUID for a given experience type. + + :param experience_type: The experience type for the widget. + :type experience_type: WidgetExperienceType + :param uuid: The UUID of the widget. + :type uuid: UUID + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["experience_type"] = experience_type + + kwargs["uuid"] = uuid + + return self._delete_widget_endpoint.call_with_http_info(**kwargs) + + def get_widget( + self, + experience_type: WidgetExperienceType, + uuid: UUID, + ) -> WidgetResponse: + """Get a widget. + + Retrieve a widget by its UUID for a given experience type. + + :param experience_type: The experience type for the widget. + :type experience_type: WidgetExperienceType + :param uuid: The UUID of the widget. + :type uuid: UUID + :rtype: WidgetResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["experience_type"] = experience_type + + kwargs["uuid"] = uuid + + return self._get_widget_endpoint.call_with_http_info(**kwargs) + + def search_widgets( + self, + experience_type: WidgetExperienceType, + *, + filter_widget_type: Union[WidgetType, UnsetType] = unset, + filter_creator_handle: Union[str, UnsetType] = unset, + filter_is_favorited: Union[bool, UnsetType] = unset, + filter_title: Union[str, UnsetType] = unset, + filter_tags: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + page_size: Union[int, UnsetType] = unset, + ) -> WidgetListResponse: + """Search widgets. + + Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. + + :param experience_type: The experience type for the widget. + :type experience_type: WidgetExperienceType + :param filter_widget_type: Filter widgets by widget type. + :type filter_widget_type: WidgetType, optional + :param filter_creator_handle: Filter widgets by the email handle of the creator. + :type filter_creator_handle: str, optional + :param filter_is_favorited: Filter to only widgets favorited by the current user. + :type filter_is_favorited: bool, optional + :param filter_title: Filter widgets by title (substring match). + :type filter_title: str, optional + :param filter_tags: Filter widgets by tags. Format as bracket-delimited CSV, e.g. ``[tag1,tag2]``. + :type filter_tags: str, optional + :param sort: Sort field for the results. Prefix with ``-`` for descending order. + Allowed values: ``title`` , ``created_at`` , ``modified_at``. + :type sort: str, optional + :param page_number: Page number for pagination (0-indexed). + :type page_number: int, optional + :param page_size: Number of widgets per page. + :type page_size: int, optional + :rtype: WidgetListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["experience_type"] = experience_type + + if filter_widget_type is not unset: + kwargs["filter_widget_type"] = filter_widget_type + + if filter_creator_handle is not unset: + kwargs["filter_creator_handle"] = filter_creator_handle + + if filter_is_favorited is not unset: + kwargs["filter_is_favorited"] = filter_is_favorited + + if filter_title is not unset: + kwargs["filter_title"] = filter_title + + if filter_tags is not unset: + kwargs["filter_tags"] = filter_tags + + if sort is not unset: + kwargs["sort"] = sort + + if page_number is not unset: + kwargs["page_number"] = page_number + + if page_size is not unset: + kwargs["page_size"] = page_size + + return self._search_widgets_endpoint.call_with_http_info(**kwargs) + + def update_widget( + self, + experience_type: WidgetExperienceType, + uuid: UUID, + body: CreateOrUpdateWidgetRequest, + ) -> WidgetResponse: + """Update a widget. + + Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition. + + :param experience_type: The experience type for the widget. + :type experience_type: WidgetExperienceType + :param uuid: The UUID of the widget. + :type uuid: UUID + :param body: Widget request body. + :type body: CreateOrUpdateWidgetRequest + :rtype: WidgetResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["experience_type"] = experience_type + + kwargs["uuid"] = uuid + + kwargs["body"] = body + + return self._update_widget_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index bc1a8f058f..db7cdb8ab0 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -101,6 +101,7 @@ from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi from datadog_api_client.v2.api.users_api import UsersApi +from datadog_api_client.v2.api.widgets_api import WidgetsApi from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi @@ -208,5 +209,6 @@ "TestOptimizationApi", "UsageMeteringApi", "UsersApi", + "WidgetsApi", "WorkflowAutomationApi", ] diff --git a/src/datadog_api_client/v2/model/create_or_update_widget_request.py b/src/datadog_api_client/v2/model/create_or_update_widget_request.py new file mode 100644 index 0000000000..eaea211d9f --- /dev/null +++ b/src/datadog_api_client/v2/model/create_or_update_widget_request.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData + + +class CreateOrUpdateWidgetRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData + + return { + "data": (CreateOrUpdateWidgetRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: CreateOrUpdateWidgetRequestData, **kwargs): + """ + Request body for creating or updating a widget. + + :param data: Data for creating or updating a widget. + :type data: CreateOrUpdateWidgetRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py b/src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py new file mode 100644 index 0000000000..97aa37fa49 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_or_update_widget_request_attributes.py @@ -0,0 +1,50 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_definition import WidgetDefinition + + +class CreateOrUpdateWidgetRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_definition import WidgetDefinition + + return { + "definition": (WidgetDefinition,), + "tags": ([str], none_type), + } + + attribute_map = { + "definition": "definition", + "tags": "tags", + } + + def __init__(self_, definition: WidgetDefinition, tags: Union[List[str], none_type, UnsetType] = unset, **kwargs): + """ + Attributes for creating or updating a widget. + + :param definition: The definition of a widget, including its type and configuration. + :type definition: WidgetDefinition + + :param tags: User-defined tags for organizing the widget. + :type tags: [str], none_type, optional + """ + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.definition = definition diff --git a/src/datadog_api_client/v2/model/create_or_update_widget_request_data.py b/src/datadog_api_client/v2/model/create_or_update_widget_request_data.py new file mode 100644 index 0000000000..38ba6e7166 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_or_update_widget_request_data.py @@ -0,0 +1,50 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_or_update_widget_request_attributes import ( + CreateOrUpdateWidgetRequestAttributes, + ) + + +class CreateOrUpdateWidgetRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_or_update_widget_request_attributes import ( + CreateOrUpdateWidgetRequestAttributes, + ) + + return { + "attributes": (CreateOrUpdateWidgetRequestAttributes,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: CreateOrUpdateWidgetRequestAttributes, type: str, **kwargs): + """ + Data for creating or updating a widget. + + :param attributes: Attributes for creating or updating a widget. + :type attributes: CreateOrUpdateWidgetRequestAttributes + + :param type: Widgets resource type. + :type type: str + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/suite_json_patch_request.py b/src/datadog_api_client/v2/model/suite_json_patch_request.py new file mode 100644 index 0000000000..952e810f47 --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_json_patch_request.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.suite_json_patch_request_data import SuiteJsonPatchRequestData + + +class SuiteJsonPatchRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.suite_json_patch_request_data import SuiteJsonPatchRequestData + + return { + "data": (SuiteJsonPatchRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: SuiteJsonPatchRequestData, **kwargs): + """ + JSON Patch request for a Synthetic test suite. + + :param data: Data object for a JSON Patch request on a Synthetic test suite. + :type data: SuiteJsonPatchRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/suite_json_patch_request_data.py b/src/datadog_api_client/v2/model/suite_json_patch_request_data.py new file mode 100644 index 0000000000..f1cbc04b98 --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_json_patch_request_data.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.suite_json_patch_request_data_attributes import SuiteJsonPatchRequestDataAttributes + from datadog_api_client.v2.model.suite_json_patch_type import SuiteJsonPatchType + + +class SuiteJsonPatchRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.suite_json_patch_request_data_attributes import ( + SuiteJsonPatchRequestDataAttributes, + ) + from datadog_api_client.v2.model.suite_json_patch_type import SuiteJsonPatchType + + return { + "attributes": (SuiteJsonPatchRequestDataAttributes,), + "type": (SuiteJsonPatchType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SuiteJsonPatchRequestDataAttributes, UnsetType] = unset, + type: Union[SuiteJsonPatchType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a JSON Patch request on a Synthetic test suite. + + :param attributes: Attributes for a JSON Patch request on a Synthetic test suite. + :type attributes: SuiteJsonPatchRequestDataAttributes, optional + + :param type: Type for a JSON Patch request on a Synthetic test suite, ``suites_json_patch``. + :type type: SuiteJsonPatchType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/suite_json_patch_request_data_attributes.py b/src/datadog_api_client/v2/model/suite_json_patch_request_data_attributes.py new file mode 100644 index 0000000000..9d7236a17a --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_json_patch_request_data_attributes.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.json_patch_operation import JsonPatchOperation + + +class SuiteJsonPatchRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.json_patch_operation import JsonPatchOperation + + return { + "json_patch": ([JsonPatchOperation],), + } + + attribute_map = { + "json_patch": "json_patch", + } + + def __init__(self_, json_patch: Union[List[JsonPatchOperation], UnsetType] = unset, **kwargs): + """ + Attributes for a JSON Patch request on a Synthetic test suite. + + :param json_patch: JSON Patch operations following RFC 6902. + :type json_patch: [JsonPatchOperation], optional + """ + if json_patch is not unset: + kwargs["json_patch"] = json_patch + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/suite_json_patch_type.py b/src/datadog_api_client/v2/model/suite_json_patch_type.py new file mode 100644 index 0000000000..96b83ac209 --- /dev/null +++ b/src/datadog_api_client/v2/model/suite_json_patch_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SuiteJsonPatchType(ModelSimple): + """ + Type for a JSON Patch request on a Synthetic test suite, `suites_json_patch`. + + :param value: If omitted defaults to "suites_json_patch". Must be one of ["suites_json_patch"]. + :type value: str + """ + + allowed_values = { + "suites_json_patch", + } + SUITES_JSON_PATCH: ClassVar["SuiteJsonPatchType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SuiteJsonPatchType.SUITES_JSON_PATCH = SuiteJsonPatchType("suites_json_patch") diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_attributes.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_attributes.py new file mode 100644 index 0000000000..8161e0ca17 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_attributes.py @@ -0,0 +1,88 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsApiMultistepParentTestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "child_name": (str,), + "child_public_id": (str,), + "monitor_id": (int,), + "name": (str,), + "overall_state": (int,), + "overall_state_modified": (str,), + "public_id": (str,), + } + + attribute_map = { + "child_name": "child_name", + "child_public_id": "child_public_id", + "monitor_id": "monitor_id", + "name": "name", + "overall_state": "overall_state", + "overall_state_modified": "overall_state_modified", + "public_id": "public_id", + } + + def __init__( + self_, + child_name: Union[str, UnsetType] = unset, + child_public_id: Union[str, UnsetType] = unset, + monitor_id: Union[int, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + overall_state: Union[int, UnsetType] = unset, + overall_state_modified: Union[str, UnsetType] = unset, + public_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a parent API multistep test. + + :param child_name: The name of the child subtest. + :type child_name: str, optional + + :param child_public_id: The public ID of the child subtest. + :type child_public_id: str, optional + + :param monitor_id: The associated monitor ID. + :type monitor_id: int, optional + + :param name: Name of the parent test. + :type name: str, optional + + :param overall_state: The overall state of the parent test. + :type overall_state: int, optional + + :param overall_state_modified: Timestamp of when the overall state was last modified. + :type overall_state_modified: str, optional + + :param public_id: The public ID of the parent test. + :type public_id: str, optional + """ + if child_name is not unset: + kwargs["child_name"] = child_name + if child_public_id is not unset: + kwargs["child_public_id"] = child_public_id + if monitor_id is not unset: + kwargs["monitor_id"] = monitor_id + if name is not unset: + kwargs["name"] = name + if overall_state is not unset: + kwargs["overall_state"] = overall_state + if overall_state_modified is not unset: + kwargs["overall_state_modified"] = overall_state_modified + if public_id is not unset: + kwargs["public_id"] = public_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_data.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_data.py new file mode 100644 index 0000000000..9166ee9db9 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_data.py @@ -0,0 +1,72 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_attributes import ( + SyntheticsApiMultistepParentTestAttributes, + ) + from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_type import ( + SyntheticsApiMultistepParentTestType, + ) + + +class SyntheticsApiMultistepParentTestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_attributes import ( + SyntheticsApiMultistepParentTestAttributes, + ) + from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_type import ( + SyntheticsApiMultistepParentTestType, + ) + + return { + "attributes": (SyntheticsApiMultistepParentTestAttributes,), + "id": (str,), + "type": (SyntheticsApiMultistepParentTestType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsApiMultistepParentTestAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[SyntheticsApiMultistepParentTestType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a parent API multistep test. + + :param attributes: Attributes of a parent API multistep test. + :type attributes: SyntheticsApiMultistepParentTestAttributes, optional + + :param id: The public ID of the parent test. + :type id: str, optional + + :param type: Type of the parent test resource. + :type type: SyntheticsApiMultistepParentTestType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_type.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_type.py new file mode 100644 index 0000000000..776e8fc37e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_test_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsApiMultistepParentTestType(ModelSimple): + """ + Type of the parent test resource. + + :param value: If omitted defaults to "parent_test". Must be one of ["parent_test"]. + :type value: str + """ + + allowed_values = { + "parent_test", + } + PARENT_TEST: ClassVar["SyntheticsApiMultistepParentTestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsApiMultistepParentTestType.PARENT_TEST = SyntheticsApiMultistepParentTestType("parent_test") diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_tests_response.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_tests_response.py new file mode 100644 index 0000000000..13cceb62f1 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_parent_tests_response.py @@ -0,0 +1,46 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_data import ( + SyntheticsApiMultistepParentTestData, + ) + + +class SyntheticsApiMultistepParentTestsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_data import ( + SyntheticsApiMultistepParentTestData, + ) + + return { + "data": ([SyntheticsApiMultistepParentTestData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[SyntheticsApiMultistepParentTestData], UnsetType] = unset, **kwargs): + """ + Response containing the list of parent tests for an API multistep subtest. + + :param data: List of parent tests that include this subtest. + :type data: [SyntheticsApiMultistepParentTestData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_attributes.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_attributes.py new file mode 100644 index 0000000000..66cb9d376d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_attributes.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsApiMultistepSubtestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "public_id": (str,), + } + + attribute_map = { + "name": "name", + "public_id": "public_id", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, public_id: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes of a Synthetic API multistep subtest. + + :param name: Name of the subtest. + :type name: str, optional + + :param public_id: The public ID of the subtest. + :type public_id: str, optional + """ + if name is not unset: + kwargs["name"] = name + if public_id is not unset: + kwargs["public_id"] = public_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_data.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_data.py new file mode 100644 index 0000000000..5795cbdfab --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_data.py @@ -0,0 +1,68 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_api_multistep_subtest_attributes import ( + SyntheticsApiMultistepSubtestAttributes, + ) + from datadog_api_client.v2.model.synthetics_api_multistep_subtest_type import SyntheticsApiMultistepSubtestType + + +class SyntheticsApiMultistepSubtestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_api_multistep_subtest_attributes import ( + SyntheticsApiMultistepSubtestAttributes, + ) + from datadog_api_client.v2.model.synthetics_api_multistep_subtest_type import SyntheticsApiMultistepSubtestType + + return { + "attributes": (SyntheticsApiMultistepSubtestAttributes,), + "id": (str,), + "type": (SyntheticsApiMultistepSubtestType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsApiMultistepSubtestAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[SyntheticsApiMultistepSubtestType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a Synthetic API multistep subtest. + + :param attributes: Attributes of a Synthetic API multistep subtest. + :type attributes: SyntheticsApiMultistepSubtestAttributes, optional + + :param id: The public ID of the subtest. + :type id: str, optional + + :param type: Type of the subtest resource. + :type type: SyntheticsApiMultistepSubtestType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_type.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_type.py new file mode 100644 index 0000000000..cfe8c94a25 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtest_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsApiMultistepSubtestType(ModelSimple): + """ + Type of the subtest resource. + + :param value: If omitted defaults to "subtest". Must be one of ["subtest"]. + :type value: str + """ + + allowed_values = { + "subtest", + } + SUBTEST: ClassVar["SyntheticsApiMultistepSubtestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsApiMultistepSubtestType.SUBTEST = SyntheticsApiMultistepSubtestType("subtest") diff --git a/src/datadog_api_client/v2/model/synthetics_api_multistep_subtests_response.py b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtests_response.py new file mode 100644 index 0000000000..6c07d5316e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_api_multistep_subtests_response.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_api_multistep_subtest_data import SyntheticsApiMultistepSubtestData + + +class SyntheticsApiMultistepSubtestsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_api_multistep_subtest_data import SyntheticsApiMultistepSubtestData + + return { + "data": ([SyntheticsApiMultistepSubtestData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[SyntheticsApiMultistepSubtestData], UnsetType] = unset, **kwargs): + """ + Response containing the list of available subtests for an API multistep test. + + :param data: List of API tests that can be added as subtests. + :type data: [SyntheticsApiMultistepSubtestData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_parent_suite_attributes.py b/src/datadog_api_client/v2/model/synthetics_test_parent_suite_attributes.py new file mode 100644 index 0000000000..876a8e9cf8 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_parent_suite_attributes.py @@ -0,0 +1,88 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestParentSuiteAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "child_name": (str,), + "child_public_id": (str,), + "monitor_id": (int,), + "name": (str,), + "overall_state": (int,), + "overall_state_modified": (str,), + "public_id": (str,), + } + + attribute_map = { + "child_name": "child_name", + "child_public_id": "child_public_id", + "monitor_id": "monitor_id", + "name": "name", + "overall_state": "overall_state", + "overall_state_modified": "overall_state_modified", + "public_id": "public_id", + } + + def __init__( + self_, + child_name: Union[str, UnsetType] = unset, + child_public_id: Union[str, UnsetType] = unset, + monitor_id: Union[int, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + overall_state: Union[int, UnsetType] = unset, + overall_state_modified: Union[str, UnsetType] = unset, + public_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Object containing details about a parent suite of a Synthetic test. + + :param child_name: The name of the child test within the suite. + :type child_name: str, optional + + :param child_public_id: The public ID of the child test within the suite. + :type child_public_id: str, optional + + :param monitor_id: The associated monitor ID. + :type monitor_id: int, optional + + :param name: Name of the parent suite. + :type name: str, optional + + :param overall_state: The overall state of the parent suite. + :type overall_state: int, optional + + :param overall_state_modified: Timestamp of when the overall state was last modified. + :type overall_state_modified: str, optional + + :param public_id: The public ID of the parent suite. + :type public_id: str, optional + """ + if child_name is not unset: + kwargs["child_name"] = child_name + if child_public_id is not unset: + kwargs["child_public_id"] = child_public_id + if monitor_id is not unset: + kwargs["monitor_id"] = monitor_id + if name is not unset: + kwargs["name"] = name + if overall_state is not unset: + kwargs["overall_state"] = overall_state + if overall_state_modified is not unset: + kwargs["overall_state_modified"] = overall_state_modified + if public_id is not unset: + kwargs["public_id"] = public_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_parent_suite_data.py b/src/datadog_api_client/v2/model/synthetics_test_parent_suite_data.py new file mode 100644 index 0000000000..4570935c58 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_parent_suite_data.py @@ -0,0 +1,66 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_parent_suite_attributes import SyntheticsTestParentSuiteAttributes + from datadog_api_client.v2.model.synthetics_test_parent_suite_type import SyntheticsTestParentSuiteType + + +class SyntheticsTestParentSuiteData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_parent_suite_attributes import ( + SyntheticsTestParentSuiteAttributes, + ) + from datadog_api_client.v2.model.synthetics_test_parent_suite_type import SyntheticsTestParentSuiteType + + return { + "attributes": (SyntheticsTestParentSuiteAttributes,), + "id": (str,), + "type": (SyntheticsTestParentSuiteType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsTestParentSuiteAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[SyntheticsTestParentSuiteType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a parent suite. + + :param attributes: Object containing details about a parent suite of a Synthetic test. + :type attributes: SyntheticsTestParentSuiteAttributes, optional + + :param id: The public ID of the parent suite. + :type id: str, optional + + :param type: Type of the parent suite resource. + :type type: SyntheticsTestParentSuiteType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_parent_suite_type.py b/src/datadog_api_client/v2/model/synthetics_test_parent_suite_type.py new file mode 100644 index 0000000000..699f6b75d3 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_parent_suite_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestParentSuiteType(ModelSimple): + """ + Type of the parent suite resource. + + :param value: If omitted defaults to "parent_suite". Must be one of ["parent_suite"]. + :type value: str + """ + + allowed_values = { + "parent_suite", + } + PARENT_SUITE: ClassVar["SyntheticsTestParentSuiteType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestParentSuiteType.PARENT_SUITE = SyntheticsTestParentSuiteType("parent_suite") diff --git a/src/datadog_api_client/v2/model/synthetics_test_parent_suites_response.py b/src/datadog_api_client/v2/model/synthetics_test_parent_suites_response.py new file mode 100644 index 0000000000..9eba9b0f7f --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_parent_suites_response.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_parent_suite_data import SyntheticsTestParentSuiteData + + +class SyntheticsTestParentSuitesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_parent_suite_data import SyntheticsTestParentSuiteData + + return { + "data": ([SyntheticsTestParentSuiteData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[SyntheticsTestParentSuiteData], UnsetType] = unset, **kwargs): + """ + Response containing the list of parent suites for a Synthetic test. + + :param data: List of parent suites for the given test. + :type data: [SyntheticsTestParentSuiteData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_action_metadata.py b/src/datadog_api_client/v2/model/synthetics_test_version_action_metadata.py new file mode 100644 index 0000000000..12cee60ee8 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_action_metadata.py @@ -0,0 +1,96 @@ +# 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. +from __future__ import annotations + +from typing import Any, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_diff_patches import SyntheticsTestVersionDiffPatches + + +class SyntheticsTestVersionActionMetadata(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_diff_patches import SyntheticsTestVersionDiffPatches + + return { + "after_value": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "before_value": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "diff_patches": ([SyntheticsTestVersionDiffPatches], none_type), + "property_path": (str,), + } + + attribute_map = { + "after_value": "after_value", + "before_value": "before_value", + "diff_patches": "diff_patches", + "property_path": "property_path", + } + + def __init__( + self_, + after_value: Union[Any, UnsetType] = unset, + before_value: Union[Any, UnsetType] = unset, + diff_patches: Union[List[SyntheticsTestVersionDiffPatches], none_type, UnsetType] = unset, + property_path: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Object containing metadata about a change action. + + :param after_value: The value of the property after the change. + :type after_value: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param before_value: The value of the property before the change. + :type before_value: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param diff_patches: List of diff patches for text changes. + :type diff_patches: [SyntheticsTestVersionDiffPatches], none_type, optional + + :param property_path: The dot-separated path of the property that was changed. + :type property_path: str, optional + """ + if after_value is not unset: + kwargs["after_value"] = after_value + if before_value is not unset: + kwargs["before_value"] = before_value + if diff_patches is not unset: + kwargs["diff_patches"] = diff_patches + if property_path is not unset: + kwargs["property_path"] = property_path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_attributes.py b/src/datadog_api_client/v2/model/synthetics_test_version_attributes.py new file mode 100644 index 0000000000..93bd655d9a --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_attributes.py @@ -0,0 +1,96 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_author import SyntheticsTestVersionAuthor + from datadog_api_client.v2.model.synthetics_test_version_change_metadata_item import ( + SyntheticsTestVersionChangeMetadataItem, + ) + + +class SyntheticsTestVersionAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_author import SyntheticsTestVersionAuthor + from datadog_api_client.v2.model.synthetics_test_version_change_metadata_item import ( + SyntheticsTestVersionChangeMetadataItem, + ) + + return { + "author": (SyntheticsTestVersionAuthor,), + "change_metadata": ([SyntheticsTestVersionChangeMetadataItem],), + "payload": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "version_payload_created_at": (datetime,), + } + + attribute_map = { + "author": "author", + "change_metadata": "change_metadata", + "payload": "payload", + "version_payload_created_at": "version_payload_created_at", + } + + def __init__( + self_, + author: Union[SyntheticsTestVersionAuthor, UnsetType] = unset, + change_metadata: Union[List[SyntheticsTestVersionChangeMetadataItem], UnsetType] = unset, + payload: Union[Dict[str, Any], UnsetType] = unset, + version_payload_created_at: Union[datetime, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a specific Synthetic test version. + + :param author: Object describing the author of a test version. + :type author: SyntheticsTestVersionAuthor, optional + + :param change_metadata: List of metadata describing individual changes in this version. + Only returned when the ``include_change_metadata`` query parameter is ``true``. + :type change_metadata: [SyntheticsTestVersionChangeMetadataItem], optional + + :param payload: The full test configuration at this version. + :type payload: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param version_payload_created_at: Timestamp of when this version was created. + :type version_payload_created_at: datetime, optional + """ + if author is not unset: + kwargs["author"] = author + if change_metadata is not unset: + kwargs["change_metadata"] = change_metadata + if payload is not unset: + kwargs["payload"] = payload + if version_payload_created_at is not unset: + kwargs["version_payload_created_at"] = version_payload_created_at + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_author.py b/src/datadog_api_client/v2/model/synthetics_test_version_author.py new file mode 100644 index 0000000000..a28b9e93d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_author.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestVersionAuthor(ModelNormal): + @cached_property + def openapi_types(_): + return { + "email": (str,), + "handle": (str,), + "id": (str,), + "name": (str,), + } + + attribute_map = { + "email": "email", + "handle": "handle", + "id": "id", + "name": "name", + } + + def __init__( + self_, + email: Union[str, UnsetType] = unset, + handle: Union[str, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Object describing the author of a test version. + + :param email: Email address of the author. + :type email: str, optional + + :param handle: The author's Datadog handle (login username). + :type handle: str, optional + + :param id: UUID of the author. + :type id: str, optional + + :param name: Display name of the author. + :type name: str, optional + """ + if email is not unset: + kwargs["email"] = email + if handle is not unset: + kwargs["handle"] = handle + if id is not unset: + kwargs["id"] = id + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_change_attributes.py b/src/datadog_api_client/v2/model/synthetics_test_version_change_attributes.py new file mode 100644 index 0000000000..f80c29d673 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_change_attributes.py @@ -0,0 +1,75 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_change_metadata_item import ( + SyntheticsTestVersionChangeMetadataItem, + ) + + +class SyntheticsTestVersionChangeAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_change_metadata_item import ( + SyntheticsTestVersionChangeMetadataItem, + ) + + return { + "author_uuid": (str,), + "change_metadata": ([SyntheticsTestVersionChangeMetadataItem],), + "version_number": (int,), + "version_payload_created_at": (datetime,), + } + + attribute_map = { + "author_uuid": "author_uuid", + "change_metadata": "change_metadata", + "version_number": "version_number", + "version_payload_created_at": "version_payload_created_at", + } + + def __init__( + self_, + author_uuid: Union[str, UnsetType] = unset, + change_metadata: Union[List[SyntheticsTestVersionChangeMetadataItem], UnsetType] = unset, + version_number: Union[int, UnsetType] = unset, + version_payload_created_at: Union[datetime, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a version change record. + + :param author_uuid: UUID of the user who created this version. + :type author_uuid: str, optional + + :param change_metadata: List of metadata describing individual changes in this version. + :type change_metadata: [SyntheticsTestVersionChangeMetadataItem], optional + + :param version_number: The sequential version number. + :type version_number: int, optional + + :param version_payload_created_at: Timestamp of when this version was created. + :type version_payload_created_at: datetime, optional + """ + if author_uuid is not unset: + kwargs["author_uuid"] = author_uuid + if change_metadata is not unset: + kwargs["change_metadata"] = change_metadata + if version_number is not unset: + kwargs["version_number"] = version_number + if version_payload_created_at is not unset: + kwargs["version_payload_created_at"] = version_payload_created_at + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_change_data.py b/src/datadog_api_client/v2/model/synthetics_test_version_change_data.py new file mode 100644 index 0000000000..b3840fa1d0 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_change_data.py @@ -0,0 +1,68 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_change_attributes import ( + SyntheticsTestVersionChangeAttributes, + ) + from datadog_api_client.v2.model.synthetics_test_version_change_type import SyntheticsTestVersionChangeType + + +class SyntheticsTestVersionChangeData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_change_attributes import ( + SyntheticsTestVersionChangeAttributes, + ) + from datadog_api_client.v2.model.synthetics_test_version_change_type import SyntheticsTestVersionChangeType + + return { + "attributes": (SyntheticsTestVersionChangeAttributes,), + "id": (str,), + "type": (SyntheticsTestVersionChangeType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsTestVersionChangeAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[SyntheticsTestVersionChangeType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a version change record. + + :param attributes: Attributes of a version change record. + :type attributes: SyntheticsTestVersionChangeAttributes, optional + + :param id: UUID of the version change record. + :type id: str, optional + + :param type: Type of the version metadata resource. + :type type: SyntheticsTestVersionChangeType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_change_metadata_item.py b/src/datadog_api_client/v2/model/synthetics_test_version_change_metadata_item.py new file mode 100644 index 0000000000..11ff321bef --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_change_metadata_item.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_action_metadata import SyntheticsTestVersionActionMetadata + + +class SyntheticsTestVersionChangeMetadataItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_action_metadata import ( + SyntheticsTestVersionActionMetadata, + ) + + return { + "action": (str,), + "action_metadata": (SyntheticsTestVersionActionMetadata,), + } + + attribute_map = { + "action": "action", + "action_metadata": "action_metadata", + } + + def __init__( + self_, + action: Union[str, UnsetType] = unset, + action_metadata: Union[SyntheticsTestVersionActionMetadata, UnsetType] = unset, + **kwargs, + ): + """ + Object describing a single change within a version. + + :param action: The action that was performed (for example, ``updated`` or ``created`` ). + :type action: str, optional + + :param action_metadata: Object containing metadata about a change action. + :type action_metadata: SyntheticsTestVersionActionMetadata, optional + """ + if action is not unset: + kwargs["action"] = action + if action_metadata is not unset: + kwargs["action_metadata"] = action_metadata + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_change_type.py b/src/datadog_api_client/v2/model/synthetics_test_version_change_type.py new file mode 100644 index 0000000000..7d9744ab2c --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_change_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestVersionChangeType(ModelSimple): + """ + Type of the version metadata resource. + + :param value: If omitted defaults to "version_metadata". Must be one of ["version_metadata"]. + :type value: str + """ + + allowed_values = { + "version_metadata", + } + VERSION_METADATA: ClassVar["SyntheticsTestVersionChangeType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestVersionChangeType.VERSION_METADATA = SyntheticsTestVersionChangeType("version_metadata") diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_data.py b/src/datadog_api_client/v2/model/synthetics_test_version_data.py new file mode 100644 index 0000000000..0c3be793f6 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_attributes import SyntheticsTestVersionAttributes + from datadog_api_client.v2.model.synthetics_test_version_type import SyntheticsTestVersionType + + +class SyntheticsTestVersionData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_attributes import SyntheticsTestVersionAttributes + from datadog_api_client.v2.model.synthetics_test_version_type import SyntheticsTestVersionType + + return { + "attributes": (SyntheticsTestVersionAttributes,), + "id": (str,), + "type": (SyntheticsTestVersionType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsTestVersionAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[SyntheticsTestVersionType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a specific Synthetic test version. + + :param attributes: Attributes of a specific Synthetic test version. + :type attributes: SyntheticsTestVersionAttributes, optional + + :param id: UUID of the version record. + :type id: str, optional + + :param type: Type of the version resource. + :type type: SyntheticsTestVersionType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_diff_patch_diff.py b/src/datadog_api_client/v2/model/synthetics_test_version_diff_patch_diff.py new file mode 100644 index 0000000000..476c312dff --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_diff_patch_diff.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestVersionDiffPatchDiff(ModelNormal): + @cached_property + def openapi_types(_): + return { + "change_text": (str,), + "operation": (str,), + } + + attribute_map = { + "change_text": "change_text", + "operation": "operation", + } + + def __init__(self_, change_text: Union[str, UnsetType] = unset, operation: Union[str, UnsetType] = unset, **kwargs): + """ + Object describing a single text diff operation. + + :param change_text: The text that was changed. + :type change_text: str, optional + + :param operation: The diff operation applied. + :type operation: str, optional + """ + if change_text is not unset: + kwargs["change_text"] = change_text + if operation is not unset: + kwargs["operation"] = operation + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_diff_patches.py b/src/datadog_api_client/v2/model/synthetics_test_version_diff_patches.py new file mode 100644 index 0000000000..84fcba8c7f --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_diff_patches.py @@ -0,0 +1,80 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_diff_patch_diff import SyntheticsTestVersionDiffPatchDiff + + +class SyntheticsTestVersionDiffPatches(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_diff_patch_diff import ( + SyntheticsTestVersionDiffPatchDiff, + ) + + return { + "diffs": ([SyntheticsTestVersionDiffPatchDiff],), + "length1": (int,), + "length2": (int,), + "start1": (int,), + "start2": (int,), + } + + attribute_map = { + "diffs": "diffs", + "length1": "length1", + "length2": "length2", + "start1": "start1", + "start2": "start2", + } + + def __init__( + self_, + diffs: Union[List[SyntheticsTestVersionDiffPatchDiff], UnsetType] = unset, + length1: Union[int, UnsetType] = unset, + length2: Union[int, UnsetType] = unset, + start1: Union[int, UnsetType] = unset, + start2: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Object describing a patch in the diff. + + :param diffs: List of individual diff operations. + :type diffs: [SyntheticsTestVersionDiffPatchDiff], optional + + :param length1: Length of the original text segment. + :type length1: int, optional + + :param length2: Length of the modified text segment. + :type length2: int, optional + + :param start1: Start position in the original text. + :type start1: int, optional + + :param start2: Start position in the modified text. + :type start2: int, optional + """ + if diffs is not unset: + kwargs["diffs"] = diffs + if length1 is not unset: + kwargs["length1"] = length1 + if length2 is not unset: + kwargs["length2"] = length2 + if start1 is not unset: + kwargs["start1"] = start1 + if start2 is not unset: + kwargs["start2"] = start2 + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_history_meta.py b/src/datadog_api_client/v2/model/synthetics_test_version_history_meta.py new file mode 100644 index 0000000000..e958ad4c6c --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_history_meta.py @@ -0,0 +1,50 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +class SyntheticsTestVersionHistoryMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "next_last_version_number": (int, none_type), + "retention_period_in_days": (int,), + } + + attribute_map = { + "next_last_version_number": "next_last_version_number", + "retention_period_in_days": "retention_period_in_days", + } + + def __init__( + self_, + next_last_version_number: Union[int, none_type, UnsetType] = unset, + retention_period_in_days: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Pagination metadata for a version history response. + + :param next_last_version_number: The version number to use as the ``last_version_number`` query parameter + to fetch the next page. ``null`` indicates there are no more pages. + :type next_last_version_number: int, none_type, optional + + :param retention_period_in_days: The number of days that version history is retained. + :type retention_period_in_days: int, optional + """ + if next_last_version_number is not unset: + kwargs["next_last_version_number"] = next_last_version_number + if retention_period_in_days is not unset: + kwargs["retention_period_in_days"] = retention_period_in_days + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_history_response.py b/src/datadog_api_client/v2/model/synthetics_test_version_history_response.py new file mode 100644 index 0000000000..e4be95d108 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_history_response.py @@ -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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_change_data import SyntheticsTestVersionChangeData + from datadog_api_client.v2.model.synthetics_test_version_history_meta import SyntheticsTestVersionHistoryMeta + + +class SyntheticsTestVersionHistoryResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_change_data import SyntheticsTestVersionChangeData + from datadog_api_client.v2.model.synthetics_test_version_history_meta import SyntheticsTestVersionHistoryMeta + + return { + "data": ([SyntheticsTestVersionChangeData],), + "meta": (SyntheticsTestVersionHistoryMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, + data: Union[List[SyntheticsTestVersionChangeData], UnsetType] = unset, + meta: Union[SyntheticsTestVersionHistoryMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response containing the paginated version history for a Synthetic test. + + :param data: List of version change records. + :type data: [SyntheticsTestVersionChangeData], optional + + :param meta: Pagination metadata for a version history response. + :type meta: SyntheticsTestVersionHistoryMeta, optional + """ + if data is not unset: + kwargs["data"] = data + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_response.py b/src/datadog_api_client/v2/model/synthetics_test_version_response.py new file mode 100644 index 0000000000..3310d60e20 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_response.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_version_data import SyntheticsTestVersionData + + +class SyntheticsTestVersionResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_version_data import SyntheticsTestVersionData + + return { + "data": (SyntheticsTestVersionData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[SyntheticsTestVersionData, UnsetType] = unset, **kwargs): + """ + Response containing a specific version of a Synthetic test. + + :param data: Data object for a specific Synthetic test version. + :type data: SyntheticsTestVersionData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_version_type.py b/src/datadog_api_client/v2/model/synthetics_test_version_type.py new file mode 100644 index 0000000000..73aaca9a43 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_version_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestVersionType(ModelSimple): + """ + Type of the version resource. + + :param value: If omitted defaults to "version". Must be one of ["version"]. + :type value: str + """ + + allowed_values = { + "version", + } + VERSION: ClassVar["SyntheticsTestVersionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestVersionType.VERSION = SyntheticsTestVersionType("version") diff --git a/src/datadog_api_client/v2/model/widget_attributes.py b/src/datadog_api_client/v2/model/widget_attributes.py new file mode 100644 index 0000000000..462a6caf78 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_attributes.py @@ -0,0 +1,73 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_definition import WidgetDefinition + + +class WidgetAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_definition import WidgetDefinition + + return { + "created_at": (str,), + "definition": (WidgetDefinition,), + "is_favorited": (bool,), + "modified_at": (str,), + "tags": ([str], none_type), + } + + attribute_map = { + "created_at": "created_at", + "definition": "definition", + "is_favorited": "is_favorited", + "modified_at": "modified_at", + "tags": "tags", + } + + def __init__( + self_, + created_at: str, + definition: WidgetDefinition, + is_favorited: bool, + modified_at: str, + tags: Union[List[str], none_type], + **kwargs, + ): + """ + Attributes of a widget resource. + + :param created_at: ISO 8601 timestamp of when the widget was created. + :type created_at: str + + :param definition: The definition of a widget, including its type and configuration. + :type definition: WidgetDefinition + + :param is_favorited: Will be implemented soon. Currently always returns false. + :type is_favorited: bool + + :param modified_at: ISO 8601 timestamp of when the widget was last modified. + :type modified_at: str + + :param tags: User-defined tags for organizing widgets. + :type tags: [str], none_type + """ + super().__init__(kwargs) + + self_.created_at = created_at + self_.definition = definition + self_.is_favorited = is_favorited + self_.modified_at = modified_at + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/widget_data.py b/src/datadog_api_client/v2/model/widget_data.py new file mode 100644 index 0000000000..576a96ac81 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_data.py @@ -0,0 +1,70 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_attributes import WidgetAttributes + from datadog_api_client.v2.model.widget_relationships import WidgetRelationships + + +class WidgetData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_attributes import WidgetAttributes + from datadog_api_client.v2.model.widget_relationships import WidgetRelationships + + return { + "attributes": (WidgetAttributes,), + "id": (str,), + "relationships": (WidgetRelationships,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: WidgetAttributes, + id: str, + type: str, + relationships: Union[WidgetRelationships, UnsetType] = unset, + **kwargs, + ): + """ + A widget resource object. + + :param attributes: Attributes of a widget resource. + :type attributes: WidgetAttributes + + :param id: The unique identifier of the widget. + :type id: str + + :param relationships: Relationships of the widget resource. + :type relationships: WidgetRelationships, optional + + :param type: Widgets resource type. + :type type: str + """ + if relationships is not unset: + kwargs["relationships"] = relationships + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_definition.py b/src/datadog_api_client/v2/model/widget_definition.py new file mode 100644 index 0000000000..2e18d238e6 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_definition.py @@ -0,0 +1,54 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_type import WidgetType + + +class WidgetDefinition(ModelNormal): + validations = { + "title": { + "max_length": 100, + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_type import WidgetType + + return { + "title": (str,), + "type": (WidgetType,), + } + + attribute_map = { + "title": "title", + "type": "type", + } + + def __init__(self_, title: str, type: WidgetType, **kwargs): + """ + The definition of a widget, including its type and configuration. + + :param title: The display title of the widget. + :type title: str + + :param type: Widget types that are allowed to be stored as individual records. + This is not a complete list of dashboard and notebook widget types. + :type type: WidgetType + """ + super().__init__(kwargs) + + self_.title = title + self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_experience_type.py b/src/datadog_api_client/v2/model/widget_experience_type.py new file mode 100644 index 0000000000..5da187948e --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_experience_type.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class WidgetExperienceType(ModelSimple): + """ + Widget experience types that differentiate between the products using the specific widget. + + :param value: Must be one of ["ccm_reports", "logs_reports", "csv_reports", "product_analytics"]. + :type value: str + """ + + allowed_values = { + "ccm_reports", + "logs_reports", + "csv_reports", + "product_analytics", + } + CCM_REPORTS: ClassVar["WidgetExperienceType"] + LOGS_REPORTS: ClassVar["WidgetExperienceType"] + CSV_REPORTS: ClassVar["WidgetExperienceType"] + PRODUCT_ANALYTICS: ClassVar["WidgetExperienceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +WidgetExperienceType.CCM_REPORTS = WidgetExperienceType("ccm_reports") +WidgetExperienceType.LOGS_REPORTS = WidgetExperienceType("logs_reports") +WidgetExperienceType.CSV_REPORTS = WidgetExperienceType("csv_reports") +WidgetExperienceType.PRODUCT_ANALYTICS = WidgetExperienceType("product_analytics") diff --git a/src/datadog_api_client/v2/model/widget_included_user.py b/src/datadog_api_client/v2/model/widget_included_user.py new file mode 100644 index 0000000000..4ac82636dc --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_included_user.py @@ -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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_included_user_attributes import WidgetIncludedUserAttributes + + +class WidgetIncludedUser(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_included_user_attributes import WidgetIncludedUserAttributes + + return { + "attributes": (WidgetIncludedUserAttributes,), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, id: str, type: str, attributes: Union[WidgetIncludedUserAttributes, UnsetType] = unset, **kwargs + ): + """ + A user resource included in the response. + + :param attributes: Attributes of an included user resource. + :type attributes: WidgetIncludedUserAttributes, optional + + :param id: The unique identifier of the user. + :type id: str + + :param type: Users resource type. + :type type: str + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_included_user_attributes.py b/src/datadog_api_client/v2/model/widget_included_user_attributes.py new file mode 100644 index 0000000000..2693d865de --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_included_user_attributes.py @@ -0,0 +1,46 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +class WidgetIncludedUserAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "handle": (str,), + "name": (str, none_type), + } + + attribute_map = { + "handle": "handle", + "name": "name", + } + + def __init__( + self_, handle: Union[str, UnsetType] = unset, name: Union[str, none_type, UnsetType] = unset, **kwargs + ): + """ + Attributes of an included user resource. + + :param handle: The email handle of the user. + :type handle: str, optional + + :param name: The display name of the user. + :type name: str, none_type, optional + """ + if handle is not unset: + kwargs["handle"] = handle + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_list_response.py b/src/datadog_api_client/v2/model/widget_list_response.py new file mode 100644 index 0000000000..4eac7af892 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_list_response.py @@ -0,0 +1,66 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_data import WidgetData + from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser + from datadog_api_client.v2.model.widget_search_meta import WidgetSearchMeta + + +class WidgetListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_data import WidgetData + from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser + from datadog_api_client.v2.model.widget_search_meta import WidgetSearchMeta + + return { + "data": ([WidgetData],), + "included": ([WidgetIncludedUser],), + "meta": (WidgetSearchMeta,), + } + + attribute_map = { + "data": "data", + "included": "included", + "meta": "meta", + } + + def __init__( + self_, + data: List[WidgetData], + included: Union[List[WidgetIncludedUser], UnsetType] = unset, + meta: Union[WidgetSearchMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response containing a list of widgets. + + :param data: List of widget resources. + :type data: [WidgetData] + + :param included: Array of user resources related to the widgets. + :type included: [WidgetIncludedUser], optional + + :param meta: Metadata about the search results. + :type meta: WidgetSearchMeta, optional + """ + if included is not unset: + kwargs["included"] = included + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/widget_relationship_data.py b/src/datadog_api_client/v2/model/widget_relationship_data.py new file mode 100644 index 0000000000..f59cbaee87 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_relationship_data.py @@ -0,0 +1,39 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class WidgetRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: str, **kwargs): + """ + Relationship data referencing a user resource. + + :param id: The unique identifier of the user. + :type id: str + + :param type: Users resource type. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/widget_relationship_item.py b/src/datadog_api_client/v2/model/widget_relationship_item.py new file mode 100644 index 0000000000..aa7099ee0c --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_relationship_item.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_relationship_data import WidgetRelationshipData + + +class WidgetRelationshipItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_relationship_data import WidgetRelationshipData + + return { + "data": (WidgetRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[WidgetRelationshipData, UnsetType] = unset, **kwargs): + """ + A JSON:API relationship to a user. + + :param data: Relationship data referencing a user resource. + :type data: WidgetRelationshipData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_relationships.py b/src/datadog_api_client/v2/model/widget_relationships.py new file mode 100644 index 0000000000..67f2fa876a --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_relationships.py @@ -0,0 +1,54 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_relationship_item import WidgetRelationshipItem + + +class WidgetRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_relationship_item import WidgetRelationshipItem + + return { + "created_by": (WidgetRelationshipItem,), + "modified_by": (WidgetRelationshipItem,), + } + + attribute_map = { + "created_by": "created_by", + "modified_by": "modified_by", + } + + def __init__( + self_, + created_by: Union[WidgetRelationshipItem, UnsetType] = unset, + modified_by: Union[WidgetRelationshipItem, UnsetType] = unset, + **kwargs, + ): + """ + Relationships of the widget resource. + + :param created_by: A JSON:API relationship to a user. + :type created_by: WidgetRelationshipItem, optional + + :param modified_by: A JSON:API relationship to a user. + :type modified_by: WidgetRelationshipItem, optional + """ + if created_by is not unset: + kwargs["created_by"] = created_by + if modified_by is not unset: + kwargs["modified_by"] = modified_by + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_response.py b/src/datadog_api_client/v2/model/widget_response.py new file mode 100644 index 0000000000..5323b26475 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_response.py @@ -0,0 +1,51 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.widget_data import WidgetData + from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser + + +class WidgetResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.widget_data import WidgetData + from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser + + return { + "data": (WidgetData,), + "included": ([WidgetIncludedUser],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__(self_, data: WidgetData, included: Union[List[WidgetIncludedUser], UnsetType] = unset, **kwargs): + """ + Response containing a single widget. + + :param data: A widget resource object. + :type data: WidgetData + + :param included: Array of user resources related to the widget. + :type included: [WidgetIncludedUser], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/widget_search_meta.py b/src/datadog_api_client/v2/model/widget_search_meta.py new file mode 100644 index 0000000000..2691bde31b --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_search_meta.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class WidgetSearchMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "created_by_anyone_total": (int,), + "created_by_you_total": (int,), + "favorited_by_you_total": (int,), + "filtered_total": (int,), + } + + attribute_map = { + "created_by_anyone_total": "created_by_anyone_total", + "created_by_you_total": "created_by_you_total", + "favorited_by_you_total": "favorited_by_you_total", + "filtered_total": "filtered_total", + } + + def __init__( + self_, + created_by_anyone_total: Union[int, UnsetType] = unset, + created_by_you_total: Union[int, UnsetType] = unset, + favorited_by_you_total: Union[int, UnsetType] = unset, + filtered_total: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Metadata about the search results. + + :param created_by_anyone_total: Total number of widgets created by anyone. + :type created_by_anyone_total: int, optional + + :param created_by_you_total: Total number of widgets created by the current user. + :type created_by_you_total: int, optional + + :param favorited_by_you_total: Total number of widgets favorited by the current user. + :type favorited_by_you_total: int, optional + + :param filtered_total: Total number of widgets matching the current filter criteria. + :type filtered_total: int, optional + """ + if created_by_anyone_total is not unset: + kwargs["created_by_anyone_total"] = created_by_anyone_total + if created_by_you_total is not unset: + kwargs["created_by_you_total"] = created_by_you_total + if favorited_by_you_total is not unset: + kwargs["favorited_by_you_total"] = favorited_by_you_total + if filtered_total is not unset: + kwargs["filtered_total"] = filtered_total + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/widget_type.py b/src/datadog_api_client/v2/model/widget_type.py new file mode 100644 index 0000000000..cb65df92c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/widget_type.py @@ -0,0 +1,78 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class WidgetType(ModelSimple): + """ + Widget types that are allowed to be stored as individual records. + This is not a complete list of dashboard and notebook widget types. + + :param value: Must be one of ["bar_chart", "change", "cloud_cost_summary", "cohort", "funnel", "geomap", "list_stream", "query_table", "query_value", "retention_curve", "sankey", "sunburst", "timeseries", "toplist", "treemap"]. + :type value: str + """ + + allowed_values = { + "bar_chart", + "change", + "cloud_cost_summary", + "cohort", + "funnel", + "geomap", + "list_stream", + "query_table", + "query_value", + "retention_curve", + "sankey", + "sunburst", + "timeseries", + "toplist", + "treemap", + } + BAR_CHART: ClassVar["WidgetType"] + CHANGE: ClassVar["WidgetType"] + CLOUD_COST_SUMMARY: ClassVar["WidgetType"] + COHORT: ClassVar["WidgetType"] + FUNNEL: ClassVar["WidgetType"] + GEOMAP: ClassVar["WidgetType"] + LIST_STREAM: ClassVar["WidgetType"] + QUERY_TABLE: ClassVar["WidgetType"] + QUERY_VALUE: ClassVar["WidgetType"] + RETENTION_CURVE: ClassVar["WidgetType"] + SANKEY: ClassVar["WidgetType"] + SUNBURST: ClassVar["WidgetType"] + TIMESERIES: ClassVar["WidgetType"] + TOPLIST: ClassVar["WidgetType"] + TREEMAP: ClassVar["WidgetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +WidgetType.BAR_CHART = WidgetType("bar_chart") +WidgetType.CHANGE = WidgetType("change") +WidgetType.CLOUD_COST_SUMMARY = WidgetType("cloud_cost_summary") +WidgetType.COHORT = WidgetType("cohort") +WidgetType.FUNNEL = WidgetType("funnel") +WidgetType.GEOMAP = WidgetType("geomap") +WidgetType.LIST_STREAM = WidgetType("list_stream") +WidgetType.QUERY_TABLE = WidgetType("query_table") +WidgetType.QUERY_VALUE = WidgetType("query_value") +WidgetType.RETENTION_CURVE = WidgetType("retention_curve") +WidgetType.SANKEY = WidgetType("sankey") +WidgetType.SUNBURST = WidgetType("sunburst") +WidgetType.TIMESERIES = WidgetType("timeseries") +WidgetType.TOPLIST = WidgetType("toplist") +WidgetType.TREEMAP = WidgetType("treemap") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 5a7ad16d25..84b0763668 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1235,6 +1235,9 @@ from datadog_api_client.v2.model.create_open_api_response import CreateOpenAPIResponse from datadog_api_client.v2.model.create_open_api_response_attributes import CreateOpenAPIResponseAttributes from datadog_api_client.v2.model.create_open_api_response_data import CreateOpenAPIResponseData +from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest +from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes +from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData from datadog_api_client.v2.model.create_page_request import CreatePageRequest from datadog_api_client.v2.model.create_page_request_data import CreatePageRequestData from datadog_api_client.v2.model.create_page_request_data_attributes import CreatePageRequestDataAttributes @@ -5978,11 +5981,31 @@ from datadog_api_client.v2.model.step_display_bounds import StepDisplayBounds from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest +from datadog_api_client.v2.model.suite_json_patch_request import SuiteJsonPatchRequest +from datadog_api_client.v2.model.suite_json_patch_request_data import SuiteJsonPatchRequestData +from datadog_api_client.v2.model.suite_json_patch_request_data_attributes import SuiteJsonPatchRequestDataAttributes +from datadog_api_client.v2.model.suite_json_patch_type import SuiteJsonPatchType from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType from datadog_api_client.v2.model.suppression_version_history import SuppressionVersionHistory from datadog_api_client.v2.model.suppression_versions import SuppressionVersions from datadog_api_client.v2.model.sync_property import SyncProperty from datadog_api_client.v2.model.sync_property_with_mapping import SyncPropertyWithMapping +from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_attributes import ( + SyntheticsApiMultistepParentTestAttributes, +) +from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_data import SyntheticsApiMultistepParentTestData +from datadog_api_client.v2.model.synthetics_api_multistep_parent_test_type import SyntheticsApiMultistepParentTestType +from datadog_api_client.v2.model.synthetics_api_multistep_parent_tests_response import ( + SyntheticsApiMultistepParentTestsResponse, +) +from datadog_api_client.v2.model.synthetics_api_multistep_subtest_attributes import ( + SyntheticsApiMultistepSubtestAttributes, +) +from datadog_api_client.v2.model.synthetics_api_multistep_subtest_data import SyntheticsApiMultistepSubtestData +from datadog_api_client.v2.model.synthetics_api_multistep_subtest_type import SyntheticsApiMultistepSubtestType +from datadog_api_client.v2.model.synthetics_api_multistep_subtests_response import ( + SyntheticsApiMultistepSubtestsResponse, +) from datadog_api_client.v2.model.synthetics_fast_test_assertion_result import SyntheticsFastTestAssertionResult from datadog_api_client.v2.model.synthetics_fast_test_result import SyntheticsFastTestResult from datadog_api_client.v2.model.synthetics_fast_test_result_attributes import SyntheticsFastTestResultAttributes @@ -6064,7 +6087,27 @@ from datadog_api_client.v2.model.synthetics_test_options_scheduling_timeframe import ( SyntheticsTestOptionsSchedulingTimeframe, ) +from datadog_api_client.v2.model.synthetics_test_parent_suite_attributes import SyntheticsTestParentSuiteAttributes +from datadog_api_client.v2.model.synthetics_test_parent_suite_data import SyntheticsTestParentSuiteData +from datadog_api_client.v2.model.synthetics_test_parent_suite_type import SyntheticsTestParentSuiteType +from datadog_api_client.v2.model.synthetics_test_parent_suites_response import SyntheticsTestParentSuitesResponse from datadog_api_client.v2.model.synthetics_test_pause_status import SyntheticsTestPauseStatus +from datadog_api_client.v2.model.synthetics_test_version_action_metadata import SyntheticsTestVersionActionMetadata +from datadog_api_client.v2.model.synthetics_test_version_attributes import SyntheticsTestVersionAttributes +from datadog_api_client.v2.model.synthetics_test_version_author import SyntheticsTestVersionAuthor +from datadog_api_client.v2.model.synthetics_test_version_change_attributes import SyntheticsTestVersionChangeAttributes +from datadog_api_client.v2.model.synthetics_test_version_change_data import SyntheticsTestVersionChangeData +from datadog_api_client.v2.model.synthetics_test_version_change_metadata_item import ( + SyntheticsTestVersionChangeMetadataItem, +) +from datadog_api_client.v2.model.synthetics_test_version_change_type import SyntheticsTestVersionChangeType +from datadog_api_client.v2.model.synthetics_test_version_data import SyntheticsTestVersionData +from datadog_api_client.v2.model.synthetics_test_version_diff_patch_diff import SyntheticsTestVersionDiffPatchDiff +from datadog_api_client.v2.model.synthetics_test_version_diff_patches import SyntheticsTestVersionDiffPatches +from datadog_api_client.v2.model.synthetics_test_version_history_meta import SyntheticsTestVersionHistoryMeta +from datadog_api_client.v2.model.synthetics_test_version_history_response import SyntheticsTestVersionHistoryResponse +from datadog_api_client.v2.model.synthetics_test_version_response import SyntheticsTestVersionResponse +from datadog_api_client.v2.model.synthetics_test_version_type import SyntheticsTestVersionType from datadog_api_client.v2.model.synthetics_variable_parser import SyntheticsVariableParser from datadog_api_client.v2.model.table_result_v2 import TableResultV2 from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array @@ -6604,7 +6647,20 @@ from datadog_api_client.v2.model.watcher_data_attributes import WatcherDataAttributes from datadog_api_client.v2.model.watcher_data_type import WatcherDataType from datadog_api_client.v2.model.weekday import Weekday +from datadog_api_client.v2.model.widget_attributes import WidgetAttributes +from datadog_api_client.v2.model.widget_data import WidgetData +from datadog_api_client.v2.model.widget_definition import WidgetDefinition +from datadog_api_client.v2.model.widget_experience_type import WidgetExperienceType +from datadog_api_client.v2.model.widget_included_user import WidgetIncludedUser +from datadog_api_client.v2.model.widget_included_user_attributes import WidgetIncludedUserAttributes +from datadog_api_client.v2.model.widget_list_response import WidgetListResponse from datadog_api_client.v2.model.widget_live_span import WidgetLiveSpan +from datadog_api_client.v2.model.widget_relationship_data import WidgetRelationshipData +from datadog_api_client.v2.model.widget_relationship_item import WidgetRelationshipItem +from datadog_api_client.v2.model.widget_relationships import WidgetRelationships +from datadog_api_client.v2.model.widget_response import WidgetResponse +from datadog_api_client.v2.model.widget_search_meta import WidgetSearchMeta +from datadog_api_client.v2.model.widget_type import WidgetType from datadog_api_client.v2.model.workflow_data import WorkflowData from datadog_api_client.v2.model.workflow_data_attributes import WorkflowDataAttributes from datadog_api_client.v2.model.workflow_data_relationships import WorkflowDataRelationships @@ -7562,6 +7618,9 @@ "CreateOpenAPIResponse", "CreateOpenAPIResponseAttributes", "CreateOpenAPIResponseData", + "CreateOrUpdateWidgetRequest", + "CreateOrUpdateWidgetRequestAttributes", + "CreateOrUpdateWidgetRequestData", "CreatePageRequest", "CreatePageRequestData", "CreatePageRequestDataAttributes", @@ -10827,11 +10886,23 @@ "StepDisplayBounds", "SuiteCreateEdit", "SuiteCreateEditRequest", + "SuiteJsonPatchRequest", + "SuiteJsonPatchRequestData", + "SuiteJsonPatchRequestDataAttributes", + "SuiteJsonPatchType", "SuiteSearchResponseType", "SuppressionVersionHistory", "SuppressionVersions", "SyncProperty", "SyncPropertyWithMapping", + "SyntheticsApiMultistepParentTestAttributes", + "SyntheticsApiMultistepParentTestData", + "SyntheticsApiMultistepParentTestType", + "SyntheticsApiMultistepParentTestsResponse", + "SyntheticsApiMultistepSubtestAttributes", + "SyntheticsApiMultistepSubtestData", + "SyntheticsApiMultistepSubtestType", + "SyntheticsApiMultistepSubtestsResponse", "SyntheticsFastTestAssertionResult", "SyntheticsFastTestResult", "SyntheticsFastTestResultAttributes", @@ -10891,7 +10962,25 @@ "SyntheticsTestOptionsRetry", "SyntheticsTestOptionsScheduling", "SyntheticsTestOptionsSchedulingTimeframe", + "SyntheticsTestParentSuiteAttributes", + "SyntheticsTestParentSuiteData", + "SyntheticsTestParentSuiteType", + "SyntheticsTestParentSuitesResponse", "SyntheticsTestPauseStatus", + "SyntheticsTestVersionActionMetadata", + "SyntheticsTestVersionAttributes", + "SyntheticsTestVersionAuthor", + "SyntheticsTestVersionChangeAttributes", + "SyntheticsTestVersionChangeData", + "SyntheticsTestVersionChangeMetadataItem", + "SyntheticsTestVersionChangeType", + "SyntheticsTestVersionData", + "SyntheticsTestVersionDiffPatchDiff", + "SyntheticsTestVersionDiffPatches", + "SyntheticsTestVersionHistoryMeta", + "SyntheticsTestVersionHistoryResponse", + "SyntheticsTestVersionResponse", + "SyntheticsTestVersionType", "SyntheticsVariableParser", "TableResultV2", "TableResultV2Array", @@ -11307,7 +11396,20 @@ "WatcherDataAttributes", "WatcherDataType", "Weekday", + "WidgetAttributes", + "WidgetData", + "WidgetDefinition", + "WidgetExperienceType", + "WidgetIncludedUser", + "WidgetIncludedUserAttributes", + "WidgetListResponse", "WidgetLiveSpan", + "WidgetRelationshipData", + "WidgetRelationshipItem", + "WidgetRelationships", + "WidgetResponse", + "WidgetSearchMeta", + "WidgetType", "WorkflowData", "WorkflowDataAttributes", "WorkflowDataRelationships", diff --git a/tests/v2/features/synthetics.feature b/tests/v2/features/synthetics.feature index 418dbf5fb3..8ed9b98adf 100644 --- a/tests/v2/features/synthetics.feature +++ b/tests/v2/features/synthetics.feature @@ -133,6 +133,22 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get a specific version of a test returns "API error response." response + Given new "GetSyntheticsTestVersion" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "version_number" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get a specific version of a test returns "OK" response + Given new "GetSyntheticsTestVersion" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "version_number" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing Scenario: Get a suite returns "API error response." response Given new "GetSyntheticsSuite" request @@ -147,12 +163,61 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get available subtests for a multistep test returns "OK" response + Given new "GetApiMultistepSubtests" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get parent suites for a test returns "API error response." response + Given new "GetTestParentSuites" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get parent suites for a test returns "OK" response + Given new "GetTestParentSuites" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get parent tests for a subtest returns "API error response." response + Given new "GetApiMultistepSubtestParents" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get parent tests for a subtest returns "OK" response + Given new "GetApiMultistepSubtestParents" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @team:DataDog/synthetics-managing Scenario: Get the on-demand concurrency cap returns "OK" response Given new "GetOnDemandConcurrencyCap" request When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get version history of a test returns "API error response." response + Given new "ListSyntheticsTestVersions" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Get version history of a test returns "OK" response + Given new "ListSyntheticsTestVersions" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing Scenario: Patch a global variable returns "Bad Request" response Given new "PatchGlobalVariable" request @@ -177,6 +242,22 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing + Scenario: Patch a test suite returns "API error response." response + Given new "PatchTestSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "suites_json_patch"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Patch a test suite returns "OK" response + Given new "PatchTestSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "suites_json_patch"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/synthetics-managing Scenario: Save new value for on-demand concurrency cap returns "OK" response Given new "SetOnDemandConcurrencyCap" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 67596e3589..dcdc0219f9 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -5809,6 +5809,18 @@ "type": "idempotent" } }, + "GetApiMultistepSubtests": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetApiMultistepSubtestParents": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, "GetOnDemandConcurrencyCap": { "tag": "Synthetics", "undo": { @@ -5858,6 +5870,12 @@ "type": "idempotent" } }, + "PatchTestSuite": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "DeleteSyntheticsTests": { "tag": "Synthetics", "undo": { @@ -5895,6 +5913,24 @@ "type": "idempotent" } }, + "GetTestParentSuites": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "ListSyntheticsTestVersions": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsTestVersion": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, "PatchGlobalVariable": { "tag": "Synthetics", "undo": { @@ -6356,6 +6392,47 @@ "type": "safe" } }, + "SearchWidgets": { + "tag": "Widgets", + "undo": { + "type": "safe" + } + }, + "CreateWidget": { + "tag": "Widgets", + "undo": { + "operationId": "DeleteWidget", + "parameters": [ + { + "name": "experience_type", + "source": "experience_type" + }, + { + "name": "uuid", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteWidget": { + "tag": "Widgets", + "undo": { + "type": "idempotent" + } + }, + "GetWidget": { + "tag": "Widgets", + "undo": { + "type": "safe" + } + }, + "UpdateWidget": { + "tag": "Widgets", + "undo": { + "type": "safe" + } + }, "CreateWorkflow": { "tag": "Workflow Automation", "undo": { diff --git a/tests/v2/features/widgets.feature b/tests/v2/features/widgets.feature new file mode 100644 index 0000000000..54b0157115 --- /dev/null +++ b/tests/v2/features/widgets.feature @@ -0,0 +1,115 @@ +@endpoint(widgets) @endpoint(widgets-v2) +Feature: Widgets + Create, read, update, and delete saved widgets. Widgets are reusable + visualization components stored independently from any dashboard or + notebook, partitioned by experience type and identified by a UUID. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Widgets" API + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Create a widget returns "Bad Request" response + Given new "CreateWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Create a widget returns "OK" response + Given new "CreateWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Delete a widget returns "Bad Request" response + Given new "DeleteWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Delete a widget returns "No Content" response + Given new "DeleteWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Delete a widget returns "Not Found" response + Given new "DeleteWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Get a widget returns "Bad Request" response + Given new "GetWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Get a widget returns "Not Found" response + Given new "GetWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Get a widget returns "OK" response + Given new "GetWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Search widgets returns "Bad Request" response + Given new "SearchWidgets" request + And request contains "experience_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Search widgets returns "OK" response + Given new "SearchWidgets" request + And request contains "experience_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Update a widget returns "Bad Request" response + Given new "UpdateWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Update a widget returns "Not Found" response + Given new "UpdateWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Update a widget returns "OK" response + Given new "UpdateWidget" request + And request contains "experience_type" parameter from "REPLACE.ME" + And request contains "uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} + When the request is sent + Then the response status is 200 OK