From 2a096c8a0f4d9894bf3c1726a5d1f72180e38737 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 23 Jul 2026 04:11:11 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Java=20SDK=20Changes:=20*=20`glean.sea?= =?UTF-8?q?rch.query()`:=20=20=20*=20=20`request.datasourceInstances`=20**?= =?UTF-8?q?Removed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`res?= =?UTF-8?q?ponse`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20?= =?UTF-8?q?*=20=20`error.status[422]`=20**Added**=20*=20`glean.skills.upda?= =?UTF-8?q?te()`:=20**Added**=20*=20`glean.search.listFilters()`:=20**Adde?= =?UTF-8?q?d**=20*=20`glean.indexing.datasources.add()`:=20=20`request`=20?= =?UTF-8?q?**Changed**=20*=20`glean.indexing.datasources.retrieveConfig()`?= =?UTF-8?q?:=20=20`response`=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 271 ++++++++++++---- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 302 ++++++++++++++++-- .speakeasy/workflow.lock | 10 +- README.md | 16 +- RELEASES.md | 12 +- docs/models/components/DatasourceCategory.md | 4 +- docs/models/components/DocCategory.md | 4 +- .../PlatformDatasourceFilterInfo.md | 9 + .../components/PlatformFilterFieldInfo.md | 11 + .../components/PlatformFilterOperator.md | 3 + docs/models/components/PlatformResult.md | 1 - .../PlatformSearchFiltersResponse.md | 9 + .../components/PlatformSearchRequest.md | 17 +- .../components/PlatformSearchResponse.md | 13 +- .../components/PlatformSkillUpdateRequest.md | 8 + .../components/PlatformSkillUpdateResponse.md | 9 + .../components/PlatformSkillUpdateStatus.md | 19 ++ .../PlatformSkillValidationResponse.md | 12 +- .../PlatformSkillValidationWarning.md | 9 - docs/models/components/PlatformWarning.md | 11 + .../PlatformSearchFiltersRequest.md | 9 + .../PlatformSearchFiltersResponse.md | 11 + .../operations/PlatformSearchResponse.md | 12 +- .../operations/PlatformSkillsUpdateRequest.md | 9 + .../PlatformSkillsUpdateResponse.md | 11 + docs/sdks/search/README.md | 60 +++- docs/sdks/skills/README.md | 60 ++++ gradle.properties | 2 +- .../glean_api_client/AsyncSearch.java | 97 +++++- .../glean_api_client/AsyncSkills.java | 41 +++ .../glean_api_client/SDKConfiguration.java | 2 +- .../api_client/glean_api_client/Search.java | 97 +++++- .../api_client/glean_api_client/Skills.java | 40 +++ .../models/components/DatasourceCategory.java | 10 +- .../models/components/DocCategory.java | 10 +- .../PlatformDatasourceFilterInfo.java | 147 +++++++++ .../components/PlatformFilterFieldInfo.java | 280 ++++++++++++++++ .../components/PlatformFilterOperator.java | 136 +++++++- .../models/components/PlatformResult.java | 74 +---- .../PlatformSearchFiltersResponse.java | 151 +++++++++ .../components/PlatformSearchRequest.java | 118 ++----- .../components/PlatformSearchResponse.java | 71 +++- .../PlatformSkillUpdateRequest.java | 102 ++++++ .../PlatformSkillUpdateResponse.java | 131 ++++++++ .../components/PlatformSkillUpdateStatus.java | 41 +++ .../PlatformSkillValidationResponse.java | 12 +- ...ationWarning.java => PlatformWarning.java} | 36 ++- .../PlatformSearchFiltersRequest.java | 200 ++++++++++++ .../PlatformSearchFiltersRequestBuilder.java | 69 ++++ .../PlatformSearchFiltersResponse.java | 253 +++++++++++++++ .../operations/PlatformSearchResponse.java | 18 +- .../PlatformSkillsUpdateRequest.java | 132 ++++++++ .../PlatformSkillsUpdateRequestBuilder.java | 56 ++++ .../PlatformSkillsUpdateResponse.java | 254 +++++++++++++++ .../PlatformSearchFiltersRequestBuilder.java | 72 +++++ .../async/PlatformSearchFiltersResponse.java | 253 +++++++++++++++ .../async/PlatformSearchResponse.java | 18 +- .../PlatformSkillsUpdateRequestBuilder.java | 59 ++++ .../async/PlatformSkillsUpdateResponse.java | 254 +++++++++++++++ .../operations/PlatformSearch.java | 4 +- .../operations/PlatformSearchFilters.java | 279 ++++++++++++++++ .../operations/PlatformSkillsUpdate.java | 294 +++++++++++++++++ 63 files changed, 4354 insertions(+), 383 deletions(-) create mode 100644 docs/models/components/PlatformDatasourceFilterInfo.md create mode 100644 docs/models/components/PlatformFilterFieldInfo.md create mode 100644 docs/models/components/PlatformSearchFiltersResponse.md create mode 100644 docs/models/components/PlatformSkillUpdateRequest.md create mode 100644 docs/models/components/PlatformSkillUpdateResponse.md create mode 100644 docs/models/components/PlatformSkillUpdateStatus.md delete mode 100644 docs/models/components/PlatformSkillValidationWarning.md create mode 100644 docs/models/components/PlatformWarning.md create mode 100644 docs/models/operations/PlatformSearchFiltersRequest.md create mode 100644 docs/models/operations/PlatformSearchFiltersResponse.md create mode 100644 docs/models/operations/PlatformSkillsUpdateRequest.md create mode 100644 docs/models/operations/PlatformSkillsUpdateResponse.md create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformDatasourceFilterInfo.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterFieldInfo.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchFiltersResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateStatus.java rename src/main/java/com/glean/api_client/glean_api_client/models/components/{PlatformSkillValidationWarning.java => PlatformWarning.java} (73%) create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequest.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateRequestBuilder.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateResponse.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearchFilters.java create mode 100644 src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsUpdate.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ef23e870..d0e09235 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: 586f40e432b9bb469fad89ebabfbc480 + docChecksum: 1424b42cb86e7228713c6bc5e8a5a44f docVersion: 0.9.0 speakeasyVersion: 1.790.3 generationVersion: 2.918.4 - releaseVersion: 0.14.4 - configChecksum: d5edf6a2d997b6ca0f087370023c40e2 + releaseVersion: 0.14.5 + configChecksum: 7e8073eeef82fc5aef8275a263970084 repoURL: https://github.com/gleanwork/api-client-java.git installationURL: https://github.com/gleanwork/api-client-java published: true persistentEdits: - generation_id: 9e45cd00-d062-4f3a-bf33-e8ad07f3309a - pristine_commit_hash: a88c2a4fd978a75f979bf1d78cef0f8ca0df74c4 - pristine_tree_hash: 127219ad2e167f35c49a019b2c22a0abfe45869a + generation_id: dd4cd422-f9e9-4ae3-8c28-a8fed1143bfc + pristine_commit_hash: d355294717ca57b4e4b89784dcfc62ef06de5a68 + pristine_tree_hash: 0b5699f6ab979e505fec8277b362b19ef3889469 features: java: acceptHeaders: 2.81.2 @@ -715,8 +715,8 @@ trackedFiles: pristine_git_object: e8600ac166525705b6d848af2397db91025c69ea docs/models/components/DatasourceCategory.md: id: 0f76c9f3a753 - last_write_checksum: sha1:f8df70eb1a7a2181389ed222b2a136d7a26ef8d6 - pristine_git_object: 6f842b8192c20739851f86a06d03a405040417ed + last_write_checksum: sha1:fdaa87d5c0f7aa79a6c02c460bc20067a7cc8c27 + pristine_git_object: 52fd6924b0e99c659255ec64a204cbc85ed61116 docs/models/components/DatasourceConfigurationResponse.md: id: f2248e515ceb last_write_checksum: sha1:13bd3121a7b2914825633ea14179399a3dda8912 @@ -947,8 +947,8 @@ trackedFiles: pristine_git_object: f5a03cfed4058478e101c765648fdd6e6b612880 docs/models/components/DocCategory.md: id: de1e5ad34b41 - last_write_checksum: sha1:b60b8ddef46ff0ae96c1246b4227a146e075b52a - pristine_git_object: 877d2411dfced576fd3aa99ce94a936c79863cef + last_write_checksum: sha1:280a8e5c04ca2c52e46f045dffa4dbd0684b8bcd + pristine_git_object: a6da6f7154daa18649b7f891203af8cc9033f383 docs/models/components/Document.md: id: 1a57b1271a67 last_write_checksum: sha1:73ae83612ba0d375f6ff0c59469cca57946922c6 @@ -1869,14 +1869,22 @@ trackedFiles: id: 4f00756c77e6 last_write_checksum: sha1:8a391070d3f8e58a29b53b34e71ea702519f0b38 pristine_git_object: b14d42cc1ba1c22a2a6f454dac3b4c197133e443 + docs/models/components/PlatformDatasourceFilterInfo.md: + id: 7ab826a1b826 + last_write_checksum: sha1:2d432dae299a75f7b209d2426abf6af8fca130d5 + pristine_git_object: 2ae637eb8f9b595bfc02655ad51c952b1f9ee304 docs/models/components/PlatformFilter.md: id: f6050e7256d6 last_write_checksum: sha1:bffd82a9821798db1bc8e416b6993ccc1b93984e pristine_git_object: 9b4b83c1e316fa93a1b037800826845f632f51b5 + docs/models/components/PlatformFilterFieldInfo.md: + id: abf8ec20e1be + last_write_checksum: sha1:be66d802e06a3a9f35f90901eb7f884cc97456c5 + pristine_git_object: 0238fd53aaa0ef9a629b8f6ce26f2b4440460752 docs/models/components/PlatformFilterOperator.md: id: f345eb615b68 - last_write_checksum: sha1:64b82b5dd017c1e6526a407ec2989e0d7187b538 - pristine_git_object: 8104e06f6f6b3b008a493d08a15daa027582bfb9 + last_write_checksum: sha1:c7f2aaa13ba77b38ff71d36cc840a75636e4ccb2 + pristine_git_object: d8cef649d16308251df6d1935e03db2f3b53dbb8 docs/models/components/PlatformMessage.md: id: f8348976d9d8 last_write_checksum: sha1:b0b4691941491486952bc1e8be01b337b9c24de6 @@ -1903,16 +1911,20 @@ trackedFiles: pristine_git_object: 3f6de73eb45fcff1aab314f236d903c26ae92b3e docs/models/components/PlatformResult.md: id: b0d7a2d55a3c - last_write_checksum: sha1:64b134366a2b8cee44b4d8bcbc9b902b3a78eb41 - pristine_git_object: c1f2481bb7fde4bc6ffd9a85c78e39e0aa28828e + last_write_checksum: sha1:08e8d63bdde4b700bf65b9250d4fcb523927042a + pristine_git_object: 43f6e405612d60c551155bda5ca5167536ca1e55 + docs/models/components/PlatformSearchFiltersResponse.md: + id: d42493354d32 + last_write_checksum: sha1:2f38300a9b6c060f9a61864bfb004ce457e92b1a + pristine_git_object: 63f7c0850fe265ff361dd741464f4f20f73d99e5 docs/models/components/PlatformSearchRequest.md: id: 4e23a5750a64 - last_write_checksum: sha1:bb03db6d0791ee5c94f18f5f4d17e03ac3ade538 - pristine_git_object: 0a835dfcc3b386cb1ca8d3adfcf1264767f5b01e + last_write_checksum: sha1:cb8c374980cc5fd5cebfc9adc8f92a0e190e36f3 + pristine_git_object: 07a4efc10c7cab3e2ceaaa885f820e0e478f4fb9 docs/models/components/PlatformSearchResponse.md: id: 5f92876fb5c8 - last_write_checksum: sha1:d463001b22ff3419918e31ec7832587341fb35a1 - pristine_git_object: 083cad412eb152684e3895da619d1f4f393ae0bf + last_write_checksum: sha1:579eb55aae378910254f997524fce68636c34adf + pristine_git_object: 55113851d6d164e93df8c758a58fbe0693f7d2c1 docs/models/components/PlatformSkill.md: id: 48b17cdbdcf3 last_write_checksum: sha1:6a89514c591aa917f1859e7f695b5a2e67d0ce1f @@ -1949,6 +1961,18 @@ trackedFiles: id: 0475ccc16596 last_write_checksum: sha1:8560f0773fe9ce87d41c1f499bf30766dbf50e2b pristine_git_object: d8195068b74dd1f14eb8649ec44e53ae551d143c + docs/models/components/PlatformSkillUpdateRequest.md: + id: b176a2cbaf9b + last_write_checksum: sha1:66506c2bb9cf83b8666c71def6ebb33fc6cd758c + pristine_git_object: 1d79d80dc1b65cd0af6834d1bebe7c72f3f7466c + docs/models/components/PlatformSkillUpdateResponse.md: + id: e24b9e6def75 + last_write_checksum: sha1:3fffca6e662a37e5819709f3b9528ee6d59af095 + pristine_git_object: 6d9fcebfc51bac0ca08d9516f142cc042edb7083 + docs/models/components/PlatformSkillUpdateStatus.md: + id: f12e417045bd + last_write_checksum: sha1:ddfbb5037d36c1d2b7a529e0b1fe525c0a573758 + pristine_git_object: 79ff81d3653b50b7f75540d4d6d43af74b314eb6 docs/models/components/PlatformSkillValidationFile.md: id: 378df9889c2f last_write_checksum: sha1:d2d16851d4af2069e171161172ad11b7c377ac35 @@ -1967,12 +1991,8 @@ trackedFiles: pristine_git_object: ea04d8e06d58013b7e2f107eb120f6888808f233 docs/models/components/PlatformSkillValidationResponse.md: id: a5a2bc520b33 - last_write_checksum: sha1:cefb02a857062fbb3c4e3a2fa8e75c0a274ab9d4 - pristine_git_object: 29d844913a5e7b100b2e81e0516cdc30a2818e50 - docs/models/components/PlatformSkillValidationWarning.md: - id: 075c0a237d51 - last_write_checksum: sha1:616a6347fe86a9860b6c32578bbc690c61bb245a - pristine_git_object: 844c546fab55a357fdeae147cf042bdcd8f1524a + last_write_checksum: sha1:94f5f210e8426de4c9804ed3369b14ad1f39efb3 + pristine_git_object: 6178958f78a005c3c5ada38d4c8dd47156c5d464 docs/models/components/PlatformSkillVersion.md: id: 3aa27198b59f last_write_checksum: sha1:e4a3220ae2b9ae4b2e24ef9994d55d6c6bb581cb @@ -2005,6 +2025,10 @@ trackedFiles: id: e23ca7368dc2 last_write_checksum: sha1:48c1a8a19bac073372bdf5b5e688865d568d6225 pristine_git_object: 67c075a66517b00915dad2c063b62f0145838551 + docs/models/components/PlatformWarning.md: + id: ce93bd66a2cf + last_write_checksum: sha1:4dcae94fd3fbae901fb5220d59e0f7d6a8d292a0 + pristine_git_object: a1addb92ee603ef5409faf4a29c593262c366976 docs/models/components/PossibleValue.md: id: b082d515927c last_write_checksum: sha1:80b4a4842f40dd2b5a0e20956b1d60b66486a080 @@ -3329,10 +3353,18 @@ trackedFiles: id: 69c6ba109512 last_write_checksum: sha1:439f70aa6d30b622e8bb20c6ef8c2a8ce800a459 pristine_git_object: e1d4afd47a1e924bf6c174452f04c361350c4ad2 + docs/models/operations/PlatformSearchFiltersRequest.md: + id: 1a4008095fc4 + last_write_checksum: sha1:44262befa7a280900f0574b2b7db0ed805c0de2d + pristine_git_object: 41652fb3ef45c375509fbcfb1965bca50bd2dc53 + docs/models/operations/PlatformSearchFiltersResponse.md: + id: 9a23f1542ede + last_write_checksum: sha1:4f59a890388e2018ae347e610b0b682ebd9c7e52 + pristine_git_object: 85ae318f2fbc2075ccff75dc54e2cd1b08b051db docs/models/operations/PlatformSearchResponse.md: id: 7ab2beea5f75 - last_write_checksum: sha1:b019dc80b72396e4103f40bc931b1a39b8b00117 - pristine_git_object: 10908aeaba0726a7003a58e259f514c0cb3d33ba + last_write_checksum: sha1:48c3f9417298b67ef88a5f9f2a13fc83672c96c8 + pristine_git_object: 3aab663037409ea6c45cdbeb54fc00ad19784bcd docs/models/operations/PlatformSkillsCreateResponse.md: id: 96b86585c676 last_write_checksum: sha1:974778f39663cc8d3463668fe26100c2ada62aee @@ -3393,6 +3425,14 @@ trackedFiles: id: 9fcdd9511f77 last_write_checksum: sha1:a19e19a240de4f6032549e9131b4ac8ef172c541 pristine_git_object: b3b9b7616cf54e49f8d709c0037f7a466aa752f6 + docs/models/operations/PlatformSkillsUpdateRequest.md: + id: 2692217b61e5 + last_write_checksum: sha1:b5e6532d7511db810fade1fb26262851b4bd5cd3 + pristine_git_object: 09e62ae8d0ba522ea19b5ce6474d5c261a9aa6bb + docs/models/operations/PlatformSkillsUpdateResponse.md: + id: 6057bcad9a86 + last_write_checksum: sha1:1d43e00eeadd464570e5eded37d4b800dfcdbdf2 + pristine_git_object: 84502373e7b6efd1fdf864b356bc26b38efe14d2 docs/models/operations/PlatformSkillsValidateResponse.md: id: 39c4aab4c440 last_write_checksum: sha1:2c97446eb0319b0ea865cead2f52e8a9b25a3b33 @@ -3815,12 +3855,12 @@ trackedFiles: pristine_git_object: 50cc780abca57bc36960910449cfa6491f729579 docs/sdks/search/README.md: id: 5c534716244c - last_write_checksum: sha1:fcf7c1cf8c87935eca2cc104391ffdd2b25473d4 - pristine_git_object: 6555e422489b48401d8c5896d8902dd40752d251 + last_write_checksum: sha1:4aeda93667ad701ae26907eb764e42b2dcda77e5 + pristine_git_object: 9a36678226f95c2d17bcc5e2de459302d5c5b02a docs/sdks/skills/README.md: id: 3a14a5c90791 - last_write_checksum: sha1:6ae19a0cf5863abaca6a9a84f015bc2a3529e78b - pristine_git_object: d69c628dd1d33d6fdbb33fed97b59edad07a3cac + last_write_checksum: sha1:878cc249765dfb431e694f3e23a1773a57c37c69 + pristine_git_object: 4316fd05fc5a6eb5ca54c6c03a9a2faff9ff0050 docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:f463db245c247de5af8035245870ca014bbe82fc @@ -3839,8 +3879,8 @@ trackedFiles: pristine_git_object: 3decbce5bd40edbe278c1c5d2dbf585808e51d9a gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:befc4a3824a4d11786b3517a0cc3c5fe9555903c - pristine_git_object: 706f89784c40c2e0255d6d368812ff7505eff14b + last_write_checksum: sha1:b7cd4a4428390dea8b7017560d3f99b52844ac60 + pristine_git_object: 8f544756091fd0c4b3cbaa8865cca3bfde551dff gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -4015,12 +4055,12 @@ trackedFiles: pristine_git_object: f6b22c18ff13f777e3641ec68739a3cb09365b48 src/main/java/com/glean/api_client/glean_api_client/AsyncSearch.java: id: 443645b885fa - last_write_checksum: sha1:0241338c962eda005c9e6c3fe4f66d78030a20d2 - pristine_git_object: 4a17ff91f2cad3a65578dd16fac8bfbb864699e5 + last_write_checksum: sha1:8f668115618c167b49d09589ac4105f0ab067184 + pristine_git_object: 4633088d5c745af703d1c992958b412646622963 src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java: id: 809381bacfb1 - last_write_checksum: sha1:29d6819f9484b63146b5adcb60c83007420a0712 - pristine_git_object: c1f1a5a298ae000e83bb2cc494aa25d22f96d20a + last_write_checksum: sha1:b8690b9773fcac824e3d11d4570ac4ac9dabec29 + pristine_git_object: 81bcacbc0acbb0a11d0100ccdb3a8ac5d49f25c0 src/main/java/com/glean/api_client/glean_api_client/AsyncTools.java: id: 02ad87504d7a last_write_checksum: sha1:506200f5eeb1be124b9352d28f9db587d0b12cad @@ -4151,20 +4191,20 @@ trackedFiles: pristine_git_object: ffae914775eb41ff311371f62504344a59d090fd src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java: id: d5fcc61f5992 - last_write_checksum: sha1:5f2abe4bd5f2bbe9151296557cc32c364087f6da - pristine_git_object: 168fb957972ca8e89a55089205bf4d11ff6078e6 + last_write_checksum: sha1:32909a5eb4b24f03ab7095fb98a78a0eb87659c1 + pristine_git_object: 3d681c8246c6c7506bdb20c294d63710e0fdcc99 src/main/java/com/glean/api_client/glean_api_client/Search.java: id: f22d94b920b5 - last_write_checksum: sha1:803fcb8e55cb4a76ec275ae45b83730fc7ed18c7 - pristine_git_object: 81cade62fd3fa7da6637858947858ad31f3565bb + last_write_checksum: sha1:0a3e703260b4f7e8a476743b24c6f75ab818e899 + pristine_git_object: d4eeda6501125c615155e3c776d58fe85b7c6b96 src/main/java/com/glean/api_client/glean_api_client/SecuritySource.java: 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:54a4186811b3fcdafadec8eb744ca047ac877a3e - pristine_git_object: 0859b0db256a7e69e48cca31377a339dac27e07f + last_write_checksum: sha1:c6e5d191a22f45f6774ef5894b0a2b576cabb931 + pristine_git_object: 66ad53d4fbba72b44812d0f9ff9e23a028e61415 src/main/java/com/glean/api_client/glean_api_client/Tools.java: id: bb072637f39b last_write_checksum: sha1:052d5febd57bebffbebd0884fd5698bff5cd20a7 @@ -4843,8 +4883,8 @@ trackedFiles: pristine_git_object: 5d140e5001bf9b326156922898068f318979de96 src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCategory.java: id: 594c38f365e3 - last_write_checksum: sha1:d559cef1898616b4442f4c5562c2604bf0793080 - pristine_git_object: 062a540a4e13ceef44e99468fb3fb0435be897cd + last_write_checksum: sha1:0323a0c0d43e82b994a3be656d36496bbcb0be5e + pristine_git_object: fe8c5d91c7f334ae08c3e3ab9f1b13c908284c3c src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceConfigurationResponse.java: id: bc6aa4441b02 last_write_checksum: sha1:832effcd46f16f322bc0940ded76ceffded5c137 @@ -5075,8 +5115,8 @@ trackedFiles: pristine_git_object: 215525daf1df20d767b177f3d004ff288dd67602 src/main/java/com/glean/api_client/glean_api_client/models/components/DocCategory.java: id: 4bb2dc758f1a - last_write_checksum: sha1:d999ab9607bf943fb117785e0609108998160166 - pristine_git_object: a9415f4fcf8db9b954e69713ef84ec585ef647c5 + last_write_checksum: sha1:6145e0b582b6d2b20b4c53e8c908b00246a84f24 + pristine_git_object: f537ca1936567fbafed289980dbed05f146644f6 src/main/java/com/glean/api_client/glean_api_client/models/components/Document.java: id: 286c1a3ce82a last_write_checksum: sha1:45a6bb5bb928680e90a08cab317f095012f1bc5c @@ -5997,14 +6037,22 @@ trackedFiles: id: de39566bcffe last_write_checksum: sha1:769c4d48aedfb3638a6dde3e762d9373b3155d20 pristine_git_object: 6c3564656db7d82a7cb0abfc6479e3bb0d163cc6 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformDatasourceFilterInfo.java: + id: 95720dbf07ab + last_write_checksum: sha1:310d40bc01d9597cfdd630217c159ad52c84c245 + pristine_git_object: 569932dc920f33dbe679a1f39fec6baa3e366f67 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilter.java: id: 79535f6079d1 last_write_checksum: sha1:0b5b67c8640ec81897142d0fd4349e732a193c71 pristine_git_object: b542c1d0622f1a18bfb075e790a07b061673c51a + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterFieldInfo.java: + id: 666f97e5824a + last_write_checksum: sha1:f30e55e5a05856e1ffeb1394a4a9c12278723d7c + pristine_git_object: 7a354daa02a6343e7ec1b62c3432a4a4939e9df2 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterOperator.java: id: 66c7c018aa4f - last_write_checksum: sha1:616e18d5bb0bcb7ce9dda6e24e6a110104dc523e - pristine_git_object: ad7114fd7cf5de09bf69694171541fa41b14db4b + last_write_checksum: sha1:c4d6e1045ffbb499bc6132ad33c0386b50f1bee0 + pristine_git_object: 40562943e62a2d7d08d9cd3cafed991459b0cc2a src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformMessage.java: id: c1cf5da6fc08 last_write_checksum: sha1:f4f376ebbf062f855845e8083909966628ce296a @@ -6031,16 +6079,20 @@ trackedFiles: pristine_git_object: 6c2a2883903d54f8255c0c35a01cb0d5d4cb37d2 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformResult.java: id: cfedffb9bb25 - last_write_checksum: sha1:af520e178d10bbdd5a2a1fb5f5f2519c31c09955 - pristine_git_object: 9f2a14b55fe016e46a1d6c7636c97738afb396bb + last_write_checksum: sha1:5e89e140aee1d9156ba0f66c04469ac363fe167d + pristine_git_object: fb7ae8b7d76abb8a1f2d6e7e99338767b48b127c + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchFiltersResponse.java: + id: b4ffdc4b53ac + last_write_checksum: sha1:7188213346f861917bf9f4ba8bb2c4a3c78a3991 + pristine_git_object: 828ba9bcc7733c486fd6fbc809d18ac71238ae61 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchRequest.java: id: 87faac7fcad3 - last_write_checksum: sha1:911a882b358129a7ab1e54d88b993b9712ea22a0 - pristine_git_object: 41659fab14eacfadc652a8b38a52a6d28e02803d + last_write_checksum: sha1:3d23a720d71f27bcb2057d9df0a1d70cabc72ed5 + pristine_git_object: 79fd3cb980f1d6d1ba947b1e2e8caeb6293c6392 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchResponse.java: id: 170859d5c40a - last_write_checksum: sha1:f6bb81d05003571db41220e1d40d54a854206d97 - pristine_git_object: bba2b20565c5103d873fb2de0ca511298695c829 + last_write_checksum: sha1:0307c8a70e92cff978109770e0a74edcdf441333 + pristine_git_object: 884895b93828bf28e86db6a56106eb679136a3dc src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java: id: 11a29891a283 last_write_checksum: sha1:e77a0aafec5bb5d8d40466d462b0dad59d2c81db @@ -6077,6 +6129,18 @@ trackedFiles: id: 9b52c0471fec last_write_checksum: sha1:cec4bc12d4d8c5b20508d90697efd3d7b8423fef pristine_git_object: 201289404dd7c8e35dc64503796481f4cd2fd79b + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateRequest.java: + id: 84e505df2f5e + last_write_checksum: sha1:63781e234fba470c918b03b0e55c4cdf4d74e3cc + pristine_git_object: 3ed55c590700a2dba0291451aad8a6c18a17d8e6 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateResponse.java: + id: 11e53d34d30e + last_write_checksum: sha1:7f4bc94a1600ecf3501cbbba755f2029439b307b + pristine_git_object: be1b82a65ab1daad454216aa93c76c790fcb846d + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateStatus.java: + id: 520df83e63e8 + last_write_checksum: sha1:2090b39893743340c206aa4d5b2983c8e70581df + pristine_git_object: 9c391a7d6ff87c7a5ccb7a79dddf33b8c2366777 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationFile.java: id: ab9dc998ea08 last_write_checksum: sha1:e7848766e9390157fff320554a1a4d27431c3403 @@ -6095,12 +6159,8 @@ trackedFiles: pristine_git_object: 8f091310d9bf706abb2751877017601c98f4101b src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java: id: e6f17469edd8 - last_write_checksum: sha1:4717ee8627173ba568b8fa7fa2abe58c0ec46815 - pristine_git_object: 6ca7a5d51183f91d990c9f9bb9063f885e341dd6 - src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java: - id: c77caa9172f6 - last_write_checksum: sha1:e0e6ad69447149766419efd5bf5c6292d5752c2d - pristine_git_object: 32e7d04b122203a058fdbeaa704f12622ab1831e + last_write_checksum: sha1:25f27c436d2cae6a9497871251405639a094b3a9 + pristine_git_object: d77ed44c55eca78314b6c100cdb0519bab629d8f src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersion.java: id: 75d21c0e97e9 last_write_checksum: sha1:ba6a0ff5f12620ff897fb05f690f177146f9dca7 @@ -6133,6 +6193,10 @@ trackedFiles: id: ab9269c32c6a last_write_checksum: sha1:6f3c5cb8d6d2a61f8d2b7ee42a1d7b73ac02c6b7 pristine_git_object: 560c03adf256f536904c6f627487fe8c39c865f4 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformWarning.java: + id: 463052217b74 + last_write_checksum: sha1:8196de575b8c41e9997799bf41ed972072b117a3 + pristine_git_object: 102a36283ccf8ad1c29ff105429e5e34b3351196 src/main/java/com/glean/api_client/glean_api_client/models/components/PossibleValue.java: id: 1c530baf92d6 last_write_checksum: sha1:676338b4060eb871152260e200286654979986ed @@ -7177,6 +7241,10 @@ trackedFiles: id: 232a1dab138b last_write_checksum: sha1:aca04a29477a63e4b032c8b995f9c448c0e80f71 pristine_git_object: 6954137606f65f50a3347f5454e9c08b5dd0bfbf + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSearchFiltersRequestBuilder.java: + id: 8e0651b29a5c + last_write_checksum: sha1:3aeb9ec2b9971853b54682b28a1c798f48e5a730 + pristine_git_object: cde5bd659c15970e1bc4c420c7af346fb44bb77a src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSearchRequestBuilder.java: id: 82db0b41fde4 last_write_checksum: sha1:7af4c73a77eeb27581501f320f4b69e76cf83d62 @@ -7213,6 +7281,10 @@ trackedFiles: id: 4ed6e7226174 last_write_checksum: sha1:c839dba1a5d49f729457ae2f0f30b14c03ec1ce6 pristine_git_object: a3cef301597cec13f613882f249caad5b2607b6c + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsUpdateRequestBuilder.java: + id: b521deba289a + last_write_checksum: sha1:0d8e4d4521817b3e0c43d4a3c3e981e51f7005ac + pristine_git_object: 1efee3ffd47afad845fa03b33ce8a7092f651db5 src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsValidateRequestBuilder.java: id: 17451af832bd last_write_checksum: sha1:20faca92a1b8dc1378d9e5be04be86197ff35cc3 @@ -8389,14 +8461,26 @@ trackedFiles: id: 797a95edf650 last_write_checksum: sha1:ad6856a23785be496390782be312b0b004a974a2 pristine_git_object: f6403da16588dde87d9315b9438ebc1d4d4abe14 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequest.java: + id: fbf5c5a7d902 + last_write_checksum: sha1:2e7002831d96dfda22ead06f6292768dcb4a3be5 + pristine_git_object: 78c59ddb407f6c96f64c5dd033d808dee8e5fb5f + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequestBuilder.java: + id: 44f17d652562 + last_write_checksum: sha1:aa2ed0a102150803ccdd9fbd6d71d175690fec54 + pristine_git_object: f16218a7dbfdc8a7ca0c1f1dc59974a5e5905969 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersResponse.java: + id: d63b4580e4df + last_write_checksum: sha1:f1ae1ff3f72dfc2bfc60694d19e28019e116d065 + pristine_git_object: 85f114e87d5f0a58322e47ce80acaf7079cc885c src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchRequestBuilder.java: id: fa980ac90208 last_write_checksum: sha1:8dc85371316b91ea65715a95dbc7483d31331260 pristine_git_object: 20f2eeb9278f8e2717c725eeca77a95f72e015ea src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchResponse.java: id: 68bd184c4656 - last_write_checksum: sha1:602ef94742690f30edd18aed6eeb9c6b0ff5b846 - pristine_git_object: f019690379285f41adeeae32dce29d9891e6f82d + last_write_checksum: sha1:95dda70c688e56c6e348da4dc31debcc7b28a17d + pristine_git_object: 4fc14490cc094ed76f41c8bc71e37c5f7ba79689 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateRequestBuilder.java: id: 9624f91e76de last_write_checksum: sha1:a71ba8c83a51781509437a985e6f378893b3b8ef @@ -8489,6 +8573,18 @@ trackedFiles: id: b3dd6f59bb8e last_write_checksum: sha1:46293d7c1050f140f1bb6644c5b875bdfee50d42 pristine_git_object: b3732fd431b6a0c270950048f6154b05b7f81ff6 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequest.java: + id: ca0b020636b0 + last_write_checksum: sha1:3f41242e87d0faf7cbc7f9deced102f9577de69c + pristine_git_object: 1eb86ab5e74b328b6ad29892a602094deb1d91ac + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequestBuilder.java: + id: 8183e397e681 + last_write_checksum: sha1:988452512f8493d5c42fe4bd7af030196e151d2b + pristine_git_object: a80e48fde23a8814ad7b4843fb05f057b8c4bd73 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateResponse.java: + id: 534df0ec5c5d + last_write_checksum: sha1:48f4b30903fbc5fefc46cd9720bc90d5e242c65c + pristine_git_object: aafd852233390785dad907ba991983db64b355f2 src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateRequestBuilder.java: id: bdf1d71df643 last_write_checksum: sha1:a64582e1c9aa9584bad5baf0e379c159fc4da5aa @@ -9353,10 +9449,14 @@ trackedFiles: id: dd7a149a5ac2 last_write_checksum: sha1:15e40e2048959fb2e80f08d5fe275e2d4d88b8f6 pristine_git_object: 84352def253ce9dac5fb54dfd7a7b14df2f0b20e + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersResponse.java: + id: e44e4ce8ebf0 + last_write_checksum: sha1:6f0ff4bdebc6648cd42b9fd9ca20e98e90b8e8ef + pristine_git_object: c0ef2a40eb742b27766c21e3d0651688768f8ab8 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchResponse.java: id: c324b8a2e02b - last_write_checksum: sha1:0ce35493af407ceddc10f68564a406736d6a2247 - pristine_git_object: 2fe9dd653b898a2ac834b9bc870086e4e200f75f + last_write_checksum: sha1:7f23d1a7eb3db5c3e349c533f8ae313acf831827 + pristine_git_object: 82b96b7d6ce0d74365a04b15360f53b80fae1a84 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateResponse.java: id: 42b466e752d4 last_write_checksum: sha1:7526c5796102914553f222539fa44207c8eba80d @@ -9389,6 +9489,10 @@ trackedFiles: id: 0423c13be505 last_write_checksum: sha1:2c01abcd2cac013be34b46c4e7ec507e962db792 pristine_git_object: 8a5b1a02b1fb12b0541cdc88c25abe56eac08bbf + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateResponse.java: + id: d1f0fe42d611 + last_write_checksum: sha1:dad82614431e8a50964aeff09af66d829c7d7ac5 + pristine_git_object: 840ab84954b9b60089facb628ca883291746269b src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateResponse.java: id: eeb57d48c7a4 last_write_checksum: sha1:90caa5bbd4398d1e80bf4d346382473ee0c3f3bf @@ -9947,8 +10051,12 @@ trackedFiles: pristine_git_object: c5021a3812b4be41f37df82ccb8d7a9856c502b8 src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearch.java: id: 9b5d67796029 - last_write_checksum: sha1:f5c9d065cb970a5852c4c8fa32456c92d63d3095 - pristine_git_object: 9cf91fe44e9b5e8e4cc98dd62a2adce6b40df81a + last_write_checksum: sha1:094ccd1b45375475466482339959aafa1db10a56 + pristine_git_object: 991532739bf948096cf103f89897de12796afc7e + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearchFilters.java: + id: ea61edacaa4a + last_write_checksum: sha1:902ba822a5efe5a36eaaa3915d71898f3d57a865 + pristine_git_object: aef33ab8ffc727ecaad02876e11915b457bad37f src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreate.java: id: e8e20e07b55d last_write_checksum: sha1:0cf5ee998ac44cf9eeb127cb2bd140ef8651a16e @@ -9981,6 +10089,10 @@ trackedFiles: id: 4fa60c778985 last_write_checksum: sha1:9f76e8f8f2e9fddb475cd4eba8d9b953b7c0228d pristine_git_object: a21321ef95702fc78d9ac063f69cfda09d33c8e9 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsUpdate.java: + id: f96fdd6c8eda + last_write_checksum: sha1:acb41923dcb0135c0589409e1ec8e4cbebd7eed6 + pristine_git_object: 66c63effe387afce5ed25fc88c38d185ef91d3c8 src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsValidate.java: id: 3ecfc797f173 last_write_checksum: sha1:35e6c42944d2ba7ba7d29af3a5970a699fc378ca @@ -11454,7 +11566,7 @@ examples: application/json: {"query": "quarterly planning 2026", "page_size": 10, "datasources": ["confluence", "google_drive"], "filters": [{"field": "type", "values": ["spreadsheet", "presentation"]}]} responses: "200": - application/json: {"results": [], "has_more": false, "next_cursor": "", "request_id": ""} + application/json: {"results": [], "has_more": false, "next_cursor": "", "request_id": "", "warnings": []} "400": application/problem+json: {"type": "https://developer.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://developer.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": @@ -11599,6 +11711,29 @@ examples: application/json: {"error": ""} "500": application/json: {"error": ""} + platform-skills-update: + speakeasy-default-platform-skills-update: + parameters: + path: + skill_id: "" + requestBody: + application/json: {"status": "DISABLED"} + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Afton14", "description": "taut netsuke duh sonata boastfully elegantly management come", "latest_version": 425795, "latest_minor_version": 741364, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2024-12-20T01:31:39.364Z", "updated_at": "2025-12-04T02:59:37.124Z"}, "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-search-filters: + speakeasy-default-platform-search-filters: + responses: + "200": + application/json: {"datasources": [], "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"}]} examplesVersion: 1.0.2 generatedTests: activity: "2025-06-09T18:03:44Z" @@ -11741,7 +11876,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.skills.create()`: **Added**\n* `glean.skills.list()`: **Added**\n* `glean.skills.validate()`: **Added**\n* `glean.skills.retrieve()`: **Added**\n* `glean.skills.retrieveContent()`: **Added**\n* `glean.skills.createVersion()`: **Added**\n* `glean.skills.listVersions()`: **Added**\n* `glean.skills.retrieveVersion()`: **Added**\n* `glean.skills.retrieveVersionContent()`: **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` **Changed**\n * `response` **Changed**\n* `glean.client.governance.data.findings.list()`: `response.exports[]` **Changed**\n" +releaseNotes: "## Java SDK Changes:\n* `glean.search.query()`: \n * `request.datasourceInstances` **Removed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.status[422]` **Added**\n* `glean.skills.update()`: **Added**\n* `glean.search.listFilters()`: **Added**\n* `glean.indexing.datasources.add()`: `request` **Changed**\n* `glean.indexing.datasources.retrieveConfig()`: `response` **Changed**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index c0ca718b..31ec3e51 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.14.4 + version: 0.14.5 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 9b00266d..fc1e0c21 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: 2822daae55430107c738db822cbeeb5a6bef463b - x-open-api-commit-sha: 0bdefe83a21f917592624e6f1dbaa180e89d5224 + x-source-commit-sha: 0a7acf0cb7018c0cc9d6da01724637d061e6ac07 + x-open-api-commit-sha: 678917897897ea11458d1a09b8e87a68e72f2916 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. @@ -401,6 +401,63 @@ paths: security: - APIToken: [] /api/skills/{skill_id}: + patch: + tags: + - Skills + summary: Update skill + description: | + Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + operationId: platform-skills-update + x-visibility: Public + x-glean-experimental: + id: 262e1f6b-6c2d-4d6d-943b-fc251d2fb38b + introduced: "2026-07-20" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillUpdateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillUpdateResponse" + "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" + "409": + $ref: "#/components/responses/PlatformConflict" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: update + security: + - APIToken: [] get: tags: - Skills @@ -739,7 +796,8 @@ paths: - Search summary: Search description: | - Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. + Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. Structured filters accept exact public built-ins and free-form custom fields. + Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid inline operators may include a nested `/query` `invalid_filter` issue. Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with `Retry-After`. Temporary backend unavailability returns HTTP 503. operationId: platform-search x-visibility: Public x-glean-experimental: @@ -754,7 +812,8 @@ paths: $ref: "#/components/schemas/PlatformSearchRequest" responses: "200": - description: Successful search. + description: | + Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may be present while results and cursor remain available. content: application/json: schema: @@ -771,6 +830,8 @@ paths: $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" + "422": + $ref: "#/components/responses/PlatformUnprocessableEntity" "429": $ref: "#/components/responses/PlatformTooManyRequests" "500": @@ -781,6 +842,66 @@ paths: x-speakeasy-name-override: query security: - APIToken: [] + /api/search/filters: + get: + tags: + - Search + summary: List search filters + description: | + Discover caller-visible datasources and common built-in filter fields that can be used with Platform Search. This is a best-effort common catalog, not an authoritative inventory of every field search may accept. + Without `query`, the response returns datasource rows and field metadata without executing search. With a nonblank `query`, exactly one `datasources` value is required and the response may include bounded, non-exhaustive facet values for matching public fields. + operationId: platform-search-filters + x-visibility: Public + x-glean-experimental: + id: 0b585621-13fb-4544-bf20-5e1c99452735 + introduced: "2026-05-12" + parameters: + - in: query + name: datasources + description: | + Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + required: false + schema: + type: array + minItems: 1 + items: + type: string + minLength: 1 + - in: query + name: query + description: | + Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Search filter metadata. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchFiltersResponse" + "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: search + x-speakeasy-name-override: listFilters + security: + - APIToken: [] /rest/api/v1/activity: post: operationId: activity @@ -5640,6 +5761,24 @@ components: description: >- HTTP bearer token. Accepts a Glean-issued API token, an OAuth access token from the Glean OAuth Authorization Server (including Dynamic Client Registration clients), or an OAuth access token issued by an external identity provider. External-IdP OAuth tokens must also include the `X-Glean-Auth-Type: OAUTH` request header. OAuth is supported on the Client API only; the Indexing API requires a Glean-issued token. schemas: + PlatformWarning: + type: object + additionalProperties: false + required: + - code + - message + description: Non-blocking warning attached to a successful Platform response. + properties: + code: + type: string + minLength: 1 + description: | + Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum. + example: results_incomplete + message: + type: string + minLength: 1 + description: Human-readable warning message. PlatformAgentsSearchRequest: type: object additionalProperties: false @@ -6205,18 +6344,6 @@ components: is_manifest: type: boolean description: Whether this file is the skill manifest. - PlatformSkillValidationWarning: - type: object - required: - - code - - message - properties: - code: - type: string - description: Stable warning code. - message: - type: string - description: Human-readable warning message. PlatformSkillValidationResponse: type: object required: @@ -6236,7 +6363,7 @@ components: type: array description: Non-blocking validation warnings. items: - $ref: "#/components/schemas/PlatformSkillValidationWarning" + $ref: "#/components/schemas/PlatformWarning" request_id: type: string description: Platform-generated request ID for support correlation. @@ -6251,6 +6378,31 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillUpdateStatus: + type: string + enum: + - ENABLED + - DISABLED + description: New status for the skill. + PlatformSkillUpdateRequest: + type: object + additionalProperties: false + required: + - status + properties: + status: + $ref: "#/components/schemas/PlatformSkillUpdateStatus" + PlatformSkillUpdateResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformSkillVersion: type: object required: @@ -6353,6 +6505,7 @@ components: - LTE PlatformFilter: type: object + additionalProperties: false required: - field - values @@ -6361,6 +6514,7 @@ components: properties: field: type: string + minLength: 1 description: | The field to filter on. Accepts built-in filter field names such as `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`, plus custom datasource property names. example: type @@ -6369,6 +6523,7 @@ components: minItems: 1 items: type: string + minLength: 1 description: One or more values to match. example: - spreadsheet @@ -6380,6 +6535,7 @@ components: Comparison operator to apply to this filter. Defaults to `EQUALS`. `GT`, `GTE`, `LT`, and `LTE` range operators require exactly one value; express bounded ranges with multiple filters on the same field. PlatformTimeRange: type: object + additionalProperties: false description: Filter results to those last updated within this range. properties: start: @@ -6408,6 +6564,7 @@ components: properties: query: type: string + minLength: 1 description: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. page_size: @@ -6423,26 +6580,24 @@ components: Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. datasources: type: array + minItems: 1 items: type: string + minLength: 1 description: | - Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. - datasource_instances: - type: array - items: - type: string - description: | - Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`. + Restrict results to specific canonical normalized datasource identifiers. filters: type: array + minItems: 1 items: $ref: "#/components/schemas/PlatformFilter" description: | - 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. + 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields. time_range: $ref: "#/components/schemas/PlatformTimeRange" PlatformResult: type: object + additionalProperties: false required: - url - title @@ -6451,31 +6606,31 @@ components: url: type: string format: uri + minLength: 1 description: Canonical URL of the result. example: https://company.atlassian.net/wiki/spaces/ENG/pages/12345 title: type: string + minLength: 1 description: Result title. example: Q2 2026 Platform Roadmap snippets: type: array items: type: string + minLength: 1 description: Query-relevant plain-text excerpts from the result body. example: - The platform team will focus on API stability and... datasource: type: string + minLength: 1 description: The datasource this result originates from. example: confluence - datasource_instance: - type: string - nullable: true - description: The datasource instance this result originates from, if known. - example: confluence_acme document_type: type: string nullable: true + minLength: 1 description: The document type within the datasource. example: page creator: @@ -6494,11 +6649,13 @@ components: description: When the result was created. PlatformSearchResponse: type: object + additionalProperties: false required: - results - has_more - next_cursor - request_id + - warnings properties: results: type: array @@ -6514,6 +6671,81 @@ components: description: Opaque token to pass as `cursor` in the next request. request_id: type: string + minLength: 1 + description: Platform-generated request ID for support correlation. + warnings: + type: array + description: | + Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present. + items: + $ref: "#/components/schemas/PlatformWarning" + PlatformFilterFieldInfo: + type: object + additionalProperties: false + required: + - field + - type + - operators + properties: + field: + type: string + minLength: 1 + description: Field name usable in the `filters` array for `POST /api/search`. + example: status + type: + type: string + minLength: 1 + description: | + Open field-type string. Current values are `STRING` and `USER`. Clients must tolerate unknown values. + example: STRING + operators: + type: array + minItems: 1 + description: Supported comparison operators for this field. + items: + $ref: "#/components/schemas/PlatformFilterOperator" + values: + type: array + description: | + Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists. + items: + type: string + minLength: 1 + PlatformDatasourceFilterInfo: + type: object + additionalProperties: false + required: + - datasource + - filters + properties: + datasource: + type: string + minLength: 1 + description: | + Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + example: jira + filters: + type: array + description: | + Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here does not make that field invalid in `POST /api/search`. + items: + $ref: "#/components/schemas/PlatformFilterFieldInfo" + PlatformSearchFiltersResponse: + type: object + additionalProperties: false + required: + - datasources + - request_id + properties: + datasources: + type: array + description: | + Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible datasources. + items: + $ref: "#/components/schemas/PlatformDatasourceFilterInfo" + request_id: + type: string + minLength: 1 description: Platform-generated request ID for support correlation. ActivityEventParams: properties: @@ -15845,6 +16077,8 @@ components: - ENTITY - CALENDAR - AGENTS + - AI_CONVERSATION + - AI_ARTIFACT description: The document category of this object type. propertyDefinitions: type: array @@ -15898,6 +16132,8 @@ components: - ENTITY - CALENDAR - AGENTS + - AI_CONVERSATION + - AI_ARTIFACT description: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. default: UNCATEGORIZED urlRegex: @@ -17028,6 +17264,12 @@ components: application/problem+json: schema: $ref: "#/components/schemas/PlatformProblemDetail" + PlatformUnprocessableEntity: + description: Syntactically valid but semantically incorrect request. + content: + application/problem+json: + schema: + $ref: "#/components/schemas/PlatformProblemDetail" SuccessResponse: description: OK content: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7a394788..9bc497a4 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.790.3 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb - sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b + sourceRevisionDigest: sha256:f51d0c7a8bea50d3550898248e6b90bcf4674cd67887b098fa8cfbf33447c626 + sourceBlobDigest: sha256:072f4941af676df25394a59a70cfbb497e383212bb111bff03feec7876b2309e tags: - latest Glean-OAS: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb - sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b + sourceRevisionDigest: sha256:f51d0c7a8bea50d3550898248e6b90bcf4674cd67887b098fa8cfbf33447c626 + sourceBlobDigest: sha256:072f4941af676df25394a59a70cfbb497e383212bb111bff03feec7876b2309e codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:e3c929dc27f770d7e9fc2453e5efcdb9b60be3e68c39fa24fc2726fb0ffd18a5 + codeSamplesRevisionDigest: sha256:21044f2759df063c4e251f7c258656e2018a774ef6dd0d1b9a5dbc9a7eb0b5a1 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 2109d672..e309e3c8 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.4' +implementation 'com.glean.api-client:glean-api-client:0.14.5' ``` Maven: @@ -75,7 +75,7 @@ Maven: com.glean.api-client glean-api-client - 0.14.4 + 0.14.5 ``` @@ -602,12 +602,14 @@ For more information on obtaining the appropriate token type, please contact you ### [Search](docs/sdks/search/README.md) * [query](docs/sdks/search/README.md#query) - Search +* [listFilters](docs/sdks/search/README.md#listfilters) - List search filters ### [Skills](docs/sdks/skills/README.md) * [create](docs/sdks/skills/README.md#create) - Create skill * [list](docs/sdks/skills/README.md#list) - List skills * [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle +* [update](docs/sdks/skills/README.md#update) - Update skill * [retrieve](docs/sdks/skills/README.md#retrieve) - Retrieve skill * [retrieveContent](docs/sdks/skills/README.md#retrievecontent) - Download skill content * [createVersion](docs/sdks/skills/README.md#createversion) - Create skill version @@ -720,11 +722,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.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 14 of 147 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 147 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 147 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 147 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 147 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 16 of 149 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 149 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 149 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 149 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 149 methods.* diff --git a/RELEASES.md b/RELEASES.md index f0376722..78e0bc28 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -808,4 +808,14 @@ Based on: ### 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 +- [Maven Central v0.14.4] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.4 - . + +## 2026-07-23 04:06:50 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.3 (2.918.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.14.5] . +### Releases +- [Maven Central v0.14.5] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.5 - . \ No newline at end of file diff --git a/docs/models/components/DatasourceCategory.md b/docs/models/components/DatasourceCategory.md index 6f842b81..52fd6924 100644 --- a/docs/models/components/DatasourceCategory.md +++ b/docs/models/components/DatasourceCategory.md @@ -35,4 +35,6 @@ DatasourceCategory custom = DatasourceCategory.of("custom_value"); | `EXTERNAL_SHORTCUT` | EXTERNAL_SHORTCUT | | `ENTITY` | ENTITY | | `CALENDAR` | CALENDAR | -| `AGENTS` | AGENTS | \ No newline at end of file +| `AGENTS` | AGENTS | +| `AI_CONVERSATION` | AI_CONVERSATION | +| `AI_ARTIFACT` | AI_ARTIFACT | \ No newline at end of file diff --git a/docs/models/components/DocCategory.md b/docs/models/components/DocCategory.md index 877d2411..a6da6f71 100644 --- a/docs/models/components/DocCategory.md +++ b/docs/models/components/DocCategory.md @@ -35,4 +35,6 @@ DocCategory custom = DocCategory.of("custom_value"); | `EXTERNAL_SHORTCUT` | EXTERNAL_SHORTCUT | | `ENTITY` | ENTITY | | `CALENDAR` | CALENDAR | -| `AGENTS` | AGENTS | \ No newline at end of file +| `AGENTS` | AGENTS | +| `AI_CONVERSATION` | AI_CONVERSATION | +| `AI_ARTIFACT` | AI_ARTIFACT | \ No newline at end of file diff --git a/docs/models/components/PlatformDatasourceFilterInfo.md b/docs/models/components/PlatformDatasourceFilterInfo.md new file mode 100644 index 00000000..2ae637eb --- /dev/null +++ b/docs/models/components/PlatformDatasourceFilterInfo.md @@ -0,0 +1,9 @@ +# PlatformDatasourceFilterInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasource` | *String* | :heavy_check_mark: | Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`.
| jira | +| `filters` | List\<[PlatformFilterFieldInfo](../../models/components/PlatformFilterFieldInfo.md)> | :heavy_check_mark: | Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here does not make that field invalid in `POST /api/search`.
| | \ No newline at end of file diff --git a/docs/models/components/PlatformFilterFieldInfo.md b/docs/models/components/PlatformFilterFieldInfo.md new file mode 100644 index 00000000..0238fd53 --- /dev/null +++ b/docs/models/components/PlatformFilterFieldInfo.md @@ -0,0 +1,11 @@ +# PlatformFilterFieldInfo + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `field` | *String* | :heavy_check_mark: | Field name usable in the `filters` array for `POST /api/search`. | status | +| `type` | *String* | :heavy_check_mark: | Open field-type string. Current values are `STRING` and `USER`. Clients must tolerate unknown values.
| STRING | +| `operators` | List\<[PlatformFilterOperator](../../models/components/PlatformFilterOperator.md)> | :heavy_check_mark: | Supported comparison operators for this field. | | +| `values` | List\<*String*> | :heavy_minus_sign: | Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as an array, including `[]`, when query-backed discovery executes. An empty array does not imply that no valid value exists.
| | \ No newline at end of file diff --git a/docs/models/components/PlatformFilterOperator.md b/docs/models/components/PlatformFilterOperator.md index 8104e06f..d8cef649 100644 --- a/docs/models/components/PlatformFilterOperator.md +++ b/docs/models/components/PlatformFilterOperator.md @@ -8,6 +8,9 @@ Supported filter operator. import com.glean.api_client.glean_api_client.models.components.PlatformFilterOperator; PlatformFilterOperator value = PlatformFilterOperator.EQUALS; + +// Open enum: use .of() to create instances from custom string values +PlatformFilterOperator custom = PlatformFilterOperator.of("custom_value"); ``` diff --git a/docs/models/components/PlatformResult.md b/docs/models/components/PlatformResult.md index c1f2481b..43f6e405 100644 --- a/docs/models/components/PlatformResult.md +++ b/docs/models/components/PlatformResult.md @@ -9,7 +9,6 @@ | `title` | *String* | :heavy_check_mark: | Result title. | Q2 2026 Platform Roadmap | | `snippets` | List\<*String*> | :heavy_minus_sign: | Query-relevant plain-text excerpts from the result body. | [
"The platform team will focus on API stability and..."
] | | `datasource` | *String* | :heavy_check_mark: | The datasource this result originates from. | confluence | -| `datasourceInstance` | *JsonNullable\* | :heavy_minus_sign: | The datasource instance this result originates from, if known. | confluence_acme | | `documentType` | *JsonNullable\* | :heavy_minus_sign: | The document type within the datasource. | page | | `creator` | [Optional\](../../models/components/PlatformPersonReference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `owner` | [Optional\](../../models/components/PlatformPersonReference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | diff --git a/docs/models/components/PlatformSearchFiltersResponse.md b/docs/models/components/PlatformSearchFiltersResponse.md new file mode 100644 index 00000000..63f7c085 --- /dev/null +++ b/docs/models/components/PlatformSearchFiltersResponse.md @@ -0,0 +1,9 @@ +# PlatformSearchFiltersResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasources` | List\<[PlatformDatasourceFilterInfo](../../models/components/PlatformDatasourceFilterInfo.md)> | :heavy_check_mark: | Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible datasources.
| +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSearchRequest.md b/docs/models/components/PlatformSearchRequest.md index 0a835dfc..07a4efc1 100644 --- a/docs/models/components/PlatformSearchRequest.md +++ b/docs/models/components/PlatformSearchRequest.md @@ -3,12 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `query` | *String* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| -| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of results to return per page. | -| `cursor` | *JsonNullable\* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| -| `datasources` | List\<*String*> | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| -| `datasourceInstances` | List\<*String*> | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| -| `filters` | List\<[PlatformFilter](../../models/components/PlatformFilter.md)> | :heavy_minus_sign: | 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.
| -| `timeRange` | [Optional\](../../models/components/PlatformTimeRange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `query` | *String* | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| +| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of results to return per page. | +| `cursor` | *JsonNullable\* | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `datasources` | List\<*String*> | :heavy_minus_sign: | Restrict results to specific canonical normalized datasource identifiers.
| +| `filters` | List\<[PlatformFilter](../../models/components/PlatformFilter.md)> | :heavy_minus_sign: | 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. Exact public built-ins receive the public operator contract; other nonblank fields pass through as possible custom fields.
| +| `timeRange` | [Optional\](../../models/components/PlatformTimeRange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file diff --git a/docs/models/components/PlatformSearchResponse.md b/docs/models/components/PlatformSearchResponse.md index 083cad41..55113851 100644 --- a/docs/models/components/PlatformSearchResponse.md +++ b/docs/models/components/PlatformSearchResponse.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `results` | List\<[PlatformResult](../../models/components/PlatformResult.md)> | :heavy_check_mark: | Ordered list of search results. | -| `hasMore` | *boolean* | :heavy_check_mark: | Indicates whether additional pages of results are available. | -| `nextCursor` | *Optional\* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. | -| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | List\<[PlatformResult](../../models/components/PlatformResult.md)> | :heavy_check_mark: | Ordered list of search results. | +| `hasMore` | *boolean* | :heavy_check_mark: | Indicates whether additional pages of results are available. | +| `nextCursor` | *Optional\* | :heavy_check_mark: | Opaque token to pass as `cursor` in the next request. | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | +| `warnings` | List\<[PlatformWarning](../../models/components/PlatformWarning.md)> | :heavy_check_mark: | Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate unknown warning codes. Current code `results_incomplete` means some results may be unavailable for the requested datasource scope; results, `has_more`, and `next_cursor` remain present.
| \ No newline at end of file diff --git a/docs/models/components/PlatformSkillUpdateRequest.md b/docs/models/components/PlatformSkillUpdateRequest.md new file mode 100644 index 00000000..1d79d80d --- /dev/null +++ b/docs/models/components/PlatformSkillUpdateRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `status` | [PlatformSkillUpdateStatus](../../models/components/PlatformSkillUpdateStatus.md) | :heavy_check_mark: | New status for the skill. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillUpdateResponse.md b/docs/models/components/PlatformSkillUpdateResponse.md new file mode 100644 index 00000000..6d9fcebf --- /dev/null +++ b/docs/models/components/PlatformSkillUpdateResponse.md @@ -0,0 +1,9 @@ +# PlatformSkillUpdateResponse + + +## 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/PlatformSkillUpdateStatus.md b/docs/models/components/PlatformSkillUpdateStatus.md new file mode 100644 index 00000000..79ff81d3 --- /dev/null +++ b/docs/models/components/PlatformSkillUpdateStatus.md @@ -0,0 +1,19 @@ +# PlatformSkillUpdateStatus + +New status for the skill. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillUpdateStatus; + +PlatformSkillUpdateStatus value = PlatformSkillUpdateStatus.ENABLED; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ENABLED` | ENABLED | +| `DISABLED` | DISABLED | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationResponse.md b/docs/models/components/PlatformSkillValidationResponse.md index 29d84491..6178958f 100644 --- a/docs/models/components/PlatformSkillValidationResponse.md +++ b/docs/models/components/PlatformSkillValidationResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `metadata` | [PlatformSkillValidationMetadata](../../models/components/PlatformSkillValidationMetadata.md) | :heavy_check_mark: | N/A | -| `files` | List\<[PlatformSkillValidationFile](../../models/components/PlatformSkillValidationFile.md)> | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | -| `warnings` | List\<[PlatformSkillValidationWarning](../../models/components/PlatformSkillValidationWarning.md)> | :heavy_check_mark: | Non-blocking validation warnings. | -| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `metadata` | [PlatformSkillValidationMetadata](../../models/components/PlatformSkillValidationMetadata.md) | :heavy_check_mark: | N/A | +| `files` | List\<[PlatformSkillValidationFile](../../models/components/PlatformSkillValidationFile.md)> | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | +| `warnings` | List\<[PlatformWarning](../../models/components/PlatformWarning.md)> | :heavy_check_mark: | Non-blocking validation warnings. | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationWarning.md b/docs/models/components/PlatformSkillValidationWarning.md deleted file mode 100644 index 844c546f..00000000 --- a/docs/models/components/PlatformSkillValidationWarning.md +++ /dev/null @@ -1,9 +0,0 @@ -# PlatformSkillValidationWarning - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `code` | *String* | :heavy_check_mark: | Stable warning code. | -| `message` | *String* | :heavy_check_mark: | Human-readable warning message. | \ No newline at end of file diff --git a/docs/models/components/PlatformWarning.md b/docs/models/components/PlatformWarning.md new file mode 100644 index 00000000..a1addb92 --- /dev/null +++ b/docs/models/components/PlatformWarning.md @@ -0,0 +1,11 @@ +# PlatformWarning + +Non-blocking warning attached to a successful Platform response. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `code` | *String* | :heavy_check_mark: | Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed enum.
| results_incomplete | +| `message` | *String* | :heavy_check_mark: | Human-readable warning message. | | \ No newline at end of file diff --git a/docs/models/operations/PlatformSearchFiltersRequest.md b/docs/models/operations/PlatformSearchFiltersRequest.md new file mode 100644 index 00000000..41652fb3 --- /dev/null +++ b/docs/models/operations/PlatformSearchFiltersRequest.md @@ -0,0 +1,9 @@ +# PlatformSearchFiltersRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasources` | List\<*String*> | :heavy_minus_sign: | Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required.
| +| `query` | *Optional\* | :heavy_minus_sign: | Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank.
| \ No newline at end of file diff --git a/docs/models/operations/PlatformSearchFiltersResponse.md b/docs/models/operations/PlatformSearchFiltersResponse.md new file mode 100644 index 00000000..85ae318f --- /dev/null +++ b/docs/models/operations/PlatformSearchFiltersResponse.md @@ -0,0 +1,11 @@ +# PlatformSearchFiltersResponse + + +## 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 | +| `platformSearchFiltersResponse` | [Optional\](../../models/components/PlatformSearchFiltersResponse.md) | :heavy_minus_sign: | Search filter metadata. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSearchResponse.md b/docs/models/operations/PlatformSearchResponse.md index 10908aea..3aab6630 100644 --- a/docs/models/operations/PlatformSearchResponse.md +++ b/docs/models/operations/PlatformSearchResponse.md @@ -3,9 +3,9 @@ ## 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 | -| `platformSearchResponse` | [Optional\](../../models/components/PlatformSearchResponse.md) | :heavy_minus_sign: | Successful search. | \ No newline at end of file +| 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 | +| `platformSearchResponse` | [Optional\](../../models/components/PlatformSearchResponse.md) | :heavy_minus_sign: | Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may be present while results and cursor remain available.
| \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsUpdateRequest.md b/docs/models/operations/PlatformSkillsUpdateRequest.md new file mode 100644 index 00000000..09e62ae8 --- /dev/null +++ b/docs/models/operations/PlatformSkillsUpdateRequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillUpdateRequest` | [PlatformSkillUpdateRequest](../../models/components/PlatformSkillUpdateRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsUpdateResponse.md b/docs/models/operations/PlatformSkillsUpdateResponse.md new file mode 100644 index 00000000..84502373 --- /dev/null +++ b/docs/models/operations/PlatformSkillsUpdateResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsUpdateResponse + + +## 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 | +| `platformSkillUpdateResponse` | [Optional\](../../models/components/PlatformSkillUpdateResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 6555e422..9a366782 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -5,10 +5,12 @@ ### Available Operations * [query](#query) - Search +* [listFilters](#listfilters) - List search filters ## query -Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. +Execute a search query and retrieve ranked results. This is the data retrieval variant of the search API and returns only results and pagination state. Structured filters accept exact public built-ins and free-form custom fields. +Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid inline operators may include a nested `/query` `invalid_filter` issue. Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with `Retry-After`. Temporary backend unavailability returns HTTP 503. ### Example Usage @@ -72,6 +74,60 @@ public class Application { | Error Type | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 413, 422, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## listFilters + +Discover caller-visible datasources and common built-in filter fields that can be used with Platform Search. This is a best-effort common catalog, not an authoritative inventory of every field search may accept. +Without `query`, the response returns datasource rows and field metadata without executing search. With a nonblank `query`, exactly one `datasources` value is required and the response may include bounded, non-exhaustive facet values for matching public fields. + + +### 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.PlatformSearchFiltersResponse; +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(); + + PlatformSearchFiltersResponse res = sdk.search().listFilters() + .call(); + + if (res.platformSearchFiltersResponse().isPresent()) { + System.out.println(res.platformSearchFiltersResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `datasources` | List\<*String*> | :heavy_minus_sign: | Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required.
| +| `query` | *Optional\* | :heavy_minus_sign: | Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank.
| + +### Response + +**[PlatformSearchFiltersResponse](../../models/operations/PlatformSearchFiltersResponse.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/docs/sdks/skills/README.md b/docs/sdks/skills/README.md index d69c628d..4316fd05 100644 --- a/docs/sdks/skills/README.md +++ b/docs/sdks/skills/README.md @@ -7,6 +7,7 @@ * [create](#create) - Create skill * [list](#list) - List skills * [validate](#validate) - Validate skill bundle +* [update](#update) - Update skill * [retrieve](#retrieve) - Retrieve skill * [retrieveContent](#retrievecontent) - Download skill content * [createVersion](#createversion) - Create skill version @@ -189,6 +190,65 @@ public class Application { | models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | | models/errors/APIException | 4XX, 5XX | \*/\* | +## update + +Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its content. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillUpdateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillUpdateStatus; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateResponse; +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(); + + PlatformSkillsUpdateResponse res = sdk.skills().update() + .skillId("") + .platformSkillUpdateRequest(PlatformSkillUpdateRequest.builder() + .status(PlatformSkillUpdateStatus.DISABLED) + .build()) + .call(); + + if (res.platformSkillUpdateResponse().isPresent()) { + System.out.println(res.platformSkillUpdateResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillUpdateRequest` | [PlatformSkillUpdateRequest](../../models/components/PlatformSkillUpdateRequest.md) | :heavy_check_mark: | N/A | + +### Response + +**[PlatformSkillsUpdateResponse](../../models/operations/PlatformSkillsUpdateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 409, 413, 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. diff --git a/gradle.properties b/gradle.properties index 706f8978..8f544756 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.14.4 +version=0.14.5 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncSearch.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncSearch.java index 4a17ff91..4633088d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncSearch.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncSearch.java @@ -7,10 +7,17 @@ import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; import com.glean.api_client.glean_api_client.models.components.PlatformSearchRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSearchFiltersRequest; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSearchFiltersRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSearchFiltersResponse; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSearchRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSearchResponse; import com.glean.api_client.glean_api_client.operations.PlatformSearch; +import com.glean.api_client.glean_api_client.operations.PlatformSearchFilters; import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.String; +import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; @@ -38,7 +45,19 @@ public Search sync() { * Search * *

Execute a search query and retrieve ranked results. This is the data retrieval variant of the search - * API and returns only results and pagination state. + * API and returns only results and pagination state. Structured filters accept exact public built-ins + * and free-form custom fields. + * Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results + * are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, + * `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that + * cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid + * inline operators may include a nested `/query` `invalid_filter` issue. + * + *

Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing + * response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with + * `Retry-After`. + * + *

Temporary backend unavailability returns HTTP 503. * * @return The async call builder */ @@ -50,7 +69,19 @@ public PlatformSearchRequestBuilder query() { * Search * *

Execute a search query and retrieve ranked results. This is the data retrieval variant of the search - * API and returns only results and pagination state. + * API and returns only results and pagination state. Structured filters accept exact public built-ins + * and free-form custom fields. + * Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results + * are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, + * `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that + * cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid + * inline operators may include a nested `/query` `invalid_filter` issue. + * + *

Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing + * response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with + * `Retry-After`. + * + *

Temporary backend unavailability returns HTTP 503. * * @param request The request object containing all the parameters for the API call. * @return {@code CompletableFuture} - The async response @@ -62,4 +93,66 @@ public CompletableFuture query(PlatformSearchRequest req .thenCompose(operation::handleResponse); } + + /** + * List search filters + * + *

Discover caller-visible datasources and common built-in filter fields that can be used with Platform + * Search. This is a best-effort common catalog, not an authoritative inventory of every field search + * may accept. + * Without `query`, the response returns datasource rows and field metadata without executing search. + * With a nonblank `query`, exactly one `datasources` value is required and the response may include + * bounded, non-exhaustive facet values for matching public fields. + * + * @return The async call builder + */ + public PlatformSearchFiltersRequestBuilder listFilters() { + return new PlatformSearchFiltersRequestBuilder(sdkConfiguration); + } + + /** + * List search filters + * + *

Discover caller-visible datasources and common built-in filter fields that can be used with Platform + * Search. This is a best-effort common catalog, not an authoritative inventory of every field search + * may accept. + * Without `query`, the response returns datasource rows and field metadata without executing search. + * With a nonblank `query`, exactly one `datasources` value is required and the response may include + * bounded, non-exhaustive facet values for matching public fields. + * + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listFiltersDirect() { + return listFilters(Optional.empty(), Optional.empty()); + } + + /** + * List search filters + * + *

Discover caller-visible datasources and common built-in filter fields that can be used with Platform + * Search. This is a best-effort common catalog, not an authoritative inventory of every field search + * may accept. + * Without `query`, the response returns datasource rows and field metadata without executing search. + * With a nonblank `query`, exactly one `datasources` value is required and the response may include + * bounded, non-exhaustive facet values for matching public fields. + * + * @param datasources Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + * + * @param query Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + * + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listFilters(Optional> datasources, Optional query) { + PlatformSearchFiltersRequest request = + PlatformSearchFiltersRequest + .builder() + .datasources(datasources) + .query(query) + .build(); + AsyncRequestOperation operation + = new PlatformSearchFilters.Async(sdkConfiguration, _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 index c1f1a5a2..81bcacbc 100644 --- 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 @@ -7,6 +7,7 @@ import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; import com.glean.api_client.glean_api_client.models.components.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillUpdateRequest; import com.glean.api_client.glean_api_client.models.components.PlatformSkillValidationRequest; import com.glean.api_client.glean_api_client.models.components.PlatformSkillVersionCreateRequest; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionRequest; @@ -16,6 +17,7 @@ import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionRequest; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateRequest; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateResponse; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateVersionRequestBuilder; @@ -32,6 +34,8 @@ import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListVersionsRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListVersionsResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsUpdateRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsUpdateResponse; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsValidateRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsValidateResponse; import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreate; @@ -42,6 +46,7 @@ import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersionContent; import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; import com.glean.api_client.glean_api_client.operations.PlatformSkillsListVersions; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsUpdate; import com.glean.api_client.glean_api_client.operations.PlatformSkillsValidate; import com.glean.api_client.glean_api_client.utils.Headers; import java.lang.Long; @@ -173,6 +178,42 @@ public CompletableFuture validate(PlatformSkillV } + /** + * Update skill + * + *

Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its + * content. + * + * @return The async call builder + */ + public PlatformSkillsUpdateRequestBuilder update() { + return new PlatformSkillsUpdateRequestBuilder(sdkConfiguration); + } + + /** + * Update skill + * + *

Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its + * content. + * + * @param skillId Glean skill ID. + * @param platformSkillUpdateRequest + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update(String skillId, PlatformSkillUpdateRequest platformSkillUpdateRequest) { + PlatformSkillsUpdateRequest request = + PlatformSkillsUpdateRequest + .builder() + .skillId(skillId) + .platformSkillUpdateRequest(platformSkillUpdateRequest) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsUpdate.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** * Retrieve skill * 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 168fb957..3d681c82 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,7 +25,7 @@ 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.4"; + public static final String SDK_VERSION = "0.14.5"; public static final String GEN_VERSION = "2.918.4"; private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client"; public static final String USER_AGENT = diff --git a/src/main/java/com/glean/api_client/glean_api_client/Search.java b/src/main/java/com/glean/api_client/glean_api_client/Search.java index 81cade62..d4eeda65 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Search.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Search.java @@ -7,10 +7,17 @@ import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; import com.glean.api_client.glean_api_client.models.components.PlatformSearchRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSearchFiltersRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSearchFiltersRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSearchFiltersResponse; import com.glean.api_client.glean_api_client.models.operations.PlatformSearchRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.PlatformSearchResponse; import com.glean.api_client.glean_api_client.operations.PlatformSearch; +import com.glean.api_client.glean_api_client.operations.PlatformSearchFilters; import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.String; +import java.util.List; +import java.util.Optional; public class Search { @@ -36,7 +43,19 @@ public AsyncSearch async() { * Search * *

Execute a search query and retrieve ranked results. This is the data retrieval variant of the search - * API and returns only results and pagination state. + * API and returns only results and pagination state. Structured filters accept exact public built-ins + * and free-form custom fields. + * Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results + * are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, + * `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that + * cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid + * inline operators may include a nested `/query` `invalid_filter` issue. + * + *

Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing + * response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with + * `Retry-After`. + * + *

Temporary backend unavailability returns HTTP 503. * * @return The call builder */ @@ -48,7 +67,19 @@ public PlatformSearchRequestBuilder query() { * Search * *

Execute a search query and retrieve ranked results. This is the data retrieval variant of the search - * API and returns only results and pagination state. + * API and returns only results and pagination state. Structured filters accept exact public built-ins + * and free-form custom fields. + * Successful responses always include a non-nullable `warnings` array (`[]` when empty). When results + * are incomplete for the requested datasource scope, the response remains HTTP 200 with `results`, + * `has_more`, and `next_cursor` preserved and a `results_incomplete` warning. Query outcomes that + * cannot be honored return HTTP 422 `unprocessable_query` and suppress results and cursor; invalid + * inline operators may include a nested `/query` `invalid_filter` issue. + * + *

Backend work and audit logging may already have occurred before such a 422 replaces a result-bearing + * response. Structural and representability failures remain HTTP 400. Rate limits return HTTP 429 with + * `Retry-After`. + * + *

Temporary backend unavailability returns HTTP 503. * * @param request The request object containing all the parameters for the API call. * @return The response from the API call @@ -60,4 +91,66 @@ public PlatformSearchResponse query(PlatformSearchRequest request) { return operation.handleResponse(operation.doRequest(request)); } + /** + * List search filters + * + *

Discover caller-visible datasources and common built-in filter fields that can be used with Platform + * Search. This is a best-effort common catalog, not an authoritative inventory of every field search + * may accept. + * Without `query`, the response returns datasource rows and field metadata without executing search. + * With a nonblank `query`, exactly one `datasources` value is required and the response may include + * bounded, non-exhaustive facet values for matching public fields. + * + * @return The call builder + */ + public PlatformSearchFiltersRequestBuilder listFilters() { + return new PlatformSearchFiltersRequestBuilder(sdkConfiguration); + } + + /** + * List search filters + * + *

Discover caller-visible datasources and common built-in filter fields that can be used with Platform + * Search. This is a best-effort common catalog, not an authoritative inventory of every field search + * may accept. + * Without `query`, the response returns datasource rows and field metadata without executing search. + * With a nonblank `query`, exactly one `datasources` value is required and the response may include + * bounded, non-exhaustive facet values for matching public fields. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSearchFiltersResponse listFiltersDirect() { + return listFilters(Optional.empty(), Optional.empty()); + } + + /** + * List search filters + * + *

Discover caller-visible datasources and common built-in filter fields that can be used with Platform + * Search. This is a best-effort common catalog, not an authoritative inventory of every field search + * may accept. + * Without `query`, the response returns datasource rows and field metadata without executing search. + * With a nonblank `query`, exactly one `datasources` value is required and the response may include + * bounded, non-exhaustive facet values for matching public fields. + * + * @param datasources Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank `query`, exactly one datasource is required. + * + * @param query Optional search query used to request bounded facet values for the selected datasource. When present it must be nonblank. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSearchFiltersResponse listFilters(Optional> datasources, Optional query) { + PlatformSearchFiltersRequest request = + PlatformSearchFiltersRequest + .builder() + .datasources(datasources) + .query(query) + .build(); + RequestOperation operation + = new PlatformSearchFilters.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } 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 index 0859b0db..66ad53d4 100644 --- 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 @@ -7,6 +7,7 @@ import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; import com.glean.api_client.glean_api_client.models.components.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillUpdateRequest; import com.glean.api_client.glean_api_client.models.components.PlatformSkillValidationRequest; import com.glean.api_client.glean_api_client.models.components.PlatformSkillVersionCreateRequest; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateRequestBuilder; @@ -32,6 +33,9 @@ import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequest; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateResponse; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsValidateRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsValidateResponse; import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreate; @@ -42,6 +46,7 @@ import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersionContent; import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; import com.glean.api_client.glean_api_client.operations.PlatformSkillsListVersions; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsUpdate; import com.glean.api_client.glean_api_client.operations.PlatformSkillsValidate; import com.glean.api_client.glean_api_client.utils.Headers; import java.lang.Long; @@ -169,6 +174,41 @@ public PlatformSkillsValidateResponse validate(PlatformSkillValidationRequest re return operation.handleResponse(operation.doRequest(request)); } + /** + * Update skill + * + *

Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its + * content. + * + * @return The call builder + */ + public PlatformSkillsUpdateRequestBuilder update() { + return new PlatformSkillsUpdateRequestBuilder(sdkConfiguration); + } + + /** + * Update skill + * + *

Update mutable metadata for a skill. V1 supports enabling or disabling a skill without changing its + * content. + * + * @param skillId Glean skill ID. + * @param platformSkillUpdateRequest + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsUpdateResponse update(String skillId, PlatformSkillUpdateRequest platformSkillUpdateRequest) { + PlatformSkillsUpdateRequest request = + PlatformSkillsUpdateRequest + .builder() + .skillId(skillId) + .platformSkillUpdateRequest(platformSkillUpdateRequest) + .build(); + RequestOperation operation + = new PlatformSkillsUpdate.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Retrieve skill * diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCategory.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCategory.java index 062a540a..fe8c5d91 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCategory.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCategory.java @@ -46,6 +46,8 @@ public class DatasourceCategory { public static final DatasourceCategory ENTITY = new DatasourceCategory("ENTITY"); public static final DatasourceCategory CALENDAR = new DatasourceCategory("CALENDAR"); public static final DatasourceCategory AGENTS = new DatasourceCategory("AGENTS"); + public static final DatasourceCategory AI_CONVERSATION = new DatasourceCategory("AI_CONVERSATION"); + public static final DatasourceCategory AI_ARTIFACT = new DatasourceCategory("AI_ARTIFACT"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -137,6 +139,8 @@ private static final Map createValuesMap() { map.put("ENTITY", ENTITY); map.put("CALENDAR", CALENDAR); map.put("AGENTS", AGENTS); + map.put("AI_CONVERSATION", AI_CONVERSATION); + map.put("AI_ARTIFACT", AI_ARTIFACT); return map; } @@ -160,6 +164,8 @@ private static final Map createEnumsMap() { map.put("ENTITY", DatasourceCategoryEnum.ENTITY); map.put("CALENDAR", DatasourceCategoryEnum.CALENDAR); map.put("AGENTS", DatasourceCategoryEnum.AGENTS); + map.put("AI_CONVERSATION", DatasourceCategoryEnum.AI_CONVERSATION); + map.put("AI_ARTIFACT", DatasourceCategoryEnum.AI_ARTIFACT); return map; } @@ -183,7 +189,9 @@ public enum DatasourceCategoryEnum { EXTERNAL_SHORTCUT("EXTERNAL_SHORTCUT"), ENTITY("ENTITY"), CALENDAR("CALENDAR"), - AGENTS("AGENTS"),; + AGENTS("AGENTS"), + AI_CONVERSATION("AI_CONVERSATION"), + AI_ARTIFACT("AI_ARTIFACT"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocCategory.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocCategory.java index a9415f4f..f537ca19 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocCategory.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocCategory.java @@ -44,6 +44,8 @@ public class DocCategory { public static final DocCategory ENTITY = new DocCategory("ENTITY"); public static final DocCategory CALENDAR = new DocCategory("CALENDAR"); public static final DocCategory AGENTS = new DocCategory("AGENTS"); + public static final DocCategory AI_CONVERSATION = new DocCategory("AI_CONVERSATION"); + public static final DocCategory AI_ARTIFACT = new DocCategory("AI_ARTIFACT"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -135,6 +137,8 @@ private static final Map createValuesMap() { map.put("ENTITY", ENTITY); map.put("CALENDAR", CALENDAR); map.put("AGENTS", AGENTS); + map.put("AI_CONVERSATION", AI_CONVERSATION); + map.put("AI_ARTIFACT", AI_ARTIFACT); return map; } @@ -158,6 +162,8 @@ private static final Map createEnumsMap() { map.put("ENTITY", DocCategoryEnum.ENTITY); map.put("CALENDAR", DocCategoryEnum.CALENDAR); map.put("AGENTS", DocCategoryEnum.AGENTS); + map.put("AI_CONVERSATION", DocCategoryEnum.AI_CONVERSATION); + map.put("AI_ARTIFACT", DocCategoryEnum.AI_ARTIFACT); return map; } @@ -181,7 +187,9 @@ public enum DocCategoryEnum { EXTERNAL_SHORTCUT("EXTERNAL_SHORTCUT"), ENTITY("ENTITY"), CALENDAR("CALENDAR"), - AGENTS("AGENTS"),; + AGENTS("AGENTS"), + AI_CONVERSATION("AI_CONVERSATION"), + AI_ARTIFACT("AI_ARTIFACT"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformDatasourceFilterInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformDatasourceFilterInfo.java new file mode 100644 index 00000000..569932dc --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformDatasourceFilterInfo.java @@ -0,0 +1,147 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 95720dbf07ab + */ +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; +import java.util.List; + + +public class PlatformDatasourceFilterInfo { + /** + * Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + */ + @JsonProperty("datasource") + private String datasource; + + /** + * Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here + * does not make that field invalid in `POST /api/search`. + */ + @JsonProperty("filters") + private List filters; + + @JsonCreator + public PlatformDatasourceFilterInfo( + @JsonProperty("datasource") String datasource, + @JsonProperty("filters") List filters) { + Utils.checkNotNull(datasource, "datasource"); + Utils.checkNotNull(filters, "filters"); + this.datasource = datasource; + this.filters = filters; + } + + /** + * Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + */ + @JsonIgnore + public String datasource() { + return datasource; + } + + /** + * Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here + * does not make that field invalid in `POST /api/search`. + */ + @JsonIgnore + public List filters() { + return filters; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + */ + public PlatformDatasourceFilterInfo withDatasource(String datasource) { + Utils.checkNotNull(datasource, "datasource"); + this.datasource = datasource; + return this; + } + + /** + * Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here + * does not make that field invalid in `POST /api/search`. + */ + public PlatformDatasourceFilterInfo withFilters(List filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformDatasourceFilterInfo other = (PlatformDatasourceFilterInfo) o; + return + Utils.enhancedDeepEquals(this.datasource, other.datasource) && + Utils.enhancedDeepEquals(this.filters, other.filters); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasource, filters); + } + + @Override + public String toString() { + return Utils.toString(PlatformDatasourceFilterInfo.class, + "datasource", datasource, + "filters", filters); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String datasource; + + private List filters; + + private Builder() { + // force use of static builder() method + } + + + /** + * Stable canonical normalized datasource identifier usable in `POST /api/search` `datasources`. + */ + public Builder datasource(String datasource) { + Utils.checkNotNull(datasource, "datasource"); + this.datasource = datasource; + return this; + } + + + /** + * Common built-in filter fields for this datasource. May be empty. Absence of a public built-in here + * does not make that field invalid in `POST /api/search`. + */ + public Builder filters(List filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + public PlatformDatasourceFilterInfo build() { + + return new PlatformDatasourceFilterInfo( + datasource, filters); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterFieldInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterFieldInfo.java new file mode 100644 index 00000000..7a354daa --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterFieldInfo.java @@ -0,0 +1,280 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 666f97e5824a + */ +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.util.List; +import java.util.Optional; + + +public class PlatformFilterFieldInfo { + /** + * Field name usable in the `filters` array for `POST /api/search`. + */ + @JsonProperty("field") + private String field; + + /** + * Open field-type string. Current values are `STRING` and `USER`. Clients must tolerate unknown + * values. + */ + @JsonProperty("type") + private String type; + + /** + * Supported comparison operators for this field. + */ + @JsonProperty("operators") + private List operators; + + /** + * Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as + * an array, including `[]`, when query-backed discovery executes. + * + *

An empty array does not imply that no valid value exists. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("values") + private Optional> values; + + @JsonCreator + public PlatformFilterFieldInfo( + @JsonProperty("field") String field, + @JsonProperty("type") String type, + @JsonProperty("operators") List operators, + @JsonProperty("values") Optional> values) { + Utils.checkNotNull(field, "field"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(operators, "operators"); + Utils.checkNotNull(values, "values"); + this.field = field; + this.type = type; + this.operators = operators; + this.values = values; + } + + public PlatformFilterFieldInfo( + String field, + String type, + List operators) { + this(field, type, operators, + Optional.empty()); + } + + /** + * Field name usable in the `filters` array for `POST /api/search`. + */ + @JsonIgnore + public String field() { + return field; + } + + /** + * Open field-type string. Current values are `STRING` and `USER`. Clients must tolerate unknown + * values. + */ + @JsonIgnore + public String type() { + return type; + } + + /** + * Supported comparison operators for this field. + */ + @JsonIgnore + public List operators() { + return operators; + } + + /** + * Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as + * an array, including `[]`, when query-backed discovery executes. + * + *

An empty array does not imply that no valid value exists. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> values() { + return (Optional>) values; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Field name usable in the `filters` array for `POST /api/search`. + */ + public PlatformFilterFieldInfo withField(String field) { + Utils.checkNotNull(field, "field"); + this.field = field; + return this; + } + + /** + * Open field-type string. Current values are `STRING` and `USER`. Clients must tolerate unknown + * values. + */ + public PlatformFilterFieldInfo withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Supported comparison operators for this field. + */ + public PlatformFilterFieldInfo withOperators(List operators) { + Utils.checkNotNull(operators, "operators"); + this.operators = operators; + return this; + } + + /** + * Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as + * an array, including `[]`, when query-backed discovery executes. + * + *

An empty array does not imply that no valid value exists. + */ + public PlatformFilterFieldInfo withValues(List values) { + Utils.checkNotNull(values, "values"); + this.values = Optional.ofNullable(values); + return this; + } + + + /** + * Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as + * an array, including `[]`, when query-backed discovery executes. + * + *

An empty array does not imply that no valid value exists. + */ + public PlatformFilterFieldInfo withValues(Optional> values) { + Utils.checkNotNull(values, "values"); + this.values = values; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformFilterFieldInfo other = (PlatformFilterFieldInfo) o; + return + Utils.enhancedDeepEquals(this.field, other.field) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.operators, other.operators) && + Utils.enhancedDeepEquals(this.values, other.values); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + field, type, operators, + values); + } + + @Override + public String toString() { + return Utils.toString(PlatformFilterFieldInfo.class, + "field", field, + "type", type, + "operators", operators, + "values", values); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String field; + + private String type; + + private List operators; + + private Optional> values = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Field name usable in the `filters` array for `POST /api/search`. + */ + public Builder field(String field) { + Utils.checkNotNull(field, "field"); + this.field = field; + return this; + } + + + /** + * Open field-type string. Current values are `STRING` and `USER`. Clients must tolerate unknown + * values. + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * Supported comparison operators for this field. + */ + public Builder operators(List operators) { + Utils.checkNotNull(operators, "operators"); + this.operators = operators; + return this; + } + + + /** + * Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as + * an array, including `[]`, when query-backed discovery executes. + * + *

An empty array does not imply that no valid value exists. + */ + public Builder values(List values) { + Utils.checkNotNull(values, "values"); + this.values = Optional.ofNullable(values); + return this; + } + + /** + * Bounded, non-exhaustive facet values for this field. Omitted in catalog-only responses. Present as + * an array, including `[]`, when query-backed discovery executes. + * + *

An empty array does not imply that no valid value exists. + */ + public Builder values(Optional> values) { + Utils.checkNotNull(values, "values"); + this.values = values; + return this; + } + + public PlatformFilterFieldInfo build() { + + return new PlatformFilterFieldInfo( + field, type, operators, + values); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterOperator.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterOperator.java index ad7114fd..40562943 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterOperator.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformFilterOperator.java @@ -4,42 +4,146 @@ */ 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. + */ /** * PlatformFilterOperator * *

Supported filter operator. */ -public enum PlatformFilterOperator { - EQUALS("EQUALS"), - NOT_EQUALS("NOT_EQUALS"), - GT("GT"), - GTE("GTE"), - LT("LT"), - LTE("LTE"); +public class PlatformFilterOperator { + + public static final PlatformFilterOperator EQUALS = new PlatformFilterOperator("EQUALS"); + public static final PlatformFilterOperator NOT_EQUALS = new PlatformFilterOperator("NOT_EQUALS"); + public static final PlatformFilterOperator GT = new PlatformFilterOperator("GT"); + public static final PlatformFilterOperator GTE = new PlatformFilterOperator("GTE"); + public static final PlatformFilterOperator LT = new PlatformFilterOperator("LT"); + public static final PlatformFilterOperator LTE = new PlatformFilterOperator("LTE"); + + // 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(); - @JsonValue private final String value; - PlatformFilterOperator(String value) { + private PlatformFilterOperator(String value) { this.value = value; } - + + /** + * Returns a PlatformFilterOperator 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 PlatformFilterOperator + */ + @JsonCreator + public static PlatformFilterOperator of(String value) { + synchronized (PlatformFilterOperator.class) { + return values.computeIfAbsent(value, v -> new PlatformFilterOperator(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; + PlatformFilterOperator other = (PlatformFilterOperator) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "PlatformFilterOperator [value=" + value + "]"; + } + + // return an array just like an enum + public static PlatformFilterOperator[] values() { + synchronized (PlatformFilterOperator.class) { + return values.values().toArray(new PlatformFilterOperator[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("EQUALS", EQUALS); + map.put("NOT_EQUALS", NOT_EQUALS); + map.put("GT", GT); + map.put("GTE", GTE); + map.put("LT", LT); + map.put("LTE", LTE); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("EQUALS", PlatformFilterOperatorEnum.EQUALS); + map.put("NOT_EQUALS", PlatformFilterOperatorEnum.NOT_EQUALS); + map.put("GT", PlatformFilterOperatorEnum.GT); + map.put("GTE", PlatformFilterOperatorEnum.GTE); + map.put("LT", PlatformFilterOperatorEnum.LT); + map.put("LTE", PlatformFilterOperatorEnum.LTE); + return map; + } - public static Optional fromValue(String value) { - for (PlatformFilterOperator o: PlatformFilterOperator.values()) { - if (Objects.deepEquals(o.value, value)) { - return Optional.of(o); - } + + public enum PlatformFilterOperatorEnum { + + EQUALS("EQUALS"), + NOT_EQUALS("NOT_EQUALS"), + GT("GT"), + GTE("GTE"), + LT("LT"), + LTE("LTE"),; + + private final String value; + + private PlatformFilterOperatorEnum(String value) { + this.value = value; + } + + public String value() { + return value; } - return Optional.empty(); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformResult.java index 9f2a14b5..fb7ae8b7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformResult.java @@ -45,13 +45,6 @@ public class PlatformResult { @JsonProperty("datasource") private String datasource; - /** - * The datasource instance this result originates from, if known. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("datasource_instance") - private JsonNullable datasourceInstance; - /** * The document type within the datasource. */ @@ -93,7 +86,6 @@ public PlatformResult( @JsonProperty("title") String title, @JsonProperty("snippets") Optional> snippets, @JsonProperty("datasource") String datasource, - @JsonProperty("datasource_instance") JsonNullable datasourceInstance, @JsonProperty("document_type") JsonNullable documentType, @JsonProperty("creator") Optional creator, @JsonProperty("owner") Optional owner, @@ -103,7 +95,6 @@ public PlatformResult( Utils.checkNotNull(title, "title"); Utils.checkNotNull(snippets, "snippets"); Utils.checkNotNull(datasource, "datasource"); - Utils.checkNotNull(datasourceInstance, "datasourceInstance"); Utils.checkNotNull(documentType, "documentType"); Utils.checkNotNull(creator, "creator"); Utils.checkNotNull(owner, "owner"); @@ -113,7 +104,6 @@ public PlatformResult( this.title = title; this.snippets = snippets; this.datasource = datasource; - this.datasourceInstance = datasourceInstance; this.documentType = documentType; this.creator = creator; this.owner = owner; @@ -126,9 +116,8 @@ public PlatformResult( String title, String datasource) { this(url, title, Optional.empty(), - datasource, JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined()); + datasource, JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -164,14 +153,6 @@ public String datasource() { return datasource; } - /** - * The datasource instance this result originates from, if known. - */ - @JsonIgnore - public JsonNullable datasourceInstance() { - return datasourceInstance; - } - /** * The document type within the datasource. */ @@ -265,24 +246,6 @@ public PlatformResult withDatasource(String datasource) { return this; } - /** - * The datasource instance this result originates from, if known. - */ - public PlatformResult withDatasourceInstance(String datasourceInstance) { - Utils.checkNotNull(datasourceInstance, "datasourceInstance"); - this.datasourceInstance = JsonNullable.of(datasourceInstance); - return this; - } - - /** - * The datasource instance this result originates from, if known. - */ - public PlatformResult withDatasourceInstance(JsonNullable datasourceInstance) { - Utils.checkNotNull(datasourceInstance, "datasourceInstance"); - this.datasourceInstance = datasourceInstance; - return this; - } - /** * The document type within the datasource. */ @@ -389,7 +352,6 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.title, other.title) && Utils.enhancedDeepEquals(this.snippets, other.snippets) && Utils.enhancedDeepEquals(this.datasource, other.datasource) && - Utils.enhancedDeepEquals(this.datasourceInstance, other.datasourceInstance) && Utils.enhancedDeepEquals(this.documentType, other.documentType) && Utils.enhancedDeepEquals(this.creator, other.creator) && Utils.enhancedDeepEquals(this.owner, other.owner) && @@ -401,9 +363,8 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( url, title, snippets, - datasource, datasourceInstance, documentType, - creator, owner, updatedAt, - createdAt); + datasource, documentType, creator, + owner, updatedAt, createdAt); } @Override @@ -413,7 +374,6 @@ public String toString() { "title", title, "snippets", snippets, "datasource", datasource, - "datasourceInstance", datasourceInstance, "documentType", documentType, "creator", creator, "owner", owner, @@ -432,8 +392,6 @@ public final static class Builder { private String datasource; - private JsonNullable datasourceInstance = JsonNullable.undefined(); - private JsonNullable documentType = JsonNullable.undefined(); private Optional creator = Optional.empty(); @@ -498,25 +456,6 @@ public Builder datasource(String datasource) { } - /** - * The datasource instance this result originates from, if known. - */ - public Builder datasourceInstance(String datasourceInstance) { - Utils.checkNotNull(datasourceInstance, "datasourceInstance"); - this.datasourceInstance = JsonNullable.of(datasourceInstance); - return this; - } - - /** - * The datasource instance this result originates from, if known. - */ - public Builder datasourceInstance(JsonNullable datasourceInstance) { - Utils.checkNotNull(datasourceInstance, "datasourceInstance"); - this.datasourceInstance = datasourceInstance; - return this; - } - - /** * The document type within the datasource. */ @@ -615,9 +554,8 @@ public PlatformResult build() { return new PlatformResult( url, title, snippets, - datasource, datasourceInstance, documentType, - creator, owner, updatedAt, - createdAt); + datasource, documentType, creator, + owner, updatedAt, createdAt); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchFiltersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchFiltersResponse.java new file mode 100644 index 00000000..828ba9bc --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchFiltersResponse.java @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b4ffdc4b53ac + */ +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; +import java.util.List; + + +public class PlatformSearchFiltersResponse { + /** + * Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical + * normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible + * datasources. + */ + @JsonProperty("datasources") + private List datasources; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSearchFiltersResponse( + @JsonProperty("datasources") List datasources, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(datasources, "datasources"); + Utils.checkNotNull(requestId, "requestId"); + this.datasources = datasources; + this.requestId = requestId; + } + + /** + * Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical + * normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible + * datasources. + */ + @JsonIgnore + public List datasources() { + return datasources; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical + * normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible + * datasources. + */ + public PlatformSearchFiltersResponse withDatasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSearchFiltersResponse 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; + } + PlatformSearchFiltersResponse other = (PlatformSearchFiltersResponse) o; + return + Utils.enhancedDeepEquals(this.datasources, other.datasources) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasources, requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSearchFiltersResponse.class, + "datasources", datasources, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List datasources; + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Datasource metadata visible to the authenticated caller. Each `datasource` value is a canonical + * normalized identifier usable in `POST /api/search` `datasources`. Empty means no visible + * datasources. + */ + public Builder datasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSearchFiltersResponse build() { + + return new PlatformSearchFiltersResponse( + datasources, requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchRequest.java index 41659fab..79fd3cb9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchRequest.java @@ -44,29 +44,20 @@ public class PlatformSearchRequest { private JsonNullable cursor; /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and - * `datasource_instances`. + * Restrict results to specific canonical normalized datasource identifiers. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("datasources") private Optional> datasources; - /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers - * returned by `GET /api/search/filters`. Requests must not specify both `datasources` and - * `datasource_instances`. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("datasource_instances") - private Optional> datasourceInstances; - /** * 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. + * result set. Exact public built-ins receive the public operator contract; other nonblank fields pass + * through as possible custom fields. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("filters") @@ -85,21 +76,18 @@ public PlatformSearchRequest( @JsonProperty("page_size") Optional pageSize, @JsonProperty("cursor") JsonNullable cursor, @JsonProperty("datasources") Optional> datasources, - @JsonProperty("datasource_instances") Optional> datasourceInstances, @JsonProperty("filters") Optional> filters, @JsonProperty("time_range") Optional timeRange) { Utils.checkNotNull(query, "query"); Utils.checkNotNull(pageSize, "pageSize"); Utils.checkNotNull(cursor, "cursor"); Utils.checkNotNull(datasources, "datasources"); - Utils.checkNotNull(datasourceInstances, "datasourceInstances"); Utils.checkNotNull(filters, "filters"); Utils.checkNotNull(timeRange, "timeRange"); this.query = query; this.pageSize = pageSize; this.cursor = cursor; this.datasources = datasources; - this.datasourceInstances = datasourceInstances; this.filters = filters; this.timeRange = timeRange; } @@ -107,8 +95,7 @@ public PlatformSearchRequest( public PlatformSearchRequest( String query) { this(query, Optional.empty(), JsonNullable.undefined(), - Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -137,8 +124,7 @@ public JsonNullable cursor() { } /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and - * `datasource_instances`. + * Restrict results to specific canonical normalized datasource identifiers. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -146,24 +132,14 @@ public Optional> datasources() { return (Optional>) datasources; } - /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers - * returned by `GET /api/search/filters`. Requests must not specify both `datasources` and - * `datasource_instances`. - */ - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional> datasourceInstances() { - return (Optional>) datasourceInstances; - } - /** * 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. + * result set. Exact public built-ins receive the public operator contract; other nonblank fields pass + * through as possible custom fields. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -233,8 +209,7 @@ public PlatformSearchRequest withCursor(JsonNullable cursor) { } /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and - * `datasource_instances`. + * Restrict results to specific canonical normalized datasource identifiers. */ public PlatformSearchRequest withDatasources(List datasources) { Utils.checkNotNull(datasources, "datasources"); @@ -244,8 +219,7 @@ public PlatformSearchRequest withDatasources(List datasources) { /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and - * `datasource_instances`. + * Restrict results to specific canonical normalized datasource identifiers. */ public PlatformSearchRequest withDatasources(Optional> datasources) { Utils.checkNotNull(datasources, "datasources"); @@ -253,36 +227,14 @@ public PlatformSearchRequest withDatasources(Optional> da return this; } - /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers - * returned by `GET /api/search/filters`. Requests must not specify both `datasources` and - * `datasource_instances`. - */ - public PlatformSearchRequest withDatasourceInstances(List datasourceInstances) { - Utils.checkNotNull(datasourceInstances, "datasourceInstances"); - this.datasourceInstances = Optional.ofNullable(datasourceInstances); - return this; - } - - - /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers - * returned by `GET /api/search/filters`. Requests must not specify both `datasources` and - * `datasource_instances`. - */ - public PlatformSearchRequest withDatasourceInstances(Optional> datasourceInstances) { - Utils.checkNotNull(datasourceInstances, "datasourceInstances"); - this.datasourceInstances = datasourceInstances; - return this; - } - /** * 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. + * result set. Exact public built-ins receive the public operator contract; other nonblank fields pass + * through as possible custom fields. */ public PlatformSearchRequest withFilters(List filters) { Utils.checkNotNull(filters, "filters"); @@ -297,7 +249,8 @@ public PlatformSearchRequest withFilters(List filters) { * *

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. + * result set. Exact public built-ins receive the public operator contract; other nonblank fields pass + * through as possible custom fields. */ public PlatformSearchRequest withFilters(Optional> filters) { Utils.checkNotNull(filters, "filters"); @@ -338,7 +291,6 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.pageSize, other.pageSize) && Utils.enhancedDeepEquals(this.cursor, other.cursor) && Utils.enhancedDeepEquals(this.datasources, other.datasources) && - Utils.enhancedDeepEquals(this.datasourceInstances, other.datasourceInstances) && Utils.enhancedDeepEquals(this.filters, other.filters) && Utils.enhancedDeepEquals(this.timeRange, other.timeRange); } @@ -347,8 +299,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( query, pageSize, cursor, - datasources, datasourceInstances, filters, - timeRange); + datasources, filters, timeRange); } @Override @@ -358,7 +309,6 @@ public String toString() { "pageSize", pageSize, "cursor", cursor, "datasources", datasources, - "datasourceInstances", datasourceInstances, "filters", filters, "timeRange", timeRange); } @@ -374,8 +324,6 @@ public final static class Builder { private Optional> datasources = Optional.empty(); - private Optional> datasourceInstances = Optional.empty(); - private Optional> filters = Optional.empty(); private Optional timeRange = Optional.empty(); @@ -435,8 +383,7 @@ public Builder cursor(JsonNullable cursor) { /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and - * `datasource_instances`. + * Restrict results to specific canonical normalized datasource identifiers. */ public Builder datasources(List datasources) { Utils.checkNotNull(datasources, "datasources"); @@ -445,8 +392,7 @@ public Builder datasources(List datasources) { } /** - * Restrict results to specific datasources. Requests must not specify both `datasources` and - * `datasource_instances`. + * Restrict results to specific canonical normalized datasource identifiers. */ public Builder datasources(Optional> datasources) { Utils.checkNotNull(datasources, "datasources"); @@ -455,36 +401,14 @@ public Builder datasources(Optional> datasources) { } - /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers - * returned by `GET /api/search/filters`. Requests must not specify both `datasources` and - * `datasource_instances`. - */ - public Builder datasourceInstances(List datasourceInstances) { - Utils.checkNotNull(datasourceInstances, "datasourceInstances"); - this.datasourceInstances = Optional.ofNullable(datasourceInstances); - return this; - } - - /** - * Restrict results to specific datasource instances. Values are datasource instance identifiers - * returned by `GET /api/search/filters`. Requests must not specify both `datasources` and - * `datasource_instances`. - */ - public Builder datasourceInstances(Optional> datasourceInstances) { - Utils.checkNotNull(datasourceInstances, "datasourceInstances"); - this.datasourceInstances = datasourceInstances; - return this; - } - - /** * 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. + * result set. Exact public built-ins receive the public operator contract; other nonblank fields pass + * through as possible custom fields. */ public Builder filters(List filters) { Utils.checkNotNull(filters, "filters"); @@ -498,7 +422,8 @@ public Builder filters(List filters) { * *

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. + * result set. Exact public built-ins receive the public operator contract; other nonblank fields pass + * through as possible custom fields. */ public Builder filters(Optional> filters) { Utils.checkNotNull(filters, "filters"); @@ -532,8 +457,7 @@ public PlatformSearchRequest build() { return new PlatformSearchRequest( query, pageSize, cursor, - datasources, datasourceInstances, filters, - timeRange); + datasources, filters, timeRange); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchResponse.java index bba2b205..884895b9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSearchResponse.java @@ -43,28 +43,42 @@ public class PlatformSearchResponse { @JsonProperty("request_id") private String requestId; + /** + * Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate + * unknown warning codes. + * + *

Current code `results_incomplete` means some results may be unavailable for the requested datasource + * scope; results, `has_more`, and `next_cursor` remain present. + */ + @JsonProperty("warnings") + private List warnings; + @JsonCreator public PlatformSearchResponse( @JsonProperty("results") List results, @JsonProperty("has_more") boolean hasMore, @JsonProperty("next_cursor") Optional nextCursor, - @JsonProperty("request_id") String requestId) { + @JsonProperty("request_id") String requestId, + @JsonProperty("warnings") List warnings) { Utils.checkNotNull(results, "results"); Utils.checkNotNull(hasMore, "hasMore"); Utils.checkNotNull(nextCursor, "nextCursor"); Utils.checkNotNull(requestId, "requestId"); + Utils.checkNotNull(warnings, "warnings"); this.results = results; this.hasMore = hasMore; this.nextCursor = nextCursor; this.requestId = requestId; + this.warnings = warnings; } public PlatformSearchResponse( List results, boolean hasMore, - String requestId) { + String requestId, + List warnings) { this(results, hasMore, Optional.empty(), - requestId); + requestId, warnings); } /** @@ -99,6 +113,18 @@ public String requestId() { return requestId; } + /** + * Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate + * unknown warning codes. + * + *

Current code `results_incomplete` means some results may be unavailable for the requested datasource + * scope; results, `has_more`, and `next_cursor` remain present. + */ + @JsonIgnore + public List warnings() { + return warnings; + } + public static Builder builder() { return new Builder(); } @@ -150,6 +176,19 @@ public PlatformSearchResponse withRequestId(String requestId) { return this; } + /** + * Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate + * unknown warning codes. + * + *

Current code `results_incomplete` means some results may be unavailable for the requested datasource + * scope; results, `has_more`, and `next_cursor` remain present. + */ + public PlatformSearchResponse withWarnings(List warnings) { + Utils.checkNotNull(warnings, "warnings"); + this.warnings = warnings; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,14 +202,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.results, other.results) && Utils.enhancedDeepEquals(this.hasMore, other.hasMore) && Utils.enhancedDeepEquals(this.nextCursor, other.nextCursor) && - Utils.enhancedDeepEquals(this.requestId, other.requestId); + Utils.enhancedDeepEquals(this.requestId, other.requestId) && + Utils.enhancedDeepEquals(this.warnings, other.warnings); } @Override public int hashCode() { return Utils.enhancedHash( results, hasMore, nextCursor, - requestId); + requestId, warnings); } @Override @@ -179,7 +219,8 @@ public String toString() { "results", results, "hasMore", hasMore, "nextCursor", nextCursor, - "requestId", requestId); + "requestId", requestId, + "warnings", warnings); } @SuppressWarnings("UnusedReturnValue") @@ -193,6 +234,8 @@ public final static class Builder { private String requestId; + private List warnings; + private Builder() { // force use of static builder() method } @@ -246,11 +289,25 @@ public Builder requestId(String requestId) { return this; } + + /** + * Non-blocking warnings for this response. Always present; empty means `[]`. Clients must tolerate + * unknown warning codes. + * + *

Current code `results_incomplete` means some results may be unavailable for the requested datasource + * scope; results, `has_more`, and `next_cursor` remain present. + */ + public Builder warnings(List warnings) { + Utils.checkNotNull(warnings, "warnings"); + this.warnings = warnings; + return this; + } + public PlatformSearchResponse build() { return new PlatformSearchResponse( results, hasMore, nextCursor, - requestId); + requestId, warnings); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateRequest.java new file mode 100644 index 00000000..3ed55c59 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 84e505df2f5e + */ +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 PlatformSkillUpdateRequest { + /** + * New status for the skill. + */ + @JsonProperty("status") + private PlatformSkillUpdateStatus status; + + @JsonCreator + public PlatformSkillUpdateRequest( + @JsonProperty("status") PlatformSkillUpdateStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + } + + /** + * New status for the skill. + */ + @JsonIgnore + public PlatformSkillUpdateStatus status() { + return status; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * New status for the skill. + */ + public PlatformSkillUpdateRequest withStatus(PlatformSkillUpdateStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillUpdateRequest other = (PlatformSkillUpdateRequest) o; + return + Utils.enhancedDeepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + status); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillUpdateRequest.class, + "status", status); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkillUpdateStatus status; + + private Builder() { + // force use of static builder() method + } + + + /** + * New status for the skill. + */ + public Builder status(PlatformSkillUpdateStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public PlatformSkillUpdateRequest build() { + + return new PlatformSkillUpdateRequest( + status); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateResponse.java new file mode 100644 index 00000000..be1b82a6 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateResponse.java @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 11e53d34d30e + */ +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 PlatformSkillUpdateResponse { + + @JsonProperty("skill") + private PlatformSkill skill; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillUpdateResponse( + @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 PlatformSkillUpdateResponse withSkill(PlatformSkill skill) { + Utils.checkNotNull(skill, "skill"); + this.skill = skill; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillUpdateResponse 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; + } + PlatformSkillUpdateResponse other = (PlatformSkillUpdateResponse) 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(PlatformSkillUpdateResponse.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 PlatformSkillUpdateResponse build() { + + return new PlatformSkillUpdateResponse( + skill, requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateStatus.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateStatus.java new file mode 100644 index 00000000..9c391a7d --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillUpdateStatus.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 520df83e63e8 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PlatformSkillUpdateStatus + * + *

New status for the skill. + */ +public enum PlatformSkillUpdateStatus { + ENABLED("ENABLED"), + DISABLED("DISABLED"); + + @JsonValue + private final String value; + + PlatformSkillUpdateStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PlatformSkillUpdateStatus o: PlatformSkillUpdateStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java index 6ca7a5d5..d77ed44c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java @@ -28,7 +28,7 @@ public class PlatformSkillValidationResponse { * Non-blocking validation warnings. */ @JsonProperty("warnings") - private List warnings; + private List warnings; /** * Platform-generated request ID for support correlation. @@ -40,7 +40,7 @@ public class PlatformSkillValidationResponse { public PlatformSkillValidationResponse( @JsonProperty("metadata") PlatformSkillValidationMetadata metadata, @JsonProperty("files") List files, - @JsonProperty("warnings") List warnings, + @JsonProperty("warnings") List warnings, @JsonProperty("request_id") String requestId) { Utils.checkNotNull(metadata, "metadata"); Utils.checkNotNull(files, "files"); @@ -69,7 +69,7 @@ public List files() { * Non-blocking validation warnings. */ @JsonIgnore - public List warnings() { + public List warnings() { return warnings; } @@ -104,7 +104,7 @@ public PlatformSkillValidationResponse withFiles(List warnings) { + public PlatformSkillValidationResponse withWarnings(List warnings) { Utils.checkNotNull(warnings, "warnings"); this.warnings = warnings; return this; @@ -158,7 +158,7 @@ public final static class Builder { private List files; - private List warnings; + private List warnings; private String requestId; @@ -187,7 +187,7 @@ public Builder files(List files) { /** * Non-blocking validation warnings. */ - public Builder warnings(List warnings) { + public Builder warnings(List warnings) { Utils.checkNotNull(warnings, "warnings"); this.warnings = warnings; return this; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformWarning.java similarity index 73% rename from src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java rename to src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformWarning.java index 32e7d04b..102a3628 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformWarning.java @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: c77caa9172f6 + * @generated-id: 463052217b74 */ package com.glean.api_client.glean_api_client.models.components; @@ -11,10 +11,15 @@ import java.lang.Override; import java.lang.String; - -public class PlatformSkillValidationWarning { +/** + * PlatformWarning + * + *

Non-blocking warning attached to a successful Platform response. + */ +public class PlatformWarning { /** - * Stable warning code. + * Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed + * enum. */ @JsonProperty("code") private String code; @@ -26,7 +31,7 @@ public class PlatformSkillValidationWarning { private String message; @JsonCreator - public PlatformSkillValidationWarning( + public PlatformWarning( @JsonProperty("code") String code, @JsonProperty("message") String message) { Utils.checkNotNull(code, "code"); @@ -36,7 +41,8 @@ public PlatformSkillValidationWarning( } /** - * Stable warning code. + * Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed + * enum. */ @JsonIgnore public String code() { @@ -57,9 +63,10 @@ public static Builder builder() { /** - * Stable warning code. + * Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed + * enum. */ - public PlatformSkillValidationWarning withCode(String code) { + public PlatformWarning withCode(String code) { Utils.checkNotNull(code, "code"); this.code = code; return this; @@ -68,7 +75,7 @@ public PlatformSkillValidationWarning withCode(String code) { /** * Human-readable warning message. */ - public PlatformSkillValidationWarning withMessage(String message) { + public PlatformWarning withMessage(String message) { Utils.checkNotNull(message, "message"); this.message = message; return this; @@ -82,7 +89,7 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PlatformSkillValidationWarning other = (PlatformSkillValidationWarning) o; + PlatformWarning other = (PlatformWarning) o; return Utils.enhancedDeepEquals(this.code, other.code) && Utils.enhancedDeepEquals(this.message, other.message); @@ -96,7 +103,7 @@ public int hashCode() { @Override public String toString() { - return Utils.toString(PlatformSkillValidationWarning.class, + return Utils.toString(PlatformWarning.class, "code", code, "message", message); } @@ -114,7 +121,8 @@ private Builder() { /** - * Stable warning code. + * Open snake_case warning code. Clients must tolerate unknown values; the set of codes is not a closed + * enum. */ public Builder code(String code) { Utils.checkNotNull(code, "code"); @@ -132,9 +140,9 @@ public Builder message(String message) { return this; } - public PlatformSkillValidationWarning build() { + public PlatformWarning build() { - return new PlatformSkillValidationWarning( + return new PlatformWarning( code, message); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequest.java new file mode 100644 index 00000000..78c59ddb --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequest.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fbf5c5a7d902 + */ +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; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class PlatformSearchFiltersRequest { + /** + * Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank + * `query`, exactly one datasource is required. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=datasources") + private Optional> datasources; + + /** + * Optional search query used to request bounded facet values for the selected datasource. When present + * it must be nonblank. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private Optional query; + + @JsonCreator + public PlatformSearchFiltersRequest( + Optional> datasources, + Optional query) { + Utils.checkNotNull(datasources, "datasources"); + Utils.checkNotNull(query, "query"); + this.datasources = datasources; + this.query = query; + } + + public PlatformSearchFiltersRequest() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank + * `query`, exactly one datasource is required. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> datasources() { + return (Optional>) datasources; + } + + /** + * Optional search query used to request bounded facet values for the selected datasource. When present + * it must be nonblank. + */ + @JsonIgnore + public Optional query() { + return query; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank + * `query`, exactly one datasource is required. + */ + public PlatformSearchFiltersRequest withDatasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = Optional.ofNullable(datasources); + return this; + } + + + /** + * Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank + * `query`, exactly one datasource is required. + */ + public PlatformSearchFiltersRequest withDatasources(Optional> datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + /** + * Optional search query used to request bounded facet values for the selected datasource. When present + * it must be nonblank. + */ + public PlatformSearchFiltersRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.ofNullable(query); + return this; + } + + + /** + * Optional search query used to request bounded facet values for the selected datasource. When present + * it must be nonblank. + */ + public PlatformSearchFiltersRequest withQuery(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSearchFiltersRequest other = (PlatformSearchFiltersRequest) o; + return + Utils.enhancedDeepEquals(this.datasources, other.datasources) && + Utils.enhancedDeepEquals(this.query, other.query); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasources, query); + } + + @Override + public String toString() { + return Utils.toString(PlatformSearchFiltersRequest.class, + "datasources", datasources, + "query", query); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> datasources = Optional.empty(); + + private Optional query = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank + * `query`, exactly one datasource is required. + */ + public Builder datasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = Optional.ofNullable(datasources); + return this; + } + + /** + * Restrict metadata to one or more canonical normalized datasource identifiers. With a nonblank + * `query`, exactly one datasource is required. + */ + public Builder datasources(Optional> datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + + /** + * Optional search query used to request bounded facet values for the selected datasource. When present + * it must be nonblank. + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.ofNullable(query); + return this; + } + + /** + * Optional search query used to request bounded facet values for the selected datasource. When present + * it must be nonblank. + */ + public Builder query(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + public PlatformSearchFiltersRequest build() { + + return new PlatformSearchFiltersRequest( + datasources, query); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequestBuilder.java new file mode 100644 index 00000000..f16218a7 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersRequestBuilder.java @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 44f17d652562 + */ +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.PlatformSearchFilters; +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.List; +import java.util.Optional; + +public class PlatformSearchFiltersRequestBuilder { + + private Optional> datasources = Optional.empty(); + private Optional query = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSearchFiltersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSearchFiltersRequestBuilder datasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = Optional.of(datasources); + return this; + } + + public PlatformSearchFiltersRequestBuilder datasources(Optional> datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + public PlatformSearchFiltersRequestBuilder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.of(query); + return this; + } + + public PlatformSearchFiltersRequestBuilder query(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + + private PlatformSearchFiltersRequest buildRequest() { + + PlatformSearchFiltersRequest request = new PlatformSearchFiltersRequest(datasources, + query); + + return request; + } + + public PlatformSearchFiltersResponse call() { + + RequestOperation operation + = new PlatformSearchFilters.Sync(sdkConfiguration, _headers); + PlatformSearchFiltersRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersResponse.java new file mode 100644 index 00000000..85f114e8 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchFiltersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d63b4580e4df + */ +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 PlatformSearchFiltersResponse 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; + + /** + * Search filter metadata. + */ + private Optional platformSearchFiltersResponse; + + @JsonCreator + public PlatformSearchFiltersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSearchFiltersResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSearchFiltersResponse = platformSearchFiltersResponse; + } + + public PlatformSearchFiltersResponse( + 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; + } + + /** + * Search filter metadata. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSearchFiltersResponse() { + return (Optional) platformSearchFiltersResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSearchFiltersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSearchFiltersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSearchFiltersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Search filter metadata. + */ + public PlatformSearchFiltersResponse withPlatformSearchFiltersResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchFiltersResponse platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = Optional.ofNullable(platformSearchFiltersResponse); + return this; + } + + + /** + * Search filter metadata. + */ + public PlatformSearchFiltersResponse withPlatformSearchFiltersResponse(Optional platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = platformSearchFiltersResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSearchFiltersResponse other = (PlatformSearchFiltersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSearchFiltersResponse, other.platformSearchFiltersResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSearchFiltersResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSearchFiltersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSearchFiltersResponse", platformSearchFiltersResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSearchFiltersResponse = 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; + } + + + /** + * Search filter metadata. + */ + public Builder platformSearchFiltersResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchFiltersResponse platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = Optional.ofNullable(platformSearchFiltersResponse); + return this; + } + + /** + * Search filter metadata. + */ + public Builder platformSearchFiltersResponse(Optional platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = platformSearchFiltersResponse; + return this; + } + + public PlatformSearchFiltersResponse build() { + + return new PlatformSearchFiltersResponse( + contentType, statusCode, rawResponse, + platformSearchFiltersResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchResponse.java index f0196903..4fc14490 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSearchResponse.java @@ -34,7 +34,8 @@ public class PlatformSearchResponse implements Response { private HttpResponse rawResponse; /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ private Optional platformSearchResponse; @@ -87,7 +88,8 @@ public HttpResponse rawResponse() { } /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -128,7 +130,8 @@ public PlatformSearchResponse withRawResponse(HttpResponse rawRespo } /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public PlatformSearchResponse withPlatformSearchResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchResponse platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); @@ -138,7 +141,8 @@ public PlatformSearchResponse withPlatformSearchResponse(com.glean.api_client.gl /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public PlatformSearchResponse withPlatformSearchResponse(Optional platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); @@ -225,7 +229,8 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public Builder platformSearchResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchResponse platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); @@ -234,7 +239,8 @@ public Builder platformSearchResponse(com.glean.api_client.glean_api_client.mode } /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public Builder platformSearchResponse(Optional platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequest.java new file mode 100644 index 00000000..1eb86ab5 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequest.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ca0b020636b0 + */ +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.PlatformSkillUpdateRequest; +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 PlatformSkillsUpdateRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private PlatformSkillUpdateRequest platformSkillUpdateRequest; + + @JsonCreator + public PlatformSkillsUpdateRequest( + String skillId, + PlatformSkillUpdateRequest platformSkillUpdateRequest) { + Utils.checkNotNull(skillId, "skillId"); + Utils.checkNotNull(platformSkillUpdateRequest, "platformSkillUpdateRequest"); + this.skillId = skillId; + this.platformSkillUpdateRequest = platformSkillUpdateRequest; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + @JsonIgnore + public PlatformSkillUpdateRequest platformSkillUpdateRequest() { + return platformSkillUpdateRequest; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsUpdateRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsUpdateRequest withPlatformSkillUpdateRequest(PlatformSkillUpdateRequest platformSkillUpdateRequest) { + Utils.checkNotNull(platformSkillUpdateRequest, "platformSkillUpdateRequest"); + this.platformSkillUpdateRequest = platformSkillUpdateRequest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsUpdateRequest other = (PlatformSkillsUpdateRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId) && + Utils.enhancedDeepEquals(this.platformSkillUpdateRequest, other.platformSkillUpdateRequest); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId, platformSkillUpdateRequest); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsUpdateRequest.class, + "skillId", skillId, + "platformSkillUpdateRequest", platformSkillUpdateRequest); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private PlatformSkillUpdateRequest platformSkillUpdateRequest; + + 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 Builder platformSkillUpdateRequest(PlatformSkillUpdateRequest platformSkillUpdateRequest) { + Utils.checkNotNull(platformSkillUpdateRequest, "platformSkillUpdateRequest"); + this.platformSkillUpdateRequest = platformSkillUpdateRequest; + return this; + } + + public PlatformSkillsUpdateRequest build() { + + return new PlatformSkillsUpdateRequest( + skillId, platformSkillUpdateRequest); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequestBuilder.java new file mode 100644 index 00000000..a80e48fd --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8183e397e681 + */ +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.models.components.PlatformSkillUpdateRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsUpdate; +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 PlatformSkillsUpdateRequestBuilder { + + private String skillId; + private PlatformSkillUpdateRequest platformSkillUpdateRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsUpdateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsUpdateRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsUpdateRequestBuilder platformSkillUpdateRequest(PlatformSkillUpdateRequest platformSkillUpdateRequest) { + Utils.checkNotNull(platformSkillUpdateRequest, "platformSkillUpdateRequest"); + this.platformSkillUpdateRequest = platformSkillUpdateRequest; + return this; + } + + + private PlatformSkillsUpdateRequest buildRequest() { + + PlatformSkillsUpdateRequest request = new PlatformSkillsUpdateRequest(skillId, + platformSkillUpdateRequest); + + return request; + } + + public PlatformSkillsUpdateResponse call() { + + RequestOperation operation + = new PlatformSkillsUpdate.Sync(sdkConfiguration, _headers); + PlatformSkillsUpdateRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateResponse.java new file mode 100644 index 00000000..aafd8522 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsUpdateResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 534df0ec5c5d + */ +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.PlatformSkillUpdateResponse; +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 PlatformSkillsUpdateResponse 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 platformSkillUpdateResponse; + + @JsonCreator + public PlatformSkillsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillUpdateResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillUpdateResponse = platformSkillUpdateResponse; + } + + public PlatformSkillsUpdateResponse( + 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 platformSkillUpdateResponse() { + return (Optional) platformSkillUpdateResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsUpdateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsUpdateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsUpdateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsUpdateResponse withPlatformSkillUpdateResponse(PlatformSkillUpdateResponse platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = Optional.ofNullable(platformSkillUpdateResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsUpdateResponse withPlatformSkillUpdateResponse(Optional platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = platformSkillUpdateResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsUpdateResponse other = (PlatformSkillsUpdateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillUpdateResponse, other.platformSkillUpdateResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillUpdateResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsUpdateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillUpdateResponse", platformSkillUpdateResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillUpdateResponse = 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 platformSkillUpdateResponse(PlatformSkillUpdateResponse platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = Optional.ofNullable(platformSkillUpdateResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillUpdateResponse(Optional platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = platformSkillUpdateResponse; + return this; + } + + public PlatformSkillsUpdateResponse build() { + + return new PlatformSkillsUpdateResponse( + contentType, statusCode, rawResponse, + platformSkillUpdateResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersRequestBuilder.java new file mode 100644 index 00000000..cde5bd65 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersRequestBuilder.java @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d2c4c4038b1b + */ +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.PlatformSearchFiltersRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSearchFilters; +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.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class PlatformSearchFiltersRequestBuilder { + + private Optional> datasources = Optional.empty(); + private Optional query = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSearchFiltersRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSearchFiltersRequestBuilder datasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = Optional.of(datasources); + return this; + } + + public PlatformSearchFiltersRequestBuilder datasources(Optional> datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + public PlatformSearchFiltersRequestBuilder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.of(query); + return this; + } + + public PlatformSearchFiltersRequestBuilder query(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + + private PlatformSearchFiltersRequest buildRequest() { + + PlatformSearchFiltersRequest request = new PlatformSearchFiltersRequest(datasources, + query); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSearchFilters.Async(sdkConfiguration, _headers); + PlatformSearchFiltersRequest 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/PlatformSearchFiltersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersResponse.java new file mode 100644 index 00000000..c0ef2a40 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchFiltersResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e44e4ce8ebf0 + */ +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 PlatformSearchFiltersResponse 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; + + /** + * Search filter metadata. + */ + private Optional platformSearchFiltersResponse; + + @JsonCreator + public PlatformSearchFiltersResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSearchFiltersResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSearchFiltersResponse = platformSearchFiltersResponse; + } + + public PlatformSearchFiltersResponse( + 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; + } + + /** + * Search filter metadata. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSearchFiltersResponse() { + return (Optional) platformSearchFiltersResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSearchFiltersResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSearchFiltersResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSearchFiltersResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Search filter metadata. + */ + public PlatformSearchFiltersResponse withPlatformSearchFiltersResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchFiltersResponse platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = Optional.ofNullable(platformSearchFiltersResponse); + return this; + } + + + /** + * Search filter metadata. + */ + public PlatformSearchFiltersResponse withPlatformSearchFiltersResponse(Optional platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = platformSearchFiltersResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSearchFiltersResponse other = (PlatformSearchFiltersResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSearchFiltersResponse, other.platformSearchFiltersResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSearchFiltersResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSearchFiltersResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSearchFiltersResponse", platformSearchFiltersResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSearchFiltersResponse = 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; + } + + + /** + * Search filter metadata. + */ + public Builder platformSearchFiltersResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchFiltersResponse platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = Optional.ofNullable(platformSearchFiltersResponse); + return this; + } + + /** + * Search filter metadata. + */ + public Builder platformSearchFiltersResponse(Optional platformSearchFiltersResponse) { + Utils.checkNotNull(platformSearchFiltersResponse, "platformSearchFiltersResponse"); + this.platformSearchFiltersResponse = platformSearchFiltersResponse; + return this; + } + + public PlatformSearchFiltersResponse build() { + + return new PlatformSearchFiltersResponse( + contentType, statusCode, rawResponse, + platformSearchFiltersResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchResponse.java index 2fe9dd65..82b96b7d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSearchResponse.java @@ -34,7 +34,8 @@ public class PlatformSearchResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ private Optional platformSearchResponse; @@ -87,7 +88,8 @@ public HttpResponse rawResponse() { } /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -128,7 +130,8 @@ public PlatformSearchResponse withRawResponse(HttpResponse rawResponse) { } /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public PlatformSearchResponse withPlatformSearchResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchResponse platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); @@ -138,7 +141,8 @@ public PlatformSearchResponse withPlatformSearchResponse(com.glean.api_client.gl /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public PlatformSearchResponse withPlatformSearchResponse(Optional platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); @@ -225,7 +229,8 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public Builder platformSearchResponse(com.glean.api_client.glean_api_client.models.components.PlatformSearchResponse platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); @@ -234,7 +239,8 @@ public Builder platformSearchResponse(com.glean.api_client.glean_api_client.mode } /** - * Successful search. + * Successful search. Always includes `warnings` (`[]` when empty). A `results_incomplete` warning may + * be present while results and cursor remain available. */ public Builder platformSearchResponse(Optional platformSearchResponse) { Utils.checkNotNull(platformSearchResponse, "platformSearchResponse"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateRequestBuilder.java new file mode 100644 index 00000000..1efee3ff --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateRequestBuilder.java @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 667eb9b199f1 + */ +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.components.PlatformSkillUpdateRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsUpdate; +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 PlatformSkillsUpdateRequestBuilder { + + private String skillId; + private PlatformSkillUpdateRequest platformSkillUpdateRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsUpdateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsUpdateRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsUpdateRequestBuilder platformSkillUpdateRequest(PlatformSkillUpdateRequest platformSkillUpdateRequest) { + Utils.checkNotNull(platformSkillUpdateRequest, "platformSkillUpdateRequest"); + this.platformSkillUpdateRequest = platformSkillUpdateRequest; + return this; + } + + + private PlatformSkillsUpdateRequest buildRequest() { + + PlatformSkillsUpdateRequest request = new PlatformSkillsUpdateRequest(skillId, + platformSkillUpdateRequest); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsUpdate.Async(sdkConfiguration, _headers); + PlatformSkillsUpdateRequest 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/PlatformSkillsUpdateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateResponse.java new file mode 100644 index 00000000..840ab849 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsUpdateResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d1f0fe42d611 + */ +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.PlatformSkillUpdateResponse; +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 PlatformSkillsUpdateResponse 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 platformSkillUpdateResponse; + + @JsonCreator + public PlatformSkillsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillUpdateResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillUpdateResponse = platformSkillUpdateResponse; + } + + public PlatformSkillsUpdateResponse( + 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 platformSkillUpdateResponse() { + return (Optional) platformSkillUpdateResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsUpdateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsUpdateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsUpdateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsUpdateResponse withPlatformSkillUpdateResponse(PlatformSkillUpdateResponse platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = Optional.ofNullable(platformSkillUpdateResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsUpdateResponse withPlatformSkillUpdateResponse(Optional platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = platformSkillUpdateResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsUpdateResponse other = (PlatformSkillsUpdateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillUpdateResponse, other.platformSkillUpdateResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillUpdateResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsUpdateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillUpdateResponse", platformSkillUpdateResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillUpdateResponse = 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 platformSkillUpdateResponse(PlatformSkillUpdateResponse platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = Optional.ofNullable(platformSkillUpdateResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillUpdateResponse(Optional platformSkillUpdateResponse) { + Utils.checkNotNull(platformSkillUpdateResponse, "platformSkillUpdateResponse"); + this.platformSkillUpdateResponse = platformSkillUpdateResponse; + return this; + } + + public PlatformSkillsUpdateResponse build() { + + return new PlatformSkillsUpdateResponse( + contentType, statusCode, rawResponse, + platformSkillUpdateResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearch.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearch.java index 9cf91fe4..99153273 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearch.java +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSearch.java @@ -176,7 +176,7 @@ public PlatformSearchResponse handleResponse(HttpResponse response) throw APIException.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "413", "429")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "413", "422", "429")) { if (Utils.contentTypeMatches(contentType, "application/problem+json")) { throw PlatformProblemDetailException.from(response); } else { @@ -261,7 +261,7 @@ public CompletableFuture securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-search-filters", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-search-filters", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-search-filters", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/api/search/filters"); + 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(PlatformSearchFiltersRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSearchFiltersRequest.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(PlatformSearchFiltersRequest 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 PlatformSearchFiltersResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSearchFiltersResponse.Builder resBuilder = + PlatformSearchFiltersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSearchFiltersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSearchFiltersResponse(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(PlatformSearchFiltersRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSearchFiltersRequest.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(PlatformSearchFiltersRequest 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.PlatformSearchFiltersResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSearchFiltersResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSearchFiltersResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSearchFiltersResponse); + } 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/PlatformSkillsUpdate.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsUpdate.java new file mode 100644 index 00000000..66c63eff --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsUpdate.java @@ -0,0 +1,294 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f96fdd6c8eda + */ +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.PlatformSkillUpdateResponse; +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.PlatformSkillsUpdateRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsUpdateResponse; +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.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PlatformSkillsUpdate { + + 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-update", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-update", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-update", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "platformSkillUpdateRequest", + "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, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(PlatformSkillsUpdateRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsUpdateRequest.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(PlatformSkillsUpdateRequest 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 PlatformSkillsUpdateResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsUpdateResponse.Builder resBuilder = + PlatformSkillsUpdateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsUpdateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillUpdateResponse(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", "409", "413", "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(PlatformSkillsUpdateRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsUpdateRequest.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(PlatformSkillsUpdateRequest 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.PlatformSkillsUpdateResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsUpdateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsUpdateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillUpdateResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "409", "413", "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()); + } + } +} From b58ed73dbdaf21ed57fb3109ad1cc06f43922dd5 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 04:11:18 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow