From 1bf58a89cab74e0d8c546cf7a8381a10594c3838 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 26 Dec 2025 02:13:43 +0000 Subject: [PATCH 1/2] ## Java SDK Changes: * `glean.client.announcements.create()`: * `request.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.announcements.update()`: * `request.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.answers.create()`: * `request.data.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.addedroles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.answers.update()`: * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.addedroles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.answers.retrieve()`: `response.answerresult.answer.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.answers.list()`: `response.answerresults.[].answer.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.chat.create()`: * `request.chatrequest.messages.[].citations.[].sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.messages.[].citations.[].sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.chat.retrieve()`: `response.chatresult.chat.createdBy.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.chat.list()`: `response.chatresults.[].chat.createdBy.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.chat.createStream()`: * `request.chatrequest.messages.[].citations.[].sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.addItems()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.create()`: * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.[class].collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.deleteItem()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.update()`: * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.addedroles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.updateItem()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.retrieve()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.collections.list()`: `response.collections.[].addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.documents.retrieve()`: `response.documents.{}.[document].metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.documents.retrieveByFacets()`: `response.documents.[].metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.insights.retrieve()`: `response` **Changed** * `glean.client.messages.retrieve()`: `response.searchresponse.results.[].structuredResults.[].meeting` **Changed** * `glean.client.pins.update()`: `response.attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.pins.retrieve()`: `response.pin.attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.pins.list()`: `response.pins.[].attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.pins.create()`: `response.attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.search.queryAsAdmin()`: * `request.sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.results.[].structuredResults.[].meeting` **Changed** * `glean.client.search.autocomplete()`: `response.results.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.search.retrieveFeed()`: `response.results.[].primaryEntry.createdBy.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.search.recommendations()`: * `request.sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.results.[].structuredResults.[].meeting` **Changed** * `glean.client.search.query()`: * `request.sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.results.[].structuredResults.[].meeting` **Changed** * `glean.client.entities.list()`: `response.results.[].relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.entities.readPeople()`: `response.results.[].relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.shortcuts.create()`: * `request.data.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.shortcut.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.shortcuts.retrieve()`: `response.shortcut.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.shortcuts.list()`: `response.shortcuts.[].addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.shortcuts.update()`: * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `response.shortcut.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.verification.addReminder()`: `response.metadata.lastVerifier.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.verification.list()`: `response.documents.[].metadata.lastVerifier.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.verification.verify()`: `response.metadata.lastVerifier.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed** * `glean.client.governance.data.policies.download()`: `error.status[400]` **Added** * `glean.governance.createfindingsexport()`: * `request.filter.archived` **Added** * `response.filter.archived` **Added** * `glean.governance.listfindingsexports()`: `response.exports.[].filter.archived` **Added** --- .speakeasy/gen.lock | 95 ++- .speakeasy/gen.yaml | 3 +- .speakeasy/glean-merged-spec.yaml | 53 +- .speakeasy/workflow.lock | 14 +- README.md | 4 +- RELEASES.md | 12 +- docs/models/components/DlpFindingFilter.md | 3 +- .../components/InsightsOverviewResponse.md | 12 + docs/models/components/Meeting.md | 7 +- gradle.properties | 2 +- .../glean_api_client/SDKConfiguration.java | 4 +- .../models/components/CustomFieldValue.java | 4 +- .../models/components/DlpFindingFilter.java | 59 +- .../models/components/DocumentSpecUnion.java | 6 +- .../components/GetShortcutRequestUnion.java | 4 +- .../components/InsightsOverviewResponse.java | 544 +++++++++++++++++- .../models/components/Meeting.java | 316 +++++++++- .../CreatecollectionResponseBody.java | 4 +- .../operations/Downloadpolicycsv.java | 8 +- .../utils/OneOfDeserializer.java | 322 ++++++----- .../utils/QueryParameters.java | 6 +- .../glean_api_client/utils/Reflections.java | 71 ++- .../glean_api_client/utils/RequestBody.java | 7 + .../glean_api_client/utils/Utils.java | 40 +- 24 files changed, 1343 insertions(+), 257 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fc2ef29c..fb9b51eb 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,18 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: 155a8a099a04ddbed1268d2c31ba186a + docChecksum: 000e1c81a917010eec101d52c0be6621 docVersion: 0.9.0 - speakeasyVersion: 1.675.4 - generationVersion: 2.779.2 - releaseVersion: 0.12.12 - configChecksum: 6b3abe5ac2fcc9c2e11b6b02465871fc + speakeasyVersion: 1.680.5 + generationVersion: 2.788.7 + releaseVersion: 0.12.13 + configChecksum: dd813db7f04d07b4e967f0b7fe9fa92d repoURL: https://github.com/gleanwork/api-client-java.git published: true persistentEdits: - generation_id: 043e62c2-8461-4dd3-93f8-3c45bfcdb8a1 - pristine_commit_hash: 194673f80b5af90b43a2e7e531890af9aac7591f - pristine_tree_hash: d5bac1aac3ee701a86ec21063a813893ee04f3b0 + generation_id: 4f2f5b88-dbb4-49dc-85cc-3c04fc7fe428 + pristine_commit_hash: 4ac2946634dbb870db931a95e1614d89fd4ace5d + pristine_tree_hash: a7e8bae1983695c7a52f436bd857ae46819e8732 features: java: additionalDependencies: 0.1.0 @@ -29,7 +29,7 @@ features: groups: 2.81.3 nameOverrides: 2.81.3 sdkHooks: 1.2.0 - unions: 0.3.0 + unions: 0.3.1 uploadStreams: 0.1.0 trackedFiles: .gitattributes: @@ -810,8 +810,8 @@ trackedFiles: pristine_git_object: f06fa04daaae9c9213533a4529c2cdf17ab9e18c docs/models/components/DlpFindingFilter.md: id: 393e15b29070 - last_write_checksum: sha1:853de60aaed75074a4123fbf56d2e2c6930fc691 - pristine_git_object: dd7e8844660b14dabbdd4717108b8afa620d97ce + last_write_checksum: sha1:0ecd517790f4912ed1a921b7e2a876bb749f446e + pristine_git_object: a13e072a7599eac6b204424a9c6737cf7b24a344 docs/models/components/DlpFrequency.md: id: faa0e105561b last_write_checksum: sha1:944330ad33b1bb325cd4ae91c483c477fa7aa5a2 @@ -1414,8 +1414,8 @@ trackedFiles: pristine_git_object: 58b92865edd1fade5a400b24eecb30d6e2192526 docs/models/components/InsightsOverviewResponse.md: id: eb8d62a9cad4 - last_write_checksum: sha1:f710b65f929bdd80e3c45c17c81b91e28a4d18aa - pristine_git_object: a9326fef07149611aff0bd55083b09c5dfa280a6 + last_write_checksum: sha1:9c2aedb331bcde5d65e4f6dd2b862fb8920382e6 + pristine_git_object: 6724bad81901ac0eaec3efad35d784cd1adc0aff docs/models/components/InsightsRequest.md: id: bca39583d1ca last_write_checksum: sha1:285e7770efbc7fe175f3a341ba8ebd79f34fb295 @@ -1546,8 +1546,8 @@ trackedFiles: pristine_git_object: 3ba4a1bed8c0ebd3f754b4a500682415943db7de docs/models/components/Meeting.md: id: 104cd2b31289 - last_write_checksum: sha1:020dbd5cd746eb4ba316eab99365b1ae112c81ec - pristine_git_object: b4647fc3b541c5c19b31540c5b5dc9998e1ae7d7 + last_write_checksum: sha1:0747c3f1c32948e83505e1fa2cd9552f997ed5e6 + pristine_git_object: 4244e8a44ccbc1f958f93d1370dc563f72f9fe5e docs/models/components/Message.md: id: c54b5da9650a last_write_checksum: sha1:5fc9ffb5fa3d5fbc3fa980a93db1fe47630fbdf1 @@ -3038,8 +3038,8 @@ trackedFiles: pristine_git_object: 3decbce5bd40edbe278c1c5d2dbf585808e51d9a gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:a843ea03418340e65a7bdaceb2dda4731b51de6b - pristine_git_object: 28e0a8d29e212ca3e5147071ff42e1b7e02c9364 + last_write_checksum: sha1:78b3358286eca262fe133f6804a1aa89ee822683 + pristine_git_object: 8f5f17725aa36610d663ab1d0ea398b7fa16e0f2 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -3342,8 +3342,8 @@ trackedFiles: pristine_git_object: 5e30515ba0d212914ac9a195db6019330b6b0a2b src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java: id: d5fcc61f5992 - last_write_checksum: sha1:eb8f6d2ba88836e6df8b3d3dbd65e99e1b44a945 - pristine_git_object: c1f35c3d0bb79a1a005a07289362535d19e114df + last_write_checksum: sha1:197de4307a369038592b7329bbe5c3e03589bc62 + pristine_git_object: 28de1b6e5ef97c091483685cb7390dc0e5a92eed src/main/java/com/glean/api_client/glean_api_client/Search.java: id: f22d94b920b5 last_write_checksum: sha1:f4c52d34b05dafaf8037a2fe5df738f6c44c7132 @@ -3914,8 +3914,8 @@ trackedFiles: pristine_git_object: de7f9a583d67a0b158e5ec97c6b2c9f792392d6a src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValue.java: id: a008d2b7b779 - last_write_checksum: sha1:c622e06c14e096d74cab150a743ea67d603ed0c9 - pristine_git_object: 636ea5c10f0f34748818d57523ad16508de9cc2e + last_write_checksum: sha1:9f1d596aead82059cb176c3ec88368a3a6403046 + pristine_git_object: 34f0a5e8276c5c00f6b409eeece8742d0640431b src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueHyperlink.java: id: d1c2f8d0c13d last_write_checksum: sha1:0e2cddf1ef3686e3efeb96175b3cb656d07beb6f @@ -4130,8 +4130,8 @@ trackedFiles: pristine_git_object: ae7a1d348da89772d6d6e3686836ab8c5adbc965 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java: id: dc525d4858a5 - last_write_checksum: sha1:a06f36557611a5030fc686b8270b2a5bffcc391a - pristine_git_object: 957f8d66ce7d9024ee36522f649224f3d4cee20d + last_write_checksum: sha1:4d6a3c7d7151124cb6ff0e087c6376e54948388e + pristine_git_object: e67082548e61ac634c6c42b2e77dd9f139daae10 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFrequency.java: id: 28cba0614d04 last_write_checksum: sha1:bc7eb007b6951edad6d089e44725ad789d08c9c3 @@ -4234,8 +4234,8 @@ trackedFiles: pristine_git_object: 0c0277711c5d0601510b960cde1405f5705ec0ea src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpecUnion.java: id: ba590f7f5406 - last_write_checksum: sha1:15f889ae8d9ce020b3c6f5a53c67cc50c5bd0121 - pristine_git_object: 056dc1f9cb353a21a4a582f9ac4dafd37ff9b9f3 + last_write_checksum: sha1:1f1094931c8eefae900aa15ef6be8ce8e2ff8d00 + pristine_git_object: 3caeb6d5f0328166609edd0d0111031c4fb07725 src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentStatusResponse.java: id: a47a7876e53d last_write_checksum: sha1:3da2b43faf430147754fa9b880019ca13ade4b71 @@ -4590,8 +4590,8 @@ trackedFiles: pristine_git_object: 3c77a75436a9b87a641700674ea499a6aeff490d src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequestUnion.java: id: 97811a34ca5b - last_write_checksum: sha1:68c74d435fb505444e704213af59d06eed1ac12f - pristine_git_object: 6fafe0cb4779bfa93f33fabafea48fcda8363b31 + last_write_checksum: sha1:1f9cd195f792434c5578302b3cb29bdfa7933977 + pristine_git_object: 91303e7275f4b5e6553c99cd2f70f49d164bcda1 src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutResponse.java: id: ca3456fdc79b last_write_checksum: sha1:73c75af92d49dd1c4c486cc9dd372600fe95ef3d @@ -4734,8 +4734,8 @@ trackedFiles: pristine_git_object: 20a0d8f2cad36dc228fc2410d3c32cc6ec57121b src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewResponse.java: id: 2df162b5c362 - last_write_checksum: sha1:bc0b02c11889824460809273728e99907bae3212 - pristine_git_object: 10dc620c810a31bf50412186ab734c8c79e90986 + last_write_checksum: sha1:bff4ef9de5c3021670c89a146f3fd35ad5a0c60f + pristine_git_object: fe655cf0da081791a0f7b30462b3e9032b1ef671 src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java: id: d18f487ace2b last_write_checksum: sha1:80cd90a632bd03802174b5b0ebb2563087b3872b @@ -4866,8 +4866,8 @@ trackedFiles: pristine_git_object: a2188b6beba53c26e205b23cf5d7d7f5edbe4c26 src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java: id: 291a666eeedf - last_write_checksum: sha1:7f72c4c924733fe88d1633770bf15ba42704c407 - pristine_git_object: 38ebe38e1833f20442206de29978f861749b6bdd + last_write_checksum: sha1:563f1ee1eab89a7b65c9cef68bc46640e99d9de6 + pristine_git_object: ac44dd9e114dda101a37d945a42666f9fb34cd4e src/main/java/com/glean/api_client/glean_api_client/models/components/Message.java: id: 40f82b645ca8 last_write_checksum: sha1:b3d9282e641bb15fe468a1b364533405596347eb @@ -6246,8 +6246,8 @@ trackedFiles: pristine_git_object: 404a26b347c56809ef2cf58e68b587d6ef2f9958 src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponseBody.java: id: 56f1b9a0bfa8 - last_write_checksum: sha1:e43bdcda2084f760b0a54fee216da8fa070f1584 - pristine_git_object: 1d414fa39fee85dd43b714393b3e4e600672af65 + last_write_checksum: sha1:29c509b83c7d4c8ec37d72f928be096b07ae628f + pristine_git_object: 1921b2a75f0932238817a6706e9bdaba824ea84e src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatefindingsexportRequestBuilder.java: id: 3ce848ada2fc last_write_checksum: sha1:ead43116908afb5e256b10758d45b9892915c56a @@ -7726,8 +7726,8 @@ trackedFiles: pristine_git_object: a2ded379d1c7d05e7323259c01534cfca7a4d8e9 src/main/java/com/glean/api_client/glean_api_client/operations/Downloadpolicycsv.java: id: 746a01b43032 - last_write_checksum: sha1:2b9a53fcb5064f91d4c2ccd1669fcd69b8d17857 - pristine_git_object: 7d952906fe626ca7602d8377186581558086e033 + last_write_checksum: sha1:0408c8f73ae4474a1ec6e9468e2b1042ba467bfa + pristine_git_object: bf9fa7acdf8f33027ea63f782364fd5269af8ec5 src/main/java/com/glean/api_client/glean_api_client/operations/Downloadreportcsv.java: id: 6a1ffa610792 last_write_checksum: sha1:9cd3edf0a2963737182a0599bcd1b321165be09f @@ -8214,8 +8214,8 @@ trackedFiles: pristine_git_object: 26c4d53b6cb9555c8d1fab7e857694c8d88f600d src/main/java/com/glean/api_client/glean_api_client/utils/OneOfDeserializer.java: id: d996aa87abfd - last_write_checksum: sha1:fc6a7ad9b29ed2a367dd4ddec949a0fca5aa7612 - pristine_git_object: 2ee0c2ab566ad67c3129ecd05c3c1772d3758a49 + last_write_checksum: sha1:f8b429bbdf3139b16258e9ccda4eff0b3fa4cb89 + pristine_git_object: 933ef5152b8c96be40fade6db63e2aa0ff0b14ae src/main/java/com/glean/api_client/glean_api_client/utils/Options.java: id: 241bae87c414 last_write_checksum: sha1:4873482941d5214a567f7b605da7cdfaff637b9a @@ -8234,8 +8234,8 @@ trackedFiles: pristine_git_object: 71085ae02849af9b350e31b588d376d12171e456 src/main/java/com/glean/api_client/glean_api_client/utils/QueryParameters.java: id: a26f4e20580f - last_write_checksum: sha1:ae73e7482d13febae425567d2b8dea3102fea858 - pristine_git_object: 018199befbc16b2969cc1897c561be77e1d35e3d + last_write_checksum: sha1:1f3b8867fc4db80976672c0200ef11f5c28dbc35 + pristine_git_object: 7766ef826574fa83a3d7fd7936635d3522ed34f7 src/main/java/com/glean/api_client/glean_api_client/utils/QueryParamsMetadata.java: id: 25325b2afd76 last_write_checksum: sha1:951f0d6671ee2098fb369dfb098493c368c17672 @@ -8246,12 +8246,12 @@ trackedFiles: pristine_git_object: 2e9024a8870de5fdd9e89aff00af257512216762 src/main/java/com/glean/api_client/glean_api_client/utils/Reflections.java: id: 05a5f30f401f - last_write_checksum: sha1:4fa6316314b571dd5bdc9a3295d4ce64b641edd9 - pristine_git_object: 3526fbccf97f8af1ac23abdd3bd592875afb8fcf + last_write_checksum: sha1:f8605ec571a44926d54cd6c4c966b08ddd48e349 + pristine_git_object: 5c3ebdbd3e53f1fca0e6b1a2b122d43be637e59a src/main/java/com/glean/api_client/glean_api_client/utils/RequestBody.java: id: 371c97c8bc16 - last_write_checksum: sha1:4dd08f17f0eef816f3a63fa23f34abe046966702 - pristine_git_object: 6237922edaf2b67d98385a20368025a4ca6b3352 + last_write_checksum: sha1:0cdaac14f682160089be3efba70d398bece8545b + pristine_git_object: f78aaa50384aa0f5aaecbeb65186fe8cfd8ab753 src/main/java/com/glean/api_client/glean_api_client/utils/RequestMetadata.java: id: 2ba215d83644 last_write_checksum: sha1:94dec7af10e8252bc769d450690e529a867fcd3a @@ -8326,8 +8326,8 @@ trackedFiles: pristine_git_object: 0ebbe04be2d4d7aef1e59917adaa2cbfd1b73dce src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java: id: 0d130b4de173 - last_write_checksum: sha1:cc936a573ce5c07cbb37ccf536e8fd5786581c45 - pristine_git_object: e7683bc75ace0692dd5532649b5d4ea3647bdc3c + last_write_checksum: sha1:5a3f352a9aca09b2cba2ca8fbdc51b4df97a7ed5 + pristine_git_object: 7ba7c925eee2658641f983e13455ae470115135f src/main/java/com/glean/api_client/glean_api_client/utils/reactive/EventStream.java: id: 88f7c8c5e838 last_write_checksum: sha1:2ec1b0ff50a40a0d5fc296ec7ca2f1cb3838a859 @@ -9214,10 +9214,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: - * `glean.governance.createfindingsexport()`: `response.exportsize` **Added** - * `glean.governance.listfindingsexports()`: `response.exports.[].exportSize` **Added** +releaseNotes: "## Java SDK Changes:\n* `glean.client.announcements.create()`: \n * `request.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.announcements.update()`: \n * `request.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.body.structuredList.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.answers.create()`: \n * `request.data.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.addedroles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.answers.update()`: \n * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.addedroles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.answers.retrieve()`: `response.answerresult.answer.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.answers.list()`: `response.answerresults.[].answer.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.chat.create()`: \n * `request.chatrequest.messages.[].citations.[].sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.messages.[].citations.[].sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.chat.retrieve()`: `response.chatresult.chat.createdBy.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.chat.list()`: `response.chatresults.[].chat.createdBy.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.chat.createStream()`: \n * `request.chatrequest.messages.[].citations.[].sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.addItems()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.create()`: \n * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.[class].collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.deleteItem()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.update()`: \n * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.addedroles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.updateItem()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.retrieve()`: `response.collection.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.collections.list()`: `response.collections.[].addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.documents.retrieve()`: `response.documents.{}.[document].metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.documents.retrieveByFacets()`: `response.documents.[].metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.insights.retrieve()`: `response` **Changed**\n* `glean.client.messages.retrieve()`: `response.searchresponse.results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.pins.update()`: `response.attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.pins.retrieve()`: `response.pin.attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.pins.list()`: `response.pins.[].attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.pins.create()`: `response.attribution.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.search.queryAsAdmin()`: \n * `request.sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.search.autocomplete()`: `response.results.[].document.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.search.retrieveFeed()`: `response.results.[].primaryEntry.createdBy.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.search.recommendations()`: \n * `request.sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.search.query()`: \n * `request.sourceDocument.metadata.author.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.entities.list()`: `response.results.[].relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.entities.readPeople()`: `response.results.[].relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.shortcuts.create()`: \n * `request.data.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.shortcut.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.shortcuts.retrieve()`: `response.shortcut.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.shortcuts.list()`: `response.shortcuts.[].addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.shortcuts.update()`: \n * `request.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n * `response.shortcut.addedRoles.[].person.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.verification.addReminder()`: `response.metadata.lastVerifier.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.verification.list()`: `response.documents.[].metadata.lastVerifier.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.verification.verify()`: `response.metadata.lastVerifier.relatedDocuments.[].results.[].structuredResults.[].meeting` **Changed**\n* `glean.client.governance.data.policies.download()`: `error.status[400]` **Added**\n* `glean.governance.createfindingsexport()`: \n * `request.filter.archived` **Added**\n * `response.filter.archived` **Added**\n* `glean.governance.listfindingsexports()`: `response.exports.[].filter.archived` **Added**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d402818a..3c71a107 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -26,7 +26,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.12.12 + version: 0.12.13 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client @@ -42,6 +42,7 @@ java: enableStreamingUploads: false envVarPrefix: GLEAN flattenGlobalSecurity: true + forwardCompatibleEnumsByDefault: false generateOptionalUnionAccessors: false generateSpringBootStarter: true githubURL: github.com/gleanwork/api-client-java diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index e448c8b1..2a213c2b 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: version: 0.9.0 title: Glean API - x-source-commit-sha: 6c18cdaa8da169e191cc66885c326e2ea6d13644 + x-source-commit-sha: c19ca7b171064c3327461f56e24b989d9d91019a 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. @@ -22,7 +22,7 @@ info: These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice. x-logo: url: https://app.glean.com/images/glean-text2.svg - x-open-api-commit-sha: c7a6190b989a16d24b879348f08e27efcb304566 + x-open-api-commit-sha: dff96374f270e664e9e5679f38291977f77e4b27 x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -3350,6 +3350,8 @@ paths: schema: description: CSV of all the violations found for this policy. type: string + "400": + description: Bad request error (e.g., continuous policies are not supported). "403": description: Permissions error "500": @@ -5873,6 +5875,21 @@ components: attendees: $ref: "#/components/schemas/CalendarAttendees" description: The attendee list, including their response status + isCancelled: + type: boolean + description: Whether the meeting has been cancelled + location: + type: string + description: The location/venue of the meeting + responseStatus: + type: string + description: The current user's response status (accepted, declined, tentativelyAccepted, none) + conferenceUri: + type: string + description: The meeting join link (Teams, Zoom, etc.) + conferenceProvider: + type: string + description: The conference provider (e.g., "Microsoft Teams", "Zoom") AppResult: required: - datasource @@ -7617,6 +7634,9 @@ components: chatId: type: string description: The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. + agentConfig: + $ref: "#/components/schemas/AgentConfig" + description: Describes the agent that will execute the request. ChatRestrictionFilters: allOf: - $ref: "#/components/schemas/RestrictionFilters" @@ -7635,9 +7655,6 @@ components: - $ref: "#/components/schemas/ChatRequestBase" - type: object properties: - agentConfig: - $ref: "#/components/schemas/AgentConfig" - description: Describes the agent that will execute the request. inclusions: $ref: "#/components/schemas/ChatRestrictionFilters" description: A list of filters which only allows chat to access certain content. @@ -8718,6 +8735,30 @@ components: $ref: "#/components/schemas/LabeledCountInfo" dailyActiveUserTimeseries: $ref: "#/components/schemas/LabeledCountInfo" + searchMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentsMonthlyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentsWeeklyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentsDailyActiveUserTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + searchesTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + assistantInteractionsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" + agentRunsTimeseries: + $ref: "#/components/schemas/LabeledCountInfo" searchDatasourceCounts: type: object additionalProperties: @@ -13045,6 +13086,8 @@ components: $ref: "#/components/schemas/DlpSeverity" timeRange: $ref: "#/components/schemas/TimeRangeFilter" + archived: + type: boolean ExportInfo: properties: createdBy: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 486da28c..3491a181 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,12 @@ -speakeasyVersion: 1.675.4 +speakeasyVersion: 1.680.5 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:a38a82dd27fe58019cf7c85c19cbd402e93361c9df38ce070f2ca419eeab832f - sourceBlobDigest: sha256:3840e8da76cb1e20b3c7f053acee46de0e4bcb58e17379e235342990ead4c8f8 + sourceRevisionDigest: sha256:687f43dc9c2b2ec4b99b40adf81c264e8270bd6accd9c24933eae789b59231c8 + sourceBlobDigest: sha256:021e3e4b29e41050b2817022ab005e49f9dfad612a674fe0984bb64404dfbc68 tags: - latest - - speakeasy-sdk-regen-1765505291 + - speakeasy-sdk-regen-1765586452 Glean-OAS: sourceNamespace: glean-oas sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317 @@ -18,10 +18,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:a38a82dd27fe58019cf7c85c19cbd402e93361c9df38ce070f2ca419eeab832f - sourceBlobDigest: sha256:3840e8da76cb1e20b3c7f053acee46de0e4bcb58e17379e235342990ead4c8f8 + sourceRevisionDigest: sha256:687f43dc9c2b2ec4b99b40adf81c264e8270bd6accd9c24933eae789b59231c8 + sourceBlobDigest: sha256:021e3e4b29e41050b2817022ab005e49f9dfad612a674fe0984bb64404dfbc68 codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:9118d4c534254f586011a33995b011403ca46ec22294d08b1626a82fca790380 + codeSamplesRevisionDigest: sha256:83090742f834b6b44ee26fbf7e187d374db69290848f332dd53da80cb4e3414a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 89168f82..89e4858a 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.12.12' +implementation 'com.glean.api-client:glean-api-client:0.12.13' ``` Maven: @@ -73,7 +73,7 @@ Maven: com.glean.api-client glean-api-client - 0.12.12 + 0.12.13 ``` diff --git a/RELEASES.md b/RELEASES.md index e30769bd..a2797782 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -468,4 +468,14 @@ Based on: ### Generated - [java v0.12.12] . ### Releases -- [Maven Central v0.12.12] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.12 - . \ No newline at end of file +- [Maven Central v0.12.12] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.12 - . + +## 2025-12-26 02:08:08 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.680.5 (2.788.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.12.13] . +### Releases +- [Maven Central v0.12.13] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.13 - . \ No newline at end of file diff --git a/docs/models/components/DlpFindingFilter.md b/docs/models/components/DlpFindingFilter.md index dd7e8844..a13e072a 100644 --- a/docs/models/components/DlpFindingFilter.md +++ b/docs/models/components/DlpFindingFilter.md @@ -13,4 +13,5 @@ | `documentIds` | List\<*String*> | :heavy_minus_sign: | N/A | | `severity` | [Optional\](../../models/components/DlpSeverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. | | `documentSeverity` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | N/A | -| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | +| `archived` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/InsightsOverviewResponse.md b/docs/models/components/InsightsOverviewResponse.md index a9326fef..6724bad8 100644 --- a/docs/models/components/InsightsOverviewResponse.md +++ b/docs/models/components/InsightsOverviewResponse.md @@ -19,6 +19,18 @@ | `monthlyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | | `weeklyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | | `dailyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `searchMonthlyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `searchWeeklyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `searchDailyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `assistantMonthlyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `assistantWeeklyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `assistantDailyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `agentsMonthlyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `agentsWeeklyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `agentsDailyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `searchesTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `assistantInteractionsTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | +| `agentRunsTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | | `searchDatasourceCounts` | Map\ | :heavy_minus_sign: | Counts of search result clicks, by datasource, over the specified time period in the specified departments. | | `chatDatasourceCounts` | Map\ | :heavy_minus_sign: | Counts of cited documents in chat, by datasource, over the specified time period in the specified departments. | | `perUserInsights` | List\<[PerUserInsight](../../models/components/PerUserInsight.md)> | :heavy_minus_sign: | Per-user insights, over the specified time period in the specified departments. All current users in the organization who have signed into Glean at least once are included. | \ No newline at end of file diff --git a/docs/models/components/Meeting.md b/docs/models/components/Meeting.md index b4647fc3..4244e8a4 100644 --- a/docs/models/components/Meeting.md +++ b/docs/models/components/Meeting.md @@ -11,4 +11,9 @@ | `url` | *Optional\* | :heavy_minus_sign: | N/A | | `startTime` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | | `endTime` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | -| `attendees` | [Optional\](../../models/components/CalendarAttendees.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `attendees` | [Optional\](../../models/components/CalendarAttendees.md) | :heavy_minus_sign: | N/A | +| `isCancelled` | *Optional\* | :heavy_minus_sign: | Whether the meeting has been cancelled | +| `location` | *Optional\* | :heavy_minus_sign: | The location/venue of the meeting | +| `responseStatus` | *Optional\* | :heavy_minus_sign: | The current user's response status (accepted, declined, tentativelyAccepted, none) | +| `conferenceUri` | *Optional\* | :heavy_minus_sign: | The meeting join link (Teams, Zoom, etc.) | +| `conferenceProvider` | *Optional\* | :heavy_minus_sign: | The conference provider (e.g., "Microsoft Teams", "Zoom") | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 28e0a8d2..8f5f1772 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.12.12 +version=0.12.13 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g 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 c1f35c3d..28de1b6e 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 @@ -24,8 +24,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.12.12"; - public static final String GEN_VERSION = "2.779.2"; + public static final String SDK_VERSION = "0.12.13"; + public static final String GEN_VERSION = "2.788.7"; private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValue.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValue.java index 636ea5c1..34f0a5e8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValue.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValue.java @@ -85,9 +85,9 @@ public static final class _Deserializer extends OneOfDeserializer() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java index 957f8d66..e6708254 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -64,6 +65,11 @@ public class DlpFindingFilter { @JsonProperty("timeRange") private Optional timeRange; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("archived") + private Optional archived; + @JsonCreator public DlpFindingFilter( @JsonProperty("infoType") Optional infoType, @@ -74,7 +80,8 @@ public DlpFindingFilter( @JsonProperty("documentIds") Optional> documentIds, @JsonProperty("severity") Optional severity, @JsonProperty("documentSeverity") Optional> documentSeverity, - @JsonProperty("timeRange") Optional timeRange) { + @JsonProperty("timeRange") Optional timeRange, + @JsonProperty("archived") Optional archived) { Utils.checkNotNull(infoType, "infoType"); Utils.checkNotNull(regexId, "regexId"); Utils.checkNotNull(reportId, "reportId"); @@ -84,6 +91,7 @@ public DlpFindingFilter( Utils.checkNotNull(severity, "severity"); Utils.checkNotNull(documentSeverity, "documentSeverity"); Utils.checkNotNull(timeRange, "timeRange"); + Utils.checkNotNull(archived, "archived"); this.infoType = infoType; this.regexId = regexId; this.reportId = reportId; @@ -93,12 +101,14 @@ public DlpFindingFilter( this.severity = severity; this.documentSeverity = documentSeverity; this.timeRange = timeRange; + this.archived = archived; } public DlpFindingFilter() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -153,6 +163,11 @@ public Optional timeRange() { return (Optional) timeRange; } + @JsonIgnore + public Optional archived() { + return archived; + } + public static Builder builder() { return new Builder(); } @@ -281,6 +296,19 @@ public DlpFindingFilter withTimeRange(Optional timeRa return this; } + public DlpFindingFilter withArchived(boolean archived) { + Utils.checkNotNull(archived, "archived"); + this.archived = Optional.ofNullable(archived); + return this; + } + + + public DlpFindingFilter withArchived(Optional archived) { + Utils.checkNotNull(archived, "archived"); + this.archived = archived; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -299,7 +327,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.documentIds, other.documentIds) && Utils.enhancedDeepEquals(this.severity, other.severity) && Utils.enhancedDeepEquals(this.documentSeverity, other.documentSeverity) && - Utils.enhancedDeepEquals(this.timeRange, other.timeRange); + Utils.enhancedDeepEquals(this.timeRange, other.timeRange) && + Utils.enhancedDeepEquals(this.archived, other.archived); } @Override @@ -307,7 +336,8 @@ public int hashCode() { return Utils.enhancedHash( infoType, regexId, reportId, datasource, visibility, documentIds, - severity, documentSeverity, timeRange); + severity, documentSeverity, timeRange, + archived); } @Override @@ -321,7 +351,8 @@ public String toString() { "documentIds", documentIds, "severity", severity, "documentSeverity", documentSeverity, - "timeRange", timeRange); + "timeRange", timeRange, + "archived", archived); } @SuppressWarnings("UnusedReturnValue") @@ -345,6 +376,8 @@ public final static class Builder { private Optional timeRange = Optional.empty(); + private Optional archived = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -472,12 +505,26 @@ public Builder timeRange(Optional timeRange) { return this; } + + public Builder archived(boolean archived) { + Utils.checkNotNull(archived, "archived"); + this.archived = Optional.ofNullable(archived); + return this; + } + + public Builder archived(Optional archived) { + Utils.checkNotNull(archived, "archived"); + this.archived = archived; + return this; + } + public DlpFindingFilter build() { return new DlpFindingFilter( infoType, regexId, reportId, datasource, visibility, documentIds, - severity, documentSeverity, timeRange); + severity, documentSeverity, timeRange, + archived); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpecUnion.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpecUnion.java index 056dc1f9..3caeb6d5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpecUnion.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpecUnion.java @@ -91,10 +91,10 @@ public static final class _Deserializer extends OneOfDeserializer() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequestUnion.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequestUnion.java index 6fafe0cb..91303e72 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequestUnion.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequestUnion.java @@ -79,8 +79,8 @@ public static final class _Deserializer extends OneOfDeserializer() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewResponse.java index 10dc620c..fe655cf0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewResponse.java @@ -104,6 +104,66 @@ public class InsightsOverviewResponse { @JsonProperty("dailyActiveUserTimeseries") private Optional dailyActiveUserTimeseries; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("searchMonthlyActiveUserTimeseries") + private Optional searchMonthlyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("searchWeeklyActiveUserTimeseries") + private Optional searchWeeklyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("searchDailyActiveUserTimeseries") + private Optional searchDailyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("assistantMonthlyActiveUserTimeseries") + private Optional assistantMonthlyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("assistantWeeklyActiveUserTimeseries") + private Optional assistantWeeklyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("assistantDailyActiveUserTimeseries") + private Optional assistantDailyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("agentsMonthlyActiveUserTimeseries") + private Optional agentsMonthlyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("agentsWeeklyActiveUserTimeseries") + private Optional agentsWeeklyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("agentsDailyActiveUserTimeseries") + private Optional agentsDailyActiveUserTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("searchesTimeseries") + private Optional searchesTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("assistantInteractionsTimeseries") + private Optional assistantInteractionsTimeseries; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("agentRunsTimeseries") + private Optional agentRunsTimeseries; + /** * Counts of search result clicks, by datasource, over the specified time period in the specified * departments. @@ -144,6 +204,18 @@ public InsightsOverviewResponse( @JsonProperty("monthlyActiveUserTimeseries") Optional monthlyActiveUserTimeseries, @JsonProperty("weeklyActiveUserTimeseries") Optional weeklyActiveUserTimeseries, @JsonProperty("dailyActiveUserTimeseries") Optional dailyActiveUserTimeseries, + @JsonProperty("searchMonthlyActiveUserTimeseries") Optional searchMonthlyActiveUserTimeseries, + @JsonProperty("searchWeeklyActiveUserTimeseries") Optional searchWeeklyActiveUserTimeseries, + @JsonProperty("searchDailyActiveUserTimeseries") Optional searchDailyActiveUserTimeseries, + @JsonProperty("assistantMonthlyActiveUserTimeseries") Optional assistantMonthlyActiveUserTimeseries, + @JsonProperty("assistantWeeklyActiveUserTimeseries") Optional assistantWeeklyActiveUserTimeseries, + @JsonProperty("assistantDailyActiveUserTimeseries") Optional assistantDailyActiveUserTimeseries, + @JsonProperty("agentsMonthlyActiveUserTimeseries") Optional agentsMonthlyActiveUserTimeseries, + @JsonProperty("agentsWeeklyActiveUserTimeseries") Optional agentsWeeklyActiveUserTimeseries, + @JsonProperty("agentsDailyActiveUserTimeseries") Optional agentsDailyActiveUserTimeseries, + @JsonProperty("searchesTimeseries") Optional searchesTimeseries, + @JsonProperty("assistantInteractionsTimeseries") Optional assistantInteractionsTimeseries, + @JsonProperty("agentRunsTimeseries") Optional agentRunsTimeseries, @JsonProperty("searchDatasourceCounts") Optional> searchDatasourceCounts, @JsonProperty("chatDatasourceCounts") Optional> chatDatasourceCounts, @JsonProperty("perUserInsights") Optional> perUserInsights) { @@ -161,6 +233,18 @@ public InsightsOverviewResponse( Utils.checkNotNull(monthlyActiveUserTimeseries, "monthlyActiveUserTimeseries"); Utils.checkNotNull(weeklyActiveUserTimeseries, "weeklyActiveUserTimeseries"); Utils.checkNotNull(dailyActiveUserTimeseries, "dailyActiveUserTimeseries"); + Utils.checkNotNull(searchMonthlyActiveUserTimeseries, "searchMonthlyActiveUserTimeseries"); + Utils.checkNotNull(searchWeeklyActiveUserTimeseries, "searchWeeklyActiveUserTimeseries"); + Utils.checkNotNull(searchDailyActiveUserTimeseries, "searchDailyActiveUserTimeseries"); + Utils.checkNotNull(assistantMonthlyActiveUserTimeseries, "assistantMonthlyActiveUserTimeseries"); + Utils.checkNotNull(assistantWeeklyActiveUserTimeseries, "assistantWeeklyActiveUserTimeseries"); + Utils.checkNotNull(assistantDailyActiveUserTimeseries, "assistantDailyActiveUserTimeseries"); + Utils.checkNotNull(agentsMonthlyActiveUserTimeseries, "agentsMonthlyActiveUserTimeseries"); + Utils.checkNotNull(agentsWeeklyActiveUserTimeseries, "agentsWeeklyActiveUserTimeseries"); + Utils.checkNotNull(agentsDailyActiveUserTimeseries, "agentsDailyActiveUserTimeseries"); + Utils.checkNotNull(searchesTimeseries, "searchesTimeseries"); + Utils.checkNotNull(assistantInteractionsTimeseries, "assistantInteractionsTimeseries"); + Utils.checkNotNull(agentRunsTimeseries, "agentRunsTimeseries"); Utils.checkNotNull(searchDatasourceCounts, "searchDatasourceCounts"); Utils.checkNotNull(chatDatasourceCounts, "chatDatasourceCounts"); Utils.checkNotNull(perUserInsights, "perUserInsights"); @@ -178,6 +262,18 @@ public InsightsOverviewResponse( this.monthlyActiveUserTimeseries = monthlyActiveUserTimeseries; this.weeklyActiveUserTimeseries = weeklyActiveUserTimeseries; this.dailyActiveUserTimeseries = dailyActiveUserTimeseries; + this.searchMonthlyActiveUserTimeseries = searchMonthlyActiveUserTimeseries; + this.searchWeeklyActiveUserTimeseries = searchWeeklyActiveUserTimeseries; + this.searchDailyActiveUserTimeseries = searchDailyActiveUserTimeseries; + this.assistantMonthlyActiveUserTimeseries = assistantMonthlyActiveUserTimeseries; + this.assistantWeeklyActiveUserTimeseries = assistantWeeklyActiveUserTimeseries; + this.assistantDailyActiveUserTimeseries = assistantDailyActiveUserTimeseries; + this.agentsMonthlyActiveUserTimeseries = agentsMonthlyActiveUserTimeseries; + this.agentsWeeklyActiveUserTimeseries = agentsWeeklyActiveUserTimeseries; + this.agentsDailyActiveUserTimeseries = agentsDailyActiveUserTimeseries; + this.searchesTimeseries = searchesTimeseries; + this.assistantInteractionsTimeseries = assistantInteractionsTimeseries; + this.agentRunsTimeseries = agentRunsTimeseries; this.searchDatasourceCounts = searchDatasourceCounts; this.chatDatasourceCounts = chatDatasourceCounts; this.perUserInsights = perUserInsights; @@ -185,6 +281,10 @@ public InsightsOverviewResponse( public InsightsOverviewResponse() { this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), @@ -291,6 +391,78 @@ public Optional dailyActiveUserTimeseries() { return (Optional) dailyActiveUserTimeseries; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional searchMonthlyActiveUserTimeseries() { + return (Optional) searchMonthlyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional searchWeeklyActiveUserTimeseries() { + return (Optional) searchWeeklyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional searchDailyActiveUserTimeseries() { + return (Optional) searchDailyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional assistantMonthlyActiveUserTimeseries() { + return (Optional) assistantMonthlyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional assistantWeeklyActiveUserTimeseries() { + return (Optional) assistantWeeklyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional assistantDailyActiveUserTimeseries() { + return (Optional) assistantDailyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional agentsMonthlyActiveUserTimeseries() { + return (Optional) agentsMonthlyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional agentsWeeklyActiveUserTimeseries() { + return (Optional) agentsWeeklyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional agentsDailyActiveUserTimeseries() { + return (Optional) agentsDailyActiveUserTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional searchesTimeseries() { + return (Optional) searchesTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional assistantInteractionsTimeseries() { + return (Optional) assistantInteractionsTimeseries; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional agentRunsTimeseries() { + return (Optional) agentRunsTimeseries; + } + /** * Counts of search result clicks, by datasource, over the specified time period in the specified * departments. @@ -550,6 +722,162 @@ public InsightsOverviewResponse withDailyActiveUserTimeseries(Optional searchMonthlyActiveUserTimeseries) { + Utils.checkNotNull(searchMonthlyActiveUserTimeseries, "searchMonthlyActiveUserTimeseries"); + this.searchMonthlyActiveUserTimeseries = searchMonthlyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withSearchWeeklyActiveUserTimeseries(LabeledCountInfo searchWeeklyActiveUserTimeseries) { + Utils.checkNotNull(searchWeeklyActiveUserTimeseries, "searchWeeklyActiveUserTimeseries"); + this.searchWeeklyActiveUserTimeseries = Optional.ofNullable(searchWeeklyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withSearchWeeklyActiveUserTimeseries(Optional searchWeeklyActiveUserTimeseries) { + Utils.checkNotNull(searchWeeklyActiveUserTimeseries, "searchWeeklyActiveUserTimeseries"); + this.searchWeeklyActiveUserTimeseries = searchWeeklyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withSearchDailyActiveUserTimeseries(LabeledCountInfo searchDailyActiveUserTimeseries) { + Utils.checkNotNull(searchDailyActiveUserTimeseries, "searchDailyActiveUserTimeseries"); + this.searchDailyActiveUserTimeseries = Optional.ofNullable(searchDailyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withSearchDailyActiveUserTimeseries(Optional searchDailyActiveUserTimeseries) { + Utils.checkNotNull(searchDailyActiveUserTimeseries, "searchDailyActiveUserTimeseries"); + this.searchDailyActiveUserTimeseries = searchDailyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withAssistantMonthlyActiveUserTimeseries(LabeledCountInfo assistantMonthlyActiveUserTimeseries) { + Utils.checkNotNull(assistantMonthlyActiveUserTimeseries, "assistantMonthlyActiveUserTimeseries"); + this.assistantMonthlyActiveUserTimeseries = Optional.ofNullable(assistantMonthlyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withAssistantMonthlyActiveUserTimeseries(Optional assistantMonthlyActiveUserTimeseries) { + Utils.checkNotNull(assistantMonthlyActiveUserTimeseries, "assistantMonthlyActiveUserTimeseries"); + this.assistantMonthlyActiveUserTimeseries = assistantMonthlyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withAssistantWeeklyActiveUserTimeseries(LabeledCountInfo assistantWeeklyActiveUserTimeseries) { + Utils.checkNotNull(assistantWeeklyActiveUserTimeseries, "assistantWeeklyActiveUserTimeseries"); + this.assistantWeeklyActiveUserTimeseries = Optional.ofNullable(assistantWeeklyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withAssistantWeeklyActiveUserTimeseries(Optional assistantWeeklyActiveUserTimeseries) { + Utils.checkNotNull(assistantWeeklyActiveUserTimeseries, "assistantWeeklyActiveUserTimeseries"); + this.assistantWeeklyActiveUserTimeseries = assistantWeeklyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withAssistantDailyActiveUserTimeseries(LabeledCountInfo assistantDailyActiveUserTimeseries) { + Utils.checkNotNull(assistantDailyActiveUserTimeseries, "assistantDailyActiveUserTimeseries"); + this.assistantDailyActiveUserTimeseries = Optional.ofNullable(assistantDailyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withAssistantDailyActiveUserTimeseries(Optional assistantDailyActiveUserTimeseries) { + Utils.checkNotNull(assistantDailyActiveUserTimeseries, "assistantDailyActiveUserTimeseries"); + this.assistantDailyActiveUserTimeseries = assistantDailyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withAgentsMonthlyActiveUserTimeseries(LabeledCountInfo agentsMonthlyActiveUserTimeseries) { + Utils.checkNotNull(agentsMonthlyActiveUserTimeseries, "agentsMonthlyActiveUserTimeseries"); + this.agentsMonthlyActiveUserTimeseries = Optional.ofNullable(agentsMonthlyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withAgentsMonthlyActiveUserTimeseries(Optional agentsMonthlyActiveUserTimeseries) { + Utils.checkNotNull(agentsMonthlyActiveUserTimeseries, "agentsMonthlyActiveUserTimeseries"); + this.agentsMonthlyActiveUserTimeseries = agentsMonthlyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withAgentsWeeklyActiveUserTimeseries(LabeledCountInfo agentsWeeklyActiveUserTimeseries) { + Utils.checkNotNull(agentsWeeklyActiveUserTimeseries, "agentsWeeklyActiveUserTimeseries"); + this.agentsWeeklyActiveUserTimeseries = Optional.ofNullable(agentsWeeklyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withAgentsWeeklyActiveUserTimeseries(Optional agentsWeeklyActiveUserTimeseries) { + Utils.checkNotNull(agentsWeeklyActiveUserTimeseries, "agentsWeeklyActiveUserTimeseries"); + this.agentsWeeklyActiveUserTimeseries = agentsWeeklyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withAgentsDailyActiveUserTimeseries(LabeledCountInfo agentsDailyActiveUserTimeseries) { + Utils.checkNotNull(agentsDailyActiveUserTimeseries, "agentsDailyActiveUserTimeseries"); + this.agentsDailyActiveUserTimeseries = Optional.ofNullable(agentsDailyActiveUserTimeseries); + return this; + } + + + public InsightsOverviewResponse withAgentsDailyActiveUserTimeseries(Optional agentsDailyActiveUserTimeseries) { + Utils.checkNotNull(agentsDailyActiveUserTimeseries, "agentsDailyActiveUserTimeseries"); + this.agentsDailyActiveUserTimeseries = agentsDailyActiveUserTimeseries; + return this; + } + + public InsightsOverviewResponse withSearchesTimeseries(LabeledCountInfo searchesTimeseries) { + Utils.checkNotNull(searchesTimeseries, "searchesTimeseries"); + this.searchesTimeseries = Optional.ofNullable(searchesTimeseries); + return this; + } + + + public InsightsOverviewResponse withSearchesTimeseries(Optional searchesTimeseries) { + Utils.checkNotNull(searchesTimeseries, "searchesTimeseries"); + this.searchesTimeseries = searchesTimeseries; + return this; + } + + public InsightsOverviewResponse withAssistantInteractionsTimeseries(LabeledCountInfo assistantInteractionsTimeseries) { + Utils.checkNotNull(assistantInteractionsTimeseries, "assistantInteractionsTimeseries"); + this.assistantInteractionsTimeseries = Optional.ofNullable(assistantInteractionsTimeseries); + return this; + } + + + public InsightsOverviewResponse withAssistantInteractionsTimeseries(Optional assistantInteractionsTimeseries) { + Utils.checkNotNull(assistantInteractionsTimeseries, "assistantInteractionsTimeseries"); + this.assistantInteractionsTimeseries = assistantInteractionsTimeseries; + return this; + } + + public InsightsOverviewResponse withAgentRunsTimeseries(LabeledCountInfo agentRunsTimeseries) { + Utils.checkNotNull(agentRunsTimeseries, "agentRunsTimeseries"); + this.agentRunsTimeseries = Optional.ofNullable(agentRunsTimeseries); + return this; + } + + + public InsightsOverviewResponse withAgentRunsTimeseries(Optional agentRunsTimeseries) { + Utils.checkNotNull(agentRunsTimeseries, "agentRunsTimeseries"); + this.agentRunsTimeseries = agentRunsTimeseries; + return this; + } + /** * Counts of search result clicks, by datasource, over the specified time period in the specified * departments. @@ -637,6 +965,18 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.monthlyActiveUserTimeseries, other.monthlyActiveUserTimeseries) && Utils.enhancedDeepEquals(this.weeklyActiveUserTimeseries, other.weeklyActiveUserTimeseries) && Utils.enhancedDeepEquals(this.dailyActiveUserTimeseries, other.dailyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.searchMonthlyActiveUserTimeseries, other.searchMonthlyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.searchWeeklyActiveUserTimeseries, other.searchWeeklyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.searchDailyActiveUserTimeseries, other.searchDailyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.assistantMonthlyActiveUserTimeseries, other.assistantMonthlyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.assistantWeeklyActiveUserTimeseries, other.assistantWeeklyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.assistantDailyActiveUserTimeseries, other.assistantDailyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.agentsMonthlyActiveUserTimeseries, other.agentsMonthlyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.agentsWeeklyActiveUserTimeseries, other.agentsWeeklyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.agentsDailyActiveUserTimeseries, other.agentsDailyActiveUserTimeseries) && + Utils.enhancedDeepEquals(this.searchesTimeseries, other.searchesTimeseries) && + Utils.enhancedDeepEquals(this.assistantInteractionsTimeseries, other.assistantInteractionsTimeseries) && + Utils.enhancedDeepEquals(this.agentRunsTimeseries, other.agentRunsTimeseries) && Utils.enhancedDeepEquals(this.searchDatasourceCounts, other.searchDatasourceCounts) && Utils.enhancedDeepEquals(this.chatDatasourceCounts, other.chatDatasourceCounts) && Utils.enhancedDeepEquals(this.perUserInsights, other.perUserInsights); @@ -649,7 +989,11 @@ public int hashCode() { employeeCount, totalSignups, searchSummary, chatSummary, extensionSummary, ugcSummary, lastUpdatedTs, searchSessionSatisfaction, monthlyActiveUserTimeseries, - weeklyActiveUserTimeseries, dailyActiveUserTimeseries, searchDatasourceCounts, + weeklyActiveUserTimeseries, dailyActiveUserTimeseries, searchMonthlyActiveUserTimeseries, + searchWeeklyActiveUserTimeseries, searchDailyActiveUserTimeseries, assistantMonthlyActiveUserTimeseries, + assistantWeeklyActiveUserTimeseries, assistantDailyActiveUserTimeseries, agentsMonthlyActiveUserTimeseries, + agentsWeeklyActiveUserTimeseries, agentsDailyActiveUserTimeseries, searchesTimeseries, + assistantInteractionsTimeseries, agentRunsTimeseries, searchDatasourceCounts, chatDatasourceCounts, perUserInsights); } @@ -670,6 +1014,18 @@ public String toString() { "monthlyActiveUserTimeseries", monthlyActiveUserTimeseries, "weeklyActiveUserTimeseries", weeklyActiveUserTimeseries, "dailyActiveUserTimeseries", dailyActiveUserTimeseries, + "searchMonthlyActiveUserTimeseries", searchMonthlyActiveUserTimeseries, + "searchWeeklyActiveUserTimeseries", searchWeeklyActiveUserTimeseries, + "searchDailyActiveUserTimeseries", searchDailyActiveUserTimeseries, + "assistantMonthlyActiveUserTimeseries", assistantMonthlyActiveUserTimeseries, + "assistantWeeklyActiveUserTimeseries", assistantWeeklyActiveUserTimeseries, + "assistantDailyActiveUserTimeseries", assistantDailyActiveUserTimeseries, + "agentsMonthlyActiveUserTimeseries", agentsMonthlyActiveUserTimeseries, + "agentsWeeklyActiveUserTimeseries", agentsWeeklyActiveUserTimeseries, + "agentsDailyActiveUserTimeseries", agentsDailyActiveUserTimeseries, + "searchesTimeseries", searchesTimeseries, + "assistantInteractionsTimeseries", assistantInteractionsTimeseries, + "agentRunsTimeseries", agentRunsTimeseries, "searchDatasourceCounts", searchDatasourceCounts, "chatDatasourceCounts", chatDatasourceCounts, "perUserInsights", perUserInsights); @@ -706,6 +1062,30 @@ public final static class Builder { private Optional dailyActiveUserTimeseries = Optional.empty(); + private Optional searchMonthlyActiveUserTimeseries = Optional.empty(); + + private Optional searchWeeklyActiveUserTimeseries = Optional.empty(); + + private Optional searchDailyActiveUserTimeseries = Optional.empty(); + + private Optional assistantMonthlyActiveUserTimeseries = Optional.empty(); + + private Optional assistantWeeklyActiveUserTimeseries = Optional.empty(); + + private Optional assistantDailyActiveUserTimeseries = Optional.empty(); + + private Optional agentsMonthlyActiveUserTimeseries = Optional.empty(); + + private Optional agentsWeeklyActiveUserTimeseries = Optional.empty(); + + private Optional agentsDailyActiveUserTimeseries = Optional.empty(); + + private Optional searchesTimeseries = Optional.empty(); + + private Optional assistantInteractionsTimeseries = Optional.empty(); + + private Optional agentRunsTimeseries = Optional.empty(); + private Optional> searchDatasourceCounts = Optional.empty(); private Optional> chatDatasourceCounts = Optional.empty(); @@ -941,6 +1321,162 @@ public Builder dailyActiveUserTimeseries(Optional da } + public Builder searchMonthlyActiveUserTimeseries(LabeledCountInfo searchMonthlyActiveUserTimeseries) { + Utils.checkNotNull(searchMonthlyActiveUserTimeseries, "searchMonthlyActiveUserTimeseries"); + this.searchMonthlyActiveUserTimeseries = Optional.ofNullable(searchMonthlyActiveUserTimeseries); + return this; + } + + public Builder searchMonthlyActiveUserTimeseries(Optional searchMonthlyActiveUserTimeseries) { + Utils.checkNotNull(searchMonthlyActiveUserTimeseries, "searchMonthlyActiveUserTimeseries"); + this.searchMonthlyActiveUserTimeseries = searchMonthlyActiveUserTimeseries; + return this; + } + + + public Builder searchWeeklyActiveUserTimeseries(LabeledCountInfo searchWeeklyActiveUserTimeseries) { + Utils.checkNotNull(searchWeeklyActiveUserTimeseries, "searchWeeklyActiveUserTimeseries"); + this.searchWeeklyActiveUserTimeseries = Optional.ofNullable(searchWeeklyActiveUserTimeseries); + return this; + } + + public Builder searchWeeklyActiveUserTimeseries(Optional searchWeeklyActiveUserTimeseries) { + Utils.checkNotNull(searchWeeklyActiveUserTimeseries, "searchWeeklyActiveUserTimeseries"); + this.searchWeeklyActiveUserTimeseries = searchWeeklyActiveUserTimeseries; + return this; + } + + + public Builder searchDailyActiveUserTimeseries(LabeledCountInfo searchDailyActiveUserTimeseries) { + Utils.checkNotNull(searchDailyActiveUserTimeseries, "searchDailyActiveUserTimeseries"); + this.searchDailyActiveUserTimeseries = Optional.ofNullable(searchDailyActiveUserTimeseries); + return this; + } + + public Builder searchDailyActiveUserTimeseries(Optional searchDailyActiveUserTimeseries) { + Utils.checkNotNull(searchDailyActiveUserTimeseries, "searchDailyActiveUserTimeseries"); + this.searchDailyActiveUserTimeseries = searchDailyActiveUserTimeseries; + return this; + } + + + public Builder assistantMonthlyActiveUserTimeseries(LabeledCountInfo assistantMonthlyActiveUserTimeseries) { + Utils.checkNotNull(assistantMonthlyActiveUserTimeseries, "assistantMonthlyActiveUserTimeseries"); + this.assistantMonthlyActiveUserTimeseries = Optional.ofNullable(assistantMonthlyActiveUserTimeseries); + return this; + } + + public Builder assistantMonthlyActiveUserTimeseries(Optional assistantMonthlyActiveUserTimeseries) { + Utils.checkNotNull(assistantMonthlyActiveUserTimeseries, "assistantMonthlyActiveUserTimeseries"); + this.assistantMonthlyActiveUserTimeseries = assistantMonthlyActiveUserTimeseries; + return this; + } + + + public Builder assistantWeeklyActiveUserTimeseries(LabeledCountInfo assistantWeeklyActiveUserTimeseries) { + Utils.checkNotNull(assistantWeeklyActiveUserTimeseries, "assistantWeeklyActiveUserTimeseries"); + this.assistantWeeklyActiveUserTimeseries = Optional.ofNullable(assistantWeeklyActiveUserTimeseries); + return this; + } + + public Builder assistantWeeklyActiveUserTimeseries(Optional assistantWeeklyActiveUserTimeseries) { + Utils.checkNotNull(assistantWeeklyActiveUserTimeseries, "assistantWeeklyActiveUserTimeseries"); + this.assistantWeeklyActiveUserTimeseries = assistantWeeklyActiveUserTimeseries; + return this; + } + + + public Builder assistantDailyActiveUserTimeseries(LabeledCountInfo assistantDailyActiveUserTimeseries) { + Utils.checkNotNull(assistantDailyActiveUserTimeseries, "assistantDailyActiveUserTimeseries"); + this.assistantDailyActiveUserTimeseries = Optional.ofNullable(assistantDailyActiveUserTimeseries); + return this; + } + + public Builder assistantDailyActiveUserTimeseries(Optional assistantDailyActiveUserTimeseries) { + Utils.checkNotNull(assistantDailyActiveUserTimeseries, "assistantDailyActiveUserTimeseries"); + this.assistantDailyActiveUserTimeseries = assistantDailyActiveUserTimeseries; + return this; + } + + + public Builder agentsMonthlyActiveUserTimeseries(LabeledCountInfo agentsMonthlyActiveUserTimeseries) { + Utils.checkNotNull(agentsMonthlyActiveUserTimeseries, "agentsMonthlyActiveUserTimeseries"); + this.agentsMonthlyActiveUserTimeseries = Optional.ofNullable(agentsMonthlyActiveUserTimeseries); + return this; + } + + public Builder agentsMonthlyActiveUserTimeseries(Optional agentsMonthlyActiveUserTimeseries) { + Utils.checkNotNull(agentsMonthlyActiveUserTimeseries, "agentsMonthlyActiveUserTimeseries"); + this.agentsMonthlyActiveUserTimeseries = agentsMonthlyActiveUserTimeseries; + return this; + } + + + public Builder agentsWeeklyActiveUserTimeseries(LabeledCountInfo agentsWeeklyActiveUserTimeseries) { + Utils.checkNotNull(agentsWeeklyActiveUserTimeseries, "agentsWeeklyActiveUserTimeseries"); + this.agentsWeeklyActiveUserTimeseries = Optional.ofNullable(agentsWeeklyActiveUserTimeseries); + return this; + } + + public Builder agentsWeeklyActiveUserTimeseries(Optional agentsWeeklyActiveUserTimeseries) { + Utils.checkNotNull(agentsWeeklyActiveUserTimeseries, "agentsWeeklyActiveUserTimeseries"); + this.agentsWeeklyActiveUserTimeseries = agentsWeeklyActiveUserTimeseries; + return this; + } + + + public Builder agentsDailyActiveUserTimeseries(LabeledCountInfo agentsDailyActiveUserTimeseries) { + Utils.checkNotNull(agentsDailyActiveUserTimeseries, "agentsDailyActiveUserTimeseries"); + this.agentsDailyActiveUserTimeseries = Optional.ofNullable(agentsDailyActiveUserTimeseries); + return this; + } + + public Builder agentsDailyActiveUserTimeseries(Optional agentsDailyActiveUserTimeseries) { + Utils.checkNotNull(agentsDailyActiveUserTimeseries, "agentsDailyActiveUserTimeseries"); + this.agentsDailyActiveUserTimeseries = agentsDailyActiveUserTimeseries; + return this; + } + + + public Builder searchesTimeseries(LabeledCountInfo searchesTimeseries) { + Utils.checkNotNull(searchesTimeseries, "searchesTimeseries"); + this.searchesTimeseries = Optional.ofNullable(searchesTimeseries); + return this; + } + + public Builder searchesTimeseries(Optional searchesTimeseries) { + Utils.checkNotNull(searchesTimeseries, "searchesTimeseries"); + this.searchesTimeseries = searchesTimeseries; + return this; + } + + + public Builder assistantInteractionsTimeseries(LabeledCountInfo assistantInteractionsTimeseries) { + Utils.checkNotNull(assistantInteractionsTimeseries, "assistantInteractionsTimeseries"); + this.assistantInteractionsTimeseries = Optional.ofNullable(assistantInteractionsTimeseries); + return this; + } + + public Builder assistantInteractionsTimeseries(Optional assistantInteractionsTimeseries) { + Utils.checkNotNull(assistantInteractionsTimeseries, "assistantInteractionsTimeseries"); + this.assistantInteractionsTimeseries = assistantInteractionsTimeseries; + return this; + } + + + public Builder agentRunsTimeseries(LabeledCountInfo agentRunsTimeseries) { + Utils.checkNotNull(agentRunsTimeseries, "agentRunsTimeseries"); + this.agentRunsTimeseries = Optional.ofNullable(agentRunsTimeseries); + return this; + } + + public Builder agentRunsTimeseries(Optional agentRunsTimeseries) { + Utils.checkNotNull(agentRunsTimeseries, "agentRunsTimeseries"); + this.agentRunsTimeseries = agentRunsTimeseries; + return this; + } + + /** * Counts of search result clicks, by datasource, over the specified time period in the specified * departments. @@ -1010,7 +1546,11 @@ public InsightsOverviewResponse build() { employeeCount, totalSignups, searchSummary, chatSummary, extensionSummary, ugcSummary, lastUpdatedTs, searchSessionSatisfaction, monthlyActiveUserTimeseries, - weeklyActiveUserTimeseries, dailyActiveUserTimeseries, searchDatasourceCounts, + weeklyActiveUserTimeseries, dailyActiveUserTimeseries, searchMonthlyActiveUserTimeseries, + searchWeeklyActiveUserTimeseries, searchDailyActiveUserTimeseries, assistantMonthlyActiveUserTimeseries, + assistantWeeklyActiveUserTimeseries, assistantDailyActiveUserTimeseries, agentsMonthlyActiveUserTimeseries, + agentsWeeklyActiveUserTimeseries, agentsDailyActiveUserTimeseries, searchesTimeseries, + assistantInteractionsTimeseries, agentRunsTimeseries, searchDatasourceCounts, chatDatasourceCounts, perUserInsights); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java index 38ebe38e..ac44dd9e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -52,6 +53,41 @@ public class Meeting { @JsonProperty("attendees") private Optional attendees; + /** + * Whether the meeting has been cancelled + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("isCancelled") + private Optional isCancelled; + + /** + * The location/venue of the meeting + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private Optional location; + + /** + * The current user's response status (accepted, declined, tentativelyAccepted, none) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("responseStatus") + private Optional responseStatus; + + /** + * The meeting join link (Teams, Zoom, etc.) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("conferenceUri") + private Optional conferenceUri; + + /** + * The conference provider (e.g., "Microsoft Teams", "Zoom") + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("conferenceProvider") + private Optional conferenceProvider; + @JsonCreator public Meeting( @JsonProperty("id") Optional id, @@ -60,7 +96,12 @@ public Meeting( @JsonProperty("url") Optional url, @JsonProperty("startTime") Optional startTime, @JsonProperty("endTime") Optional endTime, - @JsonProperty("attendees") Optional attendees) { + @JsonProperty("attendees") Optional attendees, + @JsonProperty("isCancelled") Optional isCancelled, + @JsonProperty("location") Optional location, + @JsonProperty("responseStatus") Optional responseStatus, + @JsonProperty("conferenceUri") Optional conferenceUri, + @JsonProperty("conferenceProvider") Optional conferenceProvider) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(title, "title"); Utils.checkNotNull(description, "description"); @@ -68,6 +109,11 @@ public Meeting( Utils.checkNotNull(startTime, "startTime"); Utils.checkNotNull(endTime, "endTime"); Utils.checkNotNull(attendees, "attendees"); + Utils.checkNotNull(isCancelled, "isCancelled"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(responseStatus, "responseStatus"); + Utils.checkNotNull(conferenceUri, "conferenceUri"); + Utils.checkNotNull(conferenceProvider, "conferenceProvider"); this.id = id; this.title = title; this.description = description; @@ -75,12 +121,18 @@ public Meeting( this.startTime = startTime; this.endTime = endTime; this.attendees = attendees; + this.isCancelled = isCancelled; + this.location = location; + this.responseStatus = responseStatus; + this.conferenceUri = conferenceUri; + this.conferenceProvider = conferenceProvider; } public Meeting() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -119,6 +171,46 @@ public Optional attendees() { return (Optional) attendees; } + /** + * Whether the meeting has been cancelled + */ + @JsonIgnore + public Optional isCancelled() { + return isCancelled; + } + + /** + * The location/venue of the meeting + */ + @JsonIgnore + public Optional location() { + return location; + } + + /** + * The current user's response status (accepted, declined, tentativelyAccepted, none) + */ + @JsonIgnore + public Optional responseStatus() { + return responseStatus; + } + + /** + * The meeting join link (Teams, Zoom, etc.) + */ + @JsonIgnore + public Optional conferenceUri() { + return conferenceUri; + } + + /** + * The conference provider (e.g., "Microsoft Teams", "Zoom") + */ + @JsonIgnore + public Optional conferenceProvider() { + return conferenceProvider; + } + public static Builder builder() { return new Builder(); } @@ -215,6 +307,101 @@ public Meeting withAttendees(Optional attendees) { return this; } + /** + * Whether the meeting has been cancelled + */ + public Meeting withIsCancelled(boolean isCancelled) { + Utils.checkNotNull(isCancelled, "isCancelled"); + this.isCancelled = Optional.ofNullable(isCancelled); + return this; + } + + + /** + * Whether the meeting has been cancelled + */ + public Meeting withIsCancelled(Optional isCancelled) { + Utils.checkNotNull(isCancelled, "isCancelled"); + this.isCancelled = isCancelled; + return this; + } + + /** + * The location/venue of the meeting + */ + public Meeting withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + + /** + * The location/venue of the meeting + */ + public Meeting withLocation(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * The current user's response status (accepted, declined, tentativelyAccepted, none) + */ + public Meeting withResponseStatus(String responseStatus) { + Utils.checkNotNull(responseStatus, "responseStatus"); + this.responseStatus = Optional.ofNullable(responseStatus); + return this; + } + + + /** + * The current user's response status (accepted, declined, tentativelyAccepted, none) + */ + public Meeting withResponseStatus(Optional responseStatus) { + Utils.checkNotNull(responseStatus, "responseStatus"); + this.responseStatus = responseStatus; + return this; + } + + /** + * The meeting join link (Teams, Zoom, etc.) + */ + public Meeting withConferenceUri(String conferenceUri) { + Utils.checkNotNull(conferenceUri, "conferenceUri"); + this.conferenceUri = Optional.ofNullable(conferenceUri); + return this; + } + + + /** + * The meeting join link (Teams, Zoom, etc.) + */ + public Meeting withConferenceUri(Optional conferenceUri) { + Utils.checkNotNull(conferenceUri, "conferenceUri"); + this.conferenceUri = conferenceUri; + return this; + } + + /** + * The conference provider (e.g., "Microsoft Teams", "Zoom") + */ + public Meeting withConferenceProvider(String conferenceProvider) { + Utils.checkNotNull(conferenceProvider, "conferenceProvider"); + this.conferenceProvider = Optional.ofNullable(conferenceProvider); + return this; + } + + + /** + * The conference provider (e.g., "Microsoft Teams", "Zoom") + */ + public Meeting withConferenceProvider(Optional conferenceProvider) { + Utils.checkNotNull(conferenceProvider, "conferenceProvider"); + this.conferenceProvider = conferenceProvider; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -231,7 +418,12 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.url, other.url) && Utils.enhancedDeepEquals(this.startTime, other.startTime) && Utils.enhancedDeepEquals(this.endTime, other.endTime) && - Utils.enhancedDeepEquals(this.attendees, other.attendees); + Utils.enhancedDeepEquals(this.attendees, other.attendees) && + Utils.enhancedDeepEquals(this.isCancelled, other.isCancelled) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.responseStatus, other.responseStatus) && + Utils.enhancedDeepEquals(this.conferenceUri, other.conferenceUri) && + Utils.enhancedDeepEquals(this.conferenceProvider, other.conferenceProvider); } @Override @@ -239,7 +431,8 @@ public int hashCode() { return Utils.enhancedHash( id, title, description, url, startTime, endTime, - attendees); + attendees, isCancelled, location, + responseStatus, conferenceUri, conferenceProvider); } @Override @@ -251,7 +444,12 @@ public String toString() { "url", url, "startTime", startTime, "endTime", endTime, - "attendees", attendees); + "attendees", attendees, + "isCancelled", isCancelled, + "location", location, + "responseStatus", responseStatus, + "conferenceUri", conferenceUri, + "conferenceProvider", conferenceProvider); } @SuppressWarnings("UnusedReturnValue") @@ -271,6 +469,16 @@ public final static class Builder { private Optional attendees = Optional.empty(); + private Optional isCancelled = Optional.empty(); + + private Optional location = Optional.empty(); + + private Optional responseStatus = Optional.empty(); + + private Optional conferenceUri = Optional.empty(); + + private Optional conferenceProvider = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -366,12 +574,108 @@ public Builder attendees(Optional attendees) { return this; } + + /** + * Whether the meeting has been cancelled + */ + public Builder isCancelled(boolean isCancelled) { + Utils.checkNotNull(isCancelled, "isCancelled"); + this.isCancelled = Optional.ofNullable(isCancelled); + return this; + } + + /** + * Whether the meeting has been cancelled + */ + public Builder isCancelled(Optional isCancelled) { + Utils.checkNotNull(isCancelled, "isCancelled"); + this.isCancelled = isCancelled; + return this; + } + + + /** + * The location/venue of the meeting + */ + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = Optional.ofNullable(location); + return this; + } + + /** + * The location/venue of the meeting + */ + public Builder location(Optional location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * The current user's response status (accepted, declined, tentativelyAccepted, none) + */ + public Builder responseStatus(String responseStatus) { + Utils.checkNotNull(responseStatus, "responseStatus"); + this.responseStatus = Optional.ofNullable(responseStatus); + return this; + } + + /** + * The current user's response status (accepted, declined, tentativelyAccepted, none) + */ + public Builder responseStatus(Optional responseStatus) { + Utils.checkNotNull(responseStatus, "responseStatus"); + this.responseStatus = responseStatus; + return this; + } + + + /** + * The meeting join link (Teams, Zoom, etc.) + */ + public Builder conferenceUri(String conferenceUri) { + Utils.checkNotNull(conferenceUri, "conferenceUri"); + this.conferenceUri = Optional.ofNullable(conferenceUri); + return this; + } + + /** + * The meeting join link (Teams, Zoom, etc.) + */ + public Builder conferenceUri(Optional conferenceUri) { + Utils.checkNotNull(conferenceUri, "conferenceUri"); + this.conferenceUri = conferenceUri; + return this; + } + + + /** + * The conference provider (e.g., "Microsoft Teams", "Zoom") + */ + public Builder conferenceProvider(String conferenceProvider) { + Utils.checkNotNull(conferenceProvider, "conferenceProvider"); + this.conferenceProvider = Optional.ofNullable(conferenceProvider); + return this; + } + + /** + * The conference provider (e.g., "Microsoft Teams", "Zoom") + */ + public Builder conferenceProvider(Optional conferenceProvider) { + Utils.checkNotNull(conferenceProvider, "conferenceProvider"); + this.conferenceProvider = conferenceProvider; + return this; + } + public Meeting build() { return new Meeting( id, title, description, url, startTime, endTime, - attendees); + attendees, isCancelled, location, + responseStatus, conferenceUri, conferenceProvider); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponseBody.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponseBody.java index 1d414fa3..1921b2a7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponseBody.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponseBody.java @@ -84,8 +84,8 @@ public static final class _Deserializer extends OneOfDeserializer() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/Downloadpolicycsv.java b/src/main/java/com/glean/api_client/glean_api_client/operations/Downloadpolicycsv.java index 7d952906..bf9fa7ac 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/operations/Downloadpolicycsv.java +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/Downloadpolicycsv.java @@ -125,7 +125,7 @@ public HttpResponse doRequest(DownloadpolicycsvRequest request) { HttpResponse httpRes; try { httpRes = client.send(r); - if (Utils.statusCodeMatches(httpRes.statusCode(), "403", "4XX", "500", "5XX")) { + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "403", "4XX", "500", "5XX")) { httpRes = onError(httpRes, null); } else { httpRes = onSuccess(httpRes); @@ -162,7 +162,7 @@ public DownloadpolicycsvResponse handleResponse(HttpResponse respon throw APIException.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "403", "4XX")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "4XX")) { // no content throw APIException.from("API error occurred", response); } @@ -200,7 +200,7 @@ public CompletableFuture> doRequest(DownloadpolicycsvRequest if (err != null) { return onError(null, err); } - if (Utils.statusCodeMatches(resp.statusCode(), "403", "4XX", "500", "5XX")) { + if (Utils.statusCodeMatches(resp.statusCode(), "400", "403", "4XX", "500", "5XX")) { return onError(resp, null); } return CompletableFuture.completedFuture(resp); @@ -240,7 +240,7 @@ public CompletableFuture implements Comparable> { final TypeReferenceWithShape typeReference; final T value; private final TreeNode tree; + private int matched = 0; // Count of matched fields (includes inexact) + private int inexact = 0; // Count of fields with unknown/unrecognized enum values + private int unmatched = 0; // Count of struct fields not found in raw JSON Match(TypeReferenceWithShape typeReference, T value, TreeNode tree) { this.typeReference = typeReference; @@ -129,68 +133,198 @@ private static final class Match implements Comparable> { this.tree = tree; } - private int getMappedFields() { + /** + * Populates the matched, inexact, and unmatched field counts by recursively + * analyzing the deserialized value against the JSON structure. + */ + private void countFields() { try { Object unwrapped = unwrapValue(value); JsonNode jsonNode = tree instanceof JsonNode ? (JsonNode) tree : null; - return (jsonNode != null) ? countMappedFields(unwrapped, jsonNode) : 0; + if (jsonNode != null) { + countFieldsRecursive(unwrapped, jsonNode); + } } catch (Exception e) { - return 0; + // Keep counts at 0 on error } } - private int getMappedEnumFields() { + /** + * Recursively counts matched, inexact, and unmatched fields by walking the object + * graph based on JSON structure. + * + * @param obj the deserialized object to traverse + * @param jsonNode the corresponding JSON node + */ + private void countFieldsRecursive(Object obj, JsonNode jsonNode) { + // Unwrap union wrappers to get the active variant value + obj = unwrapValue(obj); + + // Handle null JSON value + if (jsonNode != null && jsonNode.isNull()) { + // Null JSON value matches null object or JsonNullable containing null + matched++; + return; + } + + if (obj == null || jsonNode == null) { + return; + } + + // Unwrap JsonNullable fields + if (isJsonNullable(obj)) { + Object unwrapped = unwrapJsonNullable(obj); + if (unwrapped != null) { + countFieldsRecursive(unwrapped, jsonNode); + return; + } + // JsonNullable is present but contains null - already handled above + return; + } + + // Handle primitives and strings + if (isPrimitiveOrString(obj)) { + matched++; + return; + } + + // Handle standard Java enums and enum wrappers + if (obj.getClass().isEnum() || Reflections.isEnumWrapper(obj)) { + matched++; + try { + // Check if it's an unknown enum value (only for enum wrappers) + if (Reflections.isEnumWrapper(obj)) { + java.lang.reflect.Method isKnownMethod = obj.getClass().getMethod("isKnown"); + Boolean isKnown = (Boolean) isKnownMethod.invoke(obj); + if (isKnown != null && !isKnown) { + inexact++; + return; + } + } + } catch (Exception e) { + // If value() method doesn't exist or fails, treat as exact + } + return; + } + try { - Object unwrapped = unwrapValue(value); - JsonNode jsonNode = tree instanceof JsonNode ? (JsonNode) tree : null; - return (jsonNode != null) ? countMappedEnumFields(unwrapped, jsonNode) : 0; + // Recurse through collections + if (obj instanceof Collection && jsonNode.isArray()) { + int index = 0; + for (Object element : (Collection) obj) { + if (element != null && index < jsonNode.size()) { + JsonNode elementNode = jsonNode.get(index); + countFieldsRecursive(element, elementNode); + } + index++; + } + return; + } + + // Recurse through maps + if (obj instanceof Map && jsonNode.isObject()) { + for (Map.Entry entry : ((Map) obj).entrySet()) { + if (entry.getKey() != null && entry.getValue() != null) { + String key = entry.getKey().toString(); + if (jsonNode.has(key)) { + JsonNode valueNode = jsonNode.get(key); + countFieldsRecursive(entry.getValue(), valueNode); + } + } + } + return; + } + + // Recurse through object fields + if (jsonNode.isObject() && !(obj instanceof Map)) { + for (Field field : obj.getClass().getDeclaredFields()) { + if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) continue; + + field.setAccessible(true); + Object fieldValue = field.get(obj); + String fieldName = getJsonFieldName(field); + + if (fieldName == null) { + continue; // Skip fields marked with @JsonIgnore or json:"-" + } + + if (!jsonNode.has(fieldName)) { + // Field exists in struct but not in JSON + unmatched++; + continue; + } + + // Recurse into field regardless of whether it's null + // (null fields with null JSON values should be counted as matched) + JsonNode fieldNode = jsonNode.get(fieldName); + countFieldsRecursive(fieldValue, fieldNode); + } + } } catch (Exception e) { - return 0; + // Ignore errors during recursion } } + /** + * Gets the JSON field name for a Java field, respecting @JsonProperty annotations. + * Returns null if the field should be skipped (e.g., @JsonIgnore or no Jackson annotations). + */ + private String getJsonFieldName(Field field) { + // Check for @JsonIgnore + if (field.isAnnotationPresent(com.fasterxml.jackson.annotation.JsonIgnore.class)) { + return null; + } + + // Check for @JsonProperty - only include fields with Jackson annotations + if (field.isAnnotationPresent(com.fasterxml.jackson.annotation.JsonProperty.class)) { + com.fasterxml.jackson.annotation.JsonProperty prop = + field.getAnnotation(com.fasterxml.jackson.annotation.JsonProperty.class); + String value = prop.value(); + if (value != null && !value.isEmpty()) { + return value; + } + // If @JsonProperty is present but value is empty, use field name + return field.getName(); + } + + // Skip fields without Jackson annotations + return null; + } + /** * Compares candidates using a multi-level tie-breaking strategy: *
-         * 1. Number of mapped fields (higher is better)
-         * 2. Number of mapped enum fields (higher is better)
-         * 3. Size of serialized JSON (larger is better)
+         * 1. Matched count (higher is better)
+         * 2. Inexact count (lower is better)
+         * 3. Unmatched count (lower is better - fewer zero defaulted values)
          * 
- * This natural ordering is used to select the best candidate when multiple - * oneOf schemas successfully deserialize the input. */ @Override public int compareTo(Match other) { - // Primary: number of mapped fields (higher is better) - int fieldComparison = Integer.compare(this.getMappedFields(), other.getMappedFields()); - if (fieldComparison != 0) { - return fieldComparison; + // Primary: number of matched fields (higher is better) + int matchedComparison = Integer.compare(this.matched, other.matched); + if (matchedComparison != 0) { + return matchedComparison; } - // Secondary: number of mapped enum fields (higher is better) - int enumFieldComparison = Integer.compare(this.getMappedEnumFields(), other.getMappedEnumFields()); - if (enumFieldComparison != 0) { - return enumFieldComparison; + // Secondary: number of inexact fields (lower is better, prefer exactness) + int inexactComparison = Integer.compare(other.inexact, this.inexact); + if (inexactComparison != 0) { + return inexactComparison; } - // Tertiary: JSON size (larger is better) - try { - String thisJson = JSON.getMapper().writeValueAsString(unwrapValue(this.value)); - String otherJson = JSON.getMapper().writeValueAsString(unwrapValue(other.value)); - return Integer.compare(thisJson.length(), otherJson.length()); - } catch (Exception e) { - return 0; // Equal if serialization fails - } + // Tertiary: unmatched count (lower is better) + return Integer.compare(other.unmatched, this.unmatched); } } /** - * Unwraps the actual deserialized object from a union wrapper. - * Union wrappers have a TypedObject field annotated with @JsonValue. - * This method extracts that field and unwraps the TypedObject to get the actual value. + * Unwraps union wrappers to extract the active variant value. + * Union wrappers contain a TypedObject field annotated with @JsonValue. + * This ensures field counting only considers the active variant, not all union members. * * @param wrapper the union wrapper instance - * @return the actual deserialized object + * @return the actual deserialized value, or wrapper unchanged if not a union */ private static Object unwrapValue(Object wrapper) { if (wrapper == null) { @@ -218,114 +352,23 @@ private static Object unwrapValue(Object wrapper) { return wrapper; } - @FunctionalInterface - private interface ObjectMatcher { - boolean test(Object obj, JsonNode jsonNode); - } - - /** - * Generic recursive counter that walks the object graph based on JSON structure. - * Only counts elements that exist in both the object AND the JSON. - * - * @param obj the deserialized object to traverse - * @param jsonNode the corresponding JSON node - * @param matcher predicate that determines what to count (returns true if matched) - * @return count of matching elements that were present in the JSON - */ - private static int countMatching(Object obj, JsonNode jsonNode, ObjectMatcher matcher) { - if (obj == null || jsonNode == null) { - return 0; - } - - // Baseline: test if this object matches our criteria - if (matcher.test(obj, jsonNode)) { - return 1; - } - - // Early exit for primitives that don't match - if (isPrimitiveOrString(obj)) { - return 0; - } - - try { - // Recurse through collections - if (obj instanceof Collection && jsonNode.isArray()) { - int count = 0; - int index = 0; - for (Object element : (Collection) obj) { - if (element != null && index < jsonNode.size()) { - JsonNode elementNode = jsonNode.get(index); - count += countMatching(element, elementNode, matcher); - } - index++; - } - return count; - } - - // Recurse through maps - if (obj instanceof Map && jsonNode.isObject()) { - int count = 0; - for (Map.Entry entry : ((Map) obj).entrySet()) { - if (entry.getKey() != null && entry.getValue() != null) { - String key = entry.getKey().toString(); - if (jsonNode.has(key)) { - JsonNode valueNode = jsonNode.get(key); - count += countMatching(entry.getValue(), valueNode, matcher); - } - } - } - return count; - } - - // Recurse through object fields - only count fields present in JSON - if (jsonNode.isObject() && !(obj instanceof Map)) { - int count = 0; - for (Field field : obj.getClass().getDeclaredFields()) { - if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) continue; - - field.setAccessible(true); - Object fieldValue = field.get(obj); - String fieldName = field.getName(); - - if (fieldValue != null && jsonNode.has(fieldName)) { - JsonNode fieldNode = jsonNode.get(fieldName); - count += countMatching(fieldValue, fieldNode, matcher); - } - } - return count; - } - - return 0; - } catch (Exception e) { - return 0; - } - } - /** - * Counts all primitive/string fields that were mapped from JSON. + * Checks if an object is a JsonNullable wrapper. */ - private static int countMappedFields(Object obj, JsonNode jsonNode) { - return countMatching(obj, jsonNode, (o, ignored) -> isPrimitiveOrString(o)); + private static boolean isJsonNullable(Object obj) { + return obj instanceof JsonNullable; } /** - * Counts all enum fields that were mapped from JSON. - * Verifies that the JSON value matches the enum's value. - * TODO: Count "Open Enums" as well (which are wrapped in a class) + * Unwraps a JsonNullable object to get its contained value. + * Returns null if the JsonNullable is not present or contains null. */ - private static int countMappedEnumFields(Object obj, JsonNode jsonNode) { - return countMatching(obj, jsonNode, (o, node) -> { - if (!o.getClass().isEnum()) { - return false; - } - // Verify that the JSON value matches the enum's string representation - if (node != null && node.isTextual()) { - String enumValue = ((Enum) o).name(); - String jsonValue = node.asText(); - return enumValue.equals(jsonValue); - } - return false; - }); + private static Object unwrapJsonNullable(Object obj) { + if (!(obj instanceof JsonNullable)) { + return null; + } + JsonNullable nullable = (JsonNullable) obj; + return nullable.isPresent() ? nullable.get() : null; } private static boolean isPrimitiveOrString(Object obj) { @@ -391,7 +434,7 @@ public static boolean matchPossible(JavaType type, String json) { } private static boolean isDoubleQuoted(String s) { - return s.length() >=2 && s.startsWith("\"") && s.endsWith("\""); + return s.length() >= 2 && s.startsWith("\"") && s.endsWith("\""); } /** * Applies candidate preference rules to resolve multiple matches. @@ -421,6 +464,11 @@ public static List> applyMatchPreferences(List> matches, S // Apply smart scoring using natural ordering if still multiple candidates if (matches.size() > 1) { + // Count fields for each match before sorting + for (Match match : matches) { + match.countFields(); + } + return matches.stream() .sorted(Comparator.reverseOrder()) // Best candidates first (highest scores) .collect(Collectors.toList()); diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/QueryParameters.java b/src/main/java/com/glean/api_client/glean_api_client/utils/QueryParameters.java index 018199be..7766ef82 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/QueryParameters.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/QueryParameters.java @@ -143,9 +143,9 @@ private static List parseDelimitedParams(QueryParamsMetadata que params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(value), queryParamsMetadata.allowReserved)); break; } - Optional openEnumValue = Reflections.getOpenEnumValue(value.getClass(), value); - if (openEnumValue.isPresent()) { - params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(openEnumValue.get()), queryParamsMetadata.allowReserved)); + Optional unwrappedEnumValue = Reflections.getUnwrappedEnumValue(value.getClass(), value); + if (unwrappedEnumValue.isPresent()) { + params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(unwrappedEnumValue.get()), queryParamsMetadata.allowReserved)); break; } Field[] fields = value.getClass().getDeclaredFields(); diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/Reflections.java b/src/main/java/com/glean/api_client/glean_api_client/utils/Reflections.java index 3526fbcc..5c3ebdbd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/Reflections.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/Reflections.java @@ -16,13 +16,13 @@ public class Reflections { /** - * Extracts the underlying value from an open enum instance if the class follows the open enum pattern. + * Extracts the underlying value from an enum wrapper instance if the class follows the enum wrapper pattern. * - *

An open enum is a class that emulates enum behavior but can handle unknown values + *

An enum wrapper is a class that emulates enum behavior but can handle unknown values * without runtime errors. This pattern is commonly used for API responses where new * enum values might be added over time. * - *

The method validates that the class follows the open enum pattern by checking for: + *

The method validates that the class follows the enum wrapper pattern by checking for: *

    *
  • A static factory method {@code of(String)} or {@code of(Integer)} that returns the class type
  • *
  • An instance method {@code value()} returning String or Integer
  • @@ -32,12 +32,12 @@ public class Reflections { *

    If all validation passes, the method invokes the {@code value()} method on the provided instance * and returns the result. * - * @param clazz the class to examine for open enum pattern - * @param instance the instance of the open enum class from which to extract the value + * @param clazz the class to examine for enum wrapper pattern + * @param instance the instance of the enum wrapper class from which to extract the value * @return {@code Optional} containing the extracted value (String or Integer) if the class - * follows the open enum pattern and the value extraction succeeds, {@code Optional.empty()} otherwise + * follows the enum wrapper pattern and the value extraction succeeds, {@code Optional.empty()} otherwise */ - public static Optional getOpenEnumValue(Class clazz, Object instance) { + public static Optional getUnwrappedEnumValue(Class clazz, Object instance) { Objects.requireNonNull(clazz, "Class cannot be null"); try { @@ -66,6 +66,59 @@ public static Optional getOpenEnumValue(Class clazz, Object instance) { } } + /** + * Checks if the given class is an enum wrapper. + * + *

    An enum wrapper is a class that emulates enum behavior but can handle unknown values + * without runtime errors. This pattern is commonly used for API responses where new + * enum values might be added over time. + * + *

    The method validates that the class follows the enum wrapper pattern by checking for: + *

      + *
    • A static factory method {@code of(String)} or {@code of(Integer)} that returns the class type
    • + *
    • An instance method {@code value()} returning String or Integer
    • + *
    • At least one public static final field of the same class type (predefined constants)
    • + *
    + * + * @param clazz the class to examine for enum wrapper pattern + * @return true if the class is an enum wrapper, false otherwise + */ + public static boolean isEnumWrapper(Class clazz) { + if (clazz == null) { + return false; + } + + try { + // Check for factory method of(String) or of(Integer) + boolean hasFactoryMethod = Arrays.stream(clazz.getDeclaredMethods()) + .anyMatch(method -> isValidFactoryMethod(method, clazz)); + if (!hasFactoryMethod) { + return false; + } + + // Check for at least one static constant of same type + if (!hasStaticConstants(clazz)) { + return false; + } + + // Check for value() method returning String or Integer + Method valueMethod = clazz.getMethod("value"); + return isValidValueMethod(valueMethod); + } catch (Exception e) { + return false; + } + } + + /** + * Checks if the given object is an instance of an enum wrapper class. + * + * @param obj the object to check + * @return true if the object is an instance of an enum wrapper class, false otherwise + */ + public static boolean isEnumWrapper(Object obj) { + return obj != null && isEnumWrapper(obj.getClass()); + } + private static boolean isNumericType(Class type) { // Primitive numeric types if (type.isPrimitive()) { @@ -84,7 +137,7 @@ private static boolean isNumericType(Class type) { } /** - * Checks if the given method is a valid factory method for an open enum. + * Checks if the given method is a valid factory method for an enum wrapper. * * @param method the method to check * @param clazz the class that should be returned by the factory method @@ -108,7 +161,7 @@ private static boolean isValidFactoryMethod(Method method, Class clazz) { } /** - * Checks if the given method is a valid value() method for an open enum. + * Checks if the given method is a valid value() method for an enum wrapper. * * @param method the value() method to validate * @return true if valid value method diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/RequestBody.java b/src/main/java/com/glean/api_client/glean_api_client/utils/RequestBody.java index 6237922e..f78aaa50 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/RequestBody.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/RequestBody.java @@ -254,6 +254,13 @@ public static SerializedBody serializeFormData(Object value) } else { switch (Types.getType(val.getClass())) { case OBJECT: { + // Check if it's an enum wrapper first + Optional unwrappedEnumValue = Reflections.getUnwrappedEnumValue(val.getClass(), val); + if (unwrappedEnumValue.isPresent()) { + params.add(new NameValue(metadata.name, Utils.valToString(unwrappedEnumValue.get()))); + break; + } + if (!Utils.allowIntrospection(val.getClass())) { params.add(new NameValue(metadata.name, String.valueOf(val))); } else { diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java b/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java index e7683bc7..7ba7c925 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java @@ -180,10 +180,10 @@ public static String generateURL(Class type, String baseURL, String path, pathParams.put(pathParamsMetadata.name, pathEncode(valToString(value), pathParamsMetadata.allowReserved)); break; } - Optional openEnumValue = Reflections.getOpenEnumValue(value.getClass(), value); - if (openEnumValue.isPresent()) { + Optional unwrappedEnumValue = Reflections.getUnwrappedEnumValue(value.getClass(), value); + if (unwrappedEnumValue.isPresent()) { pathParams.put(pathParamsMetadata.name, pathEncode( - valToString(openEnumValue.get()), + valToString(unwrappedEnumValue.get()), pathParamsMetadata.allowReserved)); break; } @@ -368,9 +368,9 @@ public static Map> getHeadersFromMetadata(Object headers, G if (!allowIntrospection(value.getClass())) { break; } - Optional openEnumValue = Reflections.getOpenEnumValue(value.getClass(), value); - if (openEnumValue.isPresent()) { - upsertHeader(result, headerMetadata.name, openEnumValue.get()); + Optional unwrappedEnumValue = Reflections.getUnwrappedEnumValue(value.getClass(), value); + if (unwrappedEnumValue.isPresent()) { + upsertHeader(result, headerMetadata.name, unwrappedEnumValue.get()); break; } @@ -495,6 +495,14 @@ public static String valToString(Object value) { } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { return "ERROR_UNKNOWN_VALUE"; } + } else if (Reflections.isEnumWrapper(value)) { + // Extract the underlying value from enum wrapper + Optional unwrappedEnumValue = Reflections.getUnwrappedEnumValue(value.getClass(), value); + if (unwrappedEnumValue.isPresent()) { + return String.valueOf(unwrappedEnumValue.get()); + } else { + return "ERROR_UNKNOWN_VALUE"; + } } else { return String.valueOf(resolveOptionals(value)); } @@ -1135,13 +1143,22 @@ private static String toHex(byte[] bytes, int length) { @SuppressWarnings("unchecked") public static String discriminatorToString(Object o) { - // expects o to be either an Optional, Enum (with a String value() method) - // or a String value + // expects o to be either an Optional, Enum (with a String value() method), + // an open enum wrapper, or a String value Class cls = o.getClass(); if (cls.equals(Optional.class)) { Optional a = (Optional) o; return a.map(x -> discriminatorToString(x)).orElse(null); - } else if (cls.isEnum()) { + } + + // Check if it's an open enum wrapper + if (Reflections.isEnumWrapper(o)) { + Optional value = Reflections.getUnwrappedEnumValue(cls, o); + return value.map(String::valueOf).orElse(null); + } + + // Handle regular enums + if (cls.isEnum()) { try { Method m = cls.getMethod("value"); return (String) m.invoke(o); @@ -1149,9 +1166,10 @@ public static String discriminatorToString(Object o) { | InvocationTargetException e) { throw new RuntimeException(e); } - } else { - return (String) o; } + + // Fall back to String cast + return (String) o; } public static void recordTest(String id) { From bf0ef3b084e7ada191eec5eb5dc545fc42956421 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 26 Dec 2025 02:13:59 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow