From d3da9f314b8fcd5083f4227f2fdde5420daf74ad Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:49:38 +0000 Subject: [PATCH] Add app builder API spec (#2608) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 1691 +++++++++++++++++ examples/v2/app-deployment/DeployApp.java | 28 + examples/v2/app-deployment/DisableApp.java | 28 + examples/v2/apps/CreateApp.java | 78 + examples/v2/apps/DeleteApp.java | 28 + examples/v2/apps/DeleteApps.java | 40 + examples/v2/apps/GetApp.java | 28 + examples/v2/apps/ListApps.java | 25 + examples/v2/apps/UpdateApp.java | 43 + .../com/datadog/api/client/ApiClient.java | 8 + .../api/client/v2/api/AppDeploymentApi.java | 346 ++++ .../datadog/api/client/v2/api/AppsApi.java | 1143 +++++++++++ .../api/client/v2/model/AppBuilderError.java | 149 ++ .../v2/model/AppBuilderErrorErrorsItems.java | 166 ++ .../AppBuilderErrorErrorsItemsSource.java | 166 ++ .../api/client/v2/model/AppBuilderEvent.java | 169 ++ .../client/v2/model/AppBuilderEventName.java | 77 + .../client/v2/model/AppBuilderEventType.java | 73 + .../datadog/api/client/v2/model/AppMeta.java | 393 ++++ .../api/client/v2/model/AppsSortField.java | 70 + .../api/client/v2/model/Component.java | 288 +++ .../api/client/v2/model/ComponentGrid.java | 277 +++ .../v2/model/ComponentGridProperties.java | 206 ++ .../ComponentGridPropertiesIsVisible.java | 276 +++ .../client/v2/model/ComponentGridType.java | 53 + .../client/v2/model/ComponentProperties.java | 179 ++ .../model/ComponentPropertiesIsVisible.java | 274 +++ .../api/client/v2/model/ComponentType.java | 94 + .../api/client/v2/model/CreateAppRequest.java | 136 ++ .../client/v2/model/CreateAppRequestData.java | 178 ++ .../model/CreateAppRequestDataAttributes.java | 384 ++++ .../v2/model/CreateAppRequestDataType.java | 57 + .../client/v2/model/CreateAppResponse.java | 136 ++ .../v2/model/CreateAppResponseData.java | 178 ++ .../v2/model/CreateAppResponseDataType.java | 57 + .../api/client/v2/model/CustomConnection.java | 196 ++ .../v2/model/CustomConnectionAttributes.java | 167 ++ ...ustomConnectionAttributesOnPremRunner.java | 166 ++ .../client/v2/model/CustomConnectionType.java | 56 + .../client/v2/model/DeleteAppResponse.java | 136 ++ .../v2/model/DeleteAppResponseData.java | 178 ++ .../v2/model/DeleteAppResponseDataType.java | 57 + .../client/v2/model/DeleteAppsRequest.java | 149 ++ .../v2/model/DeleteAppsRequestDataItems.java | 180 ++ .../model/DeleteAppsRequestDataItemsType.java | 58 + .../client/v2/model/DeleteAppsResponse.java | 149 ++ .../v2/model/DeleteAppsResponseDataItems.java | 180 ++ .../DeleteAppsResponseDataItemsType.java | 58 + .../client/v2/model/DeployAppResponse.java | 136 ++ .../v2/model/DeployAppResponseData.java | 224 +++ .../DeployAppResponseDataAttributes.java | 137 ++ .../v2/model/DeployAppResponseDataType.java | 56 + .../client/v2/model/DeploymentIncluded.java | 224 +++ .../model/DeploymentIncludedAttributes.java | 136 ++ .../v2/model/DeploymentIncludedMeta.java | 218 +++ .../v2/model/DeploymentIncludedType.java | 55 + .../api/client/v2/model/DeploymentMeta.java | 218 +++ .../v2/model/DeploymentRelationship.java | 166 ++ .../v2/model/DeploymentRelationshipData.java | 169 ++ .../model/DeploymentRelationshipDataType.java | 57 + .../v2/model/DeploymentRelationshipMeta.java | 219 +++ .../client/v2/model/DisableAppResponse.java | 136 ++ .../v2/model/DisableAppResponseData.java | 224 +++ .../DisableAppResponseDataAttributes.java | 137 ++ .../v2/model/DisableAppResponseDataType.java | 56 + .../api/client/v2/model/GetAppResponse.java | 235 +++ .../client/v2/model/GetAppResponseData.java | 209 ++ .../model/GetAppResponseDataAttributes.java | 411 ++++ .../v2/model/GetAppResponseDataType.java | 57 + .../v2/model/GetAppResponseRelationship.java | 180 ++ .../api/client/v2/model/InputSchema.java | 136 ++ .../api/client/v2/model/InputSchemaData.java | 196 ++ .../v2/model/InputSchemaDataAttributes.java | 152 ++ ...utSchemaDataAttributesParametersItems.java | 140 ++ ...hemaDataAttributesParametersItemsData.java | 141 ++ ...tributesParametersItemsDataAttributes.java | 292 +++ .../client/v2/model/InputSchemaDataType.java | 55 + .../api/client/v2/model/ListAppsResponse.java | 218 +++ .../v2/model/ListAppsResponseDataItems.java | 268 +++ .../ListAppsResponseDataItemsAttributes.java | 257 +++ ...istAppsResponseDataItemsRelationships.java | 138 ++ .../model/ListAppsResponseDataItemsType.java | 57 + .../client/v2/model/ListAppsResponseMeta.java | 136 ++ .../v2/model/ListAppsResponseMetaPage.java | 164 ++ .../datadog/api/client/v2/model/Query.java | 274 +++ .../api/client/v2/model/QueryType.java | 56 + .../datadog/api/client/v2/model/Script.java | 136 ++ .../api/client/v2/model/ScriptData.java | 196 ++ .../client/v2/model/ScriptDataAttributes.java | 191 ++ .../api/client/v2/model/ScriptDataType.java | 53 + .../api/client/v2/model/UpdateAppRequest.java | 136 ++ .../client/v2/model/UpdateAppRequestData.java | 205 ++ .../model/UpdateAppRequestDataAttributes.java | 384 ++++ .../v2/model/UpdateAppRequestDataType.java | 57 + .../client/v2/model/UpdateAppResponse.java | 235 +++ .../v2/model/UpdateAppResponseData.java | 209 ++ .../UpdateAppResponseDataAttributes.java | 412 ++++ .../v2/model/UpdateAppResponseDataType.java | 57 + .../model/UpdateAppResponseRelationship.java | 180 ++ ...te_App_returns_App_Created_response.freeze | 1 + ...eate_App_returns_App_Created_response.json | 58 + ...te_App_returns_Bad_Request_response.freeze | 1 + ...eate_App_returns_Bad_Request_response.json | 32 + ...te_App_returns_Bad_Request_response.freeze | 1 + ...lete_App_returns_Bad_Request_response.json | 28 + ...lete_App_returns_Not_Found_response.freeze | 1 + ...Delete_App_returns_Not_Found_response.json | 28 + .../v2/Delete_App_returns_OK_response.freeze | 1 + .../v2/Delete_App_returns_OK_response.json | 84 + ...e_Apps_returns_Bad_Request_response.freeze | 1 + ...ple_Apps_returns_Bad_Request_response.json | 32 + ...ple_Apps_returns_Not_Found_response.freeze | 1 + ...tiple_Apps_returns_Not_Found_response.json | 32 + ...e_Multiple_Apps_returns_OK_response.freeze | 1 + ...ete_Multiple_Apps_returns_OK_response.json | 88 + ...oy_App_returns_Bad_Request_response.freeze | 1 + ...ploy_App_returns_Bad_Request_response.json | 28 + ...Deploy_App_returns_Created_response.freeze | 1 + .../Deploy_App_returns_Created_response.json | 84 + ...ploy_App_returns_Not_Found_response.freeze | 1 + ...Deploy_App_returns_Not_Found_response.json | 28 + ...le_App_returns_Bad_Request_response.freeze | 1 + ...able_App_returns_Bad_Request_response.json | 28 + ...able_App_returns_Not_Found_response.freeze | 1 + ...isable_App_returns_Not_Found_response.json | 28 + .../v2/Disable_App_returns_OK_response.freeze | 1 + .../v2/Disable_App_returns_OK_response.json | 84 + ...et_App_returns_Bad_Request_response.freeze | 1 + .../Get_App_returns_Bad_Request_response.json | 28 + .../Get_App_returns_Not_Found_response.freeze | 1 + .../Get_App_returns_Not_Found_response.json | 28 + .../v2/Get_App_returns_OK_response.freeze | 1 + .../v2/Get_App_returns_OK_response.json | 84 + .../v2/List_Apps_returns_OK_response.freeze | 1 + .../v2/List_Apps_returns_OK_response.json | 28 + ...te_App_returns_Bad_Request_response.freeze | 1 + ...date_App_returns_Bad_Request_response.json | 88 + .../v2/Update_App_returns_OK_response.freeze | 1 + .../v2/Update_App_returns_OK_response.json | 88 + .../api/client/v2/api/app_deployment.feature | 58 + .../datadog/api/client/v2/api/apps.feature | 155 ++ .../com/datadog/api/client/v2/api/given.json | 12 + .../com/datadog/api/client/v2/api/undo.json | 55 + 144 files changed, 19353 insertions(+), 4 deletions(-) create mode 100644 examples/v2/app-deployment/DeployApp.java create mode 100644 examples/v2/app-deployment/DisableApp.java create mode 100644 examples/v2/apps/CreateApp.java create mode 100644 examples/v2/apps/DeleteApp.java create mode 100644 examples/v2/apps/DeleteApps.java create mode 100644 examples/v2/apps/GetApp.java create mode 100644 examples/v2/apps/ListApps.java create mode 100644 examples/v2/apps/UpdateApp.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/AppsApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderEvent.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderEventName.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderEventType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppsSortField.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/Component.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentGrid.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentGridProperties.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentGridPropertiesIsVisible.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentGridType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentProperties.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentPropertiesIsVisible.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ComponentType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppRequestDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppRequestDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CreateAppResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomConnection.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomConnectionAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomConnectionAttributesOnPremRunner.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CustomConnectionType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppsRequestDataItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppsRequestDataItemsType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppsResponseDataItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeleteAppsResponseDataItemsType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeployAppResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeployAppResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeployAppResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeployAppResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentIncluded.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentIncludedAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentIncludedMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentIncludedType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentRelationshipData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentRelationshipDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeploymentRelationshipMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DisableAppResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DisableAppResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DisableAppResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DisableAppResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetAppResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetAppResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetAppResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetAppResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetAppResponseRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchema.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchemaData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchemaDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchemaDataAttributesParametersItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchemaDataAttributesParametersItemsData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchemaDataAttributesParametersItemsDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/InputSchemaDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponseDataItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponseDataItemsAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponseDataItemsRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponseDataItemsType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponseMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ListAppsResponseMetaPage.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/Query.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/QueryType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/Script.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ScriptData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ScriptDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ScriptDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppRequestDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppRequestDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateAppResponseRelationship.java create mode 100644 src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.json create mode 100644 src/test/resources/cassettes/features/v2/Create_App_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_App_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_App_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_App_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_App_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_App_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Deploy_App_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Deploy_App_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.json create mode 100644 src/test/resources/cassettes/features/v2/Deploy_App_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Deploy_App_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Disable_App_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Disable_App_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Disable_App_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Disable_App_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_App_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_App_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_App_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_App_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json create mode 100644 src/test/resources/com/datadog/api/client/v2/api/app_deployment.feature create mode 100644 src/test/resources/com/datadog/api/client/v2/api/apps.feature diff --git a/.apigentools-info b/.apigentools-info index dd9f648f459..fc5a1d616cc 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-16 19:15:38.418914", - "spec_repo_commit": "162aece5" + "regenerated": "2024-12-17 15:51:05.988918", + "spec_repo_commit": "b82d3677" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-16 19:15:38.433437", - "spec_repo_commit": "162aece5" + "regenerated": "2024-12-17 15:51:06.004049", + "spec_repo_commit": "b82d3677" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5d4184e4f2e..c19d456f413 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1615,6 +1615,126 @@ components: type: string x-enum-varnames: - apm_retention_filter + AppBuilderError: + description: The definition of `AppBuilderError` object. + properties: + errors: + description: The `AppBuilderError` `errors`. + items: + $ref: '#/components/schemas/AppBuilderErrorErrorsItems' + type: array + type: object + AppBuilderErrorErrorsItems: + description: The definition of `AppBuilderErrorErrorsItems` object. + properties: + detail: + description: The `items` `detail`. + type: string + source: + $ref: '#/components/schemas/AppBuilderErrorErrorsItemsSource' + type: object + AppBuilderErrorErrorsItemsSource: + description: The definition of `AppBuilderErrorErrorsItemsSource` object. + properties: + parameter: + description: The `source` `parameter`. + type: string + pointer: + description: The `source` `pointer`. + type: string + type: object + AppBuilderEvent: + additionalProperties: {} + description: The definition of `AppBuilderEvent` object. + properties: + name: + $ref: '#/components/schemas/AppBuilderEventName' + type: + $ref: '#/components/schemas/AppBuilderEventType' + type: object + AppBuilderEventName: + description: The triggering action for the event. + enum: + - pageChange + - tableRowClick + - _tableRowButtonClick + - change + - submit + - click + - toggleOpen + - close + - open + - executionFinished + type: string + x-enum-varnames: + - PAGECHANGE + - TABLEROWCLICK + - TABLEROWBUTTONCLICK + - CHANGE + - SUBMIT + - CLICK + - TOGGLEOPEN + - CLOSE + - OPEN + - EXECUTIONFINISHED + AppBuilderEventType: + description: The response to the event. + enum: + - custom + - setComponentState + - triggerQuery + - openModal + - closeModal + - openUrl + - downloadFile + - setStateVariableValue + type: string + x-enum-varnames: + - CUSTOM + - SETCOMPONENTSTATE + - TRIGGERQUERY + - OPENMODAL + - CLOSEMODAL + - OPENURL + - DOWNLOADFILE + - SETSTATEVARIABLEVALUE + AppMeta: + description: The definition of `AppMeta` object. + properties: + created_at: + description: The `AppMeta` `created_at`. + type: string + deleted_at: + description: The `AppMeta` `deleted_at`. + type: string + org_id: + description: The `AppMeta` `org_id`. + format: int64 + type: integer + run_as_user: + description: The `AppMeta` `run_as_user`. + type: string + updated_at: + description: The `AppMeta` `updated_at`. + type: string + updated_since_deployment: + description: The `AppMeta` `updated_since_deployment`. + type: boolean + user_id: + description: The `AppMeta` `user_id`. + format: int64 + type: integer + user_name: + description: The `AppMeta` `user_name`. + type: string + user_uuid: + description: The `AppMeta` `user_uuid`. + type: string + version: + description: The `AppMeta` `version`. + format: int64 + type: integer + type: object ApplicationKeyCreateAttributes: description: Attributes used to create an application Key. properties: @@ -1766,6 +1886,27 @@ components: type: string x-enum-varnames: - APPLICATION_KEYS + AppsSortField: + description: The field and direction to sort apps by + enum: + - name + - created_at + - updated_at + - user_name + - -name + - -created_at + - -updated_at + - -user_name + type: string + x-enum-varnames: + - NAME + - CREATED_AT + - UPDATED_AT + - USER_NAME + - NAME_DESC + - CREATED_AT_DESC + - UPDATED_AT_DESC + - USER_NAME_DESC AuditLogsEvent: description: Object description of an Audit Logs event after it is processed and stored by Datadog. @@ -5528,6 +5669,150 @@ components: $ref: '#/components/schemas/CloudflareAccountResponseData' type: array type: object + Component: + description: The definition of `Component` object. + properties: + events: + description: The `Component` `events`. + items: + $ref: '#/components/schemas/AppBuilderEvent' + type: array + id: + description: The `Component` `id`. + nullable: true + type: string + name: + description: The `Component` `name`. + example: '' + type: string + properties: + $ref: '#/components/schemas/ComponentProperties' + type: + $ref: '#/components/schemas/ComponentType' + required: + - name + - type + - properties + type: object + ComponentGrid: + description: The definition of `ComponentGrid` object. + properties: + events: + description: The `ComponentGrid` `events`. + items: + $ref: '#/components/schemas/AppBuilderEvent' + type: array + id: + description: The `ComponentGrid` `id`. + type: string + name: + description: The `ComponentGrid` `name`. + example: '' + type: string + properties: + $ref: '#/components/schemas/ComponentGridProperties' + type: + $ref: '#/components/schemas/ComponentGridType' + required: + - name + - type + - properties + type: object + ComponentGridProperties: + description: The definition of `ComponentGridProperties` object. + properties: + backgroundColor: + default: default + description: The `ComponentGridProperties` `backgroundColor`. + type: string + children: + description: The `ComponentGridProperties` `children`. + items: + $ref: '#/components/schemas/Component' + type: array + isVisible: + $ref: '#/components/schemas/ComponentGridPropertiesIsVisible' + type: object + ComponentGridPropertiesIsVisible: + description: The definition of `ComponentGridPropertiesIsVisible` object. + oneOf: + - type: string + - default: true + type: boolean + ComponentGridType: + description: The definition of `ComponentGridType` object. + enum: + - grid + example: grid + type: string + x-enum-varnames: + - GRID + ComponentProperties: + additionalProperties: {} + description: The definition of `ComponentProperties` object. + properties: + children: + description: The `ComponentProperties` `children`. + items: + $ref: '#/components/schemas/Component' + type: array + isVisible: + $ref: '#/components/schemas/ComponentPropertiesIsVisible' + type: object + ComponentPropertiesIsVisible: + description: The definition of `ComponentPropertiesIsVisible` object. + oneOf: + - type: boolean + - description: If a string, it should be a valid JavaScript expression that + evaluates to a boolean. + example: ${true} + type: string + ComponentType: + description: The definition of `ComponentType` object. + enum: + - table + - textInput + - textArea + - button + - text + - select + - modal + - schemaForm + - checkbox + - tabs + - vegaChart + - radioButtons + - numberInput + - fileInput + - jsonInput + - gridCell + - dateRangePicker + - search + - container + - calloutValue + example: table + type: string + x-enum-varnames: + - TABLE + - TEXTINPUT + - TEXTAREA + - BUTTON + - TEXT + - SELECT + - MODAL + - SCHEMAFORM + - CHECKBOX + - TABS + - VEGACHART + - RADIOBUTTONS + - NUMBERINPUT + - FILEINPUT + - JSONINPUT + - GRIDCELL + - DATERANGEPICKER + - SEARCH + - CONTAINER + - CALLOUTVALUE ConfluentAccountCreateRequest: description: Payload schema when adding a Confluent account. properties: @@ -6529,6 +6814,132 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CreateAppRequest: + description: The definition of `CreateAppRequest` object. + example: + data: + attributes: + components: + - events: [] + name: grid0 + properties: + children: + - events: [] + name: gridCell0 + properties: + children: + - events: [] + name: calloutValue0 + properties: + isDisabled: false + isLoading: false + isVisible: true + label: CPU Usage + size: sm + style: vivid_yellow + unit: kB + value: '42' + type: calloutValue + isVisible: 'true' + layout: + default: + height: 8 + width: 2 + x: 0 + y: 0 + type: gridCell + type: grid + description: This is a simple example app + embeddedQueries: [] + name: Example App + rootInstanceName: grid0 + type: appDefinitions + properties: + data: + $ref: '#/components/schemas/CreateAppRequestData' + type: object + CreateAppRequestData: + description: The definition of `CreateAppRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateAppRequestDataAttributes' + type: + $ref: '#/components/schemas/CreateAppRequestDataType' + required: + - type + type: object + CreateAppRequestDataAttributes: + description: The definition of `CreateAppRequestDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + CreateAppRequestDataType: + default: appDefinitions + description: The definition of `CreateAppRequestDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + CreateAppResponse: + description: The definition of `CreateAppResponse` object. + properties: + data: + $ref: '#/components/schemas/CreateAppResponseData' + type: object + CreateAppResponseData: + description: The definition of `CreateAppResponseData` object. + properties: + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/CreateAppResponseDataType' + required: + - id + - type + type: object + CreateAppResponseDataType: + default: appDefinitions + description: The definition of `CreateAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS CreateDataDeletionRequestBody: description: Object needed to create a data deletion request. properties: @@ -6748,6 +7159,44 @@ components: meta: $ref: '#/components/schemas/CSMAgentsMetadata' type: object + CustomConnection: + description: The definition of `CustomConnection` object. + properties: + attributes: + $ref: '#/components/schemas/CustomConnectionAttributes' + id: + description: The `CustomConnection` `id`. + type: string + type: + $ref: '#/components/schemas/CustomConnectionType' + type: object + CustomConnectionAttributes: + description: The definition of `CustomConnectionAttributes` object. + properties: + name: + description: The `attributes` `name`. + type: string + onPremRunner: + $ref: '#/components/schemas/CustomConnectionAttributesOnPremRunner' + type: object + CustomConnectionAttributesOnPremRunner: + description: The definition of `CustomConnectionAttributesOnPremRunner` object. + properties: + id: + description: The `onPremRunner` `id`. + type: string + url: + description: The `onPremRunner` `url`. + type: string + type: object + CustomConnectionType: + default: custom_connections + description: The definition of `CustomConnectionType` object. + enum: + - custom_connections + type: string + x-enum-varnames: + - CUSTOM_CONNECTIONS CustomCostGetResponseMeta: description: Meta for the response from the Get Custom Costs endpoints. properties: @@ -8129,6 +8578,270 @@ components: type: number type: array type: object + DeleteAppResponse: + description: The definition of `DeleteAppResponse` object. + properties: + data: + $ref: '#/components/schemas/DeleteAppResponseData' + type: object + DeleteAppResponseData: + description: The definition of `DeleteAppResponseData` object. + properties: + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/DeleteAppResponseDataType' + required: + - id + - type + type: object + DeleteAppResponseDataType: + default: appDefinitions + description: The definition of `DeleteAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + DeleteAppsRequest: + description: The definition of `DeleteAppsRequest` object. + example: + data: + - id: 29494ddd-ac13-46a7-8558-b05b050ee755 + type: appDefinitions + - id: 71c0d358-eac5-41e3-892d-a7467571b9b0 + type: appDefinitions + - id: 98e7e44d-1562-474a-90f7-3a94e739c006 + type: appDefinitions + properties: + data: + description: The `DeleteAppsRequest` `data`. + items: + $ref: '#/components/schemas/DeleteAppsRequestDataItems' + type: array + type: object + DeleteAppsRequestDataItems: + description: The definition of `DeleteAppsRequestDataItems` object. + properties: + id: + description: The `items` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/DeleteAppsRequestDataItemsType' + required: + - id + - type + type: object + DeleteAppsRequestDataItemsType: + default: appDefinitions + description: The definition of `DeleteAppsRequestDataItemsType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + DeleteAppsResponse: + description: The definition of `DeleteAppsResponse` object. + properties: + data: + description: The `DeleteAppsResponse` `data`. + items: + $ref: '#/components/schemas/DeleteAppsResponseDataItems' + type: array + type: object + DeleteAppsResponseDataItems: + description: The definition of `DeleteAppsResponseDataItems` object. + properties: + id: + description: The `items` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/DeleteAppsResponseDataItemsType' + required: + - id + - type + type: object + DeleteAppsResponseDataItemsType: + default: appDefinitions + description: The definition of `DeleteAppsResponseDataItemsType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + DeployAppResponse: + description: The definition of `DeployAppResponse` object. + properties: + data: + $ref: '#/components/schemas/DeployAppResponseData' + type: object + DeployAppResponseData: + description: The definition of `DeployAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/DeployAppResponseDataAttributes' + id: + description: The `data` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentMeta' + type: + $ref: '#/components/schemas/DeployAppResponseDataType' + type: object + DeployAppResponseDataAttributes: + description: The definition of `DeployAppResponseDataAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DeployAppResponseDataType: + default: deployment + description: The definition of `DeployAppResponseDataType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT + Deployment: + description: The definition of `Deployment` object. + properties: + attributes: + $ref: '#/components/schemas/DeploymentAttributes' + id: + description: The `Deployment` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentMeta' + type: + $ref: '#/components/schemas/DeploymentType' + type: object + DeploymentAttributes: + description: The definition of `DeploymentAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DeploymentIncluded: + description: The definition of `DeploymentIncluded` object. + properties: + attributes: + $ref: '#/components/schemas/DeploymentIncludedAttributes' + id: + description: The `DeploymentIncluded` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentIncludedMeta' + type: + $ref: '#/components/schemas/DeploymentIncludedType' + type: object + DeploymentIncludedAttributes: + description: The definition of `DeploymentIncludedAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DeploymentIncludedMeta: + description: The definition of `DeploymentIncludedMeta` object. + properties: + created_at: + description: The `meta` `created_at`. + type: string + user_id: + description: The `meta` `user_id`. + format: int64 + type: integer + user_name: + description: The `meta` `user_name`. + type: string + user_uuid: + description: The `meta` `user_uuid`. + type: string + type: object + DeploymentIncludedType: + default: deployment + description: The definition of `DeploymentIncludedType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT + DeploymentMeta: + description: The definition of `DeploymentMeta` object. + properties: + created_at: + description: The `DeploymentMeta` `created_at`. + type: string + user_id: + description: The `DeploymentMeta` `user_id`. + format: int64 + type: integer + user_name: + description: The `DeploymentMeta` `user_name`. + type: string + user_uuid: + description: The `DeploymentMeta` `user_uuid`. + type: string + type: object + DeploymentRelationship: + description: The definition of `DeploymentRelationship` object. + properties: + data: + $ref: '#/components/schemas/DeploymentRelationshipData' + meta: + $ref: '#/components/schemas/DeploymentRelationshipMeta' + type: object + DeploymentRelationshipData: + description: The definition of `DeploymentRelationshipData` object. + properties: + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/DeploymentRelationshipDataType' + type: object + DeploymentRelationshipDataType: + default: deployment + description: The definition of `DeploymentRelationshipDataType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT + DeploymentRelationshipMeta: + description: The definition of `DeploymentRelationshipMeta` object. + properties: + created_at: + description: The `meta` `created_at`. + type: string + user_id: + description: The `meta` `user_id`. + format: int64 + type: integer + user_name: + description: The `meta` `user_name`. + type: string + user_uuid: + description: The `meta` `user_uuid`. + type: string + type: object + DeploymentType: + default: deployment + description: The definition of `DeploymentType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT DetailedFinding: description: A single finding with with message and resource configuration. properties: @@ -8312,6 +9025,40 @@ components: description: The type of the resource. The value should always be device. type: string type: object + DisableAppResponse: + description: The definition of `DisableAppResponse` object. + properties: + data: + $ref: '#/components/schemas/DisableAppResponseData' + type: object + DisableAppResponseData: + description: The definition of `DisableAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/DisableAppResponseDataAttributes' + id: + description: The `data` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentMeta' + type: + $ref: '#/components/schemas/DisableAppResponseDataType' + type: object + DisableAppResponseDataAttributes: + description: The definition of `DisableAppResponseDataAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DisableAppResponseDataType: + default: deployment + description: The definition of `DisableAppResponseDataType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT DomainAllowlist: description: The email domain allowlist for an org. properties: @@ -11092,6 +11839,95 @@ components: type: string x-enum-varnames: - GCP_SERVICE_ACCOUNT + GetAppResponse: + description: The definition of `GetAppResponse` object. + properties: + data: + $ref: '#/components/schemas/GetAppResponseData' + included: + description: The `GetAppResponse` `included`. + items: + $ref: '#/components/schemas/DeploymentIncluded' + type: array + meta: + $ref: '#/components/schemas/AppMeta' + relationship: + $ref: '#/components/schemas/GetAppResponseRelationship' + type: object + GetAppResponseData: + description: The definition of `GetAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/GetAppResponseDataAttributes' + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/GetAppResponseDataType' + required: + - id + - type + - attributes + type: object + GetAppResponseDataAttributes: + description: The definition of `GetAppResponseDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + favorite: + description: The `attributes` `favorite`. + type: boolean + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + GetAppResponseDataType: + default: appDefinitions + description: The definition of `GetAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + GetAppResponseRelationship: + description: The definition of `GetAppResponseRelationship` object. + properties: + connections: + description: The `relationship` `connections`. + items: + $ref: '#/components/schemas/CustomConnection' + type: array + deployment: + $ref: '#/components/schemas/DeploymentRelationship' + type: object GetDataDeletionsResponseBody: description: The response from the get data deletion requests endpoint. properties: @@ -13745,6 +14581,77 @@ components: - ONCALL - INCIDENT - RELATION + InputSchema: + description: The definition of `InputSchema` object. + properties: + data: + $ref: '#/components/schemas/InputSchemaData' + type: object + InputSchemaData: + description: The definition of `InputSchemaData` object. + properties: + attributes: + $ref: '#/components/schemas/InputSchemaDataAttributes' + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/InputSchemaDataType' + type: object + InputSchemaDataAttributes: + description: The definition of `InputSchemaDataAttributes` object. + properties: + parameters: + description: The `attributes` `parameters`. + items: + $ref: '#/components/schemas/InputSchemaDataAttributesParametersItems' + type: array + type: object + InputSchemaDataAttributesParametersItems: + description: The definition of `InputSchemaDataAttributesParametersItems` object. + properties: + data: + $ref: '#/components/schemas/InputSchemaDataAttributesParametersItemsData' + type: object + InputSchemaDataAttributesParametersItemsData: + description: The definition of `InputSchemaDataAttributesParametersItemsData` + object. + properties: + attributes: + $ref: '#/components/schemas/InputSchemaDataAttributesParametersItemsDataAttributes' + type: object + InputSchemaDataAttributesParametersItemsDataAttributes: + description: The definition of `InputSchemaDataAttributesParametersItemsDataAttributes` + object. + properties: + defaultValue: + description: The `attributes` `defaultValue`. + description: + description: The `attributes` `description`. + type: string + enum: + description: The `attributes` `enum`. + items: + type: string + type: array + label: + description: The `attributes` `label`. + type: string + name: + description: The `attributes` `name`. + type: string + type: + description: The `attributes` `type`. + type: string + type: object + InputSchemaDataType: + default: inputSchema + description: The definition of `InputSchemaDataType` object. + enum: + - inputSchema + type: string + x-enum-varnames: + - INPUTSCHEMA IntakePayloadAccepted: description: The payload accepted for intake. properties: @@ -14130,6 +15037,96 @@ components: meta: $ref: '#/components/schemas/ApplicationKeyResponseMeta' type: object + ListAppsResponse: + description: The definition of `ListAppsResponse` object. + properties: + data: + description: The `ListAppsResponse` `data`. + items: + $ref: '#/components/schemas/ListAppsResponseDataItems' + type: array + included: + description: The `ListAppsResponse` `included`. + items: + $ref: '#/components/schemas/DeploymentIncluded' + type: array + meta: + $ref: '#/components/schemas/ListAppsResponseMeta' + type: object + ListAppsResponseDataItems: + description: The definition of `ListAppsResponseDataItems` object. + properties: + attributes: + $ref: '#/components/schemas/ListAppsResponseDataItemsAttributes' + id: + description: The `items` `id`. + example: '' + type: string + meta: + $ref: '#/components/schemas/AppMeta' + relationships: + $ref: '#/components/schemas/ListAppsResponseDataItemsRelationships' + type: + $ref: '#/components/schemas/ListAppsResponseDataItemsType' + required: + - id + - type + - attributes + type: object + ListAppsResponseDataItemsAttributes: + description: The definition of `ListAppsResponseDataItemsAttributes` object. + properties: + description: + description: The `attributes` `description`. + type: string + favorite: + description: The `attributes` `favorite`. + type: boolean + name: + description: The `attributes` `name`. + type: string + selfService: + description: The `attributes` `selfService`. + type: boolean + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + ListAppsResponseDataItemsRelationships: + description: The definition of `ListAppsResponseDataItemsRelationships` object. + properties: + deployment: + $ref: '#/components/schemas/DeploymentRelationship' + type: object + ListAppsResponseDataItemsType: + default: appDefinitions + description: The definition of `ListAppsResponseDataItemsType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + ListAppsResponseMeta: + description: The definition of `ListAppsResponseMeta` object. + properties: + page: + $ref: '#/components/schemas/ListAppsResponseMetaPage' + type: object + ListAppsResponseMetaPage: + description: The definition of `ListAppsResponseMetaPage` object. + properties: + totalCount: + description: The `page` `totalCount`. + format: int64 + type: integer + totalFilteredCount: + description: The `page` `totalFilteredCount`. + format: int64 + type: integer + type: object ListDevicesResponse: description: List devices response. properties: @@ -18908,6 +19905,31 @@ components: $ref: '#/components/schemas/Project' type: array type: object + Query: + description: The definition of `Query` object. + properties: + events: + description: The `Query` `events`. + items: + $ref: '#/components/schemas/AppBuilderEvent' + type: array + id: + description: The `Query` `id`. + example: '' + type: string + name: + description: The `Query` `name`. + example: '' + type: string + properties: + description: The `Query` `properties`. + type: + $ref: '#/components/schemas/QueryType' + required: + - id + - name + - type + type: object QueryFormula: description: A formula for calculation based on one or more queries. properties: @@ -18931,6 +19953,18 @@ components: x-enum-varnames: - ASC - DESC + QueryType: + description: The definition of `QueryType` object. + enum: + - action + - stateVariable + - dataTransform + example: action + type: string + x-enum-varnames: + - ACTION + - STATEVARIABLE + - DATATRANSFORM RUMAggregateBucketValue: description: A bucket value, can be either a timeseries or a single value. oneOf: @@ -21465,6 +22499,44 @@ components: type: string x-enum-varnames: - SCORECARD + Script: + description: The definition of `Script` object. + properties: + data: + $ref: '#/components/schemas/ScriptData' + type: object + ScriptData: + description: The definition of `ScriptData` object. + properties: + attributes: + $ref: '#/components/schemas/ScriptDataAttributes' + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/ScriptDataType' + type: object + ScriptDataAttributes: + description: The definition of `ScriptDataAttributes` object. + properties: + name: + description: The `attributes` `name`. + type: string + src: + description: The `attributes` `src`. + type: string + type: + description: The `attributes` `type`. + type: string + type: object + ScriptDataType: + default: scripts + description: The definition of `ScriptDataType` object. + enum: + - scripts + type: string + x-enum-varnames: + - SCRIPTS SecurityFilter: description: The security filter's properties. properties: @@ -27058,6 +28130,197 @@ components: example: min type: string type: object + UpdateAppRequest: + description: The definition of `UpdateAppRequest` object. + example: + data: + attributes: + components: + - events: [] + name: grid0 + properties: + children: + - events: [] + name: gridCell0 + properties: + children: + - events: [] + name: calloutValue0 + properties: + isDisabled: false + isLoading: false + isVisible: true + label: CPU Usage + size: sm + style: vivid_yellow + unit: kB + value: '42' + type: calloutValue + isVisible: 'true' + layout: + default: + height: 8 + width: 2 + x: 0 + y: 0 + type: gridCell + type: grid + description: This is a simple example app + embeddedQueries: [] + name: Example App + rootInstanceName: grid0 + id: 9e20cbaf-68da-45a6-9ccf-54193ac29fa5 + type: appDefinitions + properties: + data: + $ref: '#/components/schemas/UpdateAppRequestData' + type: object + UpdateAppRequestData: + description: The definition of `UpdateAppRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppRequestDataAttributes' + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/UpdateAppRequestDataType' + required: + - type + type: object + UpdateAppRequestDataAttributes: + description: The definition of `UpdateAppRequestDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + UpdateAppRequestDataType: + default: appDefinitions + description: The definition of `UpdateAppRequestDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + UpdateAppResponse: + description: The definition of `UpdateAppResponse` object. + properties: + data: + $ref: '#/components/schemas/UpdateAppResponseData' + included: + description: The `UpdateAppResponse` `included`. + items: + $ref: '#/components/schemas/DeploymentIncluded' + type: array + meta: + $ref: '#/components/schemas/AppMeta' + relationship: + $ref: '#/components/schemas/UpdateAppResponseRelationship' + type: object + UpdateAppResponseData: + description: The definition of `UpdateAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppResponseDataAttributes' + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/UpdateAppResponseDataType' + required: + - id + - type + - attributes + type: object + UpdateAppResponseDataAttributes: + description: The definition of `UpdateAppResponseDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + favorite: + description: The `attributes` `favorite`. + type: boolean + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + UpdateAppResponseDataType: + default: appDefinitions + description: The definition of `UpdateAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + UpdateAppResponseRelationship: + description: The definition of `UpdateAppResponseRelationship` object. + properties: + connections: + description: The `relationship` `connections`. + items: + $ref: '#/components/schemas/CustomConnection' + type: array + deployment: + $ref: '#/components/schemas/DeploymentRelationship' + type: object UpdateOpenAPIResponse: description: Response for `UpdateOpenAPI`. properties: @@ -28816,6 +30079,430 @@ paths: permissions: - apm_retention_filter_write - apm_pipelines_write + /api/v2/app-builder/apps: + delete: + description: Delete multiple apps by ID + operationId: DeleteApps + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden, e.g. missing permissions to delete one or more apps + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Multiple Apps + tags: + - Apps + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + get: + description: List all apps, with optional filters and sorting + operationId: ListApps + parameters: + - description: The number of apps to return per page + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The page number to return + in: query + name: page + required: false + schema: + format: int64 + type: integer + - description: The `AppsFilter` `user_name`. + in: query + name: filter[user_name] + required: false + schema: + type: string + - description: The `AppsFilter` `user_uuid`. + in: query + name: filter[user_uuid] + required: false + schema: + type: string + - description: The `AppsFilter` `name`. + in: query + name: filter[name] + required: false + schema: + type: string + - description: The `AppsFilter` `query`. + in: query + name: filter[query] + required: false + schema: + type: string + - description: The `AppsFilter` `deployed`. + in: query + name: filter[deployed] + required: false + schema: + type: boolean + - description: The `AppsFilter` `tags`. + in: query + name: filter[tags] + required: false + schema: + type: string + - description: The `AppsFilter` `favorite`. + in: query + name: filter[favorite] + required: false + schema: + type: boolean + - explode: false + in: query + name: sort + required: false + schema: + items: + $ref: '#/components/schemas/AppsSortField' + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListAppsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request, e.g. invalid sort parameter + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Apps + tags: + - Apps + x-permission: + operator: OR + permissions: + - apps_run + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + post: + description: Create a new app, returning the app ID + operationId: CreateApp + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppResponse' + description: App Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden, e.g. missing required permissions to a connection + or workflow used in the app + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create App + tags: + - Apps + x-permission: + operator: AND + permissions: + - apps_write + - connections_resolve + - workflows_run + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + /api/v2/app-builder/apps/{app_id}: + delete: + description: Delete an app by ID + operationId: DeleteApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '410': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Gone + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete App + tags: + - Apps + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + get: + description: Get the full definition of an app by ID + operationId: GetApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get App + tags: + - Apps + x-permission: + operator: AND + permissions: + - apps_run + - connections_read + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + patch: + description: Update an existing app by ID. Creates a new version of the app + operationId: UpdateApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAppRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden, e.g. missing required permissions to a connection + or workflow used in the app + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update App + tags: + - Apps + x-permission: + operator: AND + permissions: + - apps_write + - connections_resolve + - workflows_run + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + /api/v2/app-builder/apps/{app_id}/deployment: + delete: + description: Disable an app by ID + operationId: DisableApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DisableAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Disable App + tags: + - App Deployment + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + post: + description: Deploy (publish) an app by ID + operationId: DeployApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/DeployAppResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Deploy App + tags: + - App Deployment + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' /api/v2/application_keys: get: description: List all application keys available for your org @@ -44843,6 +46530,10 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration +- description: Deploy and disable apps in App Builder. + name: App Deployment +- description: Create, read, update, and delete apps in App Builder. + name: Apps - description: Search your Audit Logs events over HTTP. name: Audit - description: '[The AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_mapping/?tab=example) diff --git a/examples/v2/app-deployment/DeployApp.java b/examples/v2/app-deployment/DeployApp.java new file mode 100644 index 00000000000..4fc374e497e --- /dev/null +++ b/examples/v2/app-deployment/DeployApp.java @@ -0,0 +1,28 @@ +// Deploy App returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppDeploymentApi; +import com.datadog.api.client.v2.model.DeployAppResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deployApp", true); + AppDeploymentApi apiInstance = new AppDeploymentApi(defaultClient); + + // there is a valid "app" in the system + String APP_DATA_ID = System.getenv("APP_DATA_ID"); + + try { + DeployAppResponse result = apiInstance.deployApp(APP_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppDeploymentApi#deployApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/app-deployment/DisableApp.java b/examples/v2/app-deployment/DisableApp.java new file mode 100644 index 00000000000..3e84d7f9858 --- /dev/null +++ b/examples/v2/app-deployment/DisableApp.java @@ -0,0 +1,28 @@ +// Disable App returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppDeploymentApi; +import com.datadog.api.client.v2.model.DisableAppResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.disableApp", true); + AppDeploymentApi apiInstance = new AppDeploymentApi(defaultClient); + + // there is a valid "app" in the system + String APP_DATA_ID = System.getenv("APP_DATA_ID"); + + try { + DisableAppResponse result = apiInstance.disableApp(APP_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppDeploymentApi#disableApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/apps/CreateApp.java b/examples/v2/apps/CreateApp.java new file mode 100644 index 00000000000..23c584fb4a2 --- /dev/null +++ b/examples/v2/apps/CreateApp.java @@ -0,0 +1,78 @@ +// Create App returns "App Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppsApi; +import com.datadog.api.client.v2.model.Component; +import com.datadog.api.client.v2.model.ComponentGrid; +import com.datadog.api.client.v2.model.ComponentGridProperties; +import com.datadog.api.client.v2.model.ComponentGridType; +import com.datadog.api.client.v2.model.ComponentProperties; +import com.datadog.api.client.v2.model.ComponentPropertiesIsVisible; +import com.datadog.api.client.v2.model.ComponentType; +import com.datadog.api.client.v2.model.CreateAppRequest; +import com.datadog.api.client.v2.model.CreateAppRequestData; +import com.datadog.api.client.v2.model.CreateAppRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateAppRequestDataType; +import com.datadog.api.client.v2.model.CreateAppResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createApp", true); + AppsApi apiInstance = new AppsApi(defaultClient); + + CreateAppRequest body = + new CreateAppRequest() + .data( + new CreateAppRequestData() + .attributes( + new CreateAppRequestDataAttributes() + .components( + Collections.singletonList( + new ComponentGrid() + .name("grid0") + .properties( + new ComponentGridProperties() + .children( + Collections.singletonList( + new Component() + .name("gridCell0") + .properties( + new ComponentProperties() + .children( + Collections.singletonList( + new Component() + .name( + "calloutValue0") + .properties( + new ComponentProperties() + .isVisible( + new ComponentPropertiesIsVisible( + true))) + .type( + ComponentType + .CALLOUTVALUE))) + .isVisible( + new ComponentPropertiesIsVisible( + "true"))) + .type(ComponentType.GRIDCELL)))) + .type(ComponentGridType.GRID))) + .description("This is a simple example app") + .name("Example App") + .rootInstanceName("grid0")) + .type(CreateAppRequestDataType.APPDEFINITIONS)); + + try { + CreateAppResponse result = apiInstance.createApp(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppsApi#createApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/apps/DeleteApp.java b/examples/v2/apps/DeleteApp.java new file mode 100644 index 00000000000..d87bdf504c7 --- /dev/null +++ b/examples/v2/apps/DeleteApp.java @@ -0,0 +1,28 @@ +// Delete App returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppsApi; +import com.datadog.api.client.v2.model.DeleteAppResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteApp", true); + AppsApi apiInstance = new AppsApi(defaultClient); + + // there is a valid "app" in the system + String APP_DATA_ID = System.getenv("APP_DATA_ID"); + + try { + DeleteAppResponse result = apiInstance.deleteApp(APP_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppsApi#deleteApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/apps/DeleteApps.java b/examples/v2/apps/DeleteApps.java new file mode 100644 index 00000000000..1d699b1c0d0 --- /dev/null +++ b/examples/v2/apps/DeleteApps.java @@ -0,0 +1,40 @@ +// Delete Multiple Apps returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppsApi; +import com.datadog.api.client.v2.model.DeleteAppsRequest; +import com.datadog.api.client.v2.model.DeleteAppsRequestDataItems; +import com.datadog.api.client.v2.model.DeleteAppsRequestDataItemsType; +import com.datadog.api.client.v2.model.DeleteAppsResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteApps", true); + AppsApi apiInstance = new AppsApi(defaultClient); + + // there is a valid "app" in the system + String APP_DATA_ID = System.getenv("APP_DATA_ID"); + + DeleteAppsRequest body = + new DeleteAppsRequest() + .data( + Collections.singletonList( + new DeleteAppsRequestDataItems() + .id(APP_DATA_ID) + .type(DeleteAppsRequestDataItemsType.APPDEFINITIONS))); + + try { + DeleteAppsResponse result = apiInstance.deleteApps(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppsApi#deleteApps"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/apps/GetApp.java b/examples/v2/apps/GetApp.java new file mode 100644 index 00000000000..d7ed390962e --- /dev/null +++ b/examples/v2/apps/GetApp.java @@ -0,0 +1,28 @@ +// Get App returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppsApi; +import com.datadog.api.client.v2.model.GetAppResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getApp", true); + AppsApi apiInstance = new AppsApi(defaultClient); + + // there is a valid "app" in the system + String APP_DATA_ID = System.getenv("APP_DATA_ID"); + + try { + GetAppResponse result = apiInstance.getApp(APP_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppsApi#getApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/apps/ListApps.java b/examples/v2/apps/ListApps.java new file mode 100644 index 00000000000..9cce73af2d8 --- /dev/null +++ b/examples/v2/apps/ListApps.java @@ -0,0 +1,25 @@ +// List Apps returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppsApi; +import com.datadog.api.client.v2.model.ListAppsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listApps", true); + AppsApi apiInstance = new AppsApi(defaultClient); + + try { + ListAppsResponse result = apiInstance.listApps(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppsApi#listApps"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/apps/UpdateApp.java b/examples/v2/apps/UpdateApp.java new file mode 100644 index 00000000000..86f6f4216a8 --- /dev/null +++ b/examples/v2/apps/UpdateApp.java @@ -0,0 +1,43 @@ +// Update App returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppsApi; +import com.datadog.api.client.v2.model.UpdateAppRequest; +import com.datadog.api.client.v2.model.UpdateAppRequestData; +import com.datadog.api.client.v2.model.UpdateAppRequestDataAttributes; +import com.datadog.api.client.v2.model.UpdateAppRequestDataType; +import com.datadog.api.client.v2.model.UpdateAppResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateApp", true); + AppsApi apiInstance = new AppsApi(defaultClient); + + // there is a valid "app" in the system + String APP_DATA_ID = System.getenv("APP_DATA_ID"); + + UpdateAppRequest body = + new UpdateAppRequest() + .data( + new UpdateAppRequestData() + .attributes( + new UpdateAppRequestDataAttributes() + .name("Updated Name") + .rootInstanceName("grid0")) + .id(APP_DATA_ID) + .type(UpdateAppRequestDataType.APPDEFINITIONS)); + + try { + UpdateAppResponse result = apiInstance.updateApp(APP_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppsApi#updateApp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 6e3151edebd..353c2a33f42 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -372,6 +372,14 @@ public class ApiClient { put("v2.getOpenAPI", false); put("v2.listAPIs", false); put("v2.updateOpenAPI", false); + put("v2.createApp", false); + put("v2.deleteApp", false); + put("v2.deleteApps", false); + put("v2.getApp", false); + put("v2.listApps", false); + put("v2.updateApp", false); + put("v2.deployApp", false); + put("v2.disableApp", false); put("v2.getActiveBillingDimensions", false); put("v2.getBillingDimensionMapping", false); put("v2.getMonthlyCostAttribution", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java b/src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java new file mode 100644 index 00000000000..5b1a358dc67 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java @@ -0,0 +1,346 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DeployAppResponse; +import com.datadog.api.client.v2.model.DisableAppResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppDeploymentApi { + private ApiClient apiClient; + + public AppDeploymentApi() { + this(ApiClient.getDefaultApiClient()); + } + + public AppDeploymentApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Deploy App. + * + *

See {@link #deployAppWithHttpInfo}. + * + * @param appId (required) + * @return DeployAppResponse + * @throws ApiException if fails to make API call + */ + public DeployAppResponse deployApp(String appId) throws ApiException { + return deployAppWithHttpInfo(appId).getData(); + } + + /** + * Deploy App. + * + *

See {@link #deployAppWithHttpInfoAsync}. + * + * @param appId (required) + * @return CompletableFuture<DeployAppResponse> + */ + public CompletableFuture deployAppAsync(String appId) { + return deployAppWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deploy (publish) an app by ID + * + * @param appId (required) + * @return ApiResponse<DeployAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deployAppWithHttpInfo(String appId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deployApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling deployApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppDeploymentApi.deployApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Deploy App. + * + *

See {@link #deployAppWithHttpInfo}. + * + * @param appId (required) + * @return CompletableFuture<ApiResponse<DeployAppResponse>> + */ + public CompletableFuture> deployAppWithHttpInfoAsync( + String appId) { + // Check if unstable operation is enabled + String operationId = "deployApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling deployApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppDeploymentApi.deployApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Disable App. + * + *

See {@link #disableAppWithHttpInfo}. + * + * @param appId (required) + * @return DisableAppResponse + * @throws ApiException if fails to make API call + */ + public DisableAppResponse disableApp(String appId) throws ApiException { + return disableAppWithHttpInfo(appId).getData(); + } + + /** + * Disable App. + * + *

See {@link #disableAppWithHttpInfoAsync}. + * + * @param appId (required) + * @return CompletableFuture<DisableAppResponse> + */ + public CompletableFuture disableAppAsync(String appId) { + return disableAppWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Disable an app by ID + * + * @param appId (required) + * @return ApiResponse<DisableAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse disableAppWithHttpInfo(String appId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "disableApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling disableApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppDeploymentApi.disableApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Disable App. + * + *

See {@link #disableAppWithHttpInfo}. + * + * @param appId (required) + * @return CompletableFuture<ApiResponse<DisableAppResponse>> + */ + public CompletableFuture> disableAppWithHttpInfoAsync( + String appId) { + // Check if unstable operation is enabled + String operationId = "disableApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling disableApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppDeploymentApi.disableApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/AppsApi.java b/src/main/java/com/datadog/api/client/v2/api/AppsApi.java new file mode 100644 index 00000000000..66254d5a9d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/AppsApi.java @@ -0,0 +1,1143 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.AppsSortField; +import com.datadog.api.client.v2.model.CreateAppRequest; +import com.datadog.api.client.v2.model.CreateAppResponse; +import com.datadog.api.client.v2.model.DeleteAppResponse; +import com.datadog.api.client.v2.model.DeleteAppsRequest; +import com.datadog.api.client.v2.model.DeleteAppsResponse; +import com.datadog.api.client.v2.model.GetAppResponse; +import com.datadog.api.client.v2.model.ListAppsResponse; +import com.datadog.api.client.v2.model.UpdateAppRequest; +import com.datadog.api.client.v2.model.UpdateAppResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppsApi { + private ApiClient apiClient; + + public AppsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public AppsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create App. + * + *

See {@link #createAppWithHttpInfo}. + * + * @param body (required) + * @return CreateAppResponse + * @throws ApiException if fails to make API call + */ + public CreateAppResponse createApp(CreateAppRequest body) throws ApiException { + return createAppWithHttpInfo(body).getData(); + } + + /** + * Create App. + * + *

See {@link #createAppWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<CreateAppResponse> + */ + public CompletableFuture createAppAsync(CreateAppRequest body) { + return createAppWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new app, returning the app ID + * + * @param body (required) + * @return ApiResponse<CreateAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 App Created -
400 Bad Request -
403 Forbidden, e.g. missing required permissions to a connection or workflow used in the app -
429 Too many requests -
+ */ + public ApiResponse createAppWithHttpInfo(CreateAppRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling createApp"); + } + // create path and map variables + String localVarPath = "/api/v2/app-builder/apps"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.createApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create App. + * + *

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

See {@link #deleteAppWithHttpInfo}. + * + * @param appId (required) + * @return DeleteAppResponse + * @throws ApiException if fails to make API call + */ + public DeleteAppResponse deleteApp(String appId) throws ApiException { + return deleteAppWithHttpInfo(appId).getData(); + } + + /** + * Delete App. + * + *

See {@link #deleteAppWithHttpInfoAsync}. + * + * @param appId (required) + * @return CompletableFuture<DeleteAppResponse> + */ + public CompletableFuture deleteAppAsync(String appId) { + return deleteAppWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an app by ID + * + * @param appId (required) + * @return ApiResponse<DeleteAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
410 Gone -
429 Too many requests -
+ */ + public ApiResponse deleteAppWithHttpInfo(String appId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling deleteApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.deleteApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete App. + * + *

See {@link #deleteAppWithHttpInfo}. + * + * @param appId (required) + * @return CompletableFuture<ApiResponse<DeleteAppResponse>> + */ + public CompletableFuture> deleteAppWithHttpInfoAsync( + String appId) { + // Check if unstable operation is enabled + String operationId = "deleteApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling deleteApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.deleteApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete Multiple Apps. + * + *

See {@link #deleteAppsWithHttpInfo}. + * + * @param body (required) + * @return DeleteAppsResponse + * @throws ApiException if fails to make API call + */ + public DeleteAppsResponse deleteApps(DeleteAppsRequest body) throws ApiException { + return deleteAppsWithHttpInfo(body).getData(); + } + + /** + * Delete Multiple Apps. + * + *

See {@link #deleteAppsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<DeleteAppsResponse> + */ + public CompletableFuture deleteAppsAsync(DeleteAppsRequest body) { + return deleteAppsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete multiple apps by ID + * + * @param body (required) + * @return ApiResponse<DeleteAppsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden, e.g. missing permissions to delete one or more apps -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAppsWithHttpInfo(DeleteAppsRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteApps"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling deleteApps"); + } + // create path and map variables + String localVarPath = "/api/v2/app-builder/apps"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.deleteApps", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete Multiple Apps. + * + *

See {@link #deleteAppsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<DeleteAppsResponse>> + */ + public CompletableFuture> deleteAppsWithHttpInfoAsync( + DeleteAppsRequest body) { + // Check if unstable operation is enabled + String operationId = "deleteApps"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'body' when calling deleteApps")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/app-builder/apps"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.deleteApps", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get App. + * + *

See {@link #getAppWithHttpInfo}. + * + * @param appId (required) + * @return GetAppResponse + * @throws ApiException if fails to make API call + */ + public GetAppResponse getApp(String appId) throws ApiException { + return getAppWithHttpInfo(appId).getData(); + } + + /** + * Get App. + * + *

See {@link #getAppWithHttpInfoAsync}. + * + * @param appId (required) + * @return CompletableFuture<GetAppResponse> + */ + public CompletableFuture getAppAsync(String appId) { + return getAppWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the full definition of an app by ID + * + * @param appId (required) + * @return ApiResponse<GetAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getAppWithHttpInfo(String appId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling getApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.getApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get App. + * + *

See {@link #getAppWithHttpInfo}. + * + * @param appId (required) + * @return CompletableFuture<ApiResponse<GetAppResponse>> + */ + public CompletableFuture> getAppWithHttpInfoAsync(String appId) { + // Check if unstable operation is enabled + String operationId = "getApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling getApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.getApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listApps. */ + public static class ListAppsOptionalParameters { + private Long limit; + private Long page; + private String filterUserName; + private String filterUserUuid; + private String filterName; + private String filterQuery; + private Boolean filterDeployed; + private String filterTags; + private Boolean filterFavorite; + private List sort; + + /** + * Set limit. + * + * @param limit The number of apps to return per page (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set page. + * + * @param page The page number to return (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters page(Long page) { + this.page = page; + return this; + } + + /** + * Set filterUserName. + * + * @param filterUserName The AppsFilter user_name. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterUserName(String filterUserName) { + this.filterUserName = filterUserName; + return this; + } + + /** + * Set filterUserUuid. + * + * @param filterUserUuid The AppsFilter user_uuid. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterUserUuid(String filterUserUuid) { + this.filterUserUuid = filterUserUuid; + return this; + } + + /** + * Set filterName. + * + * @param filterName The AppsFilter name. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterQuery. + * + * @param filterQuery The AppsFilter query. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; + return this; + } + + /** + * Set filterDeployed. + * + * @param filterDeployed The AppsFilter deployed. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterDeployed(Boolean filterDeployed) { + this.filterDeployed = filterDeployed; + return this; + } + + /** + * Set filterTags. + * + * @param filterTags The AppsFilter tags. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterTags(String filterTags) { + this.filterTags = filterTags; + return this; + } + + /** + * Set filterFavorite. + * + * @param filterFavorite The AppsFilter favorite. (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterFavorite(Boolean filterFavorite) { + this.filterFavorite = filterFavorite; + return this; + } + + /** + * Set sort. + * + * @param sort (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters sort(List sort) { + this.sort = sort; + return this; + } + } + + /** + * List Apps. + * + *

See {@link #listAppsWithHttpInfo}. + * + * @return ListAppsResponse + * @throws ApiException if fails to make API call + */ + public ListAppsResponse listApps() throws ApiException { + return listAppsWithHttpInfo(new ListAppsOptionalParameters()).getData(); + } + + /** + * List Apps. + * + *

See {@link #listAppsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListAppsResponse> + */ + public CompletableFuture listAppsAsync() { + return listAppsWithHttpInfoAsync(new ListAppsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List Apps. + * + *

See {@link #listAppsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListAppsResponse + * @throws ApiException if fails to make API call + */ + public ListAppsResponse listApps(ListAppsOptionalParameters parameters) throws ApiException { + return listAppsWithHttpInfo(parameters).getData(); + } + + /** + * List Apps. + * + *

See {@link #listAppsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListAppsResponse> + */ + public CompletableFuture listAppsAsync(ListAppsOptionalParameters parameters) { + return listAppsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all apps, with optional filters and sorting + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListAppsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request, e.g. invalid sort parameter -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listAppsWithHttpInfo(ListAppsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listApps"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long limit = parameters.limit; + Long page = parameters.page; + String filterUserName = parameters.filterUserName; + String filterUserUuid = parameters.filterUserUuid; + String filterName = parameters.filterName; + String filterQuery = parameters.filterQuery; + Boolean filterDeployed = parameters.filterDeployed; + String filterTags = parameters.filterTags; + Boolean filterFavorite = parameters.filterFavorite; + List sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/app-builder/apps"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[user_name]", filterUserName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[user_uuid]", filterUserUuid)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[deployed]", filterDeployed)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[favorite]", filterFavorite)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "sort", sort)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.listApps", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Apps. + * + *

See {@link #listAppsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListAppsResponse>> + */ + public CompletableFuture> listAppsWithHttpInfoAsync( + ListAppsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listApps"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long limit = parameters.limit; + Long page = parameters.page; + String filterUserName = parameters.filterUserName; + String filterUserUuid = parameters.filterUserUuid; + String filterName = parameters.filterName; + String filterQuery = parameters.filterQuery; + Boolean filterDeployed = parameters.filterDeployed; + String filterTags = parameters.filterTags; + Boolean filterFavorite = parameters.filterFavorite; + List sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/app-builder/apps"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[user_name]", filterUserName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[user_uuid]", filterUserUuid)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[deployed]", filterDeployed)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[favorite]", filterFavorite)); + localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "sort", sort)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.listApps", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update App. + * + *

See {@link #updateAppWithHttpInfo}. + * + * @param appId (required) + * @param body (required) + * @return UpdateAppResponse + * @throws ApiException if fails to make API call + */ + public UpdateAppResponse updateApp(String appId, UpdateAppRequest body) throws ApiException { + return updateAppWithHttpInfo(appId, body).getData(); + } + + /** + * Update App. + * + *

See {@link #updateAppWithHttpInfoAsync}. + * + * @param appId (required) + * @param body (required) + * @return CompletableFuture<UpdateAppResponse> + */ + public CompletableFuture updateAppAsync(String appId, UpdateAppRequest body) { + return updateAppWithHttpInfoAsync(appId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing app by ID. Creates a new version of the app + * + * @param appId (required) + * @param body (required) + * @return ApiResponse<UpdateAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden, e.g. missing required permissions to a connection or workflow used in the app -
429 Too many requests -
+ */ + public ApiResponse updateAppWithHttpInfo(String appId, UpdateAppRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling updateApp"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling updateApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.updateApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update App. + * + *

See {@link #updateAppWithHttpInfo}. + * + * @param appId (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<UpdateAppResponse>> + */ + public CompletableFuture> updateAppWithHttpInfoAsync( + String appId, UpdateAppRequest body) { + // Check if unstable operation is enabled + String operationId = "updateApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling updateApp")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'body' when calling updateApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.updateApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java new file mode 100644 index 00000000000..25d780d1bd1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of AppBuilderError object. */ +@JsonPropertyOrder({AppBuilderError.JSON_PROPERTY_ERRORS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppBuilderError { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = null; + + public AppBuilderError errors(List errors) { + this.errors = errors; + for (AppBuilderErrorErrorsItems item : errors) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AppBuilderError addErrorsItem(AppBuilderErrorErrorsItems errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + this.unparsed |= errorsItem.unparsed; + return this; + } + + /** + * The AppBuilderError errors. + * + * @return errors + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AppBuilderError + */ + @JsonAnySetter + public AppBuilderError putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AppBuilderError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppBuilderError appBuilderError = (AppBuilderError) o; + return Objects.equals(this.errors, appBuilderError.errors) + && Objects.equals(this.additionalProperties, appBuilderError.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppBuilderError {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java new file mode 100644 index 00000000000..12b4902a353 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of AppBuilderErrorErrorsItems object. */ +@JsonPropertyOrder({ + AppBuilderErrorErrorsItems.JSON_PROPERTY_DETAIL, + AppBuilderErrorErrorsItems.JSON_PROPERTY_SOURCE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppBuilderErrorErrorsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DETAIL = "detail"; + private String detail; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private AppBuilderErrorErrorsItemsSource source; + + public AppBuilderErrorErrorsItems detail(String detail) { + this.detail = detail; + return this; + } + + /** + * The items detail. + * + * @return detail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail; + } + + public AppBuilderErrorErrorsItems source(AppBuilderErrorErrorsItemsSource source) { + this.source = source; + this.unparsed |= source.unparsed; + return this; + } + + /** + * The definition of AppBuilderErrorErrorsItemsSource object. + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AppBuilderErrorErrorsItemsSource getSource() { + return source; + } + + public void setSource(AppBuilderErrorErrorsItemsSource source) { + this.source = source; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AppBuilderErrorErrorsItems + */ + @JsonAnySetter + public AppBuilderErrorErrorsItems putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AppBuilderErrorErrorsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppBuilderErrorErrorsItems appBuilderErrorErrorsItems = (AppBuilderErrorErrorsItems) o; + return Objects.equals(this.detail, appBuilderErrorErrorsItems.detail) + && Objects.equals(this.source, appBuilderErrorErrorsItems.source) + && Objects.equals( + this.additionalProperties, appBuilderErrorErrorsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(detail, source, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppBuilderErrorErrorsItems {\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java new file mode 100644 index 00000000000..67ab1bab029 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of AppBuilderErrorErrorsItemsSource object. */ +@JsonPropertyOrder({ + AppBuilderErrorErrorsItemsSource.JSON_PROPERTY_PARAMETER, + AppBuilderErrorErrorsItemsSource.JSON_PROPERTY_POINTER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppBuilderErrorErrorsItemsSource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PARAMETER = "parameter"; + private String parameter; + + public static final String JSON_PROPERTY_POINTER = "pointer"; + private String pointer; + + public AppBuilderErrorErrorsItemsSource parameter(String parameter) { + this.parameter = parameter; + return this; + } + + /** + * The source parameter. + * + * @return parameter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARAMETER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParameter() { + return parameter; + } + + public void setParameter(String parameter) { + this.parameter = parameter; + } + + public AppBuilderErrorErrorsItemsSource pointer(String pointer) { + this.pointer = pointer; + return this; + } + + /** + * The source pointer. + * + * @return pointer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POINTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPointer() { + return pointer; + } + + public void setPointer(String pointer) { + this.pointer = pointer; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AppBuilderErrorErrorsItemsSource + */ + @JsonAnySetter + public AppBuilderErrorErrorsItemsSource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AppBuilderErrorErrorsItemsSource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppBuilderErrorErrorsItemsSource appBuilderErrorErrorsItemsSource = + (AppBuilderErrorErrorsItemsSource) o; + return Objects.equals(this.parameter, appBuilderErrorErrorsItemsSource.parameter) + && Objects.equals(this.pointer, appBuilderErrorErrorsItemsSource.pointer) + && Objects.equals( + this.additionalProperties, appBuilderErrorErrorsItemsSource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(parameter, pointer, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppBuilderErrorErrorsItemsSource {\n"); + sb.append(" parameter: ").append(toIndentedString(parameter)).append("\n"); + sb.append(" pointer: ").append(toIndentedString(pointer)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderEvent.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderEvent.java new file mode 100644 index 00000000000..98eb2db281c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderEvent.java @@ -0,0 +1,169 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of AppBuilderEvent object. */ +@JsonPropertyOrder({AppBuilderEvent.JSON_PROPERTY_NAME, AppBuilderEvent.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppBuilderEvent { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private AppBuilderEventName name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AppBuilderEventType type; + + public AppBuilderEvent name(AppBuilderEventName name) { + this.name = name; + this.unparsed |= !name.isValid(); + return this; + } + + /** + * The triggering action for the event. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AppBuilderEventName getName() { + return name; + } + + public void setName(AppBuilderEventName name) { + if (!name.isValid()) { + this.unparsed = true; + } + this.name = name; + } + + public AppBuilderEvent type(AppBuilderEventType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The response to the event. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AppBuilderEventType getType() { + return type; + } + + public void setType(AppBuilderEventType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AppBuilderEvent + */ + @JsonAnySetter + public AppBuilderEvent putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AppBuilderEvent object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppBuilderEvent appBuilderEvent = (AppBuilderEvent) o; + return Objects.equals(this.name, appBuilderEvent.name) + && Objects.equals(this.type, appBuilderEvent.type) + && Objects.equals(this.additionalProperties, appBuilderEvent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppBuilderEvent {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderEventName.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderEventName.java new file mode 100644 index 00000000000..392389402c8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderEventName.java @@ -0,0 +1,77 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The triggering action for the event. */ +@JsonSerialize(using = AppBuilderEventName.AppBuilderEventNameSerializer.class) +public class AppBuilderEventName extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "pageChange", + "tableRowClick", + "_tableRowButtonClick", + "change", + "submit", + "click", + "toggleOpen", + "close", + "open", + "executionFinished")); + + public static final AppBuilderEventName PAGECHANGE = new AppBuilderEventName("pageChange"); + public static final AppBuilderEventName TABLEROWCLICK = new AppBuilderEventName("tableRowClick"); + public static final AppBuilderEventName TABLEROWBUTTONCLICK = + new AppBuilderEventName("_tableRowButtonClick"); + public static final AppBuilderEventName CHANGE = new AppBuilderEventName("change"); + public static final AppBuilderEventName SUBMIT = new AppBuilderEventName("submit"); + public static final AppBuilderEventName CLICK = new AppBuilderEventName("click"); + public static final AppBuilderEventName TOGGLEOPEN = new AppBuilderEventName("toggleOpen"); + public static final AppBuilderEventName CLOSE = new AppBuilderEventName("close"); + public static final AppBuilderEventName OPEN = new AppBuilderEventName("open"); + public static final AppBuilderEventName EXECUTIONFINISHED = + new AppBuilderEventName("executionFinished"); + + AppBuilderEventName(String value) { + super(value, allowedValues); + } + + public static class AppBuilderEventNameSerializer extends StdSerializer { + public AppBuilderEventNameSerializer(Class t) { + super(t); + } + + public AppBuilderEventNameSerializer() { + this(null); + } + + @Override + public void serialize( + AppBuilderEventName value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AppBuilderEventName fromValue(String value) { + return new AppBuilderEventName(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderEventType.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderEventType.java new file mode 100644 index 00000000000..fc57ebb88de --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderEventType.java @@ -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. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The response to the event. */ +@JsonSerialize(using = AppBuilderEventType.AppBuilderEventTypeSerializer.class) +public class AppBuilderEventType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "custom", + "setComponentState", + "triggerQuery", + "openModal", + "closeModal", + "openUrl", + "downloadFile", + "setStateVariableValue")); + + public static final AppBuilderEventType CUSTOM = new AppBuilderEventType("custom"); + public static final AppBuilderEventType SETCOMPONENTSTATE = + new AppBuilderEventType("setComponentState"); + public static final AppBuilderEventType TRIGGERQUERY = new AppBuilderEventType("triggerQuery"); + public static final AppBuilderEventType OPENMODAL = new AppBuilderEventType("openModal"); + public static final AppBuilderEventType CLOSEMODAL = new AppBuilderEventType("closeModal"); + public static final AppBuilderEventType OPENURL = new AppBuilderEventType("openUrl"); + public static final AppBuilderEventType DOWNLOADFILE = new AppBuilderEventType("downloadFile"); + public static final AppBuilderEventType SETSTATEVARIABLEVALUE = + new AppBuilderEventType("setStateVariableValue"); + + AppBuilderEventType(String value) { + super(value, allowedValues); + } + + public static class AppBuilderEventTypeSerializer extends StdSerializer { + public AppBuilderEventTypeSerializer(Class t) { + super(t); + } + + public AppBuilderEventTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AppBuilderEventType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AppBuilderEventType fromValue(String value) { + return new AppBuilderEventType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppMeta.java b/src/main/java/com/datadog/api/client/v2/model/AppMeta.java new file mode 100644 index 00000000000..4909cc3a440 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppMeta.java @@ -0,0 +1,393 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of AppMeta object. */ +@JsonPropertyOrder({ + AppMeta.JSON_PROPERTY_CREATED_AT, + AppMeta.JSON_PROPERTY_DELETED_AT, + AppMeta.JSON_PROPERTY_ORG_ID, + AppMeta.JSON_PROPERTY_RUN_AS_USER, + AppMeta.JSON_PROPERTY_UPDATED_AT, + AppMeta.JSON_PROPERTY_UPDATED_SINCE_DEPLOYMENT, + AppMeta.JSON_PROPERTY_USER_ID, + AppMeta.JSON_PROPERTY_USER_NAME, + AppMeta.JSON_PROPERTY_USER_UUID, + AppMeta.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private String deletedAt; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_RUN_AS_USER = "run_as_user"; + private String runAsUser; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_UPDATED_SINCE_DEPLOYMENT = "updated_since_deployment"; + private Boolean updatedSinceDeployment; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private Long userId; + + public static final String JSON_PROPERTY_USER_NAME = "user_name"; + private String userName; + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private String userUuid; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public AppMeta createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The AppMeta created_at. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public AppMeta deletedAt(String deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + /** + * The AppMeta deleted_at. + * + * @return deletedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeletedAt() { + return deletedAt; + } + + public void setDeletedAt(String deletedAt) { + this.deletedAt = deletedAt; + } + + public AppMeta orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * The AppMeta org_id. + * + * @return orgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public AppMeta runAsUser(String runAsUser) { + this.runAsUser = runAsUser; + return this; + } + + /** + * The AppMeta run_as_user. + * + * @return runAsUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_AS_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRunAsUser() { + return runAsUser; + } + + public void setRunAsUser(String runAsUser) { + this.runAsUser = runAsUser; + } + + public AppMeta updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The AppMeta updated_at. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + public AppMeta updatedSinceDeployment(Boolean updatedSinceDeployment) { + this.updatedSinceDeployment = updatedSinceDeployment; + return this; + } + + /** + * The AppMeta updated_since_deployment. + * + * @return updatedSinceDeployment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_SINCE_DEPLOYMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUpdatedSinceDeployment() { + return updatedSinceDeployment; + } + + public void setUpdatedSinceDeployment(Boolean updatedSinceDeployment) { + this.updatedSinceDeployment = updatedSinceDeployment; + } + + public AppMeta userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * The AppMeta user_id. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public AppMeta userName(String userName) { + this.userName = userName; + return this; + } + + /** + * The AppMeta user_name. + * + * @return userName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public AppMeta userUuid(String userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * The AppMeta user_uuid. + * + * @return userUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserUuid() { + return userUuid; + } + + public void setUserUuid(String userUuid) { + this.userUuid = userUuid; + } + + public AppMeta version(Long version) { + this.version = version; + return this; + } + + /** + * The AppMeta version. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AppMeta + */ + @JsonAnySetter + public AppMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AppMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppMeta appMeta = (AppMeta) o; + return Objects.equals(this.createdAt, appMeta.createdAt) + && Objects.equals(this.deletedAt, appMeta.deletedAt) + && Objects.equals(this.orgId, appMeta.orgId) + && Objects.equals(this.runAsUser, appMeta.runAsUser) + && Objects.equals(this.updatedAt, appMeta.updatedAt) + && Objects.equals(this.updatedSinceDeployment, appMeta.updatedSinceDeployment) + && Objects.equals(this.userId, appMeta.userId) + && Objects.equals(this.userName, appMeta.userName) + && Objects.equals(this.userUuid, appMeta.userUuid) + && Objects.equals(this.version, appMeta.version) + && Objects.equals(this.additionalProperties, appMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + deletedAt, + orgId, + runAsUser, + updatedAt, + updatedSinceDeployment, + userId, + userName, + userUuid, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppMeta {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" runAsUser: ").append(toIndentedString(runAsUser)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedSinceDeployment: ") + .append(toIndentedString(updatedSinceDeployment)) + .append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" userUuid: ").append(toIndentedString(userUuid)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppsSortField.java b/src/main/java/com/datadog/api/client/v2/model/AppsSortField.java new file mode 100644 index 00000000000..570991f3674 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppsSortField.java @@ -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. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The field and direction to sort apps by */ +@JsonSerialize(using = AppsSortField.AppsSortFieldSerializer.class) +public class AppsSortField extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "name", + "created_at", + "updated_at", + "user_name", + "-name", + "-created_at", + "-updated_at", + "-user_name")); + + public static final AppsSortField NAME = new AppsSortField("name"); + public static final AppsSortField CREATED_AT = new AppsSortField("created_at"); + public static final AppsSortField UPDATED_AT = new AppsSortField("updated_at"); + public static final AppsSortField USER_NAME = new AppsSortField("user_name"); + public static final AppsSortField NAME_DESC = new AppsSortField("-name"); + public static final AppsSortField CREATED_AT_DESC = new AppsSortField("-created_at"); + public static final AppsSortField UPDATED_AT_DESC = new AppsSortField("-updated_at"); + public static final AppsSortField USER_NAME_DESC = new AppsSortField("-user_name"); + + AppsSortField(String value) { + super(value, allowedValues); + } + + public static class AppsSortFieldSerializer extends StdSerializer { + public AppsSortFieldSerializer(Class t) { + super(t); + } + + public AppsSortFieldSerializer() { + this(null); + } + + @Override + public void serialize(AppsSortField value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AppsSortField fromValue(String value) { + return new AppsSortField(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/Component.java b/src/main/java/com/datadog/api/client/v2/model/Component.java new file mode 100644 index 00000000000..debd0e273c5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/Component.java @@ -0,0 +1,288 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of Component object. */ +@JsonPropertyOrder({ + Component.JSON_PROPERTY_EVENTS, + Component.JSON_PROPERTY_ID, + Component.JSON_PROPERTY_NAME, + Component.JSON_PROPERTY_PROPERTIES, + Component.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class Component { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = null; + + public static final String JSON_PROPERTY_ID = "id"; + private JsonNullable id = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROPERTIES = "properties"; + private ComponentProperties properties; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ComponentType type; + + public Component() {} + + @JsonCreator + public Component( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PROPERTIES) + ComponentProperties properties, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ComponentType type) { + this.name = name; + this.properties = properties; + this.unparsed |= properties.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public Component events(List events) { + this.events = events; + for (AppBuilderEvent item : events) { + this.unparsed |= item.unparsed; + } + return this; + } + + public Component addEventsItem(AppBuilderEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + this.unparsed |= eventsItem.unparsed; + return this; + } + + /** + * The Component events. + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + public Component id(String id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * The Component id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getId_JsonNullable() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + public void setId_JsonNullable(JsonNullable id) { + this.id = id; + } + + public void setId(String id) { + this.id = JsonNullable.of(id); + } + + public Component name(String name) { + this.name = name; + return this; + } + + /** + * The Component name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Component properties(ComponentProperties properties) { + this.properties = properties; + this.unparsed |= properties.unparsed; + return this; + } + + /** + * The definition of ComponentProperties object. + * + * @return properties + */ + @JsonProperty(JSON_PROPERTY_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ComponentProperties getProperties() { + return properties; + } + + public void setProperties(ComponentProperties properties) { + this.properties = properties; + } + + public Component type(ComponentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The definition of ComponentType object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ComponentType getType() { + return type; + } + + public void setType(ComponentType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return Component + */ + @JsonAnySetter + public Component putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this Component object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Component component = (Component) o; + return Objects.equals(this.events, component.events) + && Objects.equals(this.id, component.id) + && Objects.equals(this.name, component.name) + && Objects.equals(this.properties, component.properties) + && Objects.equals(this.type, component.type) + && Objects.equals(this.additionalProperties, component.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(events, id, name, properties, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Component {\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentGrid.java b/src/main/java/com/datadog/api/client/v2/model/ComponentGrid.java new file mode 100644 index 00000000000..2e8c1e91dd3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentGrid.java @@ -0,0 +1,277 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ComponentGrid object. */ +@JsonPropertyOrder({ + ComponentGrid.JSON_PROPERTY_EVENTS, + ComponentGrid.JSON_PROPERTY_ID, + ComponentGrid.JSON_PROPERTY_NAME, + ComponentGrid.JSON_PROPERTY_PROPERTIES, + ComponentGrid.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ComponentGrid { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = null; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROPERTIES = "properties"; + private ComponentGridProperties properties; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ComponentGridType type; + + public ComponentGrid() {} + + @JsonCreator + public ComponentGrid( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PROPERTIES) + ComponentGridProperties properties, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ComponentGridType type) { + this.name = name; + this.properties = properties; + this.unparsed |= properties.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ComponentGrid events(List events) { + this.events = events; + for (AppBuilderEvent item : events) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ComponentGrid addEventsItem(AppBuilderEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + this.unparsed |= eventsItem.unparsed; + return this; + } + + /** + * The ComponentGrid events. + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + public ComponentGrid id(String id) { + this.id = id; + return this; + } + + /** + * The ComponentGrid id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ComponentGrid name(String name) { + this.name = name; + return this; + } + + /** + * The ComponentGrid name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ComponentGrid properties(ComponentGridProperties properties) { + this.properties = properties; + this.unparsed |= properties.unparsed; + return this; + } + + /** + * The definition of ComponentGridProperties object. + * + * @return properties + */ + @JsonProperty(JSON_PROPERTY_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ComponentGridProperties getProperties() { + return properties; + } + + public void setProperties(ComponentGridProperties properties) { + this.properties = properties; + } + + public ComponentGrid type(ComponentGridType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The definition of ComponentGridType object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ComponentGridType getType() { + return type; + } + + public void setType(ComponentGridType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ComponentGrid + */ + @JsonAnySetter + public ComponentGrid putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ComponentGrid object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComponentGrid componentGrid = (ComponentGrid) o; + return Objects.equals(this.events, componentGrid.events) + && Objects.equals(this.id, componentGrid.id) + && Objects.equals(this.name, componentGrid.name) + && Objects.equals(this.properties, componentGrid.properties) + && Objects.equals(this.type, componentGrid.type) + && Objects.equals(this.additionalProperties, componentGrid.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(events, id, name, properties, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ComponentGrid {\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentGridProperties.java b/src/main/java/com/datadog/api/client/v2/model/ComponentGridProperties.java new file mode 100644 index 00000000000..111e2484083 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentGridProperties.java @@ -0,0 +1,206 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ComponentGridProperties object. */ +@JsonPropertyOrder({ + ComponentGridProperties.JSON_PROPERTY_BACKGROUND_COLOR, + ComponentGridProperties.JSON_PROPERTY_CHILDREN, + ComponentGridProperties.JSON_PROPERTY_IS_VISIBLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ComponentGridProperties { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BACKGROUND_COLOR = "backgroundColor"; + private String backgroundColor = "default"; + + public static final String JSON_PROPERTY_CHILDREN = "children"; + private List children = null; + + public static final String JSON_PROPERTY_IS_VISIBLE = "isVisible"; + private ComponentGridPropertiesIsVisible isVisible; + + public ComponentGridProperties backgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** + * The ComponentGridProperties backgroundColor. + * + * @return backgroundColor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BACKGROUND_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBackgroundColor() { + return backgroundColor; + } + + public void setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + } + + public ComponentGridProperties children(List children) { + this.children = children; + for (Component item : children) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ComponentGridProperties addChildrenItem(Component childrenItem) { + if (this.children == null) { + this.children = new ArrayList<>(); + } + this.children.add(childrenItem); + this.unparsed |= childrenItem.unparsed; + return this; + } + + /** + * The ComponentGridProperties children. + * + * @return children + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + public ComponentGridProperties isVisible(ComponentGridPropertiesIsVisible isVisible) { + this.isVisible = isVisible; + this.unparsed |= isVisible.unparsed; + return this; + } + + /** + * The definition of ComponentGridPropertiesIsVisible object. + * + * @return isVisible + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_VISIBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ComponentGridPropertiesIsVisible getIsVisible() { + return isVisible; + } + + public void setIsVisible(ComponentGridPropertiesIsVisible isVisible) { + this.isVisible = isVisible; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ComponentGridProperties + */ + @JsonAnySetter + public ComponentGridProperties putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ComponentGridProperties object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComponentGridProperties componentGridProperties = (ComponentGridProperties) o; + return Objects.equals(this.backgroundColor, componentGridProperties.backgroundColor) + && Objects.equals(this.children, componentGridProperties.children) + && Objects.equals(this.isVisible, componentGridProperties.isVisible) + && Objects.equals(this.additionalProperties, componentGridProperties.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(backgroundColor, children, isVisible, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ComponentGridProperties {\n"); + sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n"); + sb.append(" children: ").append(toIndentedString(children)).append("\n"); + sb.append(" isVisible: ").append(toIndentedString(isVisible)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentGridPropertiesIsVisible.java b/src/main/java/com/datadog/api/client/v2/model/ComponentGridPropertiesIsVisible.java new file mode 100644 index 00000000000..770a1706fbf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentGridPropertiesIsVisible.java @@ -0,0 +1,276 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = ComponentGridPropertiesIsVisible.ComponentGridPropertiesIsVisibleDeserializer.class) +@JsonSerialize( + using = ComponentGridPropertiesIsVisible.ComponentGridPropertiesIsVisibleSerializer.class) +public class ComponentGridPropertiesIsVisible extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ComponentGridPropertiesIsVisible.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ComponentGridPropertiesIsVisibleSerializer + extends StdSerializer { + public ComponentGridPropertiesIsVisibleSerializer(Class t) { + super(t); + } + + public ComponentGridPropertiesIsVisibleSerializer() { + this(null); + } + + @Override + public void serialize( + ComponentGridPropertiesIsVisible value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ComponentGridPropertiesIsVisibleDeserializer + extends StdDeserializer { + public ComponentGridPropertiesIsVisibleDeserializer() { + this(ComponentGridPropertiesIsVisible.class); + } + + public ComponentGridPropertiesIsVisibleDeserializer(Class vc) { + super(vc); + } + + @Override + public ComponentGridPropertiesIsVisible deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) + || String.class.equals(Long.class) + || String.class.equals(Float.class) + || String.class.equals(Double.class) + || String.class.equals(Boolean.class) + || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((String.class.equals(Integer.class) || String.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((String.class.equals(Float.class) || String.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (String.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize Boolean + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Boolean.class.equals(Integer.class) + || Boolean.class.equals(Long.class) + || Boolean.class.equals(Float.class) + || Boolean.class.equals(Double.class) + || Boolean.class.equals(Boolean.class) + || Boolean.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (Boolean.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Boolean'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); + } + + ComponentGridPropertiesIsVisible ret = new ComponentGridPropertiesIsVisible(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ComponentGridPropertiesIsVisible getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ComponentGridPropertiesIsVisible cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ComponentGridPropertiesIsVisible() { + super("oneOf", Boolean.FALSE); + } + + public ComponentGridPropertiesIsVisible(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ComponentGridPropertiesIsVisible(Boolean o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("String", new GenericType() {}); + schemas.put("Boolean", new GenericType() {}); + JSON.registerDescendants( + ComponentGridPropertiesIsVisible.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ComponentGridPropertiesIsVisible.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: String, Boolean + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Boolean.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be String, Boolean"); + } + + /** + * Get the actual instance, which can be the following: String, Boolean + * + * @return The actual instance (String, Boolean) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Boolean` + * @throws ClassCastException if the instance is not `Boolean` + */ + public Boolean getBoolean() throws ClassCastException { + return (Boolean) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentGridType.java b/src/main/java/com/datadog/api/client/v2/model/ComponentGridType.java new file mode 100644 index 00000000000..e469df77806 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentGridType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The definition of ComponentGridType object. */ +@JsonSerialize(using = ComponentGridType.ComponentGridTypeSerializer.class) +public class ComponentGridType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("grid")); + + public static final ComponentGridType GRID = new ComponentGridType("grid"); + + ComponentGridType(String value) { + super(value, allowedValues); + } + + public static class ComponentGridTypeSerializer extends StdSerializer { + public ComponentGridTypeSerializer(Class t) { + super(t); + } + + public ComponentGridTypeSerializer() { + this(null); + } + + @Override + public void serialize(ComponentGridType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ComponentGridType fromValue(String value) { + return new ComponentGridType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentProperties.java b/src/main/java/com/datadog/api/client/v2/model/ComponentProperties.java new file mode 100644 index 00000000000..29670fc8e6c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentProperties.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ComponentProperties object. */ +@JsonPropertyOrder({ + ComponentProperties.JSON_PROPERTY_CHILDREN, + ComponentProperties.JSON_PROPERTY_IS_VISIBLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ComponentProperties { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHILDREN = "children"; + private List children = null; + + public static final String JSON_PROPERTY_IS_VISIBLE = "isVisible"; + private ComponentPropertiesIsVisible isVisible; + + public ComponentProperties children(List children) { + this.children = children; + for (Component item : children) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ComponentProperties addChildrenItem(Component childrenItem) { + if (this.children == null) { + this.children = new ArrayList<>(); + } + this.children.add(childrenItem); + this.unparsed |= childrenItem.unparsed; + return this; + } + + /** + * The ComponentProperties children. + * + * @return children + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHILDREN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + public ComponentProperties isVisible(ComponentPropertiesIsVisible isVisible) { + this.isVisible = isVisible; + this.unparsed |= isVisible.unparsed; + return this; + } + + /** + * The definition of ComponentPropertiesIsVisible object. + * + * @return isVisible + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_VISIBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ComponentPropertiesIsVisible getIsVisible() { + return isVisible; + } + + public void setIsVisible(ComponentPropertiesIsVisible isVisible) { + this.isVisible = isVisible; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ComponentProperties + */ + @JsonAnySetter + public ComponentProperties putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ComponentProperties object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ComponentProperties componentProperties = (ComponentProperties) o; + return Objects.equals(this.children, componentProperties.children) + && Objects.equals(this.isVisible, componentProperties.isVisible) + && Objects.equals(this.additionalProperties, componentProperties.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(children, isVisible, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ComponentProperties {\n"); + sb.append(" children: ").append(toIndentedString(children)).append("\n"); + sb.append(" isVisible: ").append(toIndentedString(isVisible)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentPropertiesIsVisible.java b/src/main/java/com/datadog/api/client/v2/model/ComponentPropertiesIsVisible.java new file mode 100644 index 00000000000..322906268a4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentPropertiesIsVisible.java @@ -0,0 +1,274 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = ComponentPropertiesIsVisible.ComponentPropertiesIsVisibleDeserializer.class) +@JsonSerialize(using = ComponentPropertiesIsVisible.ComponentPropertiesIsVisibleSerializer.class) +public class ComponentPropertiesIsVisible extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ComponentPropertiesIsVisible.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ComponentPropertiesIsVisibleSerializer + extends StdSerializer { + public ComponentPropertiesIsVisibleSerializer(Class t) { + super(t); + } + + public ComponentPropertiesIsVisibleSerializer() { + this(null); + } + + @Override + public void serialize( + ComponentPropertiesIsVisible value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ComponentPropertiesIsVisibleDeserializer + extends StdDeserializer { + public ComponentPropertiesIsVisibleDeserializer() { + this(ComponentPropertiesIsVisible.class); + } + + public ComponentPropertiesIsVisibleDeserializer(Class vc) { + super(vc); + } + + @Override + public ComponentPropertiesIsVisible deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize Boolean + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Boolean.class.equals(Integer.class) + || Boolean.class.equals(Long.class) + || Boolean.class.equals(Float.class) + || Boolean.class.equals(Double.class) + || Boolean.class.equals(Boolean.class) + || Boolean.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((Boolean.class.equals(Integer.class) || Boolean.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((Boolean.class.equals(Float.class) || Boolean.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (Boolean.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (Boolean.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Boolean.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Boolean'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Boolean'", e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) + || String.class.equals(Long.class) + || String.class.equals(Float.class) + || String.class.equals(Double.class) + || String.class.equals(Boolean.class) + || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((String.class.equals(Integer.class) || String.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((String.class.equals(Float.class) || String.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (String.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + ComponentPropertiesIsVisible ret = new ComponentPropertiesIsVisible(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ComponentPropertiesIsVisible getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ComponentPropertiesIsVisible cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ComponentPropertiesIsVisible() { + super("oneOf", Boolean.FALSE); + } + + public ComponentPropertiesIsVisible(Boolean o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ComponentPropertiesIsVisible(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Boolean", new GenericType() {}); + schemas.put("String", new GenericType() {}); + JSON.registerDescendants( + ComponentPropertiesIsVisible.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ComponentPropertiesIsVisible.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Boolean, String + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(Boolean.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be Boolean, String"); + } + + /** + * Get the actual instance, which can be the following: Boolean, String + * + * @return The actual instance (Boolean, String) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Boolean`. If the actual instance is not `Boolean`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `Boolean` + * @throws ClassCastException if the instance is not `Boolean` + */ + public Boolean getBoolean() throws ClassCastException { + return (Boolean) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ComponentType.java b/src/main/java/com/datadog/api/client/v2/model/ComponentType.java new file mode 100644 index 00000000000..c29c3223c05 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ComponentType.java @@ -0,0 +1,94 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The definition of ComponentType object. */ +@JsonSerialize(using = ComponentType.ComponentTypeSerializer.class) +public class ComponentType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "table", + "textInput", + "textArea", + "button", + "text", + "select", + "modal", + "schemaForm", + "checkbox", + "tabs", + "vegaChart", + "radioButtons", + "numberInput", + "fileInput", + "jsonInput", + "gridCell", + "dateRangePicker", + "search", + "container", + "calloutValue")); + + public static final ComponentType TABLE = new ComponentType("table"); + public static final ComponentType TEXTINPUT = new ComponentType("textInput"); + public static final ComponentType TEXTAREA = new ComponentType("textArea"); + public static final ComponentType BUTTON = new ComponentType("button"); + public static final ComponentType TEXT = new ComponentType("text"); + public static final ComponentType SELECT = new ComponentType("select"); + public static final ComponentType MODAL = new ComponentType("modal"); + public static final ComponentType SCHEMAFORM = new ComponentType("schemaForm"); + public static final ComponentType CHECKBOX = new ComponentType("checkbox"); + public static final ComponentType TABS = new ComponentType("tabs"); + public static final ComponentType VEGACHART = new ComponentType("vegaChart"); + public static final ComponentType RADIOBUTTONS = new ComponentType("radioButtons"); + public static final ComponentType NUMBERINPUT = new ComponentType("numberInput"); + public static final ComponentType FILEINPUT = new ComponentType("fileInput"); + public static final ComponentType JSONINPUT = new ComponentType("jsonInput"); + public static final ComponentType GRIDCELL = new ComponentType("gridCell"); + public static final ComponentType DATERANGEPICKER = new ComponentType("dateRangePicker"); + public static final ComponentType SEARCH = new ComponentType("search"); + public static final ComponentType CONTAINER = new ComponentType("container"); + public static final ComponentType CALLOUTVALUE = new ComponentType("calloutValue"); + + ComponentType(String value) { + super(value, allowedValues); + } + + public static class ComponentTypeSerializer extends StdSerializer { + public ComponentTypeSerializer(Class t) { + super(t); + } + + public ComponentTypeSerializer() { + this(null); + } + + @Override + public void serialize(ComponentType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ComponentType fromValue(String value) { + return new ComponentType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateAppRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateAppRequest.java new file mode 100644 index 00000000000..dee6d8896e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateAppRequest.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateAppRequest object. */ +@JsonPropertyOrder({CreateAppRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateAppRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateAppRequestData data; + + public CreateAppRequest data(CreateAppRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of CreateAppRequestData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateAppRequestData getData() { + return data; + } + + public void setData(CreateAppRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateAppRequest + */ + @JsonAnySetter + public CreateAppRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateAppRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAppRequest createAppRequest = (CreateAppRequest) o; + return Objects.equals(this.data, createAppRequest.data) + && Objects.equals(this.additionalProperties, createAppRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAppRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateAppRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateAppRequestData.java new file mode 100644 index 00000000000..e464271eed5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateAppRequestData.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateAppRequestData object. */ +@JsonPropertyOrder({ + CreateAppRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateAppRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateAppRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateAppRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateAppRequestDataType type = CreateAppRequestDataType.APPDEFINITIONS; + + public CreateAppRequestData() {} + + @JsonCreator + public CreateAppRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CreateAppRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateAppRequestData attributes(CreateAppRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of CreateAppRequestDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateAppRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateAppRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateAppRequestData type(CreateAppRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The definition of CreateAppRequestDataType object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateAppRequestDataType getType() { + return type; + } + + public void setType(CreateAppRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateAppRequestData + */ + @JsonAnySetter + public CreateAppRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateAppRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAppRequestData createAppRequestData = (CreateAppRequestData) o; + return Objects.equals(this.attributes, createAppRequestData.attributes) + && Objects.equals(this.type, createAppRequestData.type) + && Objects.equals(this.additionalProperties, createAppRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAppRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateAppRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateAppRequestDataAttributes.java new file mode 100644 index 00000000000..2d2990a1eda --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateAppRequestDataAttributes.java @@ -0,0 +1,384 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateAppRequestDataAttributes object. */ +@JsonPropertyOrder({ + CreateAppRequestDataAttributes.JSON_PROPERTY_COMPONENTS, + CreateAppRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateAppRequestDataAttributes.JSON_PROPERTY_EMBEDDED_QUERIES, + CreateAppRequestDataAttributes.JSON_PROPERTY_INPUT_SCHEMA, + CreateAppRequestDataAttributes.JSON_PROPERTY_NAME, + CreateAppRequestDataAttributes.JSON_PROPERTY_ROOT_INSTANCE_NAME, + CreateAppRequestDataAttributes.JSON_PROPERTY_SCRIPTS, + CreateAppRequestDataAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateAppRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EMBEDDED_QUERIES = "embeddedQueries"; + private List embeddedQueries = null; + + public static final String JSON_PROPERTY_INPUT_SCHEMA = "inputSchema"; + private InputSchema inputSchema; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ROOT_INSTANCE_NAME = "rootInstanceName"; + private String rootInstanceName; + + public static final String JSON_PROPERTY_SCRIPTS = "scripts"; + private List