From 4bd17099f1442976ab7259159205a7de48305960 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 16 Jul 2026 03:24:39 +0000 Subject: [PATCH 1/2] ## Java SDK Changes: * `glean.skills.list()`: **Added** * `glean.skills.retrieve()`: **Added** * `glean.indexing.datasources.submit()`: **Added** * `glean.client.chat.create()`: * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `response.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `glean.client.chat.createStream()`: * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `glean.client.agents.create()`: `response.workflow.webhookUrl` **Added** * `glean.client.search.retrieveFeed()`: `response.results[].primaryEntry.workflow.workflow.webhookUrl` **Added** * `glean.client.governance.data.findings.create()`: * `request.filter.severity.enum(falsePositive)` **Added** * `response.filter.severity.enum(falsePositive)` **Added** * `glean.client.governance.data.findings.list()`: `response.exports[].filter.severity.enum(falsePositive)` **Added** --- .speakeasy/gen.lock | 304 ++++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 337 ++++++++++- .speakeasy/workflow.lock | 12 +- README.md | 42 +- RELEASES.md | 12 +- build.gradle | 2 +- docs/models/components/ActionTypeSource.md | 32 ++ docs/models/components/DlpFindingFilter.md | 26 +- docs/models/components/DlpSeverity.md | 15 +- docs/models/components/PlatformSkill.md | 18 + .../components/PlatformSkillGetResponse.md | 9 + docs/models/components/PlatformSkillOrigin.md | 18 + .../PlatformSkillSourceProvenance.md | 13 + docs/models/components/PlatformSkillStatus.md | 23 + .../components/PlatformSkillSyncStatus.md | 23 + .../components/PlatformSkillsListResponse.md | 11 + docs/models/components/ToolMetadata.md | 41 +- docs/models/components/Workflow.md | 29 +- .../operations/PlatformSkillsGetRequest.md | 8 + .../operations/PlatformSkillsGetResponse.md | 11 + .../operations/PlatformSkillsListRequest.md | 9 + .../operations/PlatformSkillsListResponse.md | 11 + ...ubmissionsDatasourceInstanceTypeRequest.md | 10 + ...bmissionsDatasourceInstanceTypeResponse.md | 11 + ...sionsDatasourceInstanceTypeResponseBody.md | 10 + docs/sdks/indexingdatasources/README.md | 64 ++- docs/sdks/skills/README.md | 114 ++++ gradle.properties | 2 +- .../glean_api_client/AsyncGlean.java | 7 + .../AsyncIndexingDatasources.java | 65 +++ .../glean_api_client/AsyncSkills.java | 120 ++++ .../api_client/glean_api_client/Glean.java | 9 + .../glean_api_client/IndexingDatasources.java | 64 +++ .../glean_api_client/SDKConfiguration.java | 4 +- .../api_client/glean_api_client/Skills.java | 118 ++++ .../models/components/ActionTypeSource.java | 148 +++++ .../models/components/DlpFindingFilter.java | 18 +- .../models/components/DlpSeverity.java | 9 +- .../models/components/PlatformSkill.java | 535 ++++++++++++++++++ .../components/PlatformSkillGetResponse.java | 131 +++++ .../components/PlatformSkillOrigin.java | 129 +++++ .../PlatformSkillSourceProvenance.java | 435 ++++++++++++++ .../components/PlatformSkillStatus.java | 137 +++++ .../components/PlatformSkillSyncStatus.java | 137 +++++ .../PlatformSkillsListResponse.java | 257 +++++++++ .../models/components/ToolMetadata.java | 116 +++- .../models/components/Workflow.java | 81 ++- .../operations/PlatformSkillsGetRequest.java | 102 ++++ .../PlatformSkillsGetRequestBuilder.java | 47 ++ .../operations/PlatformSkillsGetResponse.java | 254 +++++++++ .../operations/PlatformSkillsListRequest.java | 186 ++++++ .../PlatformSkillsListRequestBuilder.java | 69 +++ .../PlatformSkillsListResponse.java | 253 +++++++++ ...missionsDatasourceInstanceTypeRequest.java | 174 ++++++ ...sDatasourceInstanceTypeRequestBuilder.java | 80 +++ ...issionsDatasourceInstanceTypeResponse.java | 253 +++++++++ ...onsDatasourceInstanceTypeResponseBody.java | 95 ++++ .../PlatformSkillsGetRequestBuilder.java | 50 ++ .../async/PlatformSkillsGetResponse.java | 254 +++++++++ .../PlatformSkillsListRequestBuilder.java | 72 +++ .../async/PlatformSkillsListResponse.java | 253 +++++++++ ...sDatasourceInstanceTypeRequestBuilder.java | 83 +++ ...issionsDatasourceInstanceTypeResponse.java | 254 +++++++++ .../operations/PlatformSkillsGet.java | 277 +++++++++ .../operations/PlatformSkillsList.java | 279 +++++++++ ...ndexSubmissionsDatasourceInstanceType.java | 315 +++++++++++ 67 files changed, 6926 insertions(+), 163 deletions(-) create mode 100644 docs/models/components/ActionTypeSource.md create mode 100644 docs/models/components/PlatformSkill.md create mode 100644 docs/models/components/PlatformSkillGetResponse.md create mode 100644 docs/models/components/PlatformSkillOrigin.md create mode 100644 docs/models/components/PlatformSkillSourceProvenance.md create mode 100644 docs/models/components/PlatformSkillStatus.md create mode 100644 docs/models/components/PlatformSkillSyncStatus.md create mode 100644 docs/models/components/PlatformSkillsListResponse.md create mode 100644 docs/models/operations/PlatformSkillsGetRequest.md create mode 100644 docs/models/operations/PlatformSkillsGetResponse.md create mode 100644 docs/models/operations/PlatformSkillsListRequest.md create mode 100644 docs/models/operations/PlatformSkillsListResponse.md create mode 100644 docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md create mode 100644 docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md create mode 100644 docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md create mode 100644 docs/sdks/skills/README.md create mode 100644 src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/Skills.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/ActionTypeSource.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillGetResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillOrigin.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSourceProvenance.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillStatus.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSyncStatus.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b5ac377c..848b5409 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: 33958fda4f2b946f46f0593aac3a619d + docChecksum: bfb167fd5444f3b58c2a1e8f9e62d163 docVersion: 0.9.0 - speakeasyVersion: 1.789.2 - generationVersion: 2.916.4 - releaseVersion: 0.14.3 - configChecksum: be03d2f5afbc5351e940b5326128717f + speakeasyVersion: 1.790.2 + generationVersion: 2.918.3 + releaseVersion: 0.14.4 + configChecksum: d5edf6a2d997b6ca0f087370023c40e2 repoURL: https://github.com/gleanwork/api-client-java.git installationURL: https://github.com/gleanwork/api-client-java published: true persistentEdits: - generation_id: da2ce852-fd82-4787-ab76-282c5d4a507f - pristine_commit_hash: e67e100bfc2d4e008318688c9b90c15832b1a62d - pristine_tree_hash: 3befd1d0abeb1604cecdd80affb5d2b0ad2a86f5 + generation_id: e9ac2a5f-67f1-429d-85a4-f5470cb576e8 + pristine_commit_hash: d18fb64fc02a17d0efe44a06e6014bf1fc649713 + pristine_tree_hash: 0c4f8bd371ac93eaabb90ed71f23c2b4a87aee8a features: java: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 - additionalProperties: 0.0.1 + additionalProperties: 0.0.2 constsAndDefaults: 0.1.3 - core: 3.55.30 + core: 3.55.31 deprecations: 2.81.2 downloadStreams: 0.1.1 examples: 2.81.9 @@ -32,7 +32,7 @@ features: groups: 2.81.3 methodServerURLs: 2.82.2 nameOverrides: 2.81.5 - nullables: 0.1.0 + nullables: 0.1.1 sdkHooks: 1.2.0 unions: 0.3.6 uploadStreams: 0.1.0 @@ -47,8 +47,8 @@ trackedFiles: pristine_git_object: 3d1f9b105935ea1eded859513fe6b38b36bd9154 build.gradle: id: f07866736216 - last_write_checksum: sha1:bb0d4a1ec7e91057bfba5afc907f91d66b057ba6 - pristine_git_object: e78cd7dfbe8e8f06bd68c2450bd1ae6fe13bec1c + last_write_checksum: sha1:9be12a8d64d242b162875b3c21d0db48c7a4faa5 + pristine_git_object: c9b8956357d3ae8032e06aebaf16905b99cbf13c docs/models/components/ActionAuthType.md: id: 85f17dd1d9c7 last_write_checksum: sha1:e2e0e2b4617367b35aab4d1092d820c2b1856072 @@ -69,6 +69,10 @@ trackedFiles: id: 300b48ceb953 last_write_checksum: sha1:ab39efc4383c1eb016849c7b98f3c2168afb2694 pristine_git_object: 0db759c8c2bbf454a72eb53e14c2620cbe47ca7d + docs/models/components/ActionTypeSource.md: + id: 12e40639f150 + last_write_checksum: sha1:c46c3cdd5cce3f80cd2932f56cccba63fc5ef0a7 + pristine_git_object: e2a0f9c4c04287dcacc66c212d6e826fe8b17874 docs/models/components/Activity.md: id: 40ede959d6db last_write_checksum: sha1:baeecedaf433816a950ec296c6ac1c3dbed85115 @@ -903,8 +907,8 @@ trackedFiles: pristine_git_object: 1ef875526389e3ff8bd4554d0fca806982f67699 docs/models/components/DlpFindingFilter.md: id: 393e15b29070 - last_write_checksum: sha1:1c4eb8267094cc7544365bcf4fd135cd3f4ec817 - pristine_git_object: 108a7202ffb64fade3a17be1a1d48e9d51c7b5ba + last_write_checksum: sha1:7b2dd573f03a7d2bdb030fcf5884c0d6689a5653 + pristine_git_object: 42a0e927820c9f3e8fb5032c2e759e9e3170a765 docs/models/components/DlpFrequency.md: id: faa0e105561b last_write_checksum: sha1:c399109ccd6f639cef1a3e53aeda839d1aa79b9f @@ -935,8 +939,8 @@ trackedFiles: pristine_git_object: 8fdd52ef21fba54bd430384b32ba28f966aa02d4 docs/models/components/DlpSeverity.md: id: 6c57ae37246e - last_write_checksum: sha1:dfdb6488f0ee8fe479e4cb88327f15fafc996ffc - pristine_git_object: daf90f11eb0d40d51468e7d3ca00177ae37af455 + last_write_checksum: sha1:4801297f37c4bd61fa377c4d7ad5c4d38c800714 + pristine_git_object: 5ab3aa7f513def7d7048bebe46446ed74bd3f8cf docs/models/components/DlpSimpleResult.md: id: 3b5204acf80c last_write_checksum: sha1:ad40cf017a5b13cface97bb154ad1f11951d173e @@ -1913,6 +1917,34 @@ trackedFiles: id: 5f92876fb5c8 last_write_checksum: sha1:d463001b22ff3419918e31ec7832587341fb35a1 pristine_git_object: 083cad412eb152684e3895da619d1f4f393ae0bf + docs/models/components/PlatformSkill.md: + id: 48b17cdbdcf3 + last_write_checksum: sha1:6a89514c591aa917f1859e7f695b5a2e67d0ce1f + pristine_git_object: ae055121bbcfc7fcdd5fdbe10ca373d84c54e638 + docs/models/components/PlatformSkillGetResponse.md: + id: 9463c73e1a4f + last_write_checksum: sha1:7003d9e9b76b756614e56b880a7c1c94826c9173 + pristine_git_object: 295031b7d5aaea130707b845293c4e8c0e3477bb + docs/models/components/PlatformSkillOrigin.md: + id: 3f51c4b399cd + last_write_checksum: sha1:60470475b7e2bf5c205090330b0e592b6a3a4f28 + pristine_git_object: aa217c27d2ecf215776707434717e38960439948 + docs/models/components/PlatformSkillSourceProvenance.md: + id: b3c0d1b1c723 + last_write_checksum: sha1:0e672c92cecb5cfecaa887dc16afb52f970d3eff + pristine_git_object: a42f8d71a53b1a3422e55325ab4259157dfa2677 + docs/models/components/PlatformSkillStatus.md: + id: 9c586f4b13dd + last_write_checksum: sha1:4297a7da9090e5fc5374779ebd20c2ceef751ecc + pristine_git_object: f3ebbcf2410f7df6b49920e0611ffd1c6c81053f + docs/models/components/PlatformSkillSyncStatus.md: + id: 0475ccc16596 + last_write_checksum: sha1:8560f0773fe9ce87d41c1f499bf30766dbf50e2b + pristine_git_object: d8195068b74dd1f14eb8649ec44e53ae551d143c + docs/models/components/PlatformSkillsListResponse.md: + id: 26c44c678682 + last_write_checksum: sha1:285e8b28837c7b6cd376aa5fe63ceb1dd7e402b6 + pristine_git_object: 1a206faa97db13103b326b757737cb9882083914 docs/models/components/PlatformTimeRange.md: id: e23ca7368dc2 last_write_checksum: sha1:48c1a8a19bac073372bdf5b5e688865d568d6225 @@ -2347,8 +2379,8 @@ trackedFiles: pristine_git_object: 1134a9832912848d3bbf03bed441b272db6e8492 docs/models/components/ToolMetadata.md: id: 75462b106367 - last_write_checksum: sha1:83b890c487f0a91d5c072babacdc19f7aeab20c6 - pristine_git_object: 0f42b42fcca9e0c8db2f9f191b244d71cef96c8c + last_write_checksum: sha1:66c19a04f7a88891b30caa8583eab9ca022559f6 + pristine_git_object: 83acea7f020c244ca9c1cdec7a3f6539fd2edb27 docs/models/components/ToolMetadataType.md: id: 1cd209a54016 last_write_checksum: sha1:baad76ab8ac32b75b8cf6467efa228e2ffa7af26 @@ -2559,8 +2591,8 @@ trackedFiles: pristine_git_object: 18849148ae82d2cbcd0af4a57b2c5d76b4dc8908 docs/models/components/Workflow.md: id: 891cae27e805 - last_write_checksum: sha1:996be9a34efa7192d527eeae727f9a6dc713ad22 - pristine_git_object: 9212a9afb7ae734cc7605b5b717b010c3a6690df + last_write_checksum: sha1:0e247c05b41cb8272b148393d343bc8f3aa03e5b + pristine_git_object: a33f5dca5a33173762ed4dfb145396c77edc91bc docs/models/components/WorkflowFeedbackInfo.md: id: 0c46cf382b83 last_write_checksum: sha1:400c9e65d35295047f35fc437160616ff09957d2 @@ -3241,6 +3273,22 @@ trackedFiles: id: 7ab2beea5f75 last_write_checksum: sha1:b019dc80b72396e4103f40bc931b1a39b8b00117 pristine_git_object: 10908aeaba0726a7003a58e259f514c0cb3d33ba + docs/models/operations/PlatformSkillsGetRequest.md: + id: 6bcca0e1d876 + last_write_checksum: sha1:6fb8769f827b2ac8b85140e1223e1369dc708cd1 + pristine_git_object: 1e6a21c8542c5444c38e944bdd200dac7d56e71d + docs/models/operations/PlatformSkillsGetResponse.md: + id: a178cbde7bf1 + last_write_checksum: sha1:29e127c2743edc3bf93cca5b2f639736d6be73ae + pristine_git_object: a2da05c0c876106339be78dc15ede106b3eeab3a + docs/models/operations/PlatformSkillsListRequest.md: + id: a2df3ca6e157 + last_write_checksum: sha1:df7ccb85f8be9bcc2d3d3171220d99a153530755 + pristine_git_object: 15f66cfe08bdc084dcfc4570d020d7b4094de670 + docs/models/operations/PlatformSkillsListResponse.md: + id: ed5d42d5c8ff + last_write_checksum: sha1:79b3a9ccf00e0280e3f960cffe929808fbb389ae + pristine_git_object: c362bbc10764f3342faefe3b31e5d77851615270 docs/models/operations/PostApiIndexV1AdddatasourceResponse.md: id: 6cd8415eee56 last_write_checksum: sha1:0b68cdac07ec9e7f87091e7dfc4a45184dedb70d @@ -3413,6 +3461,18 @@ trackedFiles: id: 2c89658daeb9 last_write_checksum: sha1:1f70ea386c54fba3cfae8113f3ad163eaadfc789 pristine_git_object: 907826eac37b40c1e5c7da923ecfbaa8aa4c932e + docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md: + id: ac201f74f31c + last_write_checksum: sha1:1b3e1ac050ebdb98b62ed8e27c1fe60e95ec428e + pristine_git_object: 5240e204ef286419706a31978cce18608035d760 + docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md: + id: 17a5df3fddb2 + last_write_checksum: sha1:26a196baed97f24e26df9d709886d68f1b02f6ae + pristine_git_object: 57dda74eb0035583b408acbd6002a329be805c16 + docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md: + id: 9ec31b9509fe + last_write_checksum: sha1:fc0f1e3de98796e9c04145065153b9fbc856fd48 + pristine_git_object: 202f59dd47ceeb9769b125eb25b44160d5e270b6 docs/models/operations/PostRestApiV1ToolsCallResponse.md: id: 83345495310c last_write_checksum: sha1:071ae496fa93ff207a262eaccf3bfd7f985f3f76 @@ -3607,8 +3667,8 @@ trackedFiles: pristine_git_object: 2b5ea396586844a3e738b00c408491f8db9986c2 docs/sdks/indexingdatasources/README.md: id: aa113bda8cbc - last_write_checksum: sha1:0fb77e6b7ce90ed5c388c2b35fe3af1e22b61163 - pristine_git_object: 8806406063917507f03e54c6be099807518b25d1 + last_write_checksum: sha1:2b687f13e8f859ebda00137b350e1b0076f016ad + pristine_git_object: 5184de29e10e0dfaa31007b82ac9f06b8d9f5d3e docs/sdks/indexingdocuments/README.md: id: 7ca38da53414 last_write_checksum: sha1:2d8c525b2cd55d063e285d2cce46e98ada2ac31a @@ -3649,6 +3709,10 @@ trackedFiles: id: 5c534716244c last_write_checksum: sha1:fcf7c1cf8c87935eca2cc104391ffdd2b25473d4 pristine_git_object: 6555e422489b48401d8c5896d8902dd40752d251 + docs/sdks/skills/README.md: + id: 3a14a5c90791 + last_write_checksum: sha1:a9d2ed5da9f700ef3bef5baa389542c78d9801dc + pristine_git_object: 4ab9a3ff27c13435616d4dba7f972d1a40b0a18f docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:f463db245c247de5af8035245870ca014bbe82fc @@ -3667,8 +3731,8 @@ trackedFiles: pristine_git_object: 3decbce5bd40edbe278c1c5d2dbf585808e51d9a gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:8379af9fa277a6752c1e33a237c83a9c494333db - pristine_git_object: 947c27d5aa59d385012bc2e657ef72db71c1959c + last_write_checksum: sha1:befc4a3824a4d11786b3517a0cc3c5fe9555903c + pristine_git_object: 706f89784c40c2e0255d6d368812ff7505eff14b gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -3783,8 +3847,8 @@ trackedFiles: pristine_git_object: b688538c7b9c976d4493061d3608ebff442b6875 src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java: id: 41f5be2f8342 - last_write_checksum: sha1:454467031a5fa7d6a7abb56ccdeddf7e1a778a7e - pristine_git_object: 043e1a834f9199a6e52545d2a6e6c46872ca5753 + last_write_checksum: sha1:eaa06c4b67e38408dddada77a5e77ce18d3382cf + pristine_git_object: ec55bc7dd2778bc301453710fb896ae15aae5bcf src/main/java/com/glean/api_client/glean_api_client/AsyncGovernance.java: id: 38b2443ece41 last_write_checksum: sha1:d98fcd8de4bbdd2455f0b186d630f68cf0aede69 @@ -3803,8 +3867,8 @@ trackedFiles: pristine_git_object: 4f05d364ccbdac188eee0257a4db815fb85ac61a src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java: id: dae1595db559 - last_write_checksum: sha1:8772da60d5be2abfaac9afd129d35762ed92d29a - pristine_git_object: 5976744e34c4f0e7b188d1837784f11c4dc12d8a + last_write_checksum: sha1:ed2121792db8bff0f66c13cccbfbbe7fae6318bb + pristine_git_object: 7598fae7a83360b8594da52f52bcb33a194c51af src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDocuments.java: id: 979f8541bead last_write_checksum: sha1:afadb6995b7992b3287b1188025343d72677f529 @@ -3845,6 +3909,10 @@ trackedFiles: id: 443645b885fa last_write_checksum: sha1:0241338c962eda005c9e6c3fe4f66d78030a20d2 pristine_git_object: 4a17ff91f2cad3a65578dd16fac8bfbb864699e5 + src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java: + id: 809381bacfb1 + last_write_checksum: sha1:1fddb6a4e696c9bd1a11366ac7740ab23a829091 + pristine_git_object: e27ff0941c23588cabe43ed67644eeccbf1bc680 src/main/java/com/glean/api_client/glean_api_client/AsyncTools.java: id: 02ad87504d7a last_write_checksum: sha1:506200f5eeb1be124b9352d28f9db587d0b12cad @@ -3915,8 +3983,8 @@ trackedFiles: pristine_git_object: e9ce0228b65e0b98e94830159dd24e3cd4abb9d3 src/main/java/com/glean/api_client/glean_api_client/Glean.java: id: ebe9053b14eb - last_write_checksum: sha1:0d365163ee1902e4797ba948db1a93f9f8a29ad1 - pristine_git_object: 3a9023767e0eb05306b07dd990a5e9d59b6958a1 + last_write_checksum: sha1:3cf8f8d0570426c19edc5a00e3de14d0c3f12b69 + pristine_git_object: fe8fc29c2dc444fc98c17f7dc8ff64af86bb1f18 src/main/java/com/glean/api_client/glean_api_client/Governance.java: id: 2d4a3c95da6a last_write_checksum: sha1:66221fd24d5e17ecdfed6bf44bbd6f73a1f93c67 @@ -3935,8 +4003,8 @@ trackedFiles: pristine_git_object: e6bed06813bf7f083e5ff0a60416185556f55a2e src/main/java/com/glean/api_client/glean_api_client/IndexingDatasources.java: id: 1437e6488e50 - last_write_checksum: sha1:f0efbcc7246a51742448bd5b69b4c2220573c740 - pristine_git_object: fa37373f9b7472a2e16d9f653f18eaeb033118ec + last_write_checksum: sha1:1beb6d86531442d96bd1c58c887efe1afede442a + pristine_git_object: 54668f98218e77c84929762cd13b3d1990eff256 src/main/java/com/glean/api_client/glean_api_client/IndexingDocuments.java: id: b8e047968f3b last_write_checksum: sha1:be58287d33e4d34fde481a016fe1606652642ca8 @@ -3975,8 +4043,8 @@ trackedFiles: pristine_git_object: ffae914775eb41ff311371f62504344a59d090fd src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java: id: d5fcc61f5992 - last_write_checksum: sha1:0425f25702347060031630a96596cd0a8c713edb - pristine_git_object: f24764cdd8070d3dd11fbfd5a0ef3ee8657a898e + last_write_checksum: sha1:f1f3b8d6ab5d1c102ee9ebbc843f04256510c052 + pristine_git_object: 290c779f26405de7af60c4f19205f3f9ebb4b958 src/main/java/com/glean/api_client/glean_api_client/Search.java: id: f22d94b920b5 last_write_checksum: sha1:803fcb8e55cb4a76ec275ae45b83730fc7ed18c7 @@ -3985,6 +4053,10 @@ trackedFiles: id: add211a7c1dd last_write_checksum: sha1:060fd502a5844abda3dba22f9e00ca79f8317f94 pristine_git_object: f1e58a1696e5159e96259e20e83ca6f5584f810a + src/main/java/com/glean/api_client/glean_api_client/Skills.java: + id: 6903ae835067 + last_write_checksum: sha1:c7c928eec4132a4b47efc8ac9cff3cfead5bfa11 + pristine_git_object: 1273572e83e1c11acb83eb467db3b2fc907f6de6 src/main/java/com/glean/api_client/glean_api_client/Tools.java: id: bb072637f39b last_write_checksum: sha1:052d5febd57bebffbebd0884fd5698bff5cd20a7 @@ -4017,6 +4089,10 @@ trackedFiles: id: 9ed3dcd26676 last_write_checksum: sha1:a1c7b9aadfc2dc06c140e748b55e8cd2326bd58a pristine_git_object: db315fd0cfa57226062f1331fb1a40e827d4d101 + src/main/java/com/glean/api_client/glean_api_client/models/components/ActionTypeSource.java: + id: e0b3f77e465b + last_write_checksum: sha1:95d7fc7ea85948a062075175e0b793a693331d05 + pristine_git_object: 9fdeb3ad7369c16540b798a338d93ab7d24fbd70 src/main/java/com/glean/api_client/glean_api_client/models/components/Activity.java: id: be1b046048ca last_write_checksum: sha1:9534cbc8b5d06901e546af50c28019dc8d3ed074 @@ -4851,8 +4927,8 @@ trackedFiles: pristine_git_object: 1970433c9d5d8903ee9d5a195adfa48c9c5c60ea src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java: id: dc525d4858a5 - last_write_checksum: sha1:96f3ae141922c7d9bde996a60c84e46e6eba3e6c - pristine_git_object: 478d86925438a5315209d92a0c7dec717e77536b + last_write_checksum: sha1:318dc60c932de213985c506185a82625dd6124f9 + pristine_git_object: 92425052aa29e9f60cfdbd76b26f9984a7eca857 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFrequency.java: id: 28cba0614d04 last_write_checksum: sha1:58ac2414e61346b2aad1fb35dc2eaa5aaf728111 @@ -4883,8 +4959,8 @@ trackedFiles: pristine_git_object: bf1c5d79ebbebc0021f2e9be328902e4193a2a30 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java: id: 2e2142ed7cb7 - last_write_checksum: sha1:32aa19858a221982e9f0e2ee76c1cdbbef4abc2f - pristine_git_object: 2f7a0d6a20638c453037102979398cd7d2a9d4fd + last_write_checksum: sha1:29c6e17a58c704003b84700e0b5a6c1ba8e0c37d + pristine_git_object: db14be57b4b77fb249f302138311d0bec8a737a9 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSimpleResult.java: id: 56f2d153b80a last_write_checksum: sha1:a7928fb22f5d5d063a16c563bc23de6baafefe26 @@ -5861,6 +5937,34 @@ trackedFiles: id: 170859d5c40a last_write_checksum: sha1:f6bb81d05003571db41220e1d40d54a854206d97 pristine_git_object: bba2b20565c5103d873fb2de0ca511298695c829 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java: + id: 11a29891a283 + last_write_checksum: sha1:e77a0aafec5bb5d8d40466d462b0dad59d2c81db + pristine_git_object: 06ad3a2718f4d3fed8a3875f57099390eb1ff046 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillGetResponse.java: + id: 88de4cd9201f + last_write_checksum: sha1:6c648eb968a6315e75b300f64bac9535c5b4ad02 + pristine_git_object: f442b75f10fdaef7ca8b3114292ea367933bd5f4 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillOrigin.java: + id: 673d58eb0c96 + last_write_checksum: sha1:c5f62255b8b368c6b850127f99cc7e09e35d14a8 + pristine_git_object: 2694ce8a273231a3f3ee30422e5694273ae5d3ca + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSourceProvenance.java: + id: 1fb785647231 + last_write_checksum: sha1:318bcb6327c7023217b0aff63cbabab2d3edacd2 + pristine_git_object: de7125a5376fa7a396097349518bff00c0c9642a + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillStatus.java: + id: d165c204cdfe + last_write_checksum: sha1:89b04089b9f7138b635380c39a0ab8bf1eb28cef + pristine_git_object: e699f0936477647cce8b2b63fb9e11c87385dfde + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSyncStatus.java: + id: 9b52c0471fec + last_write_checksum: sha1:cec4bc12d4d8c5b20508d90697efd3d7b8423fef + pristine_git_object: 201289404dd7c8e35dc64503796481f4cd2fd79b + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java: + id: 33ab82accff8 + last_write_checksum: sha1:2428e90bdb520d8f5932542298d3247c4e2b7fb4 + pristine_git_object: 174834b7e10119ec5e4819959a975a0d03231eb0 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformTimeRange.java: id: ab9269c32c6a last_write_checksum: sha1:6f3c5cb8d6d2a61f8d2b7ee42a1d7b73ac02c6b7 @@ -6295,8 +6399,8 @@ trackedFiles: pristine_git_object: 2e05317d939cd2a9e150f8e7345ab2228458b1a0 src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java: id: 1cf9a2c7160f - last_write_checksum: sha1:f928fc8a3a1757a865007cd77e4f335df473cfd7 - pristine_git_object: 5a26eff748cd0c49d1d553e243e34f6440566a10 + last_write_checksum: sha1:c416d5d832b757f36a783b460968faa511c5f6ca + pristine_git_object: edf1002d9a10c03b92831285ac2f286d81921077 src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadataType.java: id: 2b9cf4b714da last_write_checksum: sha1:3de19dbf1950823a017ab9d1b44325689627c046 @@ -6507,8 +6611,8 @@ trackedFiles: pristine_git_object: 347842229349fb95234660d05bcdb239186b80c4 src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java: id: 362d77a90ee3 - last_write_checksum: sha1:ff4df4460e8e2c8aaf3e17715a9bddf4c03f782c - pristine_git_object: f6b7f60b6ff1a0d5ab7758d28057e38ade48c000 + last_write_checksum: sha1:e395074204467f1ba976acadd7fa6e20ca578763 + pristine_git_object: 774d0e88cb7cbd1cbd045f175211b14601b997fe src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowFeedbackInfo.java: id: b19d5571d1d0 last_write_checksum: sha1:3b1f51a698d75f93eef07f9fbf7e4fdb6114e2c8 @@ -6909,6 +7013,14 @@ trackedFiles: id: 82db0b41fde4 last_write_checksum: sha1:7af4c73a77eeb27581501f320f4b69e76cf83d62 pristine_git_object: 18d1426633220ae8c17fb39a810f941ece0a2713 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsGetRequestBuilder.java: + id: 6446a69d453f + last_write_checksum: sha1:17bd5be18252d9907fa1f81155f67c125a9275fc + pristine_git_object: af6066c6c3728f1b96a393f9d1cfb3e91d3a1847 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsListRequestBuilder.java: + id: 9ce19ecbdb6d + last_write_checksum: sha1:fece1fc2d4f39e8e5e704f5db8d177b19958544a + pristine_git_object: bac4251507ff67e2e21de3b73c423e33425955f1 src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PostApiIndexV1AdddatasourceRequestBuilder.java: id: 3c6f34b93b68 last_write_checksum: sha1:4e8bdefb602c072ec9b82058b5593546e04e059b @@ -7061,6 +7173,10 @@ trackedFiles: id: 86e942619ead last_write_checksum: sha1:a73d2a4f6d6c2f28d7303c0873345f6fedc39ea3 pristine_git_object: 955fa3c101a017bef081f20a1be90dacae1d9d89 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java + : id: e25df155fed4 + last_write_checksum: sha1:dea6aee16f5710024337f99ad8c6a35ee890aeb3 + pristine_git_object: 8fc40901ce6d9d135490d3258dad56b7fce998f2 src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PostRestApiV1ToolsCallRequestBuilder.java: id: 317701276b4e last_write_checksum: sha1:68f22995144546799be933c2770348ffb652fb19 @@ -8085,6 +8201,30 @@ trackedFiles: id: 68bd184c4656 last_write_checksum: sha1:602ef94742690f30edd18aed6eeb9c6b0ff5b846 pristine_git_object: f019690379285f41adeeae32dce29d9891e6f82d + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java: + id: b1a1021e45fa + last_write_checksum: sha1:ff261484abc6ca03a3bb2a33f1c9214c559ddc69 + pristine_git_object: e95a3f18e24713fb10f58e05daef68fd8b189793 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java: + id: acf97a47458e + last_write_checksum: sha1:38e59bac457dcd87319b58620a095a3f2d06348f + pristine_git_object: 7c12088cde716fdfb0498a8c12fbe8728b11bddd + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java: + id: 10e964f47660 + last_write_checksum: sha1:f95774eddeaf8c0cf53b6e4c312c1cffd8735eab + pristine_git_object: 85f533a8b7cd39d355ce6d494623918836a843c6 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java: + id: 0c784c11f038 + last_write_checksum: sha1:c3f6882b97ce023c15b636b7ebe9c5a36c492f0a + pristine_git_object: ad2303005c0384c3f9619d2a830802d5c1d1d590 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java: + id: c4faa9ffd8e1 + last_write_checksum: sha1:3bceb47670a1e9b7ad60b723dc20d1d5f5d87212 + pristine_git_object: b242ac171532c22c30286be83cef859f9e78b70f + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java: + id: 61140aa877b7 + last_write_checksum: sha1:6775d5e44002f34ae44149a052c6e021f95eaf8f + pristine_git_object: 4194c210069a13c26c2fb968462ac25ffecbe13f src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceRequestBuilder.java: id: 12cfb3a208c3 last_write_checksum: sha1:46483ea129771ac3bc157a1e7bfcc5f672bb645b @@ -8409,6 +8549,22 @@ trackedFiles: id: b2a687f6f2a1 last_write_checksum: sha1:272480ac5f6668da9604c8546a4ddf1777691117 pristine_git_object: 5b96a78b08496a87c6bf93d1dca70f0f460616b6 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java + : id: d6f9533fb152 + last_write_checksum: sha1:03c6949fdd5d0f97cc8280d030c8ea03e47ab6f6 + pristine_git_object: 9fa2ad638c0746a54ee93af5005b1c5c8905d57e + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java + : id: ff1570f7277a + last_write_checksum: sha1:2fc8dab81c86a66c60f32ba8c0bb49aeca1dbbb1 + pristine_git_object: 6ba0274c13c36e04a0ac10c15cb4e389d5e049ea + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java + : id: 54e49721adf9 + last_write_checksum: sha1:d2a88b0270db6cb7e24b4dee57d6557559983ccd + pristine_git_object: 6c497c530babf3f737d455646a24db2d8c99eb90 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java + : id: d33d42046743 + last_write_checksum: sha1:e7479dffe11ab8eb769609adcc0734fbeb38b76b + pristine_git_object: 31449692e395cc89f97de96d85ac10bb5ba0b3a4 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallRequestBuilder.java: id: e614321e3a7d last_write_checksum: sha1:cd4f3efc411552bd798c186c918e39bc08c85fd1 @@ -8929,6 +9085,14 @@ trackedFiles: id: c324b8a2e02b last_write_checksum: sha1:0ce35493af407ceddc10f68564a406736d6a2247 pristine_git_object: 2fe9dd653b898a2ac834b9bc870086e4e200f75f + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java: + id: d9bcb05e5190 + last_write_checksum: sha1:4e382b701048c2bb3730a1b7a0874016aae8cfb6 + pristine_git_object: bcb83e3e72f78a50f7775192ee046e8bbb99a5eb + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java: + id: 7213f13e0653 + last_write_checksum: sha1:d14803de77e8aab0f74f6184bcb144234469ddbd + pristine_git_object: f2aa06a9634325edd0eae111a7be75a80b5c6aa4 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostApiIndexV1AdddatasourceResponse.java: id: 8063718dd4c6 last_write_checksum: sha1:8f5180b2a2f460afab4f8278f71524ab24d411eb @@ -9081,6 +9245,10 @@ trackedFiles: id: a9a0a1c4e85b last_write_checksum: sha1:22a8145d78806f152653ad293d6817ddd1fbd7d2 pristine_git_object: 476e24b20e3b39cac8f20a1f275c17c39ec096f0 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java + : id: c9f17492a7bd + last_write_checksum: sha1:999d7fb626252c67d1993b2eb3078722c6a4949d + pristine_git_object: d4d7b81b50e2a5b5f7e80bdcb7de4e7504b040fe src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiV1ToolsCallResponse.java: id: 897a0bcc60d4 last_write_checksum: sha1:e04f834c9052c9a6c0ad321a1e113fa75b1d7540 @@ -9481,6 +9649,14 @@ trackedFiles: id: 9b5d67796029 last_write_checksum: sha1:f5c9d065cb970a5852c4c8fa32456c92d63d3095 pristine_git_object: 9cf91fe44e9b5e8e4cc98dd62a2adce6b40df81a + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java: + id: 35379a4f4ed2 + last_write_checksum: sha1:e7dca9cc453438718bcfa8f84348362b02e2f655 + pristine_git_object: 612b0dfc1430a9af27b9956c4575229c14e7b084 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java: + id: f9f1d5a5462f + last_write_checksum: sha1:8974aef09c86c4ed1aa10691bad55f7c336da56d + pristine_git_object: 1bb80ab1ef4611a76cd715b5bbde367ce8304ec6 src/main/java/com/glean/api_client/glean_api_client/operations/PostApiIndexV1Adddatasource.java: id: 06627a85321f last_write_checksum: sha1:0a738b10de0b1c822504f5cee019a66bb4bdf35c @@ -9633,6 +9809,10 @@ trackedFiles: id: 7a5bb4c26cb6 last_write_checksum: sha1:3a16202cd328d05faa837d3d8e869d274fb4fc71 pristine_git_object: 13c3200db8fdf5d16696bb1d186c93928c4be0c0 + src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java: + id: 59cfdb0a7588 + last_write_checksum: sha1:4934cf034ddb8e070d84f7f4f2cc68e1e3e2b405 + pristine_git_object: 839ba941d2a59952cac3976e106f94ba06c167c2 src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiV1ToolsCall.java: id: c2d8aff1344a last_write_checksum: sha1:7dbf53b0404d006226789a4f112f9a43a51ac0a8 @@ -10969,6 +11149,42 @@ examples: responses: "200": application/json: {"authorizationUrl": "https://shocked-casket.name/"} + platform-skills-list: + speakeasy-default-platform-skills-list: + responses: + "200": + application/json: {"skills": [], "has_more": true, "next_cursor": "", "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-get: + speakeasy-default-platform-skills-get: + parameters: + path: + skill_id: "" + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Chad_Herzog", "description": "whenever up aha controvert", "latest_version": 151495, "latest_minor_version": 170771, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2024-12-25T16:41:00.099Z", "updated_at": "2026-12-07T21:59:59.375Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + post_/rest/api/index/submissions/{datasourceInstance}/{type}: + speakeasy-default-post-/rest/api/index/submissions/{datasource-instance}/{type}: + parameters: + path: + datasourceInstance: "" + type: "" + requestBody: + application/json: {"key": "", "key1": "", "key2": ""} + responses: + "202": + application/json: {"requestId": ""} + "400": + application/json: {"error": ""} + "500": + application/json: {"error": ""} examplesVersion: 1.0.2 generatedTests: activity: "2025-06-09T18:03:44Z" @@ -11111,7 +11327,7 @@ generatedTests: get_/rest/api/v1/tools/list: "2025-06-09T18:03:44Z" post_/rest/api/v1/tools/call: "2025-06-09T18:03:44Z" listpolicies: "2025-06-09T18:03:44Z" -releaseNotes: "## Java SDK Changes:\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].fragments[]` **Changed**\n * `response.messages[].fragments[]` **Changed**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[]` **Changed**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].fragments[]` **Changed**\n" +releaseNotes: "## Java SDK Changes:\n* `glean.skills.list()`: **Added**\n* `glean.skills.retrieve()`: **Added**\n* `glean.indexing.datasources.submit()`: **Added**\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n * `response.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.agents.create()`: `response.workflow.webhookUrl` **Added**\n* `glean.client.search.retrieveFeed()`: `response.results[].primaryEntry.workflow.workflow.webhookUrl` **Added**\n* `glean.client.governance.data.findings.create()`: \n * `request.filter.severity.enum(falsePositive)` **Added**\n * `response.filter.severity.enum(falsePositive)` **Added**\n* `glean.client.governance.data.findings.list()`: `response.exports[].filter.severity.enum(falsePositive)` **Added**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 786fdb02..c0ca718b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.14.3 + version: 0.14.4 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index a1f493a7..27509710 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.0.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 270b693d49bac2f68e751b2345bac0c267741119 - x-open-api-commit-sha: 592aec2b4913505edb8161645eaf9a72b5286f20 + x-source-commit-sha: 5e81550d181d26da20af2328d661c6cd948e8780 + x-open-api-commit-sha: 1eb11864268f4710af0d13aaa2ec2e21db96343f description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -250,6 +250,108 @@ paths: x-speakeasy-name-override: createRun security: - APIToken: [] + /api/skills: + get: + tags: + - Skills + summary: List skills + description: | + List skills available to the authenticated user. + operationId: platform-skills-list + x-visibility: Public + x-glean-experimental: + id: 3eb65937-03a3-472b-9a00-be713f302b5f + introduced: "2026-06-23" + parameters: + - in: query + name: page_size + description: Maximum number of skills to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - in: query + name: cursor + description: Opaque pagination cursor from a previous response. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillsListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: list + security: + - APIToken: [] + /api/skills/{skill_id}: + get: + tags: + - Skills + summary: Retrieve skill + description: | + Retrieve metadata for a skill available to the authenticated user. + operationId: platform-skills-get + x-visibility: Public + x-glean-experimental: + id: 8f8d1c92-a484-4769-9903-200613dc8a72 + introduced: "2026-06-23" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillGetResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: retrieve + security: + - APIToken: [] /api/search: post: tags: @@ -4177,6 +4279,69 @@ paths: x-beta: true x-speakeasy-group: indexing.documents x-speakeasy-name-override: debugEvents + /rest/api/index/submissions/{datasourceInstance}/{type}: + post: + summary: Submit datasource data + description: Validates and asynchronously processes a datasource-specific submission. + tags: + - Datasources + security: + - APIToken: [] + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: true + required: true + x-exportParamName: SubmissionRequest + responses: + "202": + description: Accepted + content: + application/json: + schema: + type: object + properties: + requestId: + type: string + required: + - requestId + "400": + $ref: '#/components/responses/BadRequestError' + "401": + $ref: '#/components/responses/UnauthorizedError' + "404": + $ref: '#/components/responses/NotFoundError' + "405": + description: Method Not Allowed + "413": + description: Payload Too Large + "500": + $ref: '#/components/responses/InternalServerError' + "503": + description: Service Unavailable + x-speakeasy-name-override: submit + x-speakeasy-group: indexing.datasources + servers: + - url: https://{instance}-be.glean.com + variables: + instance: + default: instance-name + description: The instance name (typically the email domain without the TLD) that determines the deployment backend. + parameters: + - name: datasourceInstance + in: path + description: Datasource instance that should process the submission + required: true + schema: + type: string + - name: type + in: path + description: Submission type registered for the datasource + required: true + schema: + type: string /rest/api/index/document/{docId}/custom-metadata/{groupName}: put: summary: Add or update custom metadata @@ -5479,6 +5644,138 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillStatus: + type: string + enum: + - DRAFT + - ENABLED + - DISABLED + description: Current skill status. + PlatformSkillOrigin: + type: string + enum: + - CUSTOM + description: Source category for the skill. + PlatformSkillSyncStatus: + type: string + enum: + - UP_TO_DATE + - UPDATE_AVAILABLE + - SYNC_FAILED + description: Current external-source sync status. + PlatformSkillSourceProvenance: + type: object + properties: + source_url: + type: string + description: URL of the external source the skill was imported from. + commit_sha: + type: string + description: Source commit SHA for the imported skill. + imported_at: + type: string + format: date-time + description: Time the skill was imported. + last_synced_at: + type: string + format: date-time + description: Time the skill was last synced from its source. + sync_status: + $ref: "#/components/schemas/PlatformSkillSyncStatus" + sync_error: + type: string + description: Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + PlatformPersonReference: + type: object + description: A lightweight reference to a person, used where a payload merely points at someone. + required: + - name + properties: + id: + type: string + description: Opaque Glean person ID. + name: + type: string + description: Display name. + PlatformSkill: + type: object + required: + - id + - display_name + - description + - latest_version + - latest_minor_version + - status + - origin + - owner + - created_at + - updated_at + properties: + id: + type: string + description: Glean skill ID. + display_name: + type: string + description: Human-readable skill name. + description: + type: string + description: Human-readable skill description. + latest_version: + type: integer + description: Latest major version number for the skill. + latest_minor_version: + type: integer + description: Latest minor version number for the skill. + status: + $ref: "#/components/schemas/PlatformSkillStatus" + origin: + $ref: "#/components/schemas/PlatformSkillOrigin" + source_provenance: + $ref: "#/components/schemas/PlatformSkillSourceProvenance" + owner: + $ref: "#/components/schemas/PlatformPersonReference" + created_at: + type: string + format: date-time + description: Time the skill was created. + updated_at: + type: string + format: date-time + description: Time the skill was last updated. + PlatformSkillsListResponse: + type: object + required: + - skills + - has_more + - next_cursor + - request_id + properties: + skills: + type: array + description: Skills available to the user. + items: + $ref: "#/components/schemas/PlatformSkill" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: string + nullable: true + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillGetResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformFilterOperator: type: string description: Supported filter operator. @@ -5579,18 +5876,6 @@ components: Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set. time_range: $ref: "#/components/schemas/PlatformTimeRange" - PlatformPersonReference: - type: object - description: A lightweight reference to a person, used where a payload merely points at someone. - required: - - name - properties: - id: - type: string - description: Opaque Glean person ID. - name: - type: string - description: Display name. PlatformResult: type: object required: @@ -9635,6 +9920,22 @@ components: - EXECUTION - MCP description: Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. + actionTypeSource: + type: string + enum: + - MCP_ANNOTATION + - ADMIN_OVERRIDE + - NONE + - NATIVE_TOOL_DEFINITION + description: | + Analytics-only signal (product snapshot) describing WHERE the action's + read/write determination came from. Complementary to the effective + read/write value (the tool's ToolType, which drives HITL): the value says + read-or-write, this says how confident that is. MCP_ANNOTATION = from the + tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + NONE = no usable hint (the effective value then defaults to write); + NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + Does not affect runtime behavior. authType: type: string enum: @@ -10223,6 +10524,11 @@ components: type: boolean description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. readOnly: true + webhookUrl: + type: string + description: | + For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types. + readOnly: true WorkflowResult: type: object properties: @@ -15753,7 +16059,8 @@ components: - LOW - MEDIUM - HIGH - description: Severity levels for DLP findings and analyses. + - FALSE_POSITIVE + description: Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. x-include-enum-class-prefix: true DlpIssueStatus: type: string diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ed0d1379..1e37d886 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.789.2 +speakeasyVersion: 1.790.2 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:332fe231132168125dd7ec1089a24de5ad048c8b8a7273525f0f6e71b5802e66 + sourceBlobDigest: sha256:da98193c4834777a4010e98ec2d2c128cf8bd01af864e14a35f5b758b118b73c tags: - latest Glean-OAS: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:332fe231132168125dd7ec1089a24de5ad048c8b8a7273525f0f6e71b5802e66 + sourceBlobDigest: sha256:da98193c4834777a4010e98ec2d2c128cf8bd01af864e14a35f5b758b118b73c codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:8ece00a5293a8b8a6ba95820e2cbeb8403fe62126b980b4fe41338b20b87982a + codeSamplesRevisionDigest: sha256:02699a9d06bf7a36a9cb7ccf27672dbba5578c2d0fd6d7d32f39abb717b40d32 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 83329c00..4cc069f8 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.14.3' +implementation 'com.glean.api-client:glean-api-client:0.14.4' ``` Maven: @@ -75,7 +75,7 @@ Maven: com.glean.api-client glean-api-client - 0.14.3 + 0.14.4 ``` @@ -547,6 +547,7 @@ For more information on obtaining the appropriate token type, please contact you * [add](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource * [retrieveConfig](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config +* [submit](docs/sdks/indexingdatasources/README.md#submit) - Submit datasource data ### [Indexing.Documents](docs/sdks/indexingdocuments/README.md) @@ -602,6 +603,11 @@ For more information on obtaining the appropriate token type, please contact you * [query](docs/sdks/search/README.md#query) - Search +### [Skills](docs/sdks/skills/README.md) + +* [list](docs/sdks/skills/README.md#list) - List skills +* [retrieve](docs/sdks/skills/README.md#retrieve) - Retrieve skill + @@ -707,11 +713,11 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`GleanError`](./src/main/java/models/errors/GleanError.java)**: -* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 9 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException.java): Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. Applicable to 5 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 5 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 137 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 9 of 140 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException.java): Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. Applicable to 7 of 140 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 6 of 140 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 140 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 140 methods.* @@ -809,11 +815,10 @@ The server URL can also be overridden on a per-operation basis, provided a serve package hello.world; import com.glean.api_client.glean_api_client.Glean; -import com.glean.api_client.glean_api_client.models.components.CustomMetadataPutRequest; import com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse; -import com.glean.api_client.glean_api_client.models.operations.PutRestApiIndexDocumentDocIdCustomMetadataGroupNameResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; import java.lang.Exception; -import java.util.List; +import java.util.Map; public class Application { @@ -823,17 +828,18 @@ public class Application { .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) .build(); - PutRestApiIndexDocumentDocIdCustomMetadataGroupNameResponse res = sdk.indexing().customMetadata().upsert() + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = sdk.indexing().datasources().submit() .serverURL("https://instance-name-be.glean.com") - .docId("") - .groupName("") - .customMetadataPutRequest(CustomMetadataPutRequest.builder() - .customMetadata(List.of()) - .build()) + .datasourceInstance("") + .type("") + .requestBody(Map.ofEntries( + Map.entry("key", ""), + Map.entry("key1", ""), + Map.entry("key2", ""))) .call(); - if (res.successResponse().isPresent()) { - System.out.println(res.successResponse().get()); + if (res.object().isPresent()) { + System.out.println(res.object().get()); } } } diff --git a/RELEASES.md b/RELEASES.md index a0a4eb51..d7a757aa 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -798,4 +798,14 @@ Based on: ### Generated - [java v0.14.3] . ### Releases -- [Maven Central v0.14.3] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.3 - . \ No newline at end of file +- [Maven Central v0.14.3] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.3 - . + +## 2026-07-16 03:19:03 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.2 (2.918.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.14.4] . +### Releases +- [Maven Central v0.14.4] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.4 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index e78cd7df..c9b89563 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,7 @@ javadocJar { dependencies { api 'com.fasterxml.jackson.core:jackson-annotations:2.22' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.22.0' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.22.1' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.22.0' api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'} diff --git a/docs/models/components/ActionTypeSource.md b/docs/models/components/ActionTypeSource.md new file mode 100644 index 00000000..e2a0f9c4 --- /dev/null +++ b/docs/models/components/ActionTypeSource.md @@ -0,0 +1,32 @@ +# ActionTypeSource + +Analytics-only signal (product snapshot) describing WHERE the action's +read/write determination came from. Complementary to the effective +read/write value (the tool's ToolType, which drives HITL): the value says +read-or-write, this says how confident that is. MCP_ANNOTATION = from the +tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; +NONE = no usable hint (the effective value then defaults to write); +NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). +Does not affect runtime behavior. + + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.ActionTypeSource; + +ActionTypeSource value = ActionTypeSource.MCP_ANNOTATION; + +// Open enum: use .of() to create instances from custom string values +ActionTypeSource custom = ActionTypeSource.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `MCP_ANNOTATION` | MCP_ANNOTATION | +| `ADMIN_OVERRIDE` | ADMIN_OVERRIDE | +| `NONE` | NONE | +| `NATIVE_TOOL_DEFINITION` | NATIVE_TOOL_DEFINITION | \ No newline at end of file diff --git a/docs/models/components/DlpFindingFilter.md b/docs/models/components/DlpFindingFilter.md index 108a7202..42a0e927 100644 --- a/docs/models/components/DlpFindingFilter.md +++ b/docs/models/components/DlpFindingFilter.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `infoType` | *Optional\* | :heavy_minus_sign: | N/A | -| `regexId` | *Optional\* | :heavy_minus_sign: | N/A | -| `reportId` | *Optional\* | :heavy_minus_sign: | N/A | -| `datasource` | *Optional\* | :heavy_minus_sign: | N/A | -| `visibility` | *Optional\* | :heavy_minus_sign: | N/A | -| `documentIds` | List\<*String*> | :heavy_minus_sign: | N/A | -| `severity` | [Optional\](../../models/components/DlpSeverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. | -| `documentSeverity` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | N/A | -| `statuses` | List\<[DlpIssueStatus](../../models/components/DlpIssueStatus.md)> | :heavy_minus_sign: | N/A | -| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | -| `archived` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `infoType` | *Optional\* | :heavy_minus_sign: | N/A | +| `regexId` | *Optional\* | :heavy_minus_sign: | N/A | +| `reportId` | *Optional\* | :heavy_minus_sign: | N/A | +| `datasource` | *Optional\* | :heavy_minus_sign: | N/A | +| `visibility` | *Optional\* | :heavy_minus_sign: | N/A | +| `documentIds` | List\<*String*> | :heavy_minus_sign: | N/A | +| `severity` | [Optional\](../../models/components/DlpSeverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. | +| `documentSeverity` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | N/A | +| `statuses` | List\<[DlpIssueStatus](../../models/components/DlpIssueStatus.md)> | :heavy_minus_sign: | N/A | +| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | +| `archived` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/DlpSeverity.md b/docs/models/components/DlpSeverity.md index daf90f11..5ab3aa7f 100644 --- a/docs/models/components/DlpSeverity.md +++ b/docs/models/components/DlpSeverity.md @@ -1,6 +1,6 @@ # DlpSeverity -Severity levels for DLP findings and analyses. +Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. ## Example Usage @@ -16,9 +16,10 @@ DlpSeverity custom = DlpSeverity.of("custom_value"); ## Values -| Name | Value | -| ------------- | ------------- | -| `UNSPECIFIED` | UNSPECIFIED | -| `LOW` | LOW | -| `MEDIUM` | MEDIUM | -| `HIGH` | HIGH | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `UNSPECIFIED` | UNSPECIFIED | +| `LOW` | LOW | +| `MEDIUM` | MEDIUM | +| `HIGH` | HIGH | +| `FALSE_POSITIVE` | FALSE_POSITIVE | \ No newline at end of file diff --git a/docs/models/components/PlatformSkill.md b/docs/models/components/PlatformSkill.md new file mode 100644 index 00000000..ae055121 --- /dev/null +++ b/docs/models/components/PlatformSkill.md @@ -0,0 +1,18 @@ +# PlatformSkill + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | Glean skill ID. | +| `displayName` | *String* | :heavy_check_mark: | Human-readable skill name. | +| `description` | *String* | :heavy_check_mark: | Human-readable skill description. | +| `latestVersion` | *long* | :heavy_check_mark: | Latest major version number for the skill. | +| `latestMinorVersion` | *long* | :heavy_check_mark: | Latest minor version number for the skill. | +| `status` | [PlatformSkillStatus](../../models/components/PlatformSkillStatus.md) | :heavy_check_mark: | Current skill status. | +| `origin` | [PlatformSkillOrigin](../../models/components/PlatformSkillOrigin.md) | :heavy_check_mark: | Source category for the skill. | +| `sourceProvenance` | [Optional\](../../models/components/PlatformSkillSourceProvenance.md) | :heavy_minus_sign: | N/A | +| `owner` | [PlatformPersonReference](../../models/components/PlatformPersonReference.md) | :heavy_check_mark: | A lightweight reference to a person, used where a payload merely points at someone. | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | Time the skill was created. | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | Time the skill was last updated. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillGetResponse.md b/docs/models/components/PlatformSkillGetResponse.md new file mode 100644 index 00000000..295031b7 --- /dev/null +++ b/docs/models/components/PlatformSkillGetResponse.md @@ -0,0 +1,9 @@ +# PlatformSkillGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `skill` | [PlatformSkill](../../models/components/PlatformSkill.md) | :heavy_check_mark: | N/A | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillOrigin.md b/docs/models/components/PlatformSkillOrigin.md new file mode 100644 index 00000000..aa217c27 --- /dev/null +++ b/docs/models/components/PlatformSkillOrigin.md @@ -0,0 +1,18 @@ +# PlatformSkillOrigin + +Source category for the skill. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillOrigin; + +PlatformSkillOrigin value = PlatformSkillOrigin.CUSTOM; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `CUSTOM` | CUSTOM | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillSourceProvenance.md b/docs/models/components/PlatformSkillSourceProvenance.md new file mode 100644 index 00000000..a42f8d71 --- /dev/null +++ b/docs/models/components/PlatformSkillSourceProvenance.md @@ -0,0 +1,13 @@ +# PlatformSkillSourceProvenance + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `sourceUrl` | *Optional\* | :heavy_minus_sign: | URL of the external source the skill was imported from. | +| `commitSha` | *Optional\* | :heavy_minus_sign: | Source commit SHA for the imported skill. | +| `importedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Time the skill was imported. | +| `lastSyncedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Time the skill was last synced from its source. | +| `syncStatus` | [Optional\](../../models/components/PlatformSkillSyncStatus.md) | :heavy_minus_sign: | Current external-source sync status. | +| `syncError` | *Optional\* | :heavy_minus_sign: | Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillStatus.md b/docs/models/components/PlatformSkillStatus.md new file mode 100644 index 00000000..f3ebbcf2 --- /dev/null +++ b/docs/models/components/PlatformSkillStatus.md @@ -0,0 +1,23 @@ +# PlatformSkillStatus + +Current skill status. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillStatus; + +PlatformSkillStatus value = PlatformSkillStatus.DRAFT; + +// Open enum: use .of() to create instances from custom string values +PlatformSkillStatus custom = PlatformSkillStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `DRAFT` | DRAFT | +| `ENABLED` | ENABLED | +| `DISABLED` | DISABLED | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillSyncStatus.md b/docs/models/components/PlatformSkillSyncStatus.md new file mode 100644 index 00000000..d8195068 --- /dev/null +++ b/docs/models/components/PlatformSkillSyncStatus.md @@ -0,0 +1,23 @@ +# PlatformSkillSyncStatus + +Current external-source sync status. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillSyncStatus; + +PlatformSkillSyncStatus value = PlatformSkillSyncStatus.UP_TO_DATE; + +// Open enum: use .of() to create instances from custom string values +PlatformSkillSyncStatus custom = PlatformSkillSyncStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `UP_TO_DATE` | UP_TO_DATE | +| `UPDATE_AVAILABLE` | UPDATE_AVAILABLE | +| `SYNC_FAILED` | SYNC_FAILED | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillsListResponse.md b/docs/models/components/PlatformSkillsListResponse.md new file mode 100644 index 00000000..1a206faa --- /dev/null +++ b/docs/models/components/PlatformSkillsListResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsListResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `skills` | List\<[PlatformSkill](../../models/components/PlatformSkill.md)> | :heavy_check_mark: | Skills available to the user. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether additional results are available. | +| `nextCursor` | *Optional\* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/ToolMetadata.md b/docs/models/components/ToolMetadata.md index 0f42b42f..83acea7f 100644 --- a/docs/models/components/ToolMetadata.md +++ b/docs/models/components/ToolMetadata.md @@ -5,23 +5,24 @@ The manifest for a tool that can be used to augment Glean Assistant. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [ToolMetadataType](../../models/components/ToolMetadataType.md) | :heavy_check_mark: | The type of tool. | | -| `name` | *String* | :heavy_check_mark: | Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. | | -| `displayName` | *String* | :heavy_check_mark: | Human understandable name of the tool. Max 50 characters. | | -| `toolId` | *Optional\* | :heavy_minus_sign: | An opaque id which is unique identifier for the tool. | | -| `displayDescription` | *String* | :heavy_check_mark: | Description of the tool meant for a human. | | -| `logoUrl` | *Optional\* | :heavy_minus_sign: | URL used to fetch the logo. | | -| `objectName` | *Optional\* | :heavy_minus_sign: | Name of the generated object. This will be used to indicate to the end user what the generated object contains. | [
"HR ticket",
"Email",
"Chat message"
] | -| `knowledgeType` | [Optional\](../../models/components/KnowledgeType.md) | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify. | | -| `createdBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | -| `lastUpdatedBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was created in ISO format (ISO 8601) | | -| `lastUpdatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was last updated in ISO format (ISO 8601) | | -| `writeActionType` | [Optional\](../../models/components/WriteActionType.md) | :heavy_minus_sign: | Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. | | -| `authType` | [Optional\](../../models/components/AuthType.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| | -| `auth` | [Optional\](../../models/components/AuthConfig.md) | :heavy_minus_sign: | Config for tool's authentication method. | | -| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | -| `usageInstructions` | *Optional\* | :heavy_minus_sign: | Usage instructions for the LLM to use this action. | | -| `isSetupFinished` | *Optional\* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [ToolMetadataType](../../models/components/ToolMetadataType.md) | :heavy_check_mark: | The type of tool. | | +| `name` | *String* | :heavy_check_mark: | Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. | | +| `displayName` | *String* | :heavy_check_mark: | Human understandable name of the tool. Max 50 characters. | | +| `toolId` | *Optional\* | :heavy_minus_sign: | An opaque id which is unique identifier for the tool. | | +| `displayDescription` | *String* | :heavy_check_mark: | Description of the tool meant for a human. | | +| `logoUrl` | *Optional\* | :heavy_minus_sign: | URL used to fetch the logo. | | +| `objectName` | *Optional\* | :heavy_minus_sign: | Name of the generated object. This will be used to indicate to the end user what the generated object contains. | [
"HR ticket",
"Email",
"Chat message"
] | +| `knowledgeType` | [Optional\](../../models/components/KnowledgeType.md) | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify. | | +| `createdBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | +| `lastUpdatedBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was created in ISO format (ISO 8601) | | +| `lastUpdatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was last updated in ISO format (ISO 8601) | | +| `writeActionType` | [Optional\](../../models/components/WriteActionType.md) | :heavy_minus_sign: | Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. | | +| `actionTypeSource` | [Optional\](../../models/components/ActionTypeSource.md) | :heavy_minus_sign: | Analytics-only signal (product snapshot) describing WHERE the action's
read/write determination came from. Complementary to the effective
read/write value (the tool's ToolType, which drives HITL): the value says
read-or-write, this says how confident that is. MCP_ANNOTATION = from the
tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it;
NONE = no usable hint (the effective value then defaults to write);
NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived).
Does not affect runtime behavior.
| | +| `authType` | [Optional\](../../models/components/AuthType.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| | +| `auth` | [Optional\](../../models/components/AuthConfig.md) | :heavy_minus_sign: | Config for tool's authentication method. | | +| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | +| `usageInstructions` | *Optional\* | :heavy_minus_sign: | Usage instructions for the LLM to use this action. | | +| `isSetupFinished` | *Optional\* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | | \ No newline at end of file diff --git a/docs/models/components/Workflow.md b/docs/models/components/Workflow.md index 9212a9af..a33f5dca 100644 --- a/docs/models/components/Workflow.md +++ b/docs/models/components/Workflow.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *Optional\* | :heavy_minus_sign: | The name of the workflow. | | -| `author` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `createTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | -| `lastUpdateTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | -| `lastDraftSavedAt` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | -| `lastDraftSavedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `lastDraftGitAuthorId` | *Optional\* | :heavy_minus_sign: | ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. | | -| `lastUpdatedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | -| `id` | *Optional\* | :heavy_minus_sign: | The ID of the workflow. | | -| `verified` | *Optional\* | :heavy_minus_sign: | When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. | | -| `showOrganizationAsAuthor` | *Optional\* | :heavy_minus_sign: | When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the workflow. | | +| `author` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `createTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | +| `lastUpdateTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | +| `lastDraftSavedAt` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | +| `lastDraftSavedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `lastDraftGitAuthorId` | *Optional\* | :heavy_minus_sign: | ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. | | +| `lastUpdatedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | +| `id` | *Optional\* | :heavy_minus_sign: | The ID of the workflow. | | +| `verified` | *Optional\* | :heavy_minus_sign: | When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. | | +| `showOrganizationAsAuthor` | *Optional\* | :heavy_minus_sign: | When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. | | +| `webhookUrl` | *Optional\* | :heavy_minus_sign: | For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types.
| | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetRequest.md b/docs/models/operations/PlatformSkillsGetRequest.md new file mode 100644 index 00000000..1e6a21c8 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetResponse.md b/docs/models/operations/PlatformSkillsGetResponse.md new file mode 100644 index 00000000..a2da05c0 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `platformSkillGetResponse` | [Optional\](../../models/components/PlatformSkillGetResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsListRequest.md b/docs/models/operations/PlatformSkillsListRequest.md new file mode 100644 index 00000000..15f66cfe --- /dev/null +++ b/docs/models/operations/PlatformSkillsListRequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsListRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Maximum number of skills to return. | +| `cursor` | *Optional\* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsListResponse.md b/docs/models/operations/PlatformSkillsListResponse.md new file mode 100644 index 00000000..c362bbc1 --- /dev/null +++ b/docs/models/operations/PlatformSkillsListResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `platformSkillsListResponse` | [Optional\](../../models/components/PlatformSkillsListResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md new file mode 100644 index 00000000..5240e204 --- /dev/null +++ b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md @@ -0,0 +1,10 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `datasourceInstance` | *String* | :heavy_check_mark: | Datasource instance that should process the submission | +| `type` | *String* | :heavy_check_mark: | Submission type registered for the datasource | +| `requestBody` | Map\ | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md new file mode 100644 index 00000000..57dda74e --- /dev/null +++ b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md @@ -0,0 +1,11 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md) | :heavy_minus_sign: | Accepted | \ No newline at end of file diff --git a/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md new file mode 100644 index 00000000..202f59dd --- /dev/null +++ b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md @@ -0,0 +1,10 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody + +Accepted + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `requestId` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/indexingdatasources/README.md b/docs/sdks/indexingdatasources/README.md index 88064060..5184de29 100644 --- a/docs/sdks/indexingdatasources/README.md +++ b/docs/sdks/indexingdatasources/README.md @@ -6,6 +6,7 @@ * [add](#add) - Add or update datasource * [retrieveConfig](#retrieveconfig) - Get datasource config +* [submit](#submit) - Submit datasource data ## add @@ -122,4 +123,65 @@ public class Application { | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | -| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## submit + +Validates and asynchronously processes a datasource-specific submission. + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; +import java.lang.Exception; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws ErrorInfoResponse, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = sdk.indexing().datasources().submit() + .datasourceInstance("") + .type("") + .requestBody(Map.ofEntries( + Map.entry("key", ""), + Map.entry("key1", ""), + Map.entry("key2", ""))) + .call(); + + if (res.object().isPresent()) { + System.out.println(res.object().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `datasourceInstance` | *String* | :heavy_check_mark: | Datasource instance that should process the submission | +| `type` | *String* | :heavy_check_mark: | Submission type registered for the datasource | +| `requestBody` | Map\ | :heavy_check_mark: | N/A | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | + +### Response + +**[PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse](../../models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| models/errors/ErrorInfoResponse | 400, 401, 404 | application/json | +| models/errors/ErrorInfoResponse | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md new file mode 100644 index 00000000..4ab9a3ff --- /dev/null +++ b/docs/sdks/skills/README.md @@ -0,0 +1,114 @@ +# Skills + +## Overview + +### Available Operations + +* [list](#list) - List skills +* [retrieve](#retrieve) - Retrieve skill + +## list + +List skills available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsListResponse res = sdk.skills().list() + .call(); + + if (res.platformSkillsListResponse().isPresent()) { + System.out.println(res.platformSkillsListResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Maximum number of skills to return. | +| `cursor` | *Optional\* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | + +### Response + +**[PlatformSkillsListResponse](../../models/operations/PlatformSkillsListResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## retrieve + +Retrieve metadata for a skill available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsGetResponse res = sdk.skills().retrieve() + .skillId("") + .call(); + + if (res.platformSkillGetResponse().isPresent()) { + System.out.println(res.platformSkillGetResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | + +### Response + +**[PlatformSkillsGetResponse](../../models/operations/PlatformSkillsGetResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 947c27d5..706f8978 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.14.3 +version=0.14.4 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java index 043e1a83..ec55bc7d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java @@ -36,6 +36,8 @@ public class AsyncGlean { private final AsyncAgents agents; + private final AsyncSkills skills; + private final AsyncSearch search; private final AsyncClient client; @@ -46,6 +48,10 @@ public AsyncAgents agents() { return agents; } + public AsyncSkills skills() { + return skills; + } + public AsyncSearch search() { return search; } @@ -65,6 +71,7 @@ public AsyncIndexing indexing() { this.syncSDK = syncSDK; this.sdkConfiguration = sdkConfiguration; this.agents = new AsyncAgents(syncSDK.agents(), sdkConfiguration); + this.skills = new AsyncSkills(syncSDK.skills(), sdkConfiguration); this.search = new AsyncSearch(syncSDK.search(), sdkConfiguration); this.client = new AsyncClient(syncSDK.client(), sdkConfiguration); this.indexing = new AsyncIndexing(syncSDK.indexing(), sdkConfiguration); diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java index 5976744e..7598fae7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java @@ -8,13 +8,21 @@ import com.glean.api_client.glean_api_client.models.components.CustomDatasourceConfig; import com.glean.api_client.glean_api_client.models.components.GetDatasourceConfigRequest; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1AdddatasourceRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1AdddatasourceResponse; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1GetdatasourceconfigRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1GetdatasourceconfigResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; import com.glean.api_client.glean_api_client.operations.PostApiIndexV1Adddatasource; import com.glean.api_client.glean_api_client.operations.PostApiIndexV1Getdatasourceconfig; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Object; +import java.lang.String; +import java.util.Map; +import java.util.Optional; import java.util.concurrent.CompletableFuture; @@ -91,4 +99,61 @@ public CompletableFuture retrieveConf .thenCompose(operation::handleResponse); } + + /** + * Submit datasource data + * + *

Validates and asynchronously processes a datasource-specific submission. + * + * @return The async call builder + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder submit() { + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder(sdkConfiguration); + } + + /** + * Submit datasource data + * + *

Validates and asynchronously processes a datasource-specific submission. + * + * @param datasourceInstance Datasource instance that should process the submission + * @param type Submission type registered for the datasource + * @param requestBody + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture submit( + String datasourceInstance, String type, + Map requestBody) { + return submit( + datasourceInstance, type, requestBody, + Optional.empty()); + } + + /** + * Submit datasource data + * + *

Validates and asynchronously processes a datasource-specific submission. + * + * @param datasourceInstance Datasource instance that should process the submission + * @param type Submission type registered for the datasource + * @param requestBody + * @param serverURL Overrides the server URL. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture submit( + String datasourceInstance, String type, + Map requestBody, Optional serverURL) { + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + .builder() + .datasourceInstance(datasourceInstance) + .type(type) + .requestBody(requestBody) + .build(); + AsyncRequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Async(sdkConfiguration, serverURL, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + } diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java new file mode 100644 index 00000000..e27ff094 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 809381bacfb1 + */ +package com.glean.api_client.glean_api_client; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + + +public class AsyncSkills { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final Skills syncSDK; + + AsyncSkills(Skills syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Skills sync() { + return syncSDK; + } + + + /** + * List skills + * + *

List skills available to the authenticated user. + * + * @return The async call builder + */ + public PlatformSkillsListRequestBuilder list() { + return new PlatformSkillsListRequestBuilder(sdkConfiguration); + } + + /** + * List skills + * + *

List skills available to the authenticated user. + * + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listDirect() { + return list(Optional.empty(), Optional.empty()); + } + + /** + * List skills + * + *

List skills available to the authenticated user. + * + * @param pageSize Maximum number of skills to return. + * @param cursor Opaque pagination cursor from a previous response. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture list(Optional pageSize, Optional cursor) { + PlatformSkillsListRequest request = + PlatformSkillsListRequest + .builder() + .pageSize(pageSize) + .cursor(cursor) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsList.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve skill + * + *

Retrieve metadata for a skill available to the authenticated user. + * + * @return The async call builder + */ + public PlatformSkillsGetRequestBuilder retrieve() { + return new PlatformSkillsGetRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve skill + * + *

Retrieve metadata for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture retrieve(String skillId) { + PlatformSkillsGetRequest request = + PlatformSkillsGetRequest + .builder() + .skillId(skillId) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsGet.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/Glean.java b/src/main/java/com/glean/api_client/glean_api_client/Glean.java index 3a902376..fe8fc29c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Glean.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Glean.java @@ -58,6 +58,9 @@ public class Glean { private final Agents agents; + private final Skills skills; + + private final Search search; @@ -72,6 +75,11 @@ public Agents agents() { } + public Skills skills() { + return skills; + } + + public Search search() { return search; } @@ -252,6 +260,7 @@ public static Builder builder() { private Glean(SDKConfiguration sdkConfiguration) { sdkConfiguration.initialize(); this.agents = new Agents(sdkConfiguration); + this.skills = new Skills(sdkConfiguration); this.search = new Search(sdkConfiguration); this.client = new Client(sdkConfiguration); this.indexing = new Indexing(sdkConfiguration); diff --git a/src/main/java/com/glean/api_client/glean_api_client/IndexingDatasources.java b/src/main/java/com/glean/api_client/glean_api_client/IndexingDatasources.java index fa37373f..54668f98 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/IndexingDatasources.java +++ b/src/main/java/com/glean/api_client/glean_api_client/IndexingDatasources.java @@ -12,9 +12,17 @@ import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1AdddatasourceResponse; import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1GetdatasourceconfigRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1GetdatasourceconfigResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; import com.glean.api_client.glean_api_client.operations.PostApiIndexV1Adddatasource; import com.glean.api_client.glean_api_client.operations.PostApiIndexV1Getdatasourceconfig; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Object; +import java.lang.String; +import java.util.Map; +import java.util.Optional; public class IndexingDatasources { @@ -88,4 +96,60 @@ public PostApiIndexV1GetdatasourceconfigResponse retrieveConfig(GetDatasourceCon return operation.handleResponse(operation.doRequest(request)); } + /** + * Submit datasource data + * + *

Validates and asynchronously processes a datasource-specific submission. + * + * @return The call builder + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder submit() { + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder(sdkConfiguration); + } + + /** + * Submit datasource data + * + *

Validates and asynchronously processes a datasource-specific submission. + * + * @param datasourceInstance Datasource instance that should process the submission + * @param type Submission type registered for the datasource + * @param requestBody + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse submit( + String datasourceInstance, String type, + Map requestBody) { + return submit(datasourceInstance, type, requestBody, + Optional.empty()); + } + + /** + * Submit datasource data + * + *

Validates and asynchronously processes a datasource-specific submission. + * + * @param datasourceInstance Datasource instance that should process the submission + * @param type Submission type registered for the datasource + * @param requestBody + * @param serverURL Overrides the server URL. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse submit( + String datasourceInstance, String type, + Map requestBody, Optional serverURL) { + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + .builder() + .datasourceInstance(datasourceInstance) + .type(type) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Sync(sdkConfiguration, serverURL, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java index f24764cd..290c779f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java +++ b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java @@ -25,8 +25,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.14.3"; - public static final String GEN_VERSION = "2.916.4"; + public static final String SDK_VERSION = "0.14.4"; + public static final String GEN_VERSION = "2.918.3"; private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/glean/api_client/glean_api_client/Skills.java b/src/main/java/com/glean/api_client/glean_api_client/Skills.java new file mode 100644 index 00000000..1273572e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/Skills.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6903ae835067 + */ +package com.glean.api_client.glean_api_client; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListResponse; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + + +public class Skills { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncSkills asyncSDK; + + Skills(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncSkills(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncSkills async() { + return asyncSDK; + } + + /** + * List skills + * + *

List skills available to the authenticated user. + * + * @return The call builder + */ + public PlatformSkillsListRequestBuilder list() { + return new PlatformSkillsListRequestBuilder(sdkConfiguration); + } + + /** + * List skills + * + *

List skills available to the authenticated user. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsListResponse listDirect() { + return list(Optional.empty(), Optional.empty()); + } + + /** + * List skills + * + *

List skills available to the authenticated user. + * + * @param pageSize Maximum number of skills to return. + * @param cursor Opaque pagination cursor from a previous response. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsListResponse list(Optional pageSize, Optional cursor) { + PlatformSkillsListRequest request = + PlatformSkillsListRequest + .builder() + .pageSize(pageSize) + .cursor(cursor) + .build(); + RequestOperation operation + = new PlatformSkillsList.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve skill + * + *

Retrieve metadata for a skill available to the authenticated user. + * + * @return The call builder + */ + public PlatformSkillsGetRequestBuilder retrieve() { + return new PlatformSkillsGetRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve skill + * + *

Retrieve metadata for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsGetResponse retrieve(String skillId) { + PlatformSkillsGetRequest request = + PlatformSkillsGetRequest + .builder() + .skillId(skillId) + .build(); + RequestOperation operation + = new PlatformSkillsGet.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ActionTypeSource.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ActionTypeSource.java new file mode 100644 index 00000000..9fdeb3ad --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ActionTypeSource.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e0b3f77e465b + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ActionTypeSource + * + *

Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ +public class ActionTypeSource { + + public static final ActionTypeSource MCP_ANNOTATION = new ActionTypeSource("MCP_ANNOTATION"); + public static final ActionTypeSource ADMIN_OVERRIDE = new ActionTypeSource("ADMIN_OVERRIDE"); + public static final ActionTypeSource NONE = new ActionTypeSource("NONE"); + public static final ActionTypeSource NATIVE_TOOL_DEFINITION = new ActionTypeSource("NATIVE_TOOL_DEFINITION"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ActionTypeSource(String value) { + this.value = value; + } + + /** + * Returns a ActionTypeSource with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ActionTypeSource + */ + @JsonCreator + public static ActionTypeSource of(String value) { + synchronized (ActionTypeSource.class) { + return values.computeIfAbsent(value, v -> new ActionTypeSource(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ActionTypeSource other = (ActionTypeSource) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ActionTypeSource [value=" + value + "]"; + } + + // return an array just like an enum + public static ActionTypeSource[] values() { + synchronized (ActionTypeSource.class) { + return values.values().toArray(new ActionTypeSource[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("MCP_ANNOTATION", MCP_ANNOTATION); + map.put("ADMIN_OVERRIDE", ADMIN_OVERRIDE); + map.put("NONE", NONE); + map.put("NATIVE_TOOL_DEFINITION", NATIVE_TOOL_DEFINITION); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("MCP_ANNOTATION", ActionTypeSourceEnum.MCP_ANNOTATION); + map.put("ADMIN_OVERRIDE", ActionTypeSourceEnum.ADMIN_OVERRIDE); + map.put("NONE", ActionTypeSourceEnum.NONE); + map.put("NATIVE_TOOL_DEFINITION", ActionTypeSourceEnum.NATIVE_TOOL_DEFINITION); + return map; + } + + + public enum ActionTypeSourceEnum { + + MCP_ANNOTATION("MCP_ANNOTATION"), + ADMIN_OVERRIDE("ADMIN_OVERRIDE"), + NONE("NONE"), + NATIVE_TOOL_DEFINITION("NATIVE_TOOL_DEFINITION"),; + + private final String value; + + private ActionTypeSourceEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java index 478d8692..92425052 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java @@ -50,7 +50,8 @@ public class DlpFindingFilter { private Optional> documentIds; /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("severity") @@ -152,7 +153,8 @@ public Optional> documentIds() { } /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -267,7 +269,8 @@ public DlpFindingFilter withDocumentIds(Optional> documen } /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public DlpFindingFilter withSeverity(DlpSeverity severity) { Utils.checkNotNull(severity, "severity"); @@ -277,7 +280,8 @@ public DlpFindingFilter withSeverity(DlpSeverity severity) { /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public DlpFindingFilter withSeverity(Optional severity) { Utils.checkNotNull(severity, "severity"); @@ -494,7 +498,8 @@ public Builder documentIds(Optional> documentIds) { /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public Builder severity(DlpSeverity severity) { Utils.checkNotNull(severity, "severity"); @@ -503,7 +508,8 @@ public Builder severity(DlpSeverity severity) { } /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public Builder severity(Optional severity) { Utils.checkNotNull(severity, "severity"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java index 2f7a0d6a..db14be57 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java @@ -22,7 +22,8 @@ /** * DlpSeverity * - *

Severity levels for DLP findings and analyses. + *

Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public class DlpSeverity { @@ -30,6 +31,7 @@ public class DlpSeverity { public static final DlpSeverity LOW = new DlpSeverity("LOW"); public static final DlpSeverity MEDIUM = new DlpSeverity("MEDIUM"); public static final DlpSeverity HIGH = new DlpSeverity("HIGH"); + public static final DlpSeverity FALSE_POSITIVE = new DlpSeverity("FALSE_POSITIVE"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -107,6 +109,7 @@ private static final Map createValuesMap() { map.put("LOW", LOW); map.put("MEDIUM", MEDIUM); map.put("HIGH", HIGH); + map.put("FALSE_POSITIVE", FALSE_POSITIVE); return map; } @@ -116,6 +119,7 @@ private static final Map createEnumsMap() { map.put("LOW", DlpSeverityEnum.LOW); map.put("MEDIUM", DlpSeverityEnum.MEDIUM); map.put("HIGH", DlpSeverityEnum.HIGH); + map.put("FALSE_POSITIVE", DlpSeverityEnum.FALSE_POSITIVE); return map; } @@ -125,7 +129,8 @@ public enum DlpSeverityEnum { UNSPECIFIED("UNSPECIFIED"), LOW("LOW"), MEDIUM("MEDIUM"), - HIGH("HIGH"),; + HIGH("HIGH"), + FALSE_POSITIVE("FALSE_POSITIVE"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java new file mode 100644 index 00000000..06ad3a27 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java @@ -0,0 +1,535 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 11a29891a283 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.Optional; + + +public class PlatformSkill { + /** + * Glean skill ID. + */ + @JsonProperty("id") + private String id; + + /** + * Human-readable skill name. + */ + @JsonProperty("display_name") + private String displayName; + + /** + * Human-readable skill description. + */ + @JsonProperty("description") + private String description; + + /** + * Latest major version number for the skill. + */ + @JsonProperty("latest_version") + private long latestVersion; + + /** + * Latest minor version number for the skill. + */ + @JsonProperty("latest_minor_version") + private long latestMinorVersion; + + /** + * Current skill status. + */ + @JsonProperty("status") + private PlatformSkillStatus status; + + /** + * Source category for the skill. + */ + @JsonProperty("origin") + private PlatformSkillOrigin origin; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_provenance") + private Optional sourceProvenance; + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + @JsonProperty("owner") + private PlatformPersonReference owner; + + /** + * Time the skill was created. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * Time the skill was last updated. + */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + @JsonCreator + public PlatformSkill( + @JsonProperty("id") String id, + @JsonProperty("display_name") String displayName, + @JsonProperty("description") String description, + @JsonProperty("latest_version") long latestVersion, + @JsonProperty("latest_minor_version") long latestMinorVersion, + @JsonProperty("status") PlatformSkillStatus status, + @JsonProperty("origin") PlatformSkillOrigin origin, + @JsonProperty("source_provenance") Optional sourceProvenance, + @JsonProperty("owner") PlatformPersonReference owner, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("updated_at") OffsetDateTime updatedAt) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(latestVersion, "latestVersion"); + Utils.checkNotNull(latestMinorVersion, "latestMinorVersion"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(origin, "origin"); + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + Utils.checkNotNull(owner, "owner"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.id = id; + this.displayName = displayName; + this.description = description; + this.latestVersion = latestVersion; + this.latestMinorVersion = latestMinorVersion; + this.status = status; + this.origin = origin; + this.sourceProvenance = sourceProvenance; + this.owner = owner; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public PlatformSkill( + String id, + String displayName, + String description, + long latestVersion, + long latestMinorVersion, + PlatformSkillStatus status, + PlatformSkillOrigin origin, + PlatformPersonReference owner, + OffsetDateTime createdAt, + OffsetDateTime updatedAt) { + this(id, displayName, description, + latestVersion, latestMinorVersion, status, + origin, Optional.empty(), owner, + createdAt, updatedAt); + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * Human-readable skill name. + */ + @JsonIgnore + public String displayName() { + return displayName; + } + + /** + * Human-readable skill description. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * Latest major version number for the skill. + */ + @JsonIgnore + public long latestVersion() { + return latestVersion; + } + + /** + * Latest minor version number for the skill. + */ + @JsonIgnore + public long latestMinorVersion() { + return latestMinorVersion; + } + + /** + * Current skill status. + */ + @JsonIgnore + public PlatformSkillStatus status() { + return status; + } + + /** + * Source category for the skill. + */ + @JsonIgnore + public PlatformSkillOrigin origin() { + return origin; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional sourceProvenance() { + return (Optional) sourceProvenance; + } + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + @JsonIgnore + public PlatformPersonReference owner() { + return owner; + } + + /** + * Time the skill was created. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * Time the skill was last updated. + */ + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkill withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Human-readable skill name. + */ + public PlatformSkill withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * Human-readable skill description. + */ + public PlatformSkill withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * Latest major version number for the skill. + */ + public PlatformSkill withLatestVersion(long latestVersion) { + Utils.checkNotNull(latestVersion, "latestVersion"); + this.latestVersion = latestVersion; + return this; + } + + /** + * Latest minor version number for the skill. + */ + public PlatformSkill withLatestMinorVersion(long latestMinorVersion) { + Utils.checkNotNull(latestMinorVersion, "latestMinorVersion"); + this.latestMinorVersion = latestMinorVersion; + return this; + } + + /** + * Current skill status. + */ + public PlatformSkill withStatus(PlatformSkillStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Source category for the skill. + */ + public PlatformSkill withOrigin(PlatformSkillOrigin origin) { + Utils.checkNotNull(origin, "origin"); + this.origin = origin; + return this; + } + + public PlatformSkill withSourceProvenance(PlatformSkillSourceProvenance sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = Optional.ofNullable(sourceProvenance); + return this; + } + + + public PlatformSkill withSourceProvenance(Optional sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = sourceProvenance; + return this; + } + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + public PlatformSkill withOwner(PlatformPersonReference owner) { + Utils.checkNotNull(owner, "owner"); + this.owner = owner; + return this; + } + + /** + * Time the skill was created. + */ + public PlatformSkill withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Time the skill was last updated. + */ + public PlatformSkill withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkill other = (PlatformSkill) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.displayName, other.displayName) && + Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.latestVersion, other.latestVersion) && + Utils.enhancedDeepEquals(this.latestMinorVersion, other.latestMinorVersion) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.origin, other.origin) && + Utils.enhancedDeepEquals(this.sourceProvenance, other.sourceProvenance) && + Utils.enhancedDeepEquals(this.owner, other.owner) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, displayName, description, + latestVersion, latestMinorVersion, status, + origin, sourceProvenance, owner, + createdAt, updatedAt); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkill.class, + "id", id, + "displayName", displayName, + "description", description, + "latestVersion", latestVersion, + "latestMinorVersion", latestMinorVersion, + "status", status, + "origin", origin, + "sourceProvenance", sourceProvenance, + "owner", owner, + "createdAt", createdAt, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String displayName; + + private String description; + + private Long latestVersion; + + private Long latestMinorVersion; + + private PlatformSkillStatus status; + + private PlatformSkillOrigin origin; + + private Optional sourceProvenance = Optional.empty(); + + private PlatformPersonReference owner; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Human-readable skill name. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + + /** + * Human-readable skill description. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + + /** + * Latest major version number for the skill. + */ + public Builder latestVersion(long latestVersion) { + Utils.checkNotNull(latestVersion, "latestVersion"); + this.latestVersion = latestVersion; + return this; + } + + + /** + * Latest minor version number for the skill. + */ + public Builder latestMinorVersion(long latestMinorVersion) { + Utils.checkNotNull(latestMinorVersion, "latestMinorVersion"); + this.latestMinorVersion = latestMinorVersion; + return this; + } + + + /** + * Current skill status. + */ + public Builder status(PlatformSkillStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Source category for the skill. + */ + public Builder origin(PlatformSkillOrigin origin) { + Utils.checkNotNull(origin, "origin"); + this.origin = origin; + return this; + } + + + public Builder sourceProvenance(PlatformSkillSourceProvenance sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = Optional.ofNullable(sourceProvenance); + return this; + } + + public Builder sourceProvenance(Optional sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = sourceProvenance; + return this; + } + + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + public Builder owner(PlatformPersonReference owner) { + Utils.checkNotNull(owner, "owner"); + this.owner = owner; + return this; + } + + + /** + * Time the skill was created. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * Time the skill was last updated. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public PlatformSkill build() { + + return new PlatformSkill( + id, displayName, description, + latestVersion, latestMinorVersion, status, + origin, sourceProvenance, owner, + createdAt, updatedAt); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillGetResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillGetResponse.java new file mode 100644 index 00000000..f442b75f --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillGetResponse.java @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 88de4cd9201f + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillGetResponse { + + @JsonProperty("skill") + private PlatformSkill skill; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillGetResponse( + @JsonProperty("skill") PlatformSkill skill, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(skill, "skill"); + Utils.checkNotNull(requestId, "requestId"); + this.skill = skill; + this.requestId = requestId; + } + + @JsonIgnore + public PlatformSkill skill() { + return skill; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlatformSkillGetResponse withSkill(PlatformSkill skill) { + Utils.checkNotNull(skill, "skill"); + this.skill = skill; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillGetResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillGetResponse other = (PlatformSkillGetResponse) o; + return + Utils.enhancedDeepEquals(this.skill, other.skill) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skill, requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillGetResponse.class, + "skill", skill, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkill skill; + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + public Builder skill(PlatformSkill skill) { + Utils.checkNotNull(skill, "skill"); + this.skill = skill; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillGetResponse build() { + + return new PlatformSkillGetResponse( + skill, requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillOrigin.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillOrigin.java new file mode 100644 index 00000000..2694ce8a --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillOrigin.java @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 673d58eb0c96 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * PlatformSkillOrigin + * + *

Source category for the skill. + */ +public class PlatformSkillOrigin { + + public static final PlatformSkillOrigin CUSTOM = new PlatformSkillOrigin("CUSTOM"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private PlatformSkillOrigin(String value) { + this.value = value; + } + + /** + * Returns a PlatformSkillOrigin with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as PlatformSkillOrigin + */ + @JsonCreator + public static PlatformSkillOrigin of(String value) { + synchronized (PlatformSkillOrigin.class) { + return values.computeIfAbsent(value, v -> new PlatformSkillOrigin(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PlatformSkillOrigin other = (PlatformSkillOrigin) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "PlatformSkillOrigin [value=" + value + "]"; + } + + // return an array just like an enum + public static PlatformSkillOrigin[] values() { + synchronized (PlatformSkillOrigin.class) { + return values.values().toArray(new PlatformSkillOrigin[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("CUSTOM", CUSTOM); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("CUSTOM", PlatformSkillOriginEnum.CUSTOM); + return map; + } + + + public enum PlatformSkillOriginEnum { + + CUSTOM("CUSTOM"),; + + private final String value; + + private PlatformSkillOriginEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSourceProvenance.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSourceProvenance.java new file mode 100644 index 00000000..de7125a5 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSourceProvenance.java @@ -0,0 +1,435 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1fb785647231 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.Optional; + + +public class PlatformSkillSourceProvenance { + /** + * URL of the external source the skill was imported from. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_url") + private Optional sourceUrl; + + /** + * Source commit SHA for the imported skill. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("commit_sha") + private Optional commitSha; + + /** + * Time the skill was imported. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("imported_at") + private Optional importedAt; + + /** + * Time the skill was last synced from its source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("last_synced_at") + private Optional lastSyncedAt; + + /** + * Current external-source sync status. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sync_status") + private Optional syncStatus; + + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sync_error") + private Optional syncError; + + @JsonCreator + public PlatformSkillSourceProvenance( + @JsonProperty("source_url") Optional sourceUrl, + @JsonProperty("commit_sha") Optional commitSha, + @JsonProperty("imported_at") Optional importedAt, + @JsonProperty("last_synced_at") Optional lastSyncedAt, + @JsonProperty("sync_status") Optional syncStatus, + @JsonProperty("sync_error") Optional syncError) { + Utils.checkNotNull(sourceUrl, "sourceUrl"); + Utils.checkNotNull(commitSha, "commitSha"); + Utils.checkNotNull(importedAt, "importedAt"); + Utils.checkNotNull(lastSyncedAt, "lastSyncedAt"); + Utils.checkNotNull(syncStatus, "syncStatus"); + Utils.checkNotNull(syncError, "syncError"); + this.sourceUrl = sourceUrl; + this.commitSha = commitSha; + this.importedAt = importedAt; + this.lastSyncedAt = lastSyncedAt; + this.syncStatus = syncStatus; + this.syncError = syncError; + } + + public PlatformSkillSourceProvenance() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * URL of the external source the skill was imported from. + */ + @JsonIgnore + public Optional sourceUrl() { + return sourceUrl; + } + + /** + * Source commit SHA for the imported skill. + */ + @JsonIgnore + public Optional commitSha() { + return commitSha; + } + + /** + * Time the skill was imported. + */ + @JsonIgnore + public Optional importedAt() { + return importedAt; + } + + /** + * Time the skill was last synced from its source. + */ + @JsonIgnore + public Optional lastSyncedAt() { + return lastSyncedAt; + } + + /** + * Current external-source sync status. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional syncStatus() { + return (Optional) syncStatus; + } + + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + @JsonIgnore + public Optional syncError() { + return syncError; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * URL of the external source the skill was imported from. + */ + public PlatformSkillSourceProvenance withSourceUrl(String sourceUrl) { + Utils.checkNotNull(sourceUrl, "sourceUrl"); + this.sourceUrl = Optional.ofNullable(sourceUrl); + return this; + } + + + /** + * URL of the external source the skill was imported from. + */ + public PlatformSkillSourceProvenance withSourceUrl(Optional sourceUrl) { + Utils.checkNotNull(sourceUrl, "sourceUrl"); + this.sourceUrl = sourceUrl; + return this; + } + + /** + * Source commit SHA for the imported skill. + */ + public PlatformSkillSourceProvenance withCommitSha(String commitSha) { + Utils.checkNotNull(commitSha, "commitSha"); + this.commitSha = Optional.ofNullable(commitSha); + return this; + } + + + /** + * Source commit SHA for the imported skill. + */ + public PlatformSkillSourceProvenance withCommitSha(Optional commitSha) { + Utils.checkNotNull(commitSha, "commitSha"); + this.commitSha = commitSha; + return this; + } + + /** + * Time the skill was imported. + */ + public PlatformSkillSourceProvenance withImportedAt(OffsetDateTime importedAt) { + Utils.checkNotNull(importedAt, "importedAt"); + this.importedAt = Optional.ofNullable(importedAt); + return this; + } + + + /** + * Time the skill was imported. + */ + public PlatformSkillSourceProvenance withImportedAt(Optional importedAt) { + Utils.checkNotNull(importedAt, "importedAt"); + this.importedAt = importedAt; + return this; + } + + /** + * Time the skill was last synced from its source. + */ + public PlatformSkillSourceProvenance withLastSyncedAt(OffsetDateTime lastSyncedAt) { + Utils.checkNotNull(lastSyncedAt, "lastSyncedAt"); + this.lastSyncedAt = Optional.ofNullable(lastSyncedAt); + return this; + } + + + /** + * Time the skill was last synced from its source. + */ + public PlatformSkillSourceProvenance withLastSyncedAt(Optional lastSyncedAt) { + Utils.checkNotNull(lastSyncedAt, "lastSyncedAt"); + this.lastSyncedAt = lastSyncedAt; + return this; + } + + /** + * Current external-source sync status. + */ + public PlatformSkillSourceProvenance withSyncStatus(PlatformSkillSyncStatus syncStatus) { + Utils.checkNotNull(syncStatus, "syncStatus"); + this.syncStatus = Optional.ofNullable(syncStatus); + return this; + } + + + /** + * Current external-source sync status. + */ + public PlatformSkillSourceProvenance withSyncStatus(Optional syncStatus) { + Utils.checkNotNull(syncStatus, "syncStatus"); + this.syncStatus = syncStatus; + return this; + } + + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + public PlatformSkillSourceProvenance withSyncError(String syncError) { + Utils.checkNotNull(syncError, "syncError"); + this.syncError = Optional.ofNullable(syncError); + return this; + } + + + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + public PlatformSkillSourceProvenance withSyncError(Optional syncError) { + Utils.checkNotNull(syncError, "syncError"); + this.syncError = syncError; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillSourceProvenance other = (PlatformSkillSourceProvenance) o; + return + Utils.enhancedDeepEquals(this.sourceUrl, other.sourceUrl) && + Utils.enhancedDeepEquals(this.commitSha, other.commitSha) && + Utils.enhancedDeepEquals(this.importedAt, other.importedAt) && + Utils.enhancedDeepEquals(this.lastSyncedAt, other.lastSyncedAt) && + Utils.enhancedDeepEquals(this.syncStatus, other.syncStatus) && + Utils.enhancedDeepEquals(this.syncError, other.syncError); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + sourceUrl, commitSha, importedAt, + lastSyncedAt, syncStatus, syncError); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillSourceProvenance.class, + "sourceUrl", sourceUrl, + "commitSha", commitSha, + "importedAt", importedAt, + "lastSyncedAt", lastSyncedAt, + "syncStatus", syncStatus, + "syncError", syncError); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional sourceUrl = Optional.empty(); + + private Optional commitSha = Optional.empty(); + + private Optional importedAt = Optional.empty(); + + private Optional lastSyncedAt = Optional.empty(); + + private Optional syncStatus = Optional.empty(); + + private Optional syncError = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * URL of the external source the skill was imported from. + */ + public Builder sourceUrl(String sourceUrl) { + Utils.checkNotNull(sourceUrl, "sourceUrl"); + this.sourceUrl = Optional.ofNullable(sourceUrl); + return this; + } + + /** + * URL of the external source the skill was imported from. + */ + public Builder sourceUrl(Optional sourceUrl) { + Utils.checkNotNull(sourceUrl, "sourceUrl"); + this.sourceUrl = sourceUrl; + return this; + } + + + /** + * Source commit SHA for the imported skill. + */ + public Builder commitSha(String commitSha) { + Utils.checkNotNull(commitSha, "commitSha"); + this.commitSha = Optional.ofNullable(commitSha); + return this; + } + + /** + * Source commit SHA for the imported skill. + */ + public Builder commitSha(Optional commitSha) { + Utils.checkNotNull(commitSha, "commitSha"); + this.commitSha = commitSha; + return this; + } + + + /** + * Time the skill was imported. + */ + public Builder importedAt(OffsetDateTime importedAt) { + Utils.checkNotNull(importedAt, "importedAt"); + this.importedAt = Optional.ofNullable(importedAt); + return this; + } + + /** + * Time the skill was imported. + */ + public Builder importedAt(Optional importedAt) { + Utils.checkNotNull(importedAt, "importedAt"); + this.importedAt = importedAt; + return this; + } + + + /** + * Time the skill was last synced from its source. + */ + public Builder lastSyncedAt(OffsetDateTime lastSyncedAt) { + Utils.checkNotNull(lastSyncedAt, "lastSyncedAt"); + this.lastSyncedAt = Optional.ofNullable(lastSyncedAt); + return this; + } + + /** + * Time the skill was last synced from its source. + */ + public Builder lastSyncedAt(Optional lastSyncedAt) { + Utils.checkNotNull(lastSyncedAt, "lastSyncedAt"); + this.lastSyncedAt = lastSyncedAt; + return this; + } + + + /** + * Current external-source sync status. + */ + public Builder syncStatus(PlatformSkillSyncStatus syncStatus) { + Utils.checkNotNull(syncStatus, "syncStatus"); + this.syncStatus = Optional.ofNullable(syncStatus); + return this; + } + + /** + * Current external-source sync status. + */ + public Builder syncStatus(Optional syncStatus) { + Utils.checkNotNull(syncStatus, "syncStatus"); + this.syncStatus = syncStatus; + return this; + } + + + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + public Builder syncError(String syncError) { + Utils.checkNotNull(syncError, "syncError"); + this.syncError = Optional.ofNullable(syncError); + return this; + } + + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + public Builder syncError(Optional syncError) { + Utils.checkNotNull(syncError, "syncError"); + this.syncError = syncError; + return this; + } + + public PlatformSkillSourceProvenance build() { + + return new PlatformSkillSourceProvenance( + sourceUrl, commitSha, importedAt, + lastSyncedAt, syncStatus, syncError); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillStatus.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillStatus.java new file mode 100644 index 00000000..e699f093 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillStatus.java @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d165c204cdfe + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * PlatformSkillStatus + * + *

Current skill status. + */ +public class PlatformSkillStatus { + + public static final PlatformSkillStatus DRAFT = new PlatformSkillStatus("DRAFT"); + public static final PlatformSkillStatus ENABLED = new PlatformSkillStatus("ENABLED"); + public static final PlatformSkillStatus DISABLED = new PlatformSkillStatus("DISABLED"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private PlatformSkillStatus(String value) { + this.value = value; + } + + /** + * Returns a PlatformSkillStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as PlatformSkillStatus + */ + @JsonCreator + public static PlatformSkillStatus of(String value) { + synchronized (PlatformSkillStatus.class) { + return values.computeIfAbsent(value, v -> new PlatformSkillStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PlatformSkillStatus other = (PlatformSkillStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "PlatformSkillStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static PlatformSkillStatus[] values() { + synchronized (PlatformSkillStatus.class) { + return values.values().toArray(new PlatformSkillStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("DRAFT", DRAFT); + map.put("ENABLED", ENABLED); + map.put("DISABLED", DISABLED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("DRAFT", PlatformSkillStatusEnum.DRAFT); + map.put("ENABLED", PlatformSkillStatusEnum.ENABLED); + map.put("DISABLED", PlatformSkillStatusEnum.DISABLED); + return map; + } + + + public enum PlatformSkillStatusEnum { + + DRAFT("DRAFT"), + ENABLED("ENABLED"), + DISABLED("DISABLED"),; + + private final String value; + + private PlatformSkillStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSyncStatus.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSyncStatus.java new file mode 100644 index 00000000..20128940 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSyncStatus.java @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9b52c0471fec + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * PlatformSkillSyncStatus + * + *

Current external-source sync status. + */ +public class PlatformSkillSyncStatus { + + public static final PlatformSkillSyncStatus UP_TO_DATE = new PlatformSkillSyncStatus("UP_TO_DATE"); + public static final PlatformSkillSyncStatus UPDATE_AVAILABLE = new PlatformSkillSyncStatus("UPDATE_AVAILABLE"); + public static final PlatformSkillSyncStatus SYNC_FAILED = new PlatformSkillSyncStatus("SYNC_FAILED"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private PlatformSkillSyncStatus(String value) { + this.value = value; + } + + /** + * Returns a PlatformSkillSyncStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as PlatformSkillSyncStatus + */ + @JsonCreator + public static PlatformSkillSyncStatus of(String value) { + synchronized (PlatformSkillSyncStatus.class) { + return values.computeIfAbsent(value, v -> new PlatformSkillSyncStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PlatformSkillSyncStatus other = (PlatformSkillSyncStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "PlatformSkillSyncStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static PlatformSkillSyncStatus[] values() { + synchronized (PlatformSkillSyncStatus.class) { + return values.values().toArray(new PlatformSkillSyncStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("UP_TO_DATE", UP_TO_DATE); + map.put("UPDATE_AVAILABLE", UPDATE_AVAILABLE); + map.put("SYNC_FAILED", SYNC_FAILED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("UP_TO_DATE", PlatformSkillSyncStatusEnum.UP_TO_DATE); + map.put("UPDATE_AVAILABLE", PlatformSkillSyncStatusEnum.UPDATE_AVAILABLE); + map.put("SYNC_FAILED", PlatformSkillSyncStatusEnum.SYNC_FAILED); + return map; + } + + + public enum PlatformSkillSyncStatusEnum { + + UP_TO_DATE("UP_TO_DATE"), + UPDATE_AVAILABLE("UPDATE_AVAILABLE"), + SYNC_FAILED("SYNC_FAILED"),; + + private final String value; + + private PlatformSkillSyncStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java new file mode 100644 index 00000000..174834b7 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java @@ -0,0 +1,257 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 33ab82accff8 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class PlatformSkillsListResponse { + /** + * Skills available to the user. + */ + @JsonProperty("skills") + private List skills; + + /** + * Whether additional results are available. + */ + @JsonProperty("has_more") + private boolean hasMore; + + /** + * Cursor for the next page, or null when no more results are available. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("next_cursor") + private Optional nextCursor; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillsListResponse( + @JsonProperty("skills") List skills, + @JsonProperty("has_more") boolean hasMore, + @JsonProperty("next_cursor") Optional nextCursor, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(skills, "skills"); + Utils.checkNotNull(hasMore, "hasMore"); + Utils.checkNotNull(nextCursor, "nextCursor"); + Utils.checkNotNull(requestId, "requestId"); + this.skills = skills; + this.hasMore = hasMore; + this.nextCursor = nextCursor; + this.requestId = requestId; + } + + public PlatformSkillsListResponse( + List skills, + boolean hasMore, + String requestId) { + this(skills, hasMore, Optional.empty(), + requestId); + } + + /** + * Skills available to the user. + */ + @JsonIgnore + public List skills() { + return skills; + } + + /** + * Whether additional results are available. + */ + @JsonIgnore + public boolean hasMore() { + return hasMore; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + @JsonIgnore + public Optional nextCursor() { + return nextCursor; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Skills available to the user. + */ + public PlatformSkillsListResponse withSkills(List skills) { + Utils.checkNotNull(skills, "skills"); + this.skills = skills; + return this; + } + + /** + * Whether additional results are available. + */ + public PlatformSkillsListResponse withHasMore(boolean hasMore) { + Utils.checkNotNull(hasMore, "hasMore"); + this.hasMore = hasMore; + return this; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + public PlatformSkillsListResponse withNextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = Optional.ofNullable(nextCursor); + return this; + } + + + /** + * Cursor for the next page, or null when no more results are available. + */ + public PlatformSkillsListResponse withNextCursor(Optional nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillsListResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListResponse other = (PlatformSkillsListResponse) o; + return + Utils.enhancedDeepEquals(this.skills, other.skills) && + Utils.enhancedDeepEquals(this.hasMore, other.hasMore) && + Utils.enhancedDeepEquals(this.nextCursor, other.nextCursor) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skills, hasMore, nextCursor, + requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListResponse.class, + "skills", skills, + "hasMore", hasMore, + "nextCursor", nextCursor, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List skills; + + private Boolean hasMore; + + private Optional nextCursor = Optional.empty(); + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Skills available to the user. + */ + public Builder skills(List skills) { + Utils.checkNotNull(skills, "skills"); + this.skills = skills; + return this; + } + + + /** + * Whether additional results are available. + */ + public Builder hasMore(boolean hasMore) { + Utils.checkNotNull(hasMore, "hasMore"); + this.hasMore = hasMore; + return this; + } + + + /** + * Cursor for the next page, or null when no more results are available. + */ + public Builder nextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = Optional.ofNullable(nextCursor); + return this; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + public Builder nextCursor(Optional nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillsListResponse build() { + + return new PlatformSkillsListResponse( + skills, hasMore, nextCursor, + requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java index 5a26eff7..edf1002d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java @@ -112,6 +112,20 @@ public class ToolMetadata { @JsonProperty("writeActionType") private Optional writeActionType; + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("actionTypeSource") + private Optional actionTypeSource; + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -165,6 +179,7 @@ public ToolMetadata( @JsonProperty("createdAt") Optional createdAt, @JsonProperty("lastUpdatedAt") Optional lastUpdatedAt, @JsonProperty("writeActionType") Optional writeActionType, + @JsonProperty("actionTypeSource") Optional actionTypeSource, @JsonProperty("authType") Optional authType, @JsonProperty("auth") Optional auth, @JsonProperty("permissions") Optional permissions, @@ -183,6 +198,7 @@ public ToolMetadata( Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(lastUpdatedAt, "lastUpdatedAt"); Utils.checkNotNull(writeActionType, "writeActionType"); + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); Utils.checkNotNull(authType, "authType"); Utils.checkNotNull(auth, "auth"); Utils.checkNotNull(permissions, "permissions"); @@ -201,6 +217,7 @@ public ToolMetadata( this.createdAt = createdAt; this.lastUpdatedAt = lastUpdatedAt; this.writeActionType = writeActionType; + this.actionTypeSource = actionTypeSource; this.authType = authType; this.auth = auth; this.permissions = permissions; @@ -218,7 +235,8 @@ public ToolMetadata( Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -329,6 +347,22 @@ public Optional writeActionType() { return (Optional) writeActionType; } + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional actionTypeSource() { + return (Optional) actionTypeSource; + } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -585,6 +619,39 @@ public ToolMetadata withWriteActionType(Optional writ return this; } + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public ToolMetadata withActionTypeSource(ActionTypeSource actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = Optional.ofNullable(actionTypeSource); + return this; + } + + + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public ToolMetadata withActionTypeSource(Optional actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = actionTypeSource; + return this; + } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -707,6 +774,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && Utils.enhancedDeepEquals(this.lastUpdatedAt, other.lastUpdatedAt) && Utils.enhancedDeepEquals(this.writeActionType, other.writeActionType) && + Utils.enhancedDeepEquals(this.actionTypeSource, other.actionTypeSource) && Utils.enhancedDeepEquals(this.authType, other.authType) && Utils.enhancedDeepEquals(this.auth, other.auth) && Utils.enhancedDeepEquals(this.permissions, other.permissions) && @@ -721,8 +789,9 @@ public int hashCode() { toolId, displayDescription, logoUrl, objectName, knowledgeType, createdBy, lastUpdatedBy, createdAt, lastUpdatedAt, - writeActionType, authType, auth, - permissions, usageInstructions, isSetupFinished); + writeActionType, actionTypeSource, authType, + auth, permissions, usageInstructions, + isSetupFinished); } @Override @@ -741,6 +810,7 @@ public String toString() { "createdAt", createdAt, "lastUpdatedAt", lastUpdatedAt, "writeActionType", writeActionType, + "actionTypeSource", actionTypeSource, "authType", authType, "auth", auth, "permissions", permissions, @@ -777,6 +847,8 @@ public final static class Builder { private Optional writeActionType = Optional.empty(); + private Optional actionTypeSource = Optional.empty(); + private Optional authType = Optional.empty(); private Optional auth = Optional.empty(); @@ -1002,6 +1074,39 @@ public Builder writeActionType(Optional writeActionTy } + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public Builder actionTypeSource(ActionTypeSource actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = Optional.ofNullable(actionTypeSource); + return this; + } + + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public Builder actionTypeSource(Optional actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = actionTypeSource; + return this; + } + + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -1107,8 +1212,9 @@ public ToolMetadata build() { toolId, displayDescription, logoUrl, objectName, knowledgeType, createdBy, lastUpdatedBy, createdAt, lastUpdatedAt, - writeActionType, authType, auth, - permissions, usageInstructions, isSetupFinished); + writeActionType, actionTypeSource, authType, + auth, permissions, usageInstructions, + isSetupFinished); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java index f6b7f60b..774d0e88 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java @@ -98,6 +98,14 @@ public class Workflow { @JsonProperty("showOrganizationAsAuthor") private Optional showOrganizationAsAuthor; + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("webhookUrl") + private Optional webhookUrl; + @JsonCreator public Workflow( @JsonProperty("name") Optional name, @@ -111,7 +119,8 @@ public Workflow( @JsonProperty("permissions") Optional permissions, @JsonProperty("id") Optional id, @JsonProperty("verified") Optional verified, - @JsonProperty("showOrganizationAsAuthor") Optional showOrganizationAsAuthor) { + @JsonProperty("showOrganizationAsAuthor") Optional showOrganizationAsAuthor, + @JsonProperty("webhookUrl") Optional webhookUrl) { Utils.checkNotNull(name, "name"); Utils.checkNotNull(author, "author"); Utils.checkNotNull(createTimestamp, "createTimestamp"); @@ -124,6 +133,7 @@ public Workflow( Utils.checkNotNull(id, "id"); Utils.checkNotNull(verified, "verified"); Utils.checkNotNull(showOrganizationAsAuthor, "showOrganizationAsAuthor"); + Utils.checkNotNull(webhookUrl, "webhookUrl"); this.name = name; this.author = author; this.createTimestamp = createTimestamp; @@ -136,13 +146,15 @@ public Workflow( this.id = id; this.verified = verified; this.showOrganizationAsAuthor = showOrganizationAsAuthor; + this.webhookUrl = webhookUrl; } public Workflow() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -236,6 +248,15 @@ public Optional showOrganizationAsAuthor() { return showOrganizationAsAuthor; } + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + @JsonIgnore + public Optional webhookUrl() { + return webhookUrl; + } + public static Builder builder() { return new Builder(); } @@ -451,6 +472,27 @@ public Workflow withShowOrganizationAsAuthor(Optional showOrganizationA return this; } + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Workflow withWebhookUrl(String webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = Optional.ofNullable(webhookUrl); + return this; + } + + + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Workflow withWebhookUrl(Optional webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = webhookUrl; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -472,7 +514,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.permissions, other.permissions) && Utils.enhancedDeepEquals(this.id, other.id) && Utils.enhancedDeepEquals(this.verified, other.verified) && - Utils.enhancedDeepEquals(this.showOrganizationAsAuthor, other.showOrganizationAsAuthor); + Utils.enhancedDeepEquals(this.showOrganizationAsAuthor, other.showOrganizationAsAuthor) && + Utils.enhancedDeepEquals(this.webhookUrl, other.webhookUrl); } @Override @@ -481,7 +524,8 @@ public int hashCode() { name, author, createTimestamp, lastUpdateTimestamp, lastDraftSavedAt, lastDraftSavedBy, lastDraftGitAuthorId, lastUpdatedBy, permissions, - id, verified, showOrganizationAsAuthor); + id, verified, showOrganizationAsAuthor, + webhookUrl); } @Override @@ -498,7 +542,8 @@ public String toString() { "permissions", permissions, "id", id, "verified", verified, - "showOrganizationAsAuthor", showOrganizationAsAuthor); + "showOrganizationAsAuthor", showOrganizationAsAuthor, + "webhookUrl", webhookUrl); } @SuppressWarnings("UnusedReturnValue") @@ -528,6 +573,8 @@ public final static class Builder { private Optional showOrganizationAsAuthor = Optional.empty(); + private Optional webhookUrl = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -742,13 +789,35 @@ public Builder showOrganizationAsAuthor(Optional showOrganizationAsAuth return this; } + + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Builder webhookUrl(String webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = Optional.ofNullable(webhookUrl); + return this; + } + + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Builder webhookUrl(Optional webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = webhookUrl; + return this; + } + public Workflow build() { return new Workflow( name, author, createTimestamp, lastUpdateTimestamp, lastDraftSavedAt, lastDraftSavedBy, lastDraftGitAuthorId, lastUpdatedBy, permissions, - id, verified, showOrganizationAsAuthor); + id, verified, showOrganizationAsAuthor, + webhookUrl); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java new file mode 100644 index 00000000..e95a3f18 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b1a1021e45fa + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillsGetRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + @JsonCreator + public PlatformSkillsGetRequest( + String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsGetRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetRequest other = (PlatformSkillsGetRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetRequest.class, + "skillId", skillId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetRequest build() { + + return new PlatformSkillsGetRequest( + skillId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java new file mode 100644 index 00000000..7c12088c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: acf97a47458e + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; + +public class PlatformSkillsGetRequestBuilder { + + private String skillId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + private PlatformSkillsGetRequest buildRequest() { + + PlatformSkillsGetRequest request = new PlatformSkillsGetRequest(skillId); + + return request; + } + + public PlatformSkillsGetResponse call() { + + RequestOperation operation + = new PlatformSkillsGet.Sync(sdkConfiguration, _headers); + PlatformSkillsGetRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java new file mode 100644 index 00000000..85f533a8 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 10e964f47660 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillGetResponse; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsGetResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillGetResponse; + + @JsonCreator + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillGetResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillGetResponse = platformSkillGetResponse; + } + + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillGetResponse() { + return (Optional) platformSkillGetResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetResponse other = (PlatformSkillsGetResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillGetResponse, other.platformSkillGetResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillGetResponse", platformSkillGetResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillGetResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + public PlatformSkillsGetResponse build() { + + return new PlatformSkillsGetResponse( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java new file mode 100644 index 00000000..ad230300 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0c784c11f038 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class PlatformSkillsListRequest { + /** + * Maximum number of skills to return. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=page_size") + private Optional pageSize; + + /** + * Opaque pagination cursor from a previous response. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=cursor") + private Optional cursor; + + @JsonCreator + public PlatformSkillsListRequest( + Optional pageSize, + Optional cursor) { + Utils.checkNotNull(pageSize, "pageSize"); + Utils.checkNotNull(cursor, "cursor"); + this.pageSize = pageSize; + this.cursor = cursor; + } + + public PlatformSkillsListRequest() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Maximum number of skills to return. + */ + @JsonIgnore + public Optional pageSize() { + return pageSize; + } + + /** + * Opaque pagination cursor from a previous response. + */ + @JsonIgnore + public Optional cursor() { + return cursor; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Maximum number of skills to return. + */ + public PlatformSkillsListRequest withPageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + + /** + * Maximum number of skills to return. + */ + public PlatformSkillsListRequest withPageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + /** + * Opaque pagination cursor from a previous response. + */ + public PlatformSkillsListRequest withCursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.ofNullable(cursor); + return this; + } + + + /** + * Opaque pagination cursor from a previous response. + */ + public PlatformSkillsListRequest withCursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListRequest other = (PlatformSkillsListRequest) o; + return + Utils.enhancedDeepEquals(this.pageSize, other.pageSize) && + Utils.enhancedDeepEquals(this.cursor, other.cursor); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + pageSize, cursor); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListRequest.class, + "pageSize", pageSize, + "cursor", cursor); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional pageSize = Optional.empty(); + + private Optional cursor = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Maximum number of skills to return. + */ + public Builder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + /** + * Maximum number of skills to return. + */ + public Builder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + + /** + * Opaque pagination cursor from a previous response. + */ + public Builder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.ofNullable(cursor); + return this; + } + + /** + * Opaque pagination cursor from a previous response. + */ + public Builder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + public PlatformSkillsListRequest build() { + + return new PlatformSkillsListRequest( + pageSize, cursor); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java new file mode 100644 index 00000000..b242ac17 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c4faa9ffd8e1 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + +public class PlatformSkillsListRequestBuilder { + + private Optional pageSize = Optional.empty(); + private Optional cursor = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsListRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsListRequestBuilder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.of(pageSize); + return this; + } + + public PlatformSkillsListRequestBuilder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + public PlatformSkillsListRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.of(cursor); + return this; + } + + public PlatformSkillsListRequestBuilder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + private PlatformSkillsListRequest buildRequest() { + + PlatformSkillsListRequest request = new PlatformSkillsListRequest(pageSize, + cursor); + + return request; + } + + public PlatformSkillsListResponse call() { + + RequestOperation operation + = new PlatformSkillsList.Sync(sdkConfiguration, _headers); + PlatformSkillsListRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java new file mode 100644 index 00000000..4194c210 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 61140aa877b7 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsListResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillsListResponse; + + @JsonCreator + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillsListResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillsListResponse = platformSkillsListResponse; + } + + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillsListResponse() { + return (Optional) platformSkillsListResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsListResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsListResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsListResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListResponse other = (PlatformSkillsListResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillsListResponse, other.platformSkillsListResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillsListResponse", platformSkillsListResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillsListResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + public PlatformSkillsListResponse build() { + + return new PlatformSkillsListResponse( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java new file mode 100644 index 00000000..9fa2ad63 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d6f9533fb152 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest { + /** + * Datasource instance that should process the submission + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=datasourceInstance") + private String datasourceInstance; + + /** + * Submission type registered for the datasource + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=type") + private String type; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private Map requestBody; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest( + String datasourceInstance, + String type, + Map requestBody) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + Utils.checkNotNull(type, "type"); + requestBody = Utils.emptyMapIfNull(requestBody); + Utils.checkNotNull(requestBody, "requestBody"); + this.datasourceInstance = datasourceInstance; + this.type = type; + this.requestBody = requestBody; + } + + /** + * Datasource instance that should process the submission + */ + @JsonIgnore + public String datasourceInstance() { + return datasourceInstance; + } + + /** + * Submission type registered for the datasource + */ + @JsonIgnore + public String type() { + return type; + } + + @JsonIgnore + public Map requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Datasource instance that should process the submission + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest withDatasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + /** + * Submission type registered for the datasource + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest withRequestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest) o; + return + Utils.enhancedDeepEquals(this.datasourceInstance, other.datasourceInstance) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasourceInstance, type, requestBody); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.class, + "datasourceInstance", datasourceInstance, + "type", type, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String datasourceInstance; + + private String type; + + private Map requestBody; + + private Builder() { + // force use of static builder() method + } + + + /** + * Datasource instance that should process the submission + */ + public Builder datasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + + /** + * Submission type registered for the datasource + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder requestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest( + datasourceInstance, type, requestBody); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java new file mode 100644 index 00000000..6ba0274c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ff1570f7277a + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Object; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder { + + private String datasourceInstance; + private String type; + private Map requestBody = new HashMap<>(); + private Optional serverURL = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder datasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder requestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + + private PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest buildRequest() { + + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest(datasourceInstance, + type, + requestBody); + + return request; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse call() { + + RequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Sync(sdkConfiguration, serverURL, _headers); + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java new file mode 100644 index 00000000..6c497c53 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 54e49721adf9 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Accepted + */ + private Optional object; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Accepted + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Accepted + */ + public Builder object(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Accepted + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java new file mode 100644 index 00000000..31449692 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d33d42046743 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody + * + *

Accepted + */ +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody { + + @JsonProperty("requestId") + private String requestId; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody( + @JsonProperty("requestId") String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + } + + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody) o; + return + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + requestId); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.class, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody( + requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java new file mode 100644 index 00000000..af6066c6 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9f29a43ef0e1 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsGetRequestBuilder { + + private String skillId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + private PlatformSkillsGetRequest buildRequest() { + + PlatformSkillsGetRequest request = new PlatformSkillsGetRequest(skillId); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsGet.Async(sdkConfiguration, _headers); + PlatformSkillsGetRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java new file mode 100644 index 00000000..bcb83e3e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d9bcb05e5190 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillGetResponse; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsGetResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillGetResponse; + + @JsonCreator + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillGetResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillGetResponse = platformSkillGetResponse; + } + + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillGetResponse() { + return (Optional) platformSkillGetResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetResponse other = (PlatformSkillsGetResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillGetResponse, other.platformSkillGetResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillGetResponse", platformSkillGetResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillGetResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + public PlatformSkillsGetResponse build() { + + return new PlatformSkillsGetResponse( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java new file mode 100644 index 00000000..bac42515 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7f6d7d6b2033 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsListRequestBuilder { + + private Optional pageSize = Optional.empty(); + private Optional cursor = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsListRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsListRequestBuilder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.of(pageSize); + return this; + } + + public PlatformSkillsListRequestBuilder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + public PlatformSkillsListRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.of(cursor); + return this; + } + + public PlatformSkillsListRequestBuilder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + private PlatformSkillsListRequest buildRequest() { + + PlatformSkillsListRequest request = new PlatformSkillsListRequest(pageSize, + cursor); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsList.Async(sdkConfiguration, _headers); + PlatformSkillsListRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java new file mode 100644 index 00000000..f2aa06a9 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7213f13e0653 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsListResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillsListResponse; + + @JsonCreator + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillsListResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillsListResponse = platformSkillsListResponse; + } + + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillsListResponse() { + return (Optional) platformSkillsListResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsListResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsListResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsListResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListResponse other = (PlatformSkillsListResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillsListResponse, other.platformSkillsListResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillsListResponse", platformSkillsListResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillsListResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + public PlatformSkillsListResponse build() { + + return new PlatformSkillsListResponse( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java new file mode 100644 index 00000000..8fc40901 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e06a9268bf11 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Object; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder { + + private String datasourceInstance; + private String type; + private Map requestBody = new HashMap<>(); + private Optional serverURL = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder datasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder requestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + + private PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest buildRequest() { + + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest(datasourceInstance, + type, + requestBody); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Async(sdkConfiguration, serverURL, _headers); + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java new file mode 100644 index 00000000..d4d7b81b --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c9f17492a7bd + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Accepted + */ + private Optional object; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Accepted + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Accepted + */ + public Builder object(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Accepted + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java new file mode 100644 index 00000000..612b0dfc --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 35379a4f4ed2 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillGetResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PlatformSkillsGet { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(PlatformSkillsGetRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(PlatformSkillsGetRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public PlatformSkillsGetResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsGetResponse.Builder resBuilder = + PlatformSkillsGetResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsGetResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillGetResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsGetRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(PlatformSkillsGetRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillGetResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java new file mode 100644 index 00000000..1bb80ab1 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java @@ -0,0 +1,279 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f9f1d5a5462f + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PlatformSkillsList { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/api/skills"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(PlatformSkillsListRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsListRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(PlatformSkillsListRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public PlatformSkillsListResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsListResponse.Builder resBuilder = + PlatformSkillsListResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsListResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillsListResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsListRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsListRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(PlatformSkillsListRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillsListResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java new file mode 100644 index 00000000..839ba941 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java @@ -0,0 +1,315 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 59cfdb0a7588 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.SerializedBody; +import com.glean.api_client.glean_api_client.utils.Utils.JsonShape; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceType { + + /** + * POST_REST_API_INDEX_SUBMISSIONS_DATASOURCE_INSTANCE_TYPE_SERVERS contains the list of server urls available to the SDK. + */ + public static final String[] POST_REST_API_INDEX_SUBMISSIONS_DATASOURCE_INSTANCE_TYPE_SERVERS = { + "https://{instance}-be.glean.com", + }; + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base( + SDKConfiguration sdkConfiguration, Optional serverURL, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = serverURL + .filter(u -> !u.isBlank()) + .orElse(Utils.templateUrl( + POST_REST_API_INDEX_SUBMISSIONS_DATASOURCE_INSTANCE_TYPE_SERVERS[0], + Map.of("instance", "instance-name"))); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/rest/api/index/submissions/{datasourceInstance}/{type}", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional serverURL, + Headers _headers) { + super( + sdkConfiguration, serverURL, + _headers); + } + + private HttpRequest onBuildRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) throws Exception { + HttpRequest req = buildRequest(request, PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.Builder resBuilder = + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "202")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withObject(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorInfoResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorInfoResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405", "413", "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "503", "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async( + SDKConfiguration sdkConfiguration, Optional serverURL, + Headers _headers) { + super( + sdkConfiguration, serverURL, + _headers); + } + + private CompletableFuture onBuildRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) throws Exception { + HttpRequest req = buildRequest(request, PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "202")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withObject); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorInfoResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorInfoResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405", "413", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "503", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} From e0b3a386ac89782a80abb8c6d97407e818dd6ea4 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 03:24:47 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow