diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e456fbbf..588b0355 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: d8e27f2118bb2e9b6f10f3c87ad1abab + docChecksum: 575b21c4cc88c8e35421058c957def29 docVersion: 0.9.0 - speakeasyVersion: 1.761.8 - generationVersion: 2.881.2 - releaseVersion: 0.12.38 - configChecksum: 6734fcbda27d97a184acf4cc3fa8c287 + speakeasyVersion: 1.761.9 + generationVersion: 2.881.4 + releaseVersion: 0.12.39 + configChecksum: 0b72431f029d15c8b3d06d82dae8643f repoURL: https://github.com/gleanwork/api-client-java.git installationURL: https://github.com/gleanwork/api-client-java published: true persistentEdits: - generation_id: 656cc474-e6ce-4fc4-a79f-2100ca7a86d1 - pristine_commit_hash: d1ae5358ed5ab8083086ca9e9a1318fbf1576276 - pristine_tree_hash: bcfa1f94033a4e1bfde4b16265c3bcd7d3742029 + generation_id: f498710a-1e7e-4e47-ad34-9ed079f9da03 + pristine_commit_hash: cd8472f34975e794b5ea58650db46d1d899f9bf6 + pristine_tree_hash: 022eb5cfc3b90e5d2f60c20142d79f907cdd0632 features: java: additionalDependencies: 0.1.0 @@ -75,8 +75,8 @@ trackedFiles: pristine_git_object: 223016f29c1ccff0f80822a60010f56b21116e42 docs/models/components/AddCollectionItemsErrorErrorType.md: id: e6074e15f918 - last_write_checksum: sha1:467739df012a12cea752794e84d7b3b11b961306 - pristine_git_object: e99e175832e7efc021e91f2416476d3b9183fa88 + last_write_checksum: sha1:5a8484c4d7f73750b0bafb0b5874b644a0185a51 + pristine_git_object: fc3c9d3ca72b914a4046135d4435fe25f3635717 docs/models/components/AddCollectionItemsRequest.md: id: 04c9519376f1 last_write_checksum: sha1:8511b3e5ba414f52839e37386e1f387d3e30cf33 @@ -129,6 +129,10 @@ trackedFiles: id: f240e68c81d1 last_write_checksum: sha1:66a407d9859305998077569ad6b94a325d9b1089 pristine_git_object: e4cff60c1d4a041e48ce077b05be3ae9c8ce59af + docs/models/components/AgentUseCaseInsight.md: + id: d201ebd4538a + last_write_checksum: sha1:79c04fd1f58cfb7c5375f186d29dee4508d3114f + pristine_git_object: 81603b56b8c82188d7b8a31ee556a5d9f79cfcc5 docs/models/components/AgentUsersInsight.md: id: bc38ed2da541 last_write_checksum: sha1:7af0299c9bc3f3c01762a22fd5541b0931d416bb @@ -139,8 +143,8 @@ trackedFiles: pristine_git_object: 070eb3f18d120de8e59b1e88a6cf4e982d33c60c docs/models/components/AgentsInsightsV2Response.md: id: d4153d9001d6 - last_write_checksum: sha1:dfb1720be93ddecec133908e640299336fd9e96c - pristine_git_object: a7445ae69aa5a40a36cfeba9873dc296ce4be8fd + last_write_checksum: sha1:4f008a14f6c674548040982be815eaab14e6c4d2 + pristine_git_object: 97b170bb8283192d495a389fa3192f4617446bfe docs/models/components/AgentsTimeSavedInsight.md: id: a6b9d40adfea last_write_checksum: sha1:83778ce6380774a413d262e691f4099d6693591a @@ -211,8 +215,8 @@ trackedFiles: pristine_git_object: 175061d71c6c8ab7ca4e497d9776d3f6701c754a docs/models/components/AssistantInsightsResponse.md: id: 70f4085a5cb9 - last_write_checksum: sha1:7f602ab9842b6b67994d6f801c7283ccff3e0100 - pristine_git_object: c38e5af7600a3cd74195b17c57687a61365198dc + last_write_checksum: sha1:fab19179e78ec149c3224fa17fee892d582b933b + pristine_git_object: 72f737958b2e817bde09a9545c6be5c622a0bca1 docs/models/components/AuthConfig.md: id: 2451e4f26cfe last_write_checksum: sha1:9c64703d38095009a92101e17f298a390d7da94b @@ -269,6 +273,10 @@ trackedFiles: id: 7b6f54e578a6 last_write_checksum: sha1:74e0f36158d8ed6e9770950268a2e17455d1bec5 pristine_git_object: 1aafe5cb49754911e8928f9847af0cd10ca67660 + docs/models/components/BreakdownType.md: + id: 75586ed35bbe + last_write_checksum: sha1:f14beb1bd7b87e50fe2a83bf2969a176f6737a66 + pristine_git_object: dc711a99aa03f2432183db477a49e7d52b187e44 docs/models/components/BulkIndexDocumentsRequest.md: id: 84745ad73f00 last_write_checksum: sha1:aa2f8302794d1eef5019f459b0428d20f9c5c049 @@ -443,8 +451,8 @@ trackedFiles: pristine_git_object: 797cb301d3aaefbf86126bdf25ad10668060943c docs/models/components/CollectionErrorErrorCode.md: id: 0330c7f11f46 - last_write_checksum: sha1:26f5bc659376c29966e1c0531126a5892e48ab6b - pristine_git_object: 6001f0d50a5f999979caf0bd7939c2467bebff7d + last_write_checksum: sha1:8c434cb2319944a6239dcbeb9b106adddeec990e + pristine_git_object: 6e9466bb62273efc3a1433223ca0d5da5f35be46 docs/models/components/CollectionItem.md: id: 51ba6ab76b44 last_write_checksum: sha1:5d8a867d86402771318c815dfb4661f5b839dcc2 @@ -563,8 +571,8 @@ trackedFiles: pristine_git_object: 7f7a0c5c81e4397cb2a6722fe795beddb61d0d57 docs/models/components/CurrentActiveUsers.md: id: 2ad4e5a05724 - last_write_checksum: sha1:bf77512fa17554a9cbef4f3255b3c6a1c83d04b9 - pristine_git_object: 68ea377fb9cda28b279b1a225f1c6117a7ce7c1c + last_write_checksum: sha1:056073a3ab6641fe73c575c2126a1c4aa53084ae + pristine_git_object: f73a3a4edceb65e72ae06d303f69671b91a3b53d docs/models/components/CustomDataValue.md: id: 1ad5c4636a3d last_write_checksum: sha1:75e8caefa0986622a0767b6f60b6d8c01a77f900 @@ -649,6 +657,14 @@ trackedFiles: id: f2248e515ceb last_write_checksum: sha1:13bd3121a7b2914825633ea14179399a3dda8912 pristine_git_object: a0527fb09e3de76882ea22d76362d671063375ec + docs/models/components/DatasourceCredentialStatus.md: + id: 545dafa58b13 + last_write_checksum: sha1:90825d2598f6aae46050bfe3beee7f4845b6cc73 + pristine_git_object: 65397c4e4dc916f409f70718cd60bd8342213aab + docs/models/components/DatasourceCredentialStatusResponse.md: + id: eed35802b696 + last_write_checksum: sha1:76bd4007629fecb912c476ba1184802fea170f48 + pristine_git_object: 0febb853474cdcaf9fa48799983c4f50a8619eab docs/models/components/DatasourceGroupDefinition.md: id: 78e0bb588b90 last_write_checksum: sha1:b47f7efea435c5596881c72ef891a5ff04a4ab62 @@ -983,8 +999,8 @@ trackedFiles: pristine_git_object: 73d2ca70e1047f42c9ac21db35af96d16fbb820e docs/models/components/EditCollectionResponseErrorCode.md: id: 2b17d0aa52c5 - last_write_checksum: sha1:eb7120e3700d77207fc744e641ae605ed48ca991 - pristine_git_object: 926c3604b1395d5ad107ea8051e7559bbf6ba408 + last_write_checksum: sha1:385276ade6415ddbf30e0d9714293dae9a3b923b + pristine_git_object: f9bb7c3ca773073d41283f8e882f844caf3cca23 docs/models/components/EditPinRequest.md: id: aebd7eb45420 last_write_checksum: sha1:238d4532ebaa3db8ded9151b5b3b4c03ef3f727a @@ -1099,8 +1115,8 @@ trackedFiles: pristine_git_object: b9cce921992bf7d948b7a2e3e4360ca2e3b81654 docs/models/components/FeedRequestCategory.md: id: afe4d7d42b83 - last_write_checksum: sha1:f01b11d46dec5853001b3951516423ec81a6c4e7 - pristine_git_object: 6c389ae9bdb64a48a5127403d1d1319eab994862 + last_write_checksum: sha1:d10a9a8212708a217dbca1873318c6455a287df4 + pristine_git_object: e6c55eb50e69408e624618dcee8e8fa5537da6f1 docs/models/components/FeedRequestOptions.md: id: 75fd500a75b1 last_write_checksum: sha1:448af6f7a5d161d4e2f856a6bfdb5da3bd7a9c68 @@ -1115,8 +1131,8 @@ trackedFiles: pristine_git_object: afba3e3879106e42edd5584228a0c0ac91814b5e docs/models/components/FeedResultCategory.md: id: de8a61d55051 - last_write_checksum: sha1:3aea09fc384a4f4012662a2d091144aacafaf201 - pristine_git_object: f77c72daadbe9e56333700897275deed257a3f44 + last_write_checksum: sha1:758bf6c7d78a6d0a34c7d923fc56a468e539b6bf + pristine_git_object: 1ea630d7238953f2b1598cb7601fbb5ddbaf2e12 docs/models/components/Feedback.md: id: 73b99e5606f2 last_write_checksum: sha1:674153466ef3c627154aa80e2d2bcf2c2d278978 @@ -1411,28 +1427,28 @@ trackedFiles: pristine_git_object: 164a746613da267bd79492b620f6b00d1100d96a docs/models/components/InsightsChatSummary.md: id: dafc8deb1ffa - last_write_checksum: sha1:e765b45f5c1c97e93c60fb41ed2396ebb8cfa44c - pristine_git_object: 95d7ce688a02a5c9399c120192c8f96b51d028bb + last_write_checksum: sha1:2a4dc3c0f880cdd52b0883f198dc16062fed2826 + pristine_git_object: e5c3e11e19ab7df3ccbf0d1534eb42f585784219 docs/models/components/InsightsOverviewRequest.md: id: c480783ddfe7 last_write_checksum: sha1:ffb5f96bc43b7c77be588b51d53904483c373c92 pristine_git_object: 58b92865edd1fade5a400b24eecb30d6e2192526 docs/models/components/InsightsOverviewResponse.md: id: eb8d62a9cad4 - last_write_checksum: sha1:a8f64b428a2bba8d0b4c4ebe2628cffca126b07d - pristine_git_object: 6e556f24f2a9b724a9e11f2d5b7151cb6f7aa1cb + last_write_checksum: sha1:b26f1e667be0624f5792d726187d10986cb597c6 + pristine_git_object: e73c17ded68777281348c19aeb1dffb9eb5ea23e docs/models/components/InsightsRequest.md: id: bca39583d1ca - last_write_checksum: sha1:5bf841888c51c1ac5666f3a0ce26fe728ba5439d - pristine_git_object: 775529b92c47d6a2d16f014a18f0bb28d5eb77db + last_write_checksum: sha1:0faec9f9161fb48f975128c1911c3317f7e7788d + pristine_git_object: 9de12b8971bcc70bce8267f9c69d2bb0e49100e8 docs/models/components/InsightsResponse.md: id: 147783df35c9 last_write_checksum: sha1:6784bd682698978be7e43e2edf0051b4cfb573a2 pristine_git_object: 2d17dfe6b05a4fb667417965e9fe9abbc0f977c9 docs/models/components/InsightsSearchSummary.md: id: 3f923e978a12 - last_write_checksum: sha1:b1352a09698a72a0a7f11495ffc558b4b673fb8b - pristine_git_object: a9c16853acb3dea00216fb5d54ef906585935869 + last_write_checksum: sha1:082a747b85f238e99fe256de9b5634dccbc565b9 + pristine_git_object: 07f9c26e3c351cee4eb63ded218e719ce7a35a5f docs/models/components/InvalidOperatorValueError.md: id: f84539d9b095 last_write_checksum: sha1:ba1a158464319ae493175c69e2ef1950aa250ee8 @@ -1447,8 +1463,8 @@ trackedFiles: pristine_git_object: ef8823f4217073ab8cda466d2e3e36d080141fd2 docs/models/components/JustificationType.md: id: 4f9697992386 - last_write_checksum: sha1:493e79bd1cdc521d74f4192acd735417748d7a3b - pristine_git_object: 5b7bc75c60a9b14bca9f7123182a1c546408b3a1 + last_write_checksum: sha1:348fe46b09c185a2a1cd64ba6ee25977b5ea1314 + pristine_git_object: 2134dd43f00fa569c39295dab91d72221fbe6b6a docs/models/components/KnowledgeType.md: id: 652b79486bf3 last_write_checksum: sha1:350f41b8184a84215ebbab80a83079e093a54b40 @@ -1545,6 +1561,10 @@ trackedFiles: id: a4740e845eda last_write_checksum: sha1:2d53769c4e7d72ec633b710bccf180e137fb528d pristine_git_object: 344fe18092ea9aa2c5ae6a80f4ad894377a4fcd0 + docs/models/components/McpBreakdownInsightsRequest.md: + id: 4366de2ea2de + last_write_checksum: sha1:6573dc995147431207b0795b7a17ac40047c52e0 + pristine_git_object: 257285845c59cd62940329ff689a2cc0f08267b5 docs/models/components/Meeting.md: id: 104cd2b31289 last_write_checksum: sha1:0747c3f1c32948e83505e1fa2cd9552f997ed5e6 @@ -1845,6 +1865,10 @@ trackedFiles: id: c89eff3746a7 last_write_checksum: sha1:be045f74a07ee4a2e9ae4358dee5ec0ead4d3ddf pristine_git_object: 74388fee709900070e2cf8a676eea042985d0928 + docs/models/components/RotateDatasourceCredentialsRequest.md: + id: 3a61804c4b6c + last_write_checksum: sha1:9c57cf4932032becab79d8f89d99fda41d34602a + pristine_git_object: 0ce286ac596232d42ae55c62b0d4997d36f49471 docs/models/components/RotateTokenResponse.md: id: 42451388a9dd last_write_checksum: sha1:51fb80e2fbefd863b98d3b7f5abdc1d33c2fc940 @@ -2131,8 +2155,8 @@ trackedFiles: pristine_git_object: bd49396b8d7cd30cec42c478f1dbb9a5973eae5b docs/models/components/UgcType.md: id: 15d7c1cbb511 - last_write_checksum: sha1:9d09e64d8f85fee8b0a7661a34e8bf93764f1216 - pristine_git_object: 38cabf9338e76f859b1a33dbebbad31f1c95d5a3 + last_write_checksum: sha1:84c61f0f70468964ba352cd577c1ea0075ff60c3 + pristine_git_object: 82e801d1aa4fbba4711d8cc181a70c603bf86cc6 docs/models/components/UiConfig.md: id: 7b2325b9a499 last_write_checksum: sha1:16c1b7ddda6f305a85f53949ae5acdfbc043883e @@ -2331,8 +2355,8 @@ trackedFiles: pristine_git_object: f076e01b46bdac62dbcf80e055c67281a8511796 docs/models/errors/ErrorCode.md: id: 21843405a77c - last_write_checksum: sha1:00216bac0d6b0fa591bfc748170f26a4dd0ed6ab - pristine_git_object: 72cc6cb39fd29ea4003dc6919d6a08ab3cdc736d + last_write_checksum: sha1:3fcf52fdd1601cb65f997c25f63c13669bfb3da1 + pristine_git_object: b0c03577c83e50c146d245a7ea4705272eadb07e docs/models/errors/ErrorResponse.md: id: 33e83376310b last_write_checksum: sha1:7c0ddd9cbf1343477620fc053ed0af97700b94b6 @@ -2617,6 +2641,14 @@ trackedFiles: id: b9d15ac782eb last_write_checksum: sha1:43b809ae9de45cee4700b082b0c53fe4a444e036 pristine_git_object: afccb3b71a9b7553f4464218f7bfead08d9c9012 + docs/models/operations/GetDatasourceCredentialStatusRequest.md: + id: a4afbbf72eb1 + last_write_checksum: sha1:098769b5675e1ce7c754547a5c6fc59339f9827b + pristine_git_object: 5dd66a28c495cdca49a45f66639a759e7dd1c7a7 + docs/models/operations/GetDatasourceCredentialStatusResponse.md: + id: 0ecff9970f89 + last_write_checksum: sha1:f54c1f46a7d9120a638027868449cde182e94e19 + pristine_git_object: 3291d9ec5f01cb49860e973f3603fd82a29b7fb2 docs/models/operations/GetDatasourceInstanceConfigurationRequest.md: id: c81fd7343157 last_write_checksum: sha1:22c0a3a41f5ef21ce3950422b5a28dd9daf8337c @@ -3025,6 +3057,14 @@ trackedFiles: id: ba973d70500b last_write_checksum: sha1:e10ca600e8c2a3570de4f575c3281cb07da4a4ec pristine_git_object: 9ccd1568690b6b993ed779941baceba2663c9fc4 + docs/models/operations/RotateDatasourceCredentialsRequest.md: + id: c6cffc8caa68 + last_write_checksum: sha1:9bb6367695bab6785c54b559f41bf55d7b0adfc3 + pristine_git_object: ac1499dccb21554133c7c673e77ab3a24380e0bb + docs/models/operations/RotateDatasourceCredentialsResponse.md: + id: ac054b0ebd02 + last_write_checksum: sha1:a08e7834026d58802df6a083a2ee0a831d29b430 + pristine_git_object: 860533934403c7a058b08ef14a31a8ba329865b2 docs/models/operations/SearchAgentsResponse.md: id: ce12d446ad2e last_write_checksum: sha1:f2361d91835c444346effb9337af619c482a8dfe @@ -3151,8 +3191,8 @@ trackedFiles: pristine_git_object: a997ca8507fcd9d54912e53a8e2fce7d472aef18 docs/sdks/datasources/README.md: id: 024d3ed36945 - last_write_checksum: sha1:cb5917146f34016ca8f7bda5822ed0bc9c2a6a41 - pristine_git_object: 09ef42fcccbb94666ac2cff3ec802e7fbd68c63c + last_write_checksum: sha1:2649a8d5d895adbc39e2791b846a03eade6bb448 + pristine_git_object: c00393dfb30cd951d3ddebce81a3f19e6283bfa9 docs/sdks/entities/README.md: id: a140ac5181b9 last_write_checksum: sha1:49c9cf1f1044dca5861a0f0eb49ef71b00cb5109 @@ -3227,8 +3267,8 @@ trackedFiles: pristine_git_object: 3decbce5bd40edbe278c1c5d2dbf585808e51d9a gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:7831a921205c6787308c37de78de20ba5da15cb7 - pristine_git_object: b1ea0f0ff1fb970faca4f8df9e9d5c8d31f5fa60 + last_write_checksum: sha1:e982a8dbd699563cdedf1b98bff35c2f25573d1e + pristine_git_object: 5a6fd75a7679ce35f4c4538261b75de6621e0739 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -3355,8 +3395,8 @@ trackedFiles: pristine_git_object: 119195b920979511b646f622fdc3b9b670b345c4 src/main/java/com/glean/api_client/glean_api_client/AsyncDatasources.java: id: 3c173ec01fbb - last_write_checksum: sha1:f595c359620eae14d51acce2db42482011ce76f9 - pristine_git_object: 9e740ee2708451f78020c4706452101b37fe2379 + last_write_checksum: sha1:525cbb1a0a88dcf2907454eaaf7d4d6653932cfd + pristine_git_object: 52bde47924e0644e6dc71828c1e1230b18017169 src/main/java/com/glean/api_client/glean_api_client/AsyncEntities.java: id: 7589d9e17031 last_write_checksum: sha1:e9b0b692a1020f4ec62de748bf3901be0a2e8022 @@ -3479,8 +3519,8 @@ trackedFiles: pristine_git_object: 141b1f40d3230bfa85f0960a9af4bd604f555334 src/main/java/com/glean/api_client/glean_api_client/Datasources.java: id: a5c243202fb9 - last_write_checksum: sha1:33b58c7ad3e179e7b1d4989ba8bca98b90e31850 - pristine_git_object: 316245fd3c112eddc1a117a4b674586e63314ec0 + last_write_checksum: sha1:b1359c37d6872e7b2d4188ea259acb1c4d3f4a40 + pristine_git_object: 3f6dae5dbe24dac2a789f39f808689cca40c328a src/main/java/com/glean/api_client/glean_api_client/Entities.java: id: 8254f307c235 last_write_checksum: sha1:e511ff5564697463e2b6494f1e4db60d9f24cc97 @@ -3547,8 +3587,8 @@ trackedFiles: pristine_git_object: ffae914775eb41ff311371f62504344a59d090fd src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java: id: d5fcc61f5992 - last_write_checksum: sha1:28c00802fed460958d1998150ebf7c7e1f89b4df - pristine_git_object: 308a84820e2af823159abcb75a3840c332ede95d + last_write_checksum: sha1:35ea2743145f8e6d69e13e6a65b2211d6f47c329 + pristine_git_object: 447cc816b60a4ed770a6731eba27d7d9d1064a1a src/main/java/com/glean/api_client/glean_api_client/Search.java: id: f22d94b920b5 last_write_checksum: sha1:ac38d1ed47be207940dd6fb7e4c688dddccc6a8b @@ -3599,8 +3639,8 @@ trackedFiles: pristine_git_object: 936fbe0c0cebbabcfe1d519c76db96cf76ca89da src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsErrorErrorType.java: id: 0ef5a50a0ad6 - last_write_checksum: sha1:53f75ef4c522c0fd44489662b7e8fedc3987d5c8 - pristine_git_object: 5d51dbd755c47a8e04e7a1982c82c0d4ede0b128 + last_write_checksum: sha1:5c4466ed60cac64ba14bf7b0fc389f2b89738f64 + pristine_git_object: 2998506c69a123fed452d12f6fccc78ebce47973 src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsRequest.java: id: 8e54fc689398 last_write_checksum: sha1:39bc2f7d8eb9b6f0247612a110bc8ae7c6d6f27a @@ -3653,6 +3693,10 @@ trackedFiles: id: 02499cd63d02 last_write_checksum: sha1:4a8b0dcf668ce807f7573b271fa35bd52a47d892 pristine_git_object: 550b769c68904420884f30ab814f01851fe82512 + src/main/java/com/glean/api_client/glean_api_client/models/components/AgentUseCaseInsight.java: + id: 8be03b038a72 + last_write_checksum: sha1:1271a10104e3625ec1021b5fdb7f651a53e6a06b + pristine_git_object: b6ca3475c8101cae02c2b53b04ca7df77ee24c3c src/main/java/com/glean/api_client/glean_api_client/models/components/AgentUsersInsight.java: id: b702924bc01d last_write_checksum: sha1:c377b022e7b5a29a207d28dc990f37647eb2c746 @@ -3663,8 +3707,8 @@ trackedFiles: pristine_git_object: e0113f89bd5372f836e995cd085f603065f25d86 src/main/java/com/glean/api_client/glean_api_client/models/components/AgentsInsightsV2Response.java: id: a3dea5a9588a - last_write_checksum: sha1:22768ffeebe43c578d93fd77b3154c9b58f725af - pristine_git_object: 229f6f44ccd82aca1813abc68fc7d07d1652c4dc + last_write_checksum: sha1:5a9129ec9590f1cc03bbb72af34a922f1d11a8fc + pristine_git_object: 6c9958597147205005149452be7a08599fb6b56f src/main/java/com/glean/api_client/glean_api_client/models/components/AgentsTimeSavedInsight.java: id: 4cd0a2b44815 last_write_checksum: sha1:43613513c7e5e4305e7168ca47e882129594f7a3 @@ -3735,8 +3779,8 @@ trackedFiles: pristine_git_object: b1921cacef3abe1322b8ffaddd9048729c7c2249 src/main/java/com/glean/api_client/glean_api_client/models/components/AssistantInsightsResponse.java: id: 1ca128d01115 - last_write_checksum: sha1:381d9820f5192515f7560ae576d2ba7beb6d942a - pristine_git_object: 6277c7fb78f265273fb9cf2ff9088e141751c743 + last_write_checksum: sha1:15944433ac855cb9f28d92c7392ac4b7cb484f25 + pristine_git_object: 84209052fc2e06ade5843025d299410d38f43135 src/main/java/com/glean/api_client/glean_api_client/models/components/AuthConfig.java: id: 266268058b7c last_write_checksum: sha1:2e30ccb9e89703ea04bb49e05eab0fe620d461e1 @@ -3793,6 +3837,10 @@ trackedFiles: id: b3192734966f last_write_checksum: sha1:1d549eedcbba83cc4642485842e9e4cff26082e3 pristine_git_object: 5cc29aed97997428c7ec27a945dbf4ca8ae86026 + src/main/java/com/glean/api_client/glean_api_client/models/components/BreakdownType.java: + id: 22c9cfa5fd83 + last_write_checksum: sha1:40c841c6524bf4d7d346888890fc8be5d916ae4e + pristine_git_object: b9934a5955732b137bd862e934de374dbdfd1b98 src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexDocumentsRequest.java: id: 63b98fa828ff last_write_checksum: sha1:a0801d10daff582160eeaaa3988cc5ef19366b59 @@ -3967,8 +4015,8 @@ trackedFiles: pristine_git_object: cb6282d56d6b0eddff20189995e2286093dc4023 src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionErrorErrorCode.java: id: bc79919ab65c - last_write_checksum: sha1:6fd4c3a4c919fc7508b45147d965818ebe9c09cd - pristine_git_object: 855e861c0c7fdd35591abd66fdc2773077473034 + last_write_checksum: sha1:bdb12a1556eb3f85b5c458fae809339f7a3bf0ec + pristine_git_object: fe6a556fab0b16e8fceb1d13cc393b0e15951c16 src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItem.java: id: 2a01ea2b8250 last_write_checksum: sha1:3fbd81c7c68d94d5a3a14d9af5fe9dbacac2187e @@ -4087,8 +4135,8 @@ trackedFiles: pristine_git_object: cd92ec8e614cf9b95fee675b5aace3e9fb934c76 src/main/java/com/glean/api_client/glean_api_client/models/components/CurrentActiveUsers.java: id: 270d2a2bdf80 - last_write_checksum: sha1:362c74446a55efa44a6c0152b7b3422638dfe8b5 - pristine_git_object: 3339cfa952523449e5b86b99e927e49aa8456f60 + last_write_checksum: sha1:cf530d74648b55590453964714865916465f069c + pristine_git_object: 682bf0a8fc7feb1f0fbdde95c9dad84f376619a4 src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDataValue.java: id: bd491d634a46 last_write_checksum: sha1:b0c31895c93d93a8e6d58cac8028da2278ccb359 @@ -4173,6 +4221,14 @@ trackedFiles: id: bc6aa4441b02 last_write_checksum: sha1:832effcd46f16f322bc0940ded76ceffded5c137 pristine_git_object: 252ddc4b7236de814bdca8222ed58f7dc10baae7 + src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatus.java: + id: 8ce4a048ef1e + last_write_checksum: sha1:e0a1bbb59ecb699813712eafecdfde13a25d5981 + pristine_git_object: 3948af87d5b4fe310303399bb8a8f7c56b24225f + src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatusResponse.java: + id: 6aa3d770bcc1 + last_write_checksum: sha1:170673016158b9ea2e8d497e762294e148087727 + pristine_git_object: 54dc377aced4114e6e301eb10cede661c08dcbff src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceGroupDefinition.java: id: bf78b36e5a35 last_write_checksum: sha1:4e21b7517b5b8c06e32f2019addcd7f3fc2c5ef5 @@ -4507,8 +4563,8 @@ trackedFiles: pristine_git_object: 43bac5d46365a2a2b3e1f1d15e7dc3d235193beb src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponseErrorCode.java: id: ec103e36e48d - last_write_checksum: sha1:ff2c63c81c7c1f082721bf3822b229be15b45b1f - pristine_git_object: 145894a172e9036c675c9134f684e60500010dd3 + last_write_checksum: sha1:fcf089b90c2e585ed18201451684336bf4f30abd + pristine_git_object: 4a0716960dffaaeb8daf94fd658f57d95b424164 src/main/java/com/glean/api_client/glean_api_client/models/components/EditPinRequest.java: id: 9d121c7be959 last_write_checksum: sha1:11fa6028271302185bcdf12fe3aa118dcd4d9daa @@ -4623,8 +4679,8 @@ trackedFiles: pristine_git_object: da07bc2b22a0c18ddaaeb554bf70ddf655b607cc src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java: id: 57e4db8e0360 - last_write_checksum: sha1:dd5021d893bee0cadd3f08265c66585cdcad1189 - pristine_git_object: 16c04adbd32d3610628e984396c1bc35f620e28d + last_write_checksum: sha1:cbbb9fadb6fe341c4baff32742e3321aa1e6075c + pristine_git_object: 40b1bf9e8a9bf34bf7f1bc2a36b73fbf85da0aa0 src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestOptions.java: id: 0961449ce7b9 last_write_checksum: sha1:1becd935e511806b12ea1aedebd9da174d807ad6 @@ -4639,8 +4695,8 @@ trackedFiles: pristine_git_object: d48710af7fe0154dc068aa6461409edf2e064068 src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java: id: d5f852e61d61 - last_write_checksum: sha1:9be2c20be6fc81915118a64ca0fea5b6707c29b7 - pristine_git_object: fdc07be52d93facaf5580852b73e9df87aadf0b0 + last_write_checksum: sha1:be637530f5e942f947dfee69ab38692893daa2fb + pristine_git_object: 43fbfb66b6ddb719efe65025db6438858711ac36 src/main/java/com/glean/api_client/glean_api_client/models/components/Feedback.java: id: f7178cc3b4f0 last_write_checksum: sha1:ad5079dea53ae7d7479b5bce2c16fcc63a4711e5 @@ -4935,28 +4991,28 @@ trackedFiles: pristine_git_object: e04efb3fdf9de3493dc11f5c4058fb0f443ed2b9 src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsChatSummary.java: id: 0814a90adc02 - last_write_checksum: sha1:31a6e6c7658130cb7301776b0138f667e5c19af1 - pristine_git_object: 28c1ee3b9b3a7a15a396b3a1f3af4424b6469c25 + last_write_checksum: sha1:ce2be39ee80b0bd81fb88112571ab33ccd060acd + pristine_git_object: 4aaa151177360be6b9476dffc6caa41b5c3f4c98 src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewRequest.java: id: 6fa0c64bb6d5 last_write_checksum: sha1:2b0670691cd4dd62ccc40da72b012b5dfda6026c pristine_git_object: b8ec936bceaff6ca8ffc907fc064779808bd328b src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsOverviewResponse.java: id: 2df162b5c362 - last_write_checksum: sha1:7cef5e4dd70eb3fa7f03ec3d716fefe645c99990 - pristine_git_object: ba67584f56d747b6d1eb01ca06cba9e37eb1f8fe + last_write_checksum: sha1:b35c7e42e40f655e67f6f4e79e86653e317b4234 + pristine_git_object: e08b82f53043673293c44b1728e92e79ebe7a63d src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java: id: d18f487ace2b - last_write_checksum: sha1:9f4f66fe84e8930d611b20bf21d4a9a044f7c9cd - pristine_git_object: 10a5aae444404426f7a79b88561d594b2771a56b + last_write_checksum: sha1:913fcc6229279b2c6a4510ada93bcfd358025eb4 + pristine_git_object: 58b725bb68bb29b7cedc07da6ae341e8d2e902e9 src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsResponse.java: id: cf29a55ddf0f last_write_checksum: sha1:81cead1f35c560283deef41daa23e720b4dc476a pristine_git_object: e3965c5e9678eb1e72a2dc4ec6ba097358f82021 src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsSearchSummary.java: id: e62bb509b213 - last_write_checksum: sha1:e50df8b839c9e57ddfd457b5690b515d3c0be1eb - pristine_git_object: ed1fc5e54495c9a1af575cc711e6a65473ecd166 + last_write_checksum: sha1:64daf224a1a77d9c3cf7a39c3081887b27076eb1 + pristine_git_object: 3dc7eb61d9ba58399be5a52eb5eac0997c0e0921 src/main/java/com/glean/api_client/glean_api_client/models/components/InvalidOperatorValueError.java: id: a968549cc703 last_write_checksum: sha1:544885bdd03aa1f41736deeda03339583cf50fc7 @@ -4971,8 +5027,8 @@ trackedFiles: pristine_git_object: 27aa91ed2894e57bf87f42b39c63adbe776c49f9 src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java: id: 4e704d02ecd5 - last_write_checksum: sha1:fa9173c1ae9d5723cca71069d69c63444b5e8137 - pristine_git_object: 6e1ed2a76acffbf0d9ba0bf270c52b67d284b534 + last_write_checksum: sha1:42d95239a1040d16fdc51455702e962b49d803bf + pristine_git_object: d422ebc1ea4e86077fd5a0380258f2f56809ba20 src/main/java/com/glean/api_client/glean_api_client/models/components/KnowledgeType.java: id: 86321f7dd6fe last_write_checksum: sha1:85872bd4390e4a048c4995b1427bec8b2fe88664 @@ -5069,6 +5125,10 @@ trackedFiles: id: 0679a490a55e last_write_checksum: sha1:3709846b9770184598f83143075a1795680743ee pristine_git_object: 976ff631aa369ec9fe43e901880070da1a5533d3 + src/main/java/com/glean/api_client/glean_api_client/models/components/McpBreakdownInsightsRequest.java: + id: 89a6d0bf179d + last_write_checksum: sha1:c7c25cf3f21ccf3de03f322b0effedc2468f3590 + pristine_git_object: 33490de9f2caf2460e2fe2d83e95ba974c2ceda7 src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java: id: 291a666eeedf last_write_checksum: sha1:41625a30e7e41f74db762647fda7b6e89c1db34b @@ -5369,6 +5429,10 @@ trackedFiles: id: 27c1126ef53f last_write_checksum: sha1:ab72a68a25826436c4035a28f7beff41c936a242 pristine_git_object: db30abddaddfd81896fb5029b8656110da8ae0f9 + src/main/java/com/glean/api_client/glean_api_client/models/components/RotateDatasourceCredentialsRequest.java: + id: 3289b4dd3617 + last_write_checksum: sha1:86b3473fa3fb425038c73eb9e622828ef43455a5 + pristine_git_object: 90d0b16b9a07dbdac28be128d47aeebedba3cb8b src/main/java/com/glean/api_client/glean_api_client/models/components/RotateTokenResponse.java: id: bf054aecb9e4 last_write_checksum: sha1:74ffdaec429b31eafa31f157fe043fd2c1c17cb7 @@ -5655,8 +5719,8 @@ trackedFiles: pristine_git_object: 7cd618713ae1d537f4161be77a1bdceb52985973 src/main/java/com/glean/api_client/glean_api_client/models/components/UgcType.java: id: 799738fed61d - last_write_checksum: sha1:59f5b4521b3f189fad1ab538994a917e2c73d235 - pristine_git_object: f61988046532dca2454c298e7c3de19d57440263 + last_write_checksum: sha1:b8c14600f748fac81bff1cb6ed10323469b12aa6 + pristine_git_object: bbf4832b46a4c90626f2a5a44e702369a9fc0de5 src/main/java/com/glean/api_client/glean_api_client/models/components/UiConfig.java: id: 4a03695e2c2e last_write_checksum: sha1:048a07117a3d72dc3981db90b927cef33c445819 @@ -5867,8 +5931,8 @@ trackedFiles: pristine_git_object: ebea7655bf0f20e5053a59954e10e5307f96d687 src/main/java/com/glean/api_client/glean_api_client/models/errors/ErrorCode.java: id: e2ce83e00dfc - last_write_checksum: sha1:d543d50f0c9b6374310fb67d9accc824724ce951 - pristine_git_object: bbfff4a1e9e6321aa9b0a38afb8c0ba80a13aaf9 + last_write_checksum: sha1:d6e298b2ada67a6afb601c01289c565cfecf762a + pristine_git_object: d41c9dd21a4325b1678875aad387a59a29ca336b src/main/java/com/glean/api_client/glean_api_client/models/errors/ErrorResponse.java: id: f900b82c72e9 last_write_checksum: sha1:b3883f5dc1c649279c454e2e701f32c00933d798 @@ -6033,6 +6097,10 @@ trackedFiles: id: 78ce0c6b242c last_write_checksum: sha1:8f37b009af70f271ba044d194805fca4c329f9b8 pristine_git_object: 0948f4005a4ef6951c4bebc34a715cad28d2d9e5 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/GetDatasourceCredentialStatusRequestBuilder.java: + id: 78c20673b086 + last_write_checksum: sha1:d4d9824aa2c8de0c7184cec1613a957d45f3ced5 + pristine_git_object: 86330b8f93df612c6a2720a8edba961dd1dff848 ? src/main/java/com/glean/api_client/glean_api_client/models/operations//async/GetDatasourceInstanceConfigurationRequestBuilder.java : id: 63938814345e last_write_checksum: sha1:885c2c357301885ca0cbc7a89dabd35d3b9d113a @@ -6301,6 +6369,10 @@ trackedFiles: id: fb9a4142cd38 last_write_checksum: sha1:63cae231404968f81f82a248345f1b919913a364 pristine_git_object: 01e46676218ec596d1280d2274ef9212ea3d2601 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/RotateDatasourceCredentialsRequestBuilder.java: + id: 979d03af8304 + last_write_checksum: sha1:a478c142d25afe2e7c6a416b13e4a944497c3a41 + pristine_git_object: e4c61236d6b7e5e2457060c4618bc2c948189c3f src/main/java/com/glean/api_client/glean_api_client/models/operations//async/SearchAgentsRequestBuilder.java: id: e7c50b9e7078 last_write_checksum: sha1:e964a45415ff392d96b4a830a7378829bd0923a5 @@ -6773,6 +6845,18 @@ trackedFiles: id: 0f877dbacbcf last_write_checksum: sha1:9ee489471cdee6b378487d48f333490478f57a80 pristine_git_object: 9083e3bf217b7387bedccd0f914661621ab24c95 + src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequest.java: + id: 54388988d5f7 + last_write_checksum: sha1:2483f6fd1ff01f9e4418ca84aa43af6962290d05 + pristine_git_object: 9adcc4fa6eb5dd0ace4880207ac9c755bfeb4e59 + src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequestBuilder.java: + id: 72f7fb8e0956 + last_write_checksum: sha1:f48882b343b7487fd707a736577e4ab4b043c875 + pristine_git_object: 9d74a8f3f89022ba8a1c5a532d96a538507f5975 + src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusResponse.java: + id: 3a19b00e6bf5 + last_write_checksum: sha1:299cd24fee2c36936d62a93ca6de3ea3bc1ddb70 + pristine_git_object: cc413136c821a56de30510dc2456fbf012ba196f src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceInstanceConfigurationRequest.java: id: 2720d4773720 last_write_checksum: sha1:b4ef8fdfbb607f24530cb9b2b06022d47926bf32 @@ -7449,6 +7533,18 @@ trackedFiles: id: d8489b9dc16a last_write_checksum: sha1:db3b22f645bf9b716fec0cd9796b124d1e4d7799 pristine_git_object: c0e74516316f8333f7f5edc2decc32ef41c450cc + src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequest.java: + id: 745ebb281581 + last_write_checksum: sha1:f77327e035065ac048543aaa51f6554ad587d87c + pristine_git_object: d3e4511cdcdf17c1b44a0228f44484bd632a2542 + src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequestBuilder.java: + id: 9b020cd5c52b + last_write_checksum: sha1:ca8711050fd348595c353766be7eb3fa5a6b32c6 + pristine_git_object: 69e72adf2773bc888b267dec3b9e56d0add66580 + src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsResponse.java: + id: c9cd40c8a35b + last_write_checksum: sha1:aecef7d4230828c810cea44053d0acf4d8376a13 + pristine_git_object: d6686240e4089b93974968266c33c206eb04baee src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsRequestBuilder.java: id: d0050192a9d8 last_write_checksum: sha1:87ed26c428e0e34161c5841f681cf19bf12861d3 @@ -7725,6 +7821,10 @@ trackedFiles: id: 7abc39060daa last_write_checksum: sha1:47e851d27ff0bfb64a8b3f8f78ef1af4cd5f23bb pristine_git_object: 77ad0e655ea0658e625aa82a3a797ef473ec8fec + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusResponse.java: + id: f3e85a5d5b2b + last_write_checksum: sha1:7900e46c32a685b016edb5a6623e63fc81f676da + pristine_git_object: 4e967b41e3a2e69b86d8e7f305394c46854d3b7d src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceInstanceConfigurationResponse.java: id: e96306d013c9 last_write_checksum: sha1:b71efdf55a1c4282bfa4ef3b72c07edec6473d98 @@ -7993,6 +8093,10 @@ trackedFiles: id: 3f31b6c6aea6 last_write_checksum: sha1:cd3684615393a592c33ef87b38f4daa3c1e19b3a pristine_git_object: 292830fa37b6fc700aff0e68a17a06edd4c0b080 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsResponse.java: + id: 572c78332148 + last_write_checksum: sha1:d46beac8e88bbf6d7187a1eb273ae4c0d9afdc23 + pristine_git_object: 700a8969fe9c718ac2444da1c82c113bedd2b338 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/SearchAgentsResponse.java: id: 529bf7dd548e last_write_checksum: sha1:eb30a931eb712d83a88c3dead13d3cfea8607ae2 @@ -8189,6 +8293,10 @@ trackedFiles: id: b0bdd6bb4e15 last_write_checksum: sha1:47b47b3fcfbb07ef816f8c07c84198b2c41a9296 pristine_git_object: 4c080a668607ba9d50614ee85a0c6a095012a18d + src/main/java/com/glean/api_client/glean_api_client/operations/GetDatasourceCredentialStatus.java: + id: 03caec3de5f5 + last_write_checksum: sha1:9c8cdac9fd04ec83e7c43b4d0a95d751fb8ea316 + pristine_git_object: a9b1049e31aee533d87cdb2d1fd903a68f63888f src/main/java/com/glean/api_client/glean_api_client/operations/GetDatasourceInstanceConfiguration.java: id: 46207fe96766 last_write_checksum: sha1:7123395211193f3e203e9b69759c89387282744a @@ -8461,6 +8569,10 @@ trackedFiles: id: ab31cb2dd32b last_write_checksum: sha1:7129f745069e92a2b4425e6ffdf820930c376dc0 pristine_git_object: 306bac677913896f89b8beec41b95eb909d52b74 + src/main/java/com/glean/api_client/glean_api_client/operations/RotateDatasourceCredentials.java: + id: dcb749627166 + last_write_checksum: sha1:6ec3b521d2e7825d7f8b642f1c4079289afbef40 + pristine_git_object: e5743dc211138f24f10dea387bfeda887131c63d src/main/java/com/glean/api_client/glean_api_client/operations/Search.java: id: 97c80b03b669 last_write_checksum: sha1:28a639ee1b39c35b35876bc2638825ce0e8a727b @@ -9080,7 +9192,7 @@ examples: application/json: {} responses: "200": - application/json: {"gleanAssist": {"activityInsights": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123", "relatedDocuments": [{"querySuggestion": {"query": "app:github type:pull author:mortimer", "searchProviderInfo": {"name": "Google", "searchLinkUrlTemplate": "https://www.google.com/search?q={query}&hl=en"}, "label": "Mortimer's PRs", "datasource": "github", "requestOptions": {"datasourceFilter": "JIRA", "datasourcesFilter": ["JIRA"], "queryOverridesFacetFilters": true, "facetFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "facetFilterSets": [{"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}], "facetBucketSize": 867945, "authTokens": [{"accessToken": "123abc", "datasource": "gmail", "scope": "email profile https://www.googleapis.com/auth/gmail.readonly", "tokenType": "Bearer", "authUser": "1"}]}, "ranges": [{"startIndex": 617092, "document": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "components": ["Backend", "Networking"], "status": "[\"Done\"]", "pins": [{"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}, {"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}], "collections": [{"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}], "interactions": {"reacts": [{}, {}], "shares": [{"numDaysAgo": 448639}]}, "verification": {"state": "DEPRECATED", "metadata": {"reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 872106}}}, "shortcuts": [{"inputAlias": ""}, {"inputAlias": ""}], "customData": {"someCustomField": {}}}}}], "inputDetails": {"hasCopyPaste": true}}, "results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}]}, {"querySuggestion": {"query": "app:github type:pull author:mortimer", "searchProviderInfo": {"name": "Google", "searchLinkUrlTemplate": "https://www.google.com/search?q={query}&hl=en"}, "label": "Mortimer's PRs", "datasource": "github", "requestOptions": {"datasourceFilter": "JIRA", "datasourcesFilter": ["JIRA"], "queryOverridesFacetFilters": true, "facetFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "facetFilterSets": [{"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}], "facetBucketSize": 867945, "authTokens": [{"accessToken": "123abc", "datasource": "gmail", "scope": "email profile https://www.googleapis.com/auth/gmail.readonly", "tokenType": "Bearer", "authUser": "1"}]}, "ranges": [{"startIndex": 617092, "document": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "components": ["Backend", "Networking"], "status": "[\"Done\"]", "pins": [{"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}, {"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}], "collections": [{"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}], "interactions": {"reacts": [{}, {}], "shares": [{"numDaysAgo": 448639}]}, "verification": {"state": "DEPRECATED", "metadata": {"reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 872106}}}, "shortcuts": [{"inputAlias": ""}, {"inputAlias": ""}], "customData": {"someCustomField": {}}}}}], "inputDetails": {"hasCopyPaste": true}}, "results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}]}], "metadata": {"type": "FULL_TIME", "title": "Actor", "department": "Movies", "email": "george@example.com", "location": "Hollywood, CA", "phone": "6505551234", "photoUrl": "https://example.com/george.jpg", "startDate": "2000-01-23", "datasourceProfile": [{"datasource": "github", "handle": ""}], "querySuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}]}, "inviteInfo": {"invites": [{}, {}, {}]}, "customFields": [{"label": "", "values": [{}], "displayable": true}], "badges": [{"key": "deployment_name_new_hire", "displayName": "New hire", "iconConfig": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}]}}, "activity": "ALL"}]}, "overviewResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "assistantResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "agentsResponse": {"topAgentsInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentsUsageByDepartmentInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentUsersInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "agentsTimeSavedInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}]}} + application/json: {"gleanAssist": {"activityInsights": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123", "relatedDocuments": [{"querySuggestion": {"query": "app:github type:pull author:mortimer", "searchProviderInfo": {"name": "Google", "searchLinkUrlTemplate": "https://www.google.com/search?q={query}&hl=en"}, "label": "Mortimer's PRs", "datasource": "github", "requestOptions": {"datasourceFilter": "JIRA", "datasourcesFilter": ["JIRA"], "queryOverridesFacetFilters": true, "facetFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "facetFilterSets": [{"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}], "facetBucketSize": 867945, "authTokens": [{"accessToken": "123abc", "datasource": "gmail", "scope": "email profile https://www.googleapis.com/auth/gmail.readonly", "tokenType": "Bearer", "authUser": "1"}]}, "ranges": [{"startIndex": 617092, "document": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "components": ["Backend", "Networking"], "status": "[\"Done\"]", "pins": [{"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}, {"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}], "collections": [{"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}], "interactions": {"reacts": [{}, {}], "shares": [{"numDaysAgo": 448639}]}, "verification": {"state": "DEPRECATED", "metadata": {"reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 872106}}}, "shortcuts": [{"inputAlias": ""}, {"inputAlias": ""}], "customData": {"someCustomField": {}}}}}], "inputDetails": {"hasCopyPaste": true}}, "results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}]}, {"querySuggestion": {"query": "app:github type:pull author:mortimer", "searchProviderInfo": {"name": "Google", "searchLinkUrlTemplate": "https://www.google.com/search?q={query}&hl=en"}, "label": "Mortimer's PRs", "datasource": "github", "requestOptions": {"datasourceFilter": "JIRA", "datasourcesFilter": ["JIRA"], "queryOverridesFacetFilters": true, "facetFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "facetFilterSets": [{"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}, {"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}], "facetBucketSize": 867945, "authTokens": [{"accessToken": "123abc", "datasource": "gmail", "scope": "email profile https://www.googleapis.com/auth/gmail.readonly", "tokenType": "Bearer", "authUser": "1"}]}, "ranges": [{"startIndex": 617092, "document": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "components": ["Backend", "Networking"], "status": "[\"Done\"]", "pins": [{"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}, {"audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "documentId": ""}], "collections": [{"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}, {"name": "", "description": "whoever peppery lest knife publication faint concerning", "addedRoles": [{"role": "OWNER"}], "removedRoles": [{"role": "ANSWER_MODERATOR"}, {"role": "ANSWER_MODERATOR"}], "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 554319, "items": [{"collectionId": 954550, "shortcut": {"inputAlias": "", "roles": [{"role": "OWNER"}, {"role": "OWNER"}, {"role": "OWNER"}]}, "itemType": "COLLECTION"}]}], "interactions": {"reacts": [{}, {}], "shares": [{"numDaysAgo": 448639}]}, "verification": {"state": "DEPRECATED", "metadata": {"reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}, {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 640737}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 872106}}}, "shortcuts": [{"inputAlias": ""}, {"inputAlias": ""}], "customData": {"someCustomField": {}}}}}], "inputDetails": {"hasCopyPaste": true}}, "results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}]}], "metadata": {"type": "FULL_TIME", "title": "Actor", "department": "Movies", "email": "george@example.com", "location": "Hollywood, CA", "phone": "6505551234", "photoUrl": "https://example.com/george.jpg", "startDate": "2000-01-23", "datasourceProfile": [{"datasource": "github", "handle": ""}], "querySuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}]}, "inviteInfo": {"invites": [{}, {}, {}]}, "customFields": [{"label": "", "values": [{}], "displayable": true}], "badges": [{"key": "deployment_name_new_hire", "displayName": "New hire", "iconConfig": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}]}}, "activity": "ALL"}]}, "overviewResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "assistantResponse": {"perUserInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "agentsResponse": {"topAgentsInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "topUseCasesInsights": [{"topAgentIcon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentsUsageByDepartmentInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}], "agentUsersInsights": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "agentsTimeSavedInsights": [{"icon": {"color": "#343CED", "key": "person_icon", "iconType": "GLYPH", "name": "user"}}]}} messages: speakeasy-default-messages: requestBody: @@ -9546,6 +9658,28 @@ examples: application/json: {"configuration": {"values": {}}} "400": application/json: {} + getDatasourceCredentialStatus: + speakeasy-default-get-datasource-credential-status: + parameters: + path: + datasourceInstanceId: "o365sharepoint_abc123" + responses: + "200": + application/json: {"status": "VALID"} + "400": + application/json: {} + rotateDatasourceCredentials: + speakeasy-default-rotate-datasource-credentials: + parameters: + path: + datasourceInstanceId: "o365sharepoint_abc123" + requestBody: + application/json: {"credentials": {"values": {"key": {}}}} + responses: + "200": + application/json: {"status": "MISSING"} + "400": + application/json: {} examplesVersion: 1.0.2 generatedTests: activity: "2025-06-09T18:03:44Z" @@ -9688,6 +9822,7 @@ generatedTests: get_/rest/api/v1/tools/list: "2025-06-09T18:03:44Z" post_/rest/api/v1/tools/call: "2025-06-09T18:03:44Z" listpolicies: "2025-06-09T18:03:44Z" +releaseNotes: "## Java SDK Changes:\n* `glean.client.collections.addItems()`: `response.error.errorType.enum(corruptItem)` **Added** (Breaking ⚠️)\n* `glean.datasources.getDatasourceCredentialStatus()`: **Added**\n* `glean.datasources.rotateDatasourceCredentials()`: **Added**\n* `glean.client.collections.create()`: \n * `response.union(class (0)).error.errorCode.enum(corruptItem)` **Added**\n * `errorCode.enum(corruptItem)` **Added**\n* `glean.client.collections.delete()`: `errorCode.enum(corruptItem)` **Added**\n* `glean.client.collections.update()`: \n * `response` **Changed**\n * `errorCode.enum(corruptItem)` **Added**\n* `glean.client.collections.retrieve()`: `response.error.errorCode.enum(corruptItem)` **Added**\n* `glean.client.insights.retrieve()`: \n * `request.insightsRequest.mcpBreakdownRequest` **Added**\n * `response.agentsResponse.topUseCasesInsights` **Added**\n* `glean.client.search.retrieveFeed()`: \n * `request.feedRequest.categories[].enum(projectFocusBlock)` **Added**\n * `response.results[]` **Changed**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 008fd755..82b855ca 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.12.38 + version: 0.12.39 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index e084beac..11c1af1c 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: 0aa266469924048ad422bf6314104f79b477e46a + x-source-commit-sha: b0dfb9e760c6eef2148e9637e279283c2ad60818 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: 122e22b59935f3ed61845da28a7c607ebc115c9b + x-open-api-commit-sha: 975175338f255469ecfc324be3c37e64cbf632fd x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -4014,6 +4014,93 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' x-visibility: Preview + /rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus: + get: + operationId: getDatasourceCredentialStatus + summary: Get datasource instance credential status + description: | + Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + tags: + - Datasources + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/datasourceInstanceId' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatasourceCredentialStatusResponse' + "400": + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-visibility: Preview + /rest/api/v1/datasource/{datasourceInstanceId}/credentials: + post: + operationId: rotateDatasourceCredentials + summary: Rotate datasource instance credentials + description: | + Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}. + tags: + - Datasources + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/datasourceInstanceId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RotateDatasourceCredentialsRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatasourceCredentialStatusResponse' + "400": + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-visibility: Preview /rest/api/v1/chat#stream: post: tags: @@ -8709,6 +8796,7 @@ components: type: string enum: - EXISTING_ITEM + - CORRUPT_ITEM AddCollectionItemsResponse: properties: collection: @@ -8738,6 +8826,7 @@ components: - HEIGHT_VIOLATION - WIDTH_VIOLATION - NO_PERMISSIONS + - CORRUPT_ITEM CreateCollectionResponse: allOf: - type: object @@ -8988,6 +9077,44 @@ components: dayRange: $ref: "#/components/schemas/Period" description: Time period for which Insights are requested. + McpBreakdownInsightsRequest: + properties: + departments: + type: array + items: + type: string + description: Departments for which Insights are requested. + managerIds: + type: array + items: + type: string + description: Manager user IDs whose teams should be filtered for. Empty array means no filtering. + dayRange: + $ref: "#/components/schemas/Period" + description: Time period for which Insights are requested. + breakdownType: + type: string + enum: + - USERS + - HOST_APPLICATIONS + - TOOLS + - SERVERS + description: Type of breakdown to return. + hostApplications: + type: array + items: + type: string + description: Host applications to filter by. Empty array means all host applications. + tools: + type: array + items: + type: string + description: MCP tools to filter by. Empty array means all tools. + servers: + type: array + items: + type: string + description: MCP servers to filter by. Empty array means all servers. InsightsRequest: properties: overviewRequest: @@ -9002,6 +9129,8 @@ components: $ref: "#/components/schemas/AgentsInsightsV2Request" x-visibility: Public description: If specified, will return data for the Agents section of the Insights Dashboard. + mcpBreakdownRequest: + $ref: "#/components/schemas/McpBreakdownInsightsRequest" disablePerUserInsights: type: boolean description: If true, suppresses the generation of per-user Insights in the response. Default is false. @@ -9052,10 +9181,10 @@ components: properties: monthlyActiveUsers: type: integer - description: Number of current Monthly Active Users, in the specified departments. + description: Number of current Monthly Active Users. weeklyActiveUsers: type: integer - description: Number of current Weekly Active Users, in the specified departments. + description: Number of current Weekly Active Users. InsightsSearchSummary: allOf: - $ref: "#/components/schemas/CurrentActiveUsers" @@ -9286,6 +9415,33 @@ components: downvoteCount: type: integer description: Total number of downvotes for this agent over the specified time period. + AgentUseCaseInsight: + properties: + useCase: + type: string + description: Use case name + runCount: + type: integer + description: Total number of runs for this use case over the specified time period. + trend: + type: number + format: float + description: Percentage change in runs compared to the previous equivalent time period. + topDepartments: + type: string + description: Comma-separated list of the top departments using this use case. + topAgentId: + type: string + description: ID of the most-used agent for this use case. + topAgentName: + type: string + description: Name of the most-used agent for this use case. + topAgentIcon: + $ref: "#/components/schemas/IconConfig" + description: Icon of the most-used agent for this use case. + topAgentIsDeleted: + type: boolean + description: Indicates whether the top agent has been deleted. AgentsUsageByDepartmentInsight: properties: department: @@ -9375,6 +9531,10 @@ components: type: array items: $ref: "#/components/schemas/PerAgentInsight" + topUseCasesInsights: + type: array + items: + $ref: "#/components/schemas/AgentUseCaseInsight" agentsUsageByDepartmentInsights: type: array items: @@ -10196,6 +10356,7 @@ components: - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP description: Categories of content requested. An allowlist gives flexibility to request content separately or together. requestOptions: @@ -10533,6 +10694,7 @@ components: - SHORTCUTS_TYPE - SLIDE_TYPE - SPREADSHEET_TYPE + - INLINE_HTML_TYPE - WORKFLOWS_TYPE FavoriteInfo: type: object @@ -10706,6 +10868,7 @@ components: - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP description: Type of the justification. justification: @@ -10789,6 +10952,7 @@ components: - FOLLOW_UP - MILESTONE_TIMELINE_CHECK - PROJECT_DISCUSSION_DIGEST + - PROJECT_FOCUS_BLOCK - PROJECT_NEXT_STEP description: Category of the result, one of the requested categories in incoming request. primaryEntry: @@ -13841,6 +14005,46 @@ components: - configuration description: | Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. + DatasourceCredentialStatus: + type: string + enum: + - VALID + - VALID_WITH_WARNINGS + - VALIDATING + - INVALID + - MISSING + description: | + Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + DatasourceCredentialStatusResponse: + type: object + properties: + status: + $ref: '#/components/schemas/DatasourceCredentialStatus' + lastRotatedAt: + type: string + format: date-time + description: When the credentials were last rotated. Omitted when not known. + expiresAt: + type: string + format: date-time + description: | + When the active credentials expire. Omitted when not known or not applicable to this credential type. + message: + type: string + description: Optional human-readable detail about the current credential status. + required: + - status + description: Status of the credentials currently installed for a datasource instance. + RotateDatasourceCredentialsRequest: + type: object + properties: + credentials: + $ref: '#/components/schemas/DatasourceInstanceConfiguration' + required: + - credentials + description: | + Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. ChatRequestStream: required: - messages @@ -13914,6 +14118,14 @@ components: schema: type: string example: o365sharepoint_abc123 + datasourceInstanceId: + name: datasourceInstanceId + in: path + description: The full datasource instance identifier (e.g. o365sharepoint_abc123) + required: true + schema: + type: string + example: o365sharepoint_abc123 responses: SuccessResponse: description: OK diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5d86601b..2755d4ba 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.761.8 +speakeasyVersion: 1.761.9 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6 - sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3 + sourceRevisionDigest: sha256:362782ee6cd0011223dca70ca5ded96d66d148905772516fe52e1da42d5d02a2 + sourceBlobDigest: sha256:257c45d600fc3d7559f52235e2d52a3c6b6c09242160852bbc8a810b27bd9537 tags: - latest Glean-OAS: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:5fafd8224d41224b85cbb5f39c686e5da647fadcd8211bc9fae3c0834341dae6 - sourceBlobDigest: sha256:884a6119e9d59c15d47e169eaa496571dae1c106d390990aee38a25cb51e42c3 + sourceRevisionDigest: sha256:362782ee6cd0011223dca70ca5ded96d66d148905772516fe52e1da42d5d02a2 + sourceBlobDigest: sha256:257c45d600fc3d7559f52235e2d52a3c6b6c09242160852bbc8a810b27bd9537 codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:ae9e0d92820a63defd05d413b6e301b7717405a6b9a992c754166897b2d7cb45 + codeSamplesRevisionDigest: sha256:8b313f02415b6d8207a31cf9285a19d7c83872589fd5a44f1b0ccd0f503e82f3 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 7d62a851..23d259c4 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.12.38' +implementation 'com.glean.api-client:glean-api-client:0.12.39' ``` Maven: @@ -75,7 +75,7 @@ Maven: com.glean.api-client glean-api-client - 0.12.38 + 0.12.39 ``` @@ -545,6 +545,8 @@ For more information on obtaining the appropriate token type, please contact you * [getDatasourceInstanceConfiguration](docs/sdks/datasources/README.md#getdatasourceinstanceconfiguration) - Get datasource instance configuration * [updateDatasourceInstanceConfiguration](docs/sdks/datasources/README.md#updatedatasourceinstanceconfiguration) - Update datasource instance configuration +* [getDatasourceCredentialStatus](docs/sdks/datasources/README.md#getdatasourcecredentialstatus) - Get datasource instance credential status +* [rotateDatasourceCredentials](docs/sdks/datasources/README.md#rotatedatasourcecredentials) - Rotate datasource instance credentials ### [Governance](docs/sdks/governance/README.md) @@ -713,9 +715,9 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`GleanError`](./src/main/java/models/errors/GleanError.java)**: -* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 6 of 116 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 116 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 116 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 8 of 118 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 118 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 118 methods.* diff --git a/RELEASES.md b/RELEASES.md index aee99e8c..398c5921 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -728,4 +728,14 @@ Based on: ### Generated - [java v0.12.38] . ### Releases -- [Maven Central v0.12.38] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.38 - . \ No newline at end of file +- [Maven Central v0.12.38] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.38 - . + +## 2026-04-29 03:47:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.9 (2.881.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.12.39] . +### Releases +- [Maven Central v0.12.39] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.12.39 - . \ No newline at end of file diff --git a/docs/models/components/AddCollectionItemsErrorErrorType.md b/docs/models/components/AddCollectionItemsErrorErrorType.md index e99e1758..fc3c9d3c 100644 --- a/docs/models/components/AddCollectionItemsErrorErrorType.md +++ b/docs/models/components/AddCollectionItemsErrorErrorType.md @@ -6,6 +6,9 @@ import com.glean.api_client.glean_api_client.models.components.AddCollectionItemsErrorErrorType; AddCollectionItemsErrorErrorType value = AddCollectionItemsErrorErrorType.EXISTING_ITEM; + +// Open enum: use .of() to create instances from custom string values +AddCollectionItemsErrorErrorType custom = AddCollectionItemsErrorErrorType.of("custom_value"); ``` @@ -13,4 +16,5 @@ AddCollectionItemsErrorErrorType value = AddCollectionItemsErrorErrorType.EXISTI | Name | Value | | --------------- | --------------- | -| `EXISTING_ITEM` | EXISTING_ITEM | \ No newline at end of file +| `EXISTING_ITEM` | EXISTING_ITEM | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/components/AgentUseCaseInsight.md b/docs/models/components/AgentUseCaseInsight.md new file mode 100644 index 00000000..81603b56 --- /dev/null +++ b/docs/models/components/AgentUseCaseInsight.md @@ -0,0 +1,15 @@ +# AgentUseCaseInsight + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `useCase` | *Optional\* | :heavy_minus_sign: | Use case name | | +| `runCount` | *Optional\* | :heavy_minus_sign: | Total number of runs for this use case over the specified time period. | | +| `trend` | *Optional\* | :heavy_minus_sign: | Percentage change in runs compared to the previous equivalent time period. | | +| `topDepartments` | *Optional\* | :heavy_minus_sign: | Comma-separated list of the top departments using this use case. | | +| `topAgentId` | *Optional\* | :heavy_minus_sign: | ID of the most-used agent for this use case. | | +| `topAgentName` | *Optional\* | :heavy_minus_sign: | Name of the most-used agent for this use case. | | +| `topAgentIcon` | [Optional\](../../models/components/IconConfig.md) | :heavy_minus_sign: | Defines how to render an icon | {
"color": "#343CED",
"key": "person_icon",
"iconType": "GLYPH",
"name": "user"
} | +| `topAgentIsDeleted` | *Optional\* | :heavy_minus_sign: | Indicates whether the top agent has been deleted. | | \ No newline at end of file diff --git a/docs/models/components/AgentsInsightsV2Response.md b/docs/models/components/AgentsInsightsV2Response.md index a7445ae6..97b170bb 100644 --- a/docs/models/components/AgentsInsightsV2Response.md +++ b/docs/models/components/AgentsInsightsV2Response.md @@ -5,13 +5,14 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `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 | | `sharedAgentsCount` | *Optional\* | :heavy_minus_sign: | Total number of shared agents. | | `topAgentsInsights` | List\<[PerAgentInsight](../../models/components/PerAgentInsight.md)> | :heavy_minus_sign: | N/A | +| `topUseCasesInsights` | List\<[AgentUseCaseInsight](../../models/components/AgentUseCaseInsight.md)> | :heavy_minus_sign: | N/A | | `agentsUsageByDepartmentInsights` | List\<[AgentsUsageByDepartmentInsight](../../models/components/AgentsUsageByDepartmentInsight.md)> | :heavy_minus_sign: | N/A | | `agentUsersInsights` | List\<[AgentUsersInsight](../../models/components/AgentUsersInsight.md)> | :heavy_minus_sign: | N/A | | `agentsTimeSavedInsights` | List\<[AgentsTimeSavedInsight](../../models/components/AgentsTimeSavedInsight.md)> | :heavy_minus_sign: | Insights for agents time saved over the specified time period. | diff --git a/docs/models/components/AssistantInsightsResponse.md b/docs/models/components/AssistantInsightsResponse.md index c38e5af7..72f73795 100644 --- a/docs/models/components/AssistantInsightsResponse.md +++ b/docs/models/components/AssistantInsightsResponse.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `lastUpdatedTs` | *Optional\* | :heavy_minus_sign: | Unix timestamp of the last update for the insights data in the response. | | `monthlyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | | `weeklyActiveUserTimeseries` | [Optional\](../../models/components/LabeledCountInfo.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/BreakdownType.md b/docs/models/components/BreakdownType.md new file mode 100644 index 00000000..dc711a99 --- /dev/null +++ b/docs/models/components/BreakdownType.md @@ -0,0 +1,21 @@ +# BreakdownType + +Type of breakdown to return. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.BreakdownType; + +BreakdownType value = BreakdownType.USERS; +``` + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `USERS` | USERS | +| `HOST_APPLICATIONS` | HOST_APPLICATIONS | +| `TOOLS` | TOOLS | +| `SERVERS` | SERVERS | \ No newline at end of file diff --git a/docs/models/components/CollectionErrorErrorCode.md b/docs/models/components/CollectionErrorErrorCode.md index 6001f0d5..6e9466bb 100644 --- a/docs/models/components/CollectionErrorErrorCode.md +++ b/docs/models/components/CollectionErrorErrorCode.md @@ -22,4 +22,5 @@ CollectionErrorErrorCode custom = CollectionErrorErrorCode.of("custom_value"); | `CONCURRENT_HIERARCHY_EDIT` | CONCURRENT_HIERARCHY_EDIT | | `HEIGHT_VIOLATION` | HEIGHT_VIOLATION | | `WIDTH_VIOLATION` | WIDTH_VIOLATION | -| `NO_PERMISSIONS` | NO_PERMISSIONS | \ No newline at end of file +| `NO_PERMISSIONS` | NO_PERMISSIONS | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/components/CurrentActiveUsers.md b/docs/models/components/CurrentActiveUsers.md index 68ea377f..f73a3a4e 100644 --- a/docs/models/components/CurrentActiveUsers.md +++ b/docs/models/components/CurrentActiveUsers.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users. | \ No newline at end of file diff --git a/docs/models/components/DatasourceCredentialStatus.md b/docs/models/components/DatasourceCredentialStatus.md new file mode 100644 index 00000000..65397c4e --- /dev/null +++ b/docs/models/components/DatasourceCredentialStatus.md @@ -0,0 +1,26 @@ +# DatasourceCredentialStatus + +Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past. + + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatus; + +DatasourceCredentialStatus value = DatasourceCredentialStatus.VALID; + +// Open enum: use .of() to create instances from custom string values +DatasourceCredentialStatus custom = DatasourceCredentialStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `VALID` | VALID | +| `VALID_WITH_WARNINGS` | VALID_WITH_WARNINGS | +| `VALIDATING` | VALIDATING | +| `INVALID` | INVALID | +| `MISSING` | MISSING | \ No newline at end of file diff --git a/docs/models/components/DatasourceCredentialStatusResponse.md b/docs/models/components/DatasourceCredentialStatusResponse.md new file mode 100644 index 00000000..0febb853 --- /dev/null +++ b/docs/models/components/DatasourceCredentialStatusResponse.md @@ -0,0 +1,13 @@ +# DatasourceCredentialStatusResponse + +Status of the credentials currently installed for a datasource instance. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `status` | [DatasourceCredentialStatus](../../models/components/DatasourceCredentialStatus.md) | :heavy_check_mark: | Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID plus a non-null `expiresAt` in the past.
| +| `lastRotatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | When the credentials were last rotated. Omitted when not known. | +| `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | When the active credentials expire. Omitted when not known or not applicable to this credential type.
| +| `message` | *Optional\* | :heavy_minus_sign: | Optional human-readable detail about the current credential status. | \ No newline at end of file diff --git a/docs/models/components/EditCollectionResponseErrorCode.md b/docs/models/components/EditCollectionResponseErrorCode.md index 926c3604..f9bb7c3c 100644 --- a/docs/models/components/EditCollectionResponseErrorCode.md +++ b/docs/models/components/EditCollectionResponseErrorCode.md @@ -22,4 +22,5 @@ EditCollectionResponseErrorCode custom = EditCollectionResponseErrorCode.of("cus | `CONCURRENT_HIERARCHY_EDIT` | CONCURRENT_HIERARCHY_EDIT | | `HEIGHT_VIOLATION` | HEIGHT_VIOLATION | | `WIDTH_VIOLATION` | WIDTH_VIOLATION | -| `NO_PERMISSIONS` | NO_PERMISSIONS | \ No newline at end of file +| `NO_PERMISSIONS` | NO_PERMISSIONS | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/components/FeedRequestCategory.md b/docs/models/components/FeedRequestCategory.md index 6c389ae9..e6c55eb5 100644 --- a/docs/models/components/FeedRequestCategory.md +++ b/docs/models/components/FeedRequestCategory.md @@ -48,4 +48,5 @@ FeedRequestCategory value = FeedRequestCategory.DOCUMENT_SUGGESTION; | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | | `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file diff --git a/docs/models/components/FeedResultCategory.md b/docs/models/components/FeedResultCategory.md index f77c72da..1ea630d7 100644 --- a/docs/models/components/FeedResultCategory.md +++ b/docs/models/components/FeedResultCategory.md @@ -53,4 +53,5 @@ FeedResultCategory custom = FeedResultCategory.of("custom_value"); | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | | `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file diff --git a/docs/models/components/InsightsChatSummary.md b/docs/models/components/InsightsChatSummary.md index 95d7ce68..e5c3e11e 100644 --- a/docs/models/components/InsightsChatSummary.md +++ b/docs/models/components/InsightsChatSummary.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `numChats` | *Optional\* | :heavy_minus_sign: | Total number of chats by users over the specified time period. | | `numChatUsers` | *Optional\* | :heavy_minus_sign: | Total number of distinct users who used Chat over the specified time period. | \ No newline at end of file diff --git a/docs/models/components/InsightsOverviewResponse.md b/docs/models/components/InsightsOverviewResponse.md index 6e556f24..e73c17de 100644 --- a/docs/models/components/InsightsOverviewResponse.md +++ b/docs/models/components/InsightsOverviewResponse.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `departments` | List\<*String*> | :heavy_minus_sign: | Department name(s). | | `employeeCount` | *Optional\* | :heavy_minus_sign: | Number of current employees in the specified departments, according to the Org Chart. | | `totalSignups` | *Optional\* | :heavy_minus_sign: | Number of current signed up employees in the specified departments, according to the Org Chart. | diff --git a/docs/models/components/InsightsRequest.md b/docs/models/components/InsightsRequest.md index 775529b9..9de12b89 100644 --- a/docs/models/components/InsightsRequest.md +++ b/docs/models/components/InsightsRequest.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `overviewRequest` | [Optional\](../../models/components/InsightsOverviewRequest.md) | :heavy_minus_sign: | N/A | -| `assistantRequest` | [Optional\](../../models/components/InsightsAssistantRequest.md) | :heavy_minus_sign: | N/A | -| `agentsRequest` | [Optional\](../../models/components/AgentsInsightsV2Request.md) | :heavy_minus_sign: | N/A | -| `disablePerUserInsights` | *Optional\* | :heavy_minus_sign: | If true, suppresses the generation of per-user Insights in the response. Default is false. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `overviewRequest` | [Optional\](../../models/components/InsightsOverviewRequest.md) | :heavy_minus_sign: | N/A | +| `assistantRequest` | [Optional\](../../models/components/InsightsAssistantRequest.md) | :heavy_minus_sign: | N/A | +| `agentsRequest` | [Optional\](../../models/components/AgentsInsightsV2Request.md) | :heavy_minus_sign: | N/A | +| `mcpBreakdownRequest` | [Optional\](../../models/components/McpBreakdownInsightsRequest.md) | :heavy_minus_sign: | N/A | +| `disablePerUserInsights` | *Optional\* | :heavy_minus_sign: | If true, suppresses the generation of per-user Insights in the response. Default is false. | \ No newline at end of file diff --git a/docs/models/components/InsightsSearchSummary.md b/docs/models/components/InsightsSearchSummary.md index a9c16853..07f9c26e 100644 --- a/docs/models/components/InsightsSearchSummary.md +++ b/docs/models/components/InsightsSearchSummary.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users, in the specified departments. | -| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users, in the specified departments. | +| `monthlyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Monthly Active Users. | +| `weeklyActiveUsers` | *Optional\* | :heavy_minus_sign: | Number of current Weekly Active Users. | | `numSearches` | *Optional\* | :heavy_minus_sign: | Total number of searches by users over the specified time period. | | `numSearchUsers` | *Optional\* | :heavy_minus_sign: | Total number of distinct users who searched over the specified time period. | \ No newline at end of file diff --git a/docs/models/components/JustificationType.md b/docs/models/components/JustificationType.md index 5b7bc75c..2134dd43 100644 --- a/docs/models/components/JustificationType.md +++ b/docs/models/components/JustificationType.md @@ -66,4 +66,5 @@ JustificationType custom = JustificationType.of("custom_value"); | `FOLLOW_UP` | FOLLOW_UP | | `MILESTONE_TIMELINE_CHECK` | MILESTONE_TIMELINE_CHECK | | `PROJECT_DISCUSSION_DIGEST` | PROJECT_DISCUSSION_DIGEST | +| `PROJECT_FOCUS_BLOCK` | PROJECT_FOCUS_BLOCK | | `PROJECT_NEXT_STEP` | PROJECT_NEXT_STEP | \ No newline at end of file diff --git a/docs/models/components/McpBreakdownInsightsRequest.md b/docs/models/components/McpBreakdownInsightsRequest.md new file mode 100644 index 00000000..25728584 --- /dev/null +++ b/docs/models/components/McpBreakdownInsightsRequest.md @@ -0,0 +1,14 @@ +# McpBreakdownInsightsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `departments` | List\<*String*> | :heavy_minus_sign: | Departments for which Insights are requested. | +| `managerIds` | List\<*String*> | :heavy_minus_sign: | Manager user IDs whose teams should be filtered for. Empty array means no filtering. | +| `dayRange` | [Optional\](../../models/components/Period.md) | :heavy_minus_sign: | N/A | +| `breakdownType` | [Optional\](../../models/components/BreakdownType.md) | :heavy_minus_sign: | Type of breakdown to return. | +| `hostApplications` | List\<*String*> | :heavy_minus_sign: | Host applications to filter by. Empty array means all host applications. | +| `tools` | List\<*String*> | :heavy_minus_sign: | MCP tools to filter by. Empty array means all tools. | +| `servers` | List\<*String*> | :heavy_minus_sign: | MCP servers to filter by. Empty array means all servers. | \ No newline at end of file diff --git a/docs/models/components/RotateDatasourceCredentialsRequest.md b/docs/models/components/RotateDatasourceCredentialsRequest.md new file mode 100644 index 00000000..0ce286ac --- /dev/null +++ b/docs/models/components/RotateDatasourceCredentialsRequest.md @@ -0,0 +1,12 @@ +# RotateDatasourceCredentialsRequest + +Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. +`credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. + + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `credentials` | [DatasourceInstanceConfiguration](../../models/components/DatasourceInstanceConfiguration.md) | :heavy_check_mark: | Configuration for a datasource instance | \ No newline at end of file diff --git a/docs/models/components/UgcType.md b/docs/models/components/UgcType.md index 38cabf93..82e801d1 100644 --- a/docs/models/components/UgcType.md +++ b/docs/models/components/UgcType.md @@ -33,4 +33,5 @@ UgcType custom = UgcType.of("custom_value"); | `SHORTCUTS_TYPE` | SHORTCUTS_TYPE | | `SLIDE_TYPE` | SLIDE_TYPE | | `SPREADSHEET_TYPE` | SPREADSHEET_TYPE | +| `INLINE_HTML_TYPE` | INLINE_HTML_TYPE | | `WORKFLOWS_TYPE` | WORKFLOWS_TYPE | \ No newline at end of file diff --git a/docs/models/errors/ErrorCode.md b/docs/models/errors/ErrorCode.md index 72cc6cb3..b0c03577 100644 --- a/docs/models/errors/ErrorCode.md +++ b/docs/models/errors/ErrorCode.md @@ -22,4 +22,5 @@ ErrorCode custom = ErrorCode.of("custom_value"); | `CONCURRENT_HIERARCHY_EDIT` | CONCURRENT_HIERARCHY_EDIT | | `HEIGHT_VIOLATION` | HEIGHT_VIOLATION | | `WIDTH_VIOLATION` | WIDTH_VIOLATION | -| `NO_PERMISSIONS` | NO_PERMISSIONS | \ No newline at end of file +| `NO_PERMISSIONS` | NO_PERMISSIONS | +| `CORRUPT_ITEM` | CORRUPT_ITEM | \ No newline at end of file diff --git a/docs/models/operations/GetDatasourceCredentialStatusRequest.md b/docs/models/operations/GetDatasourceCredentialStatusRequest.md new file mode 100644 index 00000000..5dd66a28 --- /dev/null +++ b/docs/models/operations/GetDatasourceCredentialStatusRequest.md @@ -0,0 +1,8 @@ +# GetDatasourceCredentialStatusRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `datasourceInstanceId` | *String* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | \ No newline at end of file diff --git a/docs/models/operations/GetDatasourceCredentialStatusResponse.md b/docs/models/operations/GetDatasourceCredentialStatusResponse.md new file mode 100644 index 00000000..3291d9ec --- /dev/null +++ b/docs/models/operations/GetDatasourceCredentialStatusResponse.md @@ -0,0 +1,11 @@ +# GetDatasourceCredentialStatusResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `datasourceCredentialStatusResponse` | [Optional\](../../models/components/DatasourceCredentialStatusResponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/RotateDatasourceCredentialsRequest.md b/docs/models/operations/RotateDatasourceCredentialsRequest.md new file mode 100644 index 00000000..ac1499dc --- /dev/null +++ b/docs/models/operations/RotateDatasourceCredentialsRequest.md @@ -0,0 +1,9 @@ +# RotateDatasourceCredentialsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `datasourceInstanceId` | *String* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | +| `rotateDatasourceCredentialsRequest` | [RotateDatasourceCredentialsRequest](../../models/components/RotateDatasourceCredentialsRequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/RotateDatasourceCredentialsResponse.md b/docs/models/operations/RotateDatasourceCredentialsResponse.md new file mode 100644 index 00000000..86053393 --- /dev/null +++ b/docs/models/operations/RotateDatasourceCredentialsResponse.md @@ -0,0 +1,11 @@ +# RotateDatasourceCredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `datasourceCredentialStatusResponse` | [Optional\](../../models/components/DatasourceCredentialStatusResponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdks/datasources/README.md b/docs/sdks/datasources/README.md index 09ef42fc..c00393df 100644 --- a/docs/sdks/datasources/README.md +++ b/docs/sdks/datasources/README.md @@ -8,6 +8,8 @@ Manage datasources. * [getDatasourceInstanceConfiguration](#getdatasourceinstanceconfiguration) - Get datasource instance configuration * [updateDatasourceInstanceConfiguration](#updatedatasourceinstanceconfiguration) - Update datasource instance configuration +* [getDatasourceCredentialStatus](#getdatasourcecredentialstatus) - Get datasource instance credential status +* [rotateDatasourceCredentials](#rotatedatasourcecredentials) - Rotate datasource instance credentials ## getDatasourceInstanceConfiguration @@ -122,6 +124,121 @@ public class Application { ### Errors +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| models/errors/ErrorResponse | 400, 403, 404 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## getDatasourceCredentialStatus + +Returns the current credential status for a datasource instance. Access is limited to callers with the ADMIN scope; the handler enforces this check. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.ErrorResponse; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorResponse, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + GetDatasourceCredentialStatusResponse res = sdk.datasources().getDatasourceCredentialStatus() + .datasourceInstanceId("o365sharepoint_abc123") + .call(); + + if (res.datasourceCredentialStatusResponse().isPresent()) { + System.out.println(res.datasourceCredentialStatusResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `datasourceInstanceId` | *String* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | + +### Response + +**[GetDatasourceCredentialStatusResponse](../../models/operations/GetDatasourceCredentialStatusResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| models/errors/ErrorResponse | 400, 403, 404 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## rotateDatasourceCredentials + +Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces the active credential material with the supplied values and returns the credential status after rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. +Only keys recognized as credential material for the datasource type may be set in `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; other instance configuration must be updated via PATCH /configure/datasources/{datasourceId}/instances/{instanceId}. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.components.*; +import com.glean.api_client.glean_api_client.models.errors.ErrorResponse; +import com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsResponse; +import java.lang.Exception; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws ErrorResponse, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + RotateDatasourceCredentialsResponse res = sdk.datasources().rotateDatasourceCredentials() + .datasourceInstanceId("o365sharepoint_abc123") + .rotateDatasourceCredentialsRequest(RotateDatasourceCredentialsRequest.builder() + .credentials(DatasourceInstanceConfiguration.builder() + .values(Map.ofEntries( + Map.entry("key", ConfigurationValue.builder() + .build()))) + .build()) + .build()) + .call(); + + if (res.datasourceCredentialStatusResponse().isPresent()) { + System.out.println(res.datasourceCredentialStatusResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `datasourceInstanceId` | *String* | :heavy_check_mark: | The full datasource instance identifier (e.g. o365sharepoint_abc123) | o365sharepoint_abc123 | +| `rotateDatasourceCredentialsRequest` | [RotateDatasourceCredentialsRequest](../../models/components/RotateDatasourceCredentialsRequest.md) | :heavy_check_mark: | N/A | | + +### Response + +**[RotateDatasourceCredentialsResponse](../../models/operations/RotateDatasourceCredentialsResponse.md)** + +### Errors + | Error Type | Status Code | Content Type | | --------------------------- | --------------------------- | --------------------------- | | models/errors/ErrorResponse | 400, 403, 404 | application/json | diff --git a/gradle.properties b/gradle.properties index b1ea0f0f..5a6fd75a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.12.38 +version=0.12.39 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncDatasources.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncDatasources.java index 9e740ee2..52bde479 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncDatasources.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncDatasources.java @@ -6,14 +6,22 @@ import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; +import com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest; import com.glean.api_client.glean_api_client.models.components.UpdateDatasourceConfigurationRequest; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusRequest; import com.glean.api_client.glean_api_client.models.operations.GetDatasourceInstanceConfigurationRequest; import com.glean.api_client.glean_api_client.models.operations.UpdateDatasourceInstanceConfigurationRequest; +import com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceCredentialStatusRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceCredentialStatusResponse; import com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceInstanceConfigurationRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceInstanceConfigurationResponse; +import com.glean.api_client.glean_api_client.models.operations.async.RotateDatasourceCredentialsRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.RotateDatasourceCredentialsResponse; import com.glean.api_client.glean_api_client.models.operations.async.UpdateDatasourceInstanceConfigurationRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.UpdateDatasourceInstanceConfigurationResponse; +import com.glean.api_client.glean_api_client.operations.GetDatasourceCredentialStatus; import com.glean.api_client.glean_api_client.operations.GetDatasourceInstanceConfiguration; +import com.glean.api_client.glean_api_client.operations.RotateDatasourceCredentials; import com.glean.api_client.glean_api_client.operations.UpdateDatasourceInstanceConfiguration; import com.glean.api_client.glean_api_client.utils.Headers; import java.lang.String; @@ -120,4 +128,88 @@ public CompletableFuture updateDa .thenCompose(operation::handleResponse); } + + /** + * Get datasource instance credential status + * + *

Returns the current credential status for a datasource instance. Access is limited to callers with + * the ADMIN scope; the handler enforces this check. + * + * @return The async call builder + */ + public GetDatasourceCredentialStatusRequestBuilder getDatasourceCredentialStatus() { + return new GetDatasourceCredentialStatusRequestBuilder(sdkConfiguration); + } + + /** + * Get datasource instance credential status + * + *

Returns the current credential status for a datasource instance. Access is limited to callers with + * the ADMIN scope; the handler enforces this check. + * + * @param datasourceInstanceId The full datasource instance identifier (e.g. o365sharepoint_abc123) + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture getDatasourceCredentialStatus(String datasourceInstanceId) { + GetDatasourceCredentialStatusRequest request = + GetDatasourceCredentialStatusRequest + .builder() + .datasourceInstanceId(datasourceInstanceId) + .build(); + AsyncRequestOperation operation + = new GetDatasourceCredentialStatus.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Rotate datasource instance credentials + * + *

Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces + * the active credential material with the supplied values and returns the credential status after + * rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + * Only keys recognized as credential material for the datasource type may be set in + * `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured + * auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a + * 400; other instance configuration must be updated via PATCH + * /configure/datasources/{datasourceId}/instances/{instanceId}. + * + * @return The async call builder + */ + public RotateDatasourceCredentialsRequestBuilder rotateDatasourceCredentials() { + return new RotateDatasourceCredentialsRequestBuilder(sdkConfiguration); + } + + /** + * Rotate datasource instance credentials + * + *

Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces + * the active credential material with the supplied values and returns the credential status after + * rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + * Only keys recognized as credential material for the datasource type may be set in + * `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured + * auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a + * 400; other instance configuration must be updated via PATCH + * /configure/datasources/{datasourceId}/instances/{instanceId}. + * + * @param datasourceInstanceId The full datasource instance identifier (e.g. o365sharepoint_abc123) + * @param rotateDatasourceCredentialsRequest Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + * `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. + * + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture rotateDatasourceCredentials(String datasourceInstanceId, RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest request = + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest + .builder() + .datasourceInstanceId(datasourceInstanceId) + .rotateDatasourceCredentialsRequest(rotateDatasourceCredentialsRequest) + .build(); + AsyncRequestOperation operation + = new RotateDatasourceCredentials.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Datasources.java b/src/main/java/com/glean/api_client/glean_api_client/Datasources.java index 316245fd..3f6dae5d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Datasources.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Datasources.java @@ -6,14 +6,22 @@ import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest; import com.glean.api_client.glean_api_client.models.components.UpdateDatasourceConfigurationRequest; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusRequest; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusResponse; import com.glean.api_client.glean_api_client.models.operations.GetDatasourceInstanceConfigurationRequest; import com.glean.api_client.glean_api_client.models.operations.GetDatasourceInstanceConfigurationRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.GetDatasourceInstanceConfigurationResponse; +import com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsResponse; import com.glean.api_client.glean_api_client.models.operations.UpdateDatasourceInstanceConfigurationRequest; import com.glean.api_client.glean_api_client.models.operations.UpdateDatasourceInstanceConfigurationRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.UpdateDatasourceInstanceConfigurationResponse; +import com.glean.api_client.glean_api_client.operations.GetDatasourceCredentialStatus; import com.glean.api_client.glean_api_client.operations.GetDatasourceInstanceConfiguration; +import com.glean.api_client.glean_api_client.operations.RotateDatasourceCredentials; import com.glean.api_client.glean_api_client.operations.UpdateDatasourceInstanceConfiguration; import com.glean.api_client.glean_api_client.utils.Headers; import java.lang.String; @@ -117,4 +125,86 @@ public UpdateDatasourceInstanceConfigurationResponse updateDatasourceInstanceCon return operation.handleResponse(operation.doRequest(request)); } + /** + * Get datasource instance credential status + * + *

Returns the current credential status for a datasource instance. Access is limited to callers with + * the ADMIN scope; the handler enforces this check. + * + * @return The call builder + */ + public GetDatasourceCredentialStatusRequestBuilder getDatasourceCredentialStatus() { + return new GetDatasourceCredentialStatusRequestBuilder(sdkConfiguration); + } + + /** + * Get datasource instance credential status + * + *

Returns the current credential status for a datasource instance. Access is limited to callers with + * the ADMIN scope; the handler enforces this check. + * + * @param datasourceInstanceId The full datasource instance identifier (e.g. o365sharepoint_abc123) + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetDatasourceCredentialStatusResponse getDatasourceCredentialStatus(String datasourceInstanceId) { + GetDatasourceCredentialStatusRequest request = + GetDatasourceCredentialStatusRequest + .builder() + .datasourceInstanceId(datasourceInstanceId) + .build(); + RequestOperation operation + = new GetDatasourceCredentialStatus.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Rotate datasource instance credentials + * + *

Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces + * the active credential material with the supplied values and returns the credential status after + * rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + * Only keys recognized as credential material for the datasource type may be set in + * `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured + * auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a + * 400; other instance configuration must be updated via PATCH + * /configure/datasources/{datasourceId}/instances/{instanceId}. + * + * @return The call builder + */ + public RotateDatasourceCredentialsRequestBuilder rotateDatasourceCredentials() { + return new RotateDatasourceCredentialsRequestBuilder(sdkConfiguration); + } + + /** + * Rotate datasource instance credentials + * + *

Rotates the credentials that a datasource instance uses to connect to its upstream system. Replaces + * the active credential material with the supplied values and returns the credential status after + * rotation. Access is limited to callers with the ADMIN scope; the handler enforces this check. + * Only keys recognized as credential material for the datasource type may be set in + * `credentials.values` (e.g. `clientSecret`, `apiToken`, `privateKey`, depending on the configured + * auth method). Unrecognized keys, or keys that correspond to non-credential configuration, cause a + * 400; other instance configuration must be updated via PATCH + * /configure/datasources/{datasourceId}/instances/{instanceId}. + * + * @param datasourceInstanceId The full datasource instance identifier (e.g. o365sharepoint_abc123) + * @param rotateDatasourceCredentialsRequest Request to rotate the credentials used by a datasource instance. Replaces the active credential material with the supplied values. + * `credentials.values` must contain only keys recognized as credential material for the datasource type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause a 400; use the configure endpoint to change non-credential config. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public RotateDatasourceCredentialsResponse rotateDatasourceCredentials(String datasourceInstanceId, RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest request = + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest + .builder() + .datasourceInstanceId(datasourceInstanceId) + .rotateDatasourceCredentialsRequest(rotateDatasourceCredentialsRequest) + .build(); + RequestOperation operation + = new RotateDatasourceCredentials.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java index 308a8482..447cc816 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java +++ b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java @@ -25,8 +25,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.12.38"; - public static final String GEN_VERSION = "2.881.2"; + public static final String SDK_VERSION = "0.12.39"; + public static final String GEN_VERSION = "2.881.4"; 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/AddCollectionItemsErrorErrorType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsErrorErrorType.java index 5d51dbd7..2998506c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsErrorErrorType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsErrorErrorType.java @@ -22,6 +22,7 @@ public class AddCollectionItemsErrorErrorType { public static final AddCollectionItemsErrorErrorType EXISTING_ITEM = new AddCollectionItemsErrorErrorType("EXISTING_ITEM"); + public static final AddCollectionItemsErrorErrorType CORRUPT_ITEM = new AddCollectionItemsErrorErrorType("CORRUPT_ITEM"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -96,19 +97,22 @@ public static AddCollectionItemsErrorErrorType[] values() { private static final Map createValuesMap() { Map map = new LinkedHashMap<>(); map.put("EXISTING_ITEM", EXISTING_ITEM); + map.put("CORRUPT_ITEM", CORRUPT_ITEM); return map; } private static final Map createEnumsMap() { Map map = new HashMap<>(); map.put("EXISTING_ITEM", AddCollectionItemsErrorErrorTypeEnum.EXISTING_ITEM); + map.put("CORRUPT_ITEM", AddCollectionItemsErrorErrorTypeEnum.CORRUPT_ITEM); return map; } public enum AddCollectionItemsErrorErrorTypeEnum { - EXISTING_ITEM("EXISTING_ITEM"),; + EXISTING_ITEM("EXISTING_ITEM"), + CORRUPT_ITEM("CORRUPT_ITEM"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentUseCaseInsight.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentUseCaseInsight.java new file mode 100644 index 00000000..b6ca3475 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentUseCaseInsight.java @@ -0,0 +1,560 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8be03b038a72 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; +import java.lang.Float; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class AgentUseCaseInsight { + /** + * Use case name + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("useCase") + private Optional useCase; + + /** + * Total number of runs for this use case over the specified time period. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("runCount") + private Optional runCount; + + /** + * Percentage change in runs compared to the previous equivalent time period. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("trend") + private Optional trend; + + /** + * Comma-separated list of the top departments using this use case. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topDepartments") + private Optional topDepartments; + + /** + * ID of the most-used agent for this use case. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topAgentId") + private Optional topAgentId; + + /** + * Name of the most-used agent for this use case. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topAgentName") + private Optional topAgentName; + + /** + * Defines how to render an icon + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topAgentIcon") + private Optional topAgentIcon; + + /** + * Indicates whether the top agent has been deleted. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topAgentIsDeleted") + private Optional topAgentIsDeleted; + + @JsonCreator + public AgentUseCaseInsight( + @JsonProperty("useCase") Optional useCase, + @JsonProperty("runCount") Optional runCount, + @JsonProperty("trend") Optional trend, + @JsonProperty("topDepartments") Optional topDepartments, + @JsonProperty("topAgentId") Optional topAgentId, + @JsonProperty("topAgentName") Optional topAgentName, + @JsonProperty("topAgentIcon") Optional topAgentIcon, + @JsonProperty("topAgentIsDeleted") Optional topAgentIsDeleted) { + Utils.checkNotNull(useCase, "useCase"); + Utils.checkNotNull(runCount, "runCount"); + Utils.checkNotNull(trend, "trend"); + Utils.checkNotNull(topDepartments, "topDepartments"); + Utils.checkNotNull(topAgentId, "topAgentId"); + Utils.checkNotNull(topAgentName, "topAgentName"); + Utils.checkNotNull(topAgentIcon, "topAgentIcon"); + Utils.checkNotNull(topAgentIsDeleted, "topAgentIsDeleted"); + this.useCase = useCase; + this.runCount = runCount; + this.trend = trend; + this.topDepartments = topDepartments; + this.topAgentId = topAgentId; + this.topAgentName = topAgentName; + this.topAgentIcon = topAgentIcon; + this.topAgentIsDeleted = topAgentIsDeleted; + } + + public AgentUseCaseInsight() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Use case name + */ + @JsonIgnore + public Optional useCase() { + return useCase; + } + + /** + * Total number of runs for this use case over the specified time period. + */ + @JsonIgnore + public Optional runCount() { + return runCount; + } + + /** + * Percentage change in runs compared to the previous equivalent time period. + */ + @JsonIgnore + public Optional trend() { + return trend; + } + + /** + * Comma-separated list of the top departments using this use case. + */ + @JsonIgnore + public Optional topDepartments() { + return topDepartments; + } + + /** + * ID of the most-used agent for this use case. + */ + @JsonIgnore + public Optional topAgentId() { + return topAgentId; + } + + /** + * Name of the most-used agent for this use case. + */ + @JsonIgnore + public Optional topAgentName() { + return topAgentName; + } + + /** + * Defines how to render an icon + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional topAgentIcon() { + return (Optional) topAgentIcon; + } + + /** + * Indicates whether the top agent has been deleted. + */ + @JsonIgnore + public Optional topAgentIsDeleted() { + return topAgentIsDeleted; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Use case name + */ + public AgentUseCaseInsight withUseCase(String useCase) { + Utils.checkNotNull(useCase, "useCase"); + this.useCase = Optional.ofNullable(useCase); + return this; + } + + + /** + * Use case name + */ + public AgentUseCaseInsight withUseCase(Optional useCase) { + Utils.checkNotNull(useCase, "useCase"); + this.useCase = useCase; + return this; + } + + /** + * Total number of runs for this use case over the specified time period. + */ + public AgentUseCaseInsight withRunCount(long runCount) { + Utils.checkNotNull(runCount, "runCount"); + this.runCount = Optional.ofNullable(runCount); + return this; + } + + + /** + * Total number of runs for this use case over the specified time period. + */ + public AgentUseCaseInsight withRunCount(Optional runCount) { + Utils.checkNotNull(runCount, "runCount"); + this.runCount = runCount; + return this; + } + + /** + * Percentage change in runs compared to the previous equivalent time period. + */ + public AgentUseCaseInsight withTrend(float trend) { + Utils.checkNotNull(trend, "trend"); + this.trend = Optional.ofNullable(trend); + return this; + } + + + /** + * Percentage change in runs compared to the previous equivalent time period. + */ + public AgentUseCaseInsight withTrend(Optional trend) { + Utils.checkNotNull(trend, "trend"); + this.trend = trend; + return this; + } + + /** + * Comma-separated list of the top departments using this use case. + */ + public AgentUseCaseInsight withTopDepartments(String topDepartments) { + Utils.checkNotNull(topDepartments, "topDepartments"); + this.topDepartments = Optional.ofNullable(topDepartments); + return this; + } + + + /** + * Comma-separated list of the top departments using this use case. + */ + public AgentUseCaseInsight withTopDepartments(Optional topDepartments) { + Utils.checkNotNull(topDepartments, "topDepartments"); + this.topDepartments = topDepartments; + return this; + } + + /** + * ID of the most-used agent for this use case. + */ + public AgentUseCaseInsight withTopAgentId(String topAgentId) { + Utils.checkNotNull(topAgentId, "topAgentId"); + this.topAgentId = Optional.ofNullable(topAgentId); + return this; + } + + + /** + * ID of the most-used agent for this use case. + */ + public AgentUseCaseInsight withTopAgentId(Optional topAgentId) { + Utils.checkNotNull(topAgentId, "topAgentId"); + this.topAgentId = topAgentId; + return this; + } + + /** + * Name of the most-used agent for this use case. + */ + public AgentUseCaseInsight withTopAgentName(String topAgentName) { + Utils.checkNotNull(topAgentName, "topAgentName"); + this.topAgentName = Optional.ofNullable(topAgentName); + return this; + } + + + /** + * Name of the most-used agent for this use case. + */ + public AgentUseCaseInsight withTopAgentName(Optional topAgentName) { + Utils.checkNotNull(topAgentName, "topAgentName"); + this.topAgentName = topAgentName; + return this; + } + + /** + * Defines how to render an icon + */ + public AgentUseCaseInsight withTopAgentIcon(IconConfig topAgentIcon) { + Utils.checkNotNull(topAgentIcon, "topAgentIcon"); + this.topAgentIcon = Optional.ofNullable(topAgentIcon); + return this; + } + + + /** + * Defines how to render an icon + */ + public AgentUseCaseInsight withTopAgentIcon(Optional topAgentIcon) { + Utils.checkNotNull(topAgentIcon, "topAgentIcon"); + this.topAgentIcon = topAgentIcon; + return this; + } + + /** + * Indicates whether the top agent has been deleted. + */ + public AgentUseCaseInsight withTopAgentIsDeleted(boolean topAgentIsDeleted) { + Utils.checkNotNull(topAgentIsDeleted, "topAgentIsDeleted"); + this.topAgentIsDeleted = Optional.ofNullable(topAgentIsDeleted); + return this; + } + + + /** + * Indicates whether the top agent has been deleted. + */ + public AgentUseCaseInsight withTopAgentIsDeleted(Optional topAgentIsDeleted) { + Utils.checkNotNull(topAgentIsDeleted, "topAgentIsDeleted"); + this.topAgentIsDeleted = topAgentIsDeleted; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgentUseCaseInsight other = (AgentUseCaseInsight) o; + return + Utils.enhancedDeepEquals(this.useCase, other.useCase) && + Utils.enhancedDeepEquals(this.runCount, other.runCount) && + Utils.enhancedDeepEquals(this.trend, other.trend) && + Utils.enhancedDeepEquals(this.topDepartments, other.topDepartments) && + Utils.enhancedDeepEquals(this.topAgentId, other.topAgentId) && + Utils.enhancedDeepEquals(this.topAgentName, other.topAgentName) && + Utils.enhancedDeepEquals(this.topAgentIcon, other.topAgentIcon) && + Utils.enhancedDeepEquals(this.topAgentIsDeleted, other.topAgentIsDeleted); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + useCase, runCount, trend, + topDepartments, topAgentId, topAgentName, + topAgentIcon, topAgentIsDeleted); + } + + @Override + public String toString() { + return Utils.toString(AgentUseCaseInsight.class, + "useCase", useCase, + "runCount", runCount, + "trend", trend, + "topDepartments", topDepartments, + "topAgentId", topAgentId, + "topAgentName", topAgentName, + "topAgentIcon", topAgentIcon, + "topAgentIsDeleted", topAgentIsDeleted); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional useCase = Optional.empty(); + + private Optional runCount = Optional.empty(); + + private Optional trend = Optional.empty(); + + private Optional topDepartments = Optional.empty(); + + private Optional topAgentId = Optional.empty(); + + private Optional topAgentName = Optional.empty(); + + private Optional topAgentIcon = Optional.empty(); + + private Optional topAgentIsDeleted = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Use case name + */ + public Builder useCase(String useCase) { + Utils.checkNotNull(useCase, "useCase"); + this.useCase = Optional.ofNullable(useCase); + return this; + } + + /** + * Use case name + */ + public Builder useCase(Optional useCase) { + Utils.checkNotNull(useCase, "useCase"); + this.useCase = useCase; + return this; + } + + + /** + * Total number of runs for this use case over the specified time period. + */ + public Builder runCount(long runCount) { + Utils.checkNotNull(runCount, "runCount"); + this.runCount = Optional.ofNullable(runCount); + return this; + } + + /** + * Total number of runs for this use case over the specified time period. + */ + public Builder runCount(Optional runCount) { + Utils.checkNotNull(runCount, "runCount"); + this.runCount = runCount; + return this; + } + + + /** + * Percentage change in runs compared to the previous equivalent time period. + */ + public Builder trend(float trend) { + Utils.checkNotNull(trend, "trend"); + this.trend = Optional.ofNullable(trend); + return this; + } + + /** + * Percentage change in runs compared to the previous equivalent time period. + */ + public Builder trend(Optional trend) { + Utils.checkNotNull(trend, "trend"); + this.trend = trend; + return this; + } + + + /** + * Comma-separated list of the top departments using this use case. + */ + public Builder topDepartments(String topDepartments) { + Utils.checkNotNull(topDepartments, "topDepartments"); + this.topDepartments = Optional.ofNullable(topDepartments); + return this; + } + + /** + * Comma-separated list of the top departments using this use case. + */ + public Builder topDepartments(Optional topDepartments) { + Utils.checkNotNull(topDepartments, "topDepartments"); + this.topDepartments = topDepartments; + return this; + } + + + /** + * ID of the most-used agent for this use case. + */ + public Builder topAgentId(String topAgentId) { + Utils.checkNotNull(topAgentId, "topAgentId"); + this.topAgentId = Optional.ofNullable(topAgentId); + return this; + } + + /** + * ID of the most-used agent for this use case. + */ + public Builder topAgentId(Optional topAgentId) { + Utils.checkNotNull(topAgentId, "topAgentId"); + this.topAgentId = topAgentId; + return this; + } + + + /** + * Name of the most-used agent for this use case. + */ + public Builder topAgentName(String topAgentName) { + Utils.checkNotNull(topAgentName, "topAgentName"); + this.topAgentName = Optional.ofNullable(topAgentName); + return this; + } + + /** + * Name of the most-used agent for this use case. + */ + public Builder topAgentName(Optional topAgentName) { + Utils.checkNotNull(topAgentName, "topAgentName"); + this.topAgentName = topAgentName; + return this; + } + + + /** + * Defines how to render an icon + */ + public Builder topAgentIcon(IconConfig topAgentIcon) { + Utils.checkNotNull(topAgentIcon, "topAgentIcon"); + this.topAgentIcon = Optional.ofNullable(topAgentIcon); + return this; + } + + /** + * Defines how to render an icon + */ + public Builder topAgentIcon(Optional topAgentIcon) { + Utils.checkNotNull(topAgentIcon, "topAgentIcon"); + this.topAgentIcon = topAgentIcon; + return this; + } + + + /** + * Indicates whether the top agent has been deleted. + */ + public Builder topAgentIsDeleted(boolean topAgentIsDeleted) { + Utils.checkNotNull(topAgentIsDeleted, "topAgentIsDeleted"); + this.topAgentIsDeleted = Optional.ofNullable(topAgentIsDeleted); + return this; + } + + /** + * Indicates whether the top agent has been deleted. + */ + public Builder topAgentIsDeleted(Optional topAgentIsDeleted) { + Utils.checkNotNull(topAgentIsDeleted, "topAgentIsDeleted"); + this.topAgentIsDeleted = topAgentIsDeleted; + return this; + } + + public AgentUseCaseInsight build() { + + return new AgentUseCaseInsight( + useCase, runCount, trend, + topDepartments, topAgentId, topAgentName, + topAgentIcon, topAgentIsDeleted); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentsInsightsV2Response.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentsInsightsV2Response.java index 229f6f44..6c995859 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentsInsightsV2Response.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentsInsightsV2Response.java @@ -20,14 +20,14 @@ public class AgentsInsightsV2Response { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("monthlyActiveUsers") private Optional monthlyActiveUsers; /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("weeklyActiveUsers") @@ -61,6 +61,11 @@ public class AgentsInsightsV2Response { private Optional> topAgentsInsights; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("topUseCasesInsights") + private Optional> topUseCasesInsights; + + @JsonInclude(Include.NON_ABSENT) @JsonProperty("agentsUsageByDepartmentInsights") private Optional> agentsUsageByDepartmentInsights; @@ -116,6 +121,7 @@ public AgentsInsightsV2Response( @JsonProperty("dailyActiveUserTimeseries") Optional dailyActiveUserTimeseries, @JsonProperty("sharedAgentsCount") Optional sharedAgentsCount, @JsonProperty("topAgentsInsights") Optional> topAgentsInsights, + @JsonProperty("topUseCasesInsights") Optional> topUseCasesInsights, @JsonProperty("agentsUsageByDepartmentInsights") Optional> agentsUsageByDepartmentInsights, @JsonProperty("agentUsersInsights") Optional> agentUsersInsights, @JsonProperty("agentsTimeSavedInsights") Optional> agentsTimeSavedInsights, @@ -132,6 +138,7 @@ public AgentsInsightsV2Response( Utils.checkNotNull(dailyActiveUserTimeseries, "dailyActiveUserTimeseries"); Utils.checkNotNull(sharedAgentsCount, "sharedAgentsCount"); Utils.checkNotNull(topAgentsInsights, "topAgentsInsights"); + Utils.checkNotNull(topUseCasesInsights, "topUseCasesInsights"); Utils.checkNotNull(agentsUsageByDepartmentInsights, "agentsUsageByDepartmentInsights"); Utils.checkNotNull(agentUsersInsights, "agentUsersInsights"); Utils.checkNotNull(agentsTimeSavedInsights, "agentsTimeSavedInsights"); @@ -148,6 +155,7 @@ public AgentsInsightsV2Response( this.dailyActiveUserTimeseries = dailyActiveUserTimeseries; this.sharedAgentsCount = sharedAgentsCount; this.topAgentsInsights = topAgentsInsights; + this.topUseCasesInsights = topUseCasesInsights; this.agentsUsageByDepartmentInsights = agentsUsageByDepartmentInsights; this.agentUsersInsights = agentUsersInsights; this.agentsTimeSavedInsights = agentsTimeSavedInsights; @@ -165,11 +173,11 @@ public AgentsInsightsV2Response() { Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonIgnore public Optional monthlyActiveUsers() { @@ -177,7 +185,7 @@ public Optional monthlyActiveUsers() { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonIgnore public Optional weeklyActiveUsers() { @@ -216,6 +224,12 @@ public Optional> topAgentsInsights() { return (Optional>) topAgentsInsights; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> topUseCasesInsights() { + return (Optional>) topUseCasesInsights; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional> agentsUsageByDepartmentInsights() { @@ -279,7 +293,7 @@ public static Builder builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public AgentsInsightsV2Response withMonthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -289,7 +303,7 @@ public AgentsInsightsV2Response withMonthlyActiveUsers(long monthlyActiveUsers) /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public AgentsInsightsV2Response withMonthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -298,7 +312,7 @@ public AgentsInsightsV2Response withMonthlyActiveUsers(Optional monthlyAct } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public AgentsInsightsV2Response withWeeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -308,7 +322,7 @@ public AgentsInsightsV2Response withWeeklyActiveUsers(long weeklyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public AgentsInsightsV2Response withWeeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -387,6 +401,19 @@ public AgentsInsightsV2Response withTopAgentsInsights(Optional topUseCasesInsights) { + Utils.checkNotNull(topUseCasesInsights, "topUseCasesInsights"); + this.topUseCasesInsights = Optional.ofNullable(topUseCasesInsights); + return this; + } + + + public AgentsInsightsV2Response withTopUseCasesInsights(Optional> topUseCasesInsights) { + Utils.checkNotNull(topUseCasesInsights, "topUseCasesInsights"); + this.topUseCasesInsights = topUseCasesInsights; + return this; + } + public AgentsInsightsV2Response withAgentsUsageByDepartmentInsights(List agentsUsageByDepartmentInsights) { Utils.checkNotNull(agentsUsageByDepartmentInsights, "agentsUsageByDepartmentInsights"); this.agentsUsageByDepartmentInsights = Optional.ofNullable(agentsUsageByDepartmentInsights); @@ -527,6 +554,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.dailyActiveUserTimeseries, other.dailyActiveUserTimeseries) && Utils.enhancedDeepEquals(this.sharedAgentsCount, other.sharedAgentsCount) && Utils.enhancedDeepEquals(this.topAgentsInsights, other.topAgentsInsights) && + Utils.enhancedDeepEquals(this.topUseCasesInsights, other.topUseCasesInsights) && Utils.enhancedDeepEquals(this.agentsUsageByDepartmentInsights, other.agentsUsageByDepartmentInsights) && Utils.enhancedDeepEquals(this.agentUsersInsights, other.agentUsersInsights) && Utils.enhancedDeepEquals(this.agentsTimeSavedInsights, other.agentsTimeSavedInsights) && @@ -543,10 +571,10 @@ public int hashCode() { return Utils.enhancedHash( monthlyActiveUsers, weeklyActiveUsers, monthlyActiveUserTimeseries, weeklyActiveUserTimeseries, dailyActiveUserTimeseries, sharedAgentsCount, - topAgentsInsights, agentsUsageByDepartmentInsights, agentUsersInsights, - agentsTimeSavedInsights, dailyAgentRunsTimeseries, successfulRunsTimeseries, - failedRunsTimeseries, pausedRunsTimeseries, upvotesTimeseries, - downvotesTimeseries); + topAgentsInsights, topUseCasesInsights, agentsUsageByDepartmentInsights, + agentUsersInsights, agentsTimeSavedInsights, dailyAgentRunsTimeseries, + successfulRunsTimeseries, failedRunsTimeseries, pausedRunsTimeseries, + upvotesTimeseries, downvotesTimeseries); } @Override @@ -559,6 +587,7 @@ public String toString() { "dailyActiveUserTimeseries", dailyActiveUserTimeseries, "sharedAgentsCount", sharedAgentsCount, "topAgentsInsights", topAgentsInsights, + "topUseCasesInsights", topUseCasesInsights, "agentsUsageByDepartmentInsights", agentsUsageByDepartmentInsights, "agentUsersInsights", agentUsersInsights, "agentsTimeSavedInsights", agentsTimeSavedInsights, @@ -587,6 +616,8 @@ public final static class Builder { private Optional> topAgentsInsights = Optional.empty(); + private Optional> topUseCasesInsights = Optional.empty(); + private Optional> agentsUsageByDepartmentInsights = Optional.empty(); private Optional> agentUsersInsights = Optional.empty(); @@ -611,7 +642,7 @@ private Builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -620,7 +651,7 @@ public Builder monthlyActiveUsers(long monthlyActiveUsers) { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -630,7 +661,7 @@ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -639,7 +670,7 @@ public Builder weeklyActiveUsers(long weeklyActiveUsers) { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -719,6 +750,19 @@ public Builder topAgentsInsights(Optional> topAg } + public Builder topUseCasesInsights(List topUseCasesInsights) { + Utils.checkNotNull(topUseCasesInsights, "topUseCasesInsights"); + this.topUseCasesInsights = Optional.ofNullable(topUseCasesInsights); + return this; + } + + public Builder topUseCasesInsights(Optional> topUseCasesInsights) { + Utils.checkNotNull(topUseCasesInsights, "topUseCasesInsights"); + this.topUseCasesInsights = topUseCasesInsights; + return this; + } + + public Builder agentsUsageByDepartmentInsights(List agentsUsageByDepartmentInsights) { Utils.checkNotNull(agentsUsageByDepartmentInsights, "agentsUsageByDepartmentInsights"); this.agentsUsageByDepartmentInsights = Optional.ofNullable(agentsUsageByDepartmentInsights); @@ -846,10 +890,10 @@ public AgentsInsightsV2Response build() { return new AgentsInsightsV2Response( monthlyActiveUsers, weeklyActiveUsers, monthlyActiveUserTimeseries, weeklyActiveUserTimeseries, dailyActiveUserTimeseries, sharedAgentsCount, - topAgentsInsights, agentsUsageByDepartmentInsights, agentUsersInsights, - agentsTimeSavedInsights, dailyAgentRunsTimeseries, successfulRunsTimeseries, - failedRunsTimeseries, pausedRunsTimeseries, upvotesTimeseries, - downvotesTimeseries); + topAgentsInsights, topUseCasesInsights, agentsUsageByDepartmentInsights, + agentUsersInsights, agentsTimeSavedInsights, dailyAgentRunsTimeseries, + successfulRunsTimeseries, failedRunsTimeseries, pausedRunsTimeseries, + upvotesTimeseries, downvotesTimeseries); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AssistantInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AssistantInsightsResponse.java index 6277c7fb..84209052 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AssistantInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AssistantInsightsResponse.java @@ -20,14 +20,14 @@ public class AssistantInsightsResponse { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("monthlyActiveUsers") private Optional monthlyActiveUsers; /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("weeklyActiveUsers") @@ -152,7 +152,7 @@ public AssistantInsightsResponse() { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonIgnore public Optional monthlyActiveUsers() { @@ -160,7 +160,7 @@ public Optional monthlyActiveUsers() { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonIgnore public Optional weeklyActiveUsers() { @@ -249,7 +249,7 @@ public static Builder builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public AssistantInsightsResponse withMonthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -259,7 +259,7 @@ public AssistantInsightsResponse withMonthlyActiveUsers(long monthlyActiveUsers) /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public AssistantInsightsResponse withMonthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -268,7 +268,7 @@ public AssistantInsightsResponse withMonthlyActiveUsers(Optional monthlyAc } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public AssistantInsightsResponse withWeeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -278,7 +278,7 @@ public AssistantInsightsResponse withWeeklyActiveUsers(long weeklyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public AssistantInsightsResponse withWeeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -546,7 +546,7 @@ private Builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -555,7 +555,7 @@ public Builder monthlyActiveUsers(long monthlyActiveUsers) { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -565,7 +565,7 @@ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -574,7 +574,7 @@ public Builder weeklyActiveUsers(long weeklyActiveUsers) { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BreakdownType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BreakdownType.java new file mode 100644 index 00000000..b9934a59 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BreakdownType.java @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 22c9cfa5fd83 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * BreakdownType + * + *

Type of breakdown to return. + */ +public enum BreakdownType { + USERS("USERS"), + HOST_APPLICATIONS("HOST_APPLICATIONS"), + TOOLS("TOOLS"), + SERVERS("SERVERS"); + + @JsonValue + private final String value; + + BreakdownType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (BreakdownType o: BreakdownType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionErrorErrorCode.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionErrorErrorCode.java index 855e861c..fe6a556f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionErrorErrorCode.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionErrorErrorCode.java @@ -28,6 +28,7 @@ public class CollectionErrorErrorCode { public static final CollectionErrorErrorCode HEIGHT_VIOLATION = new CollectionErrorErrorCode("HEIGHT_VIOLATION"); public static final CollectionErrorErrorCode WIDTH_VIOLATION = new CollectionErrorErrorCode("WIDTH_VIOLATION"); public static final CollectionErrorErrorCode NO_PERMISSIONS = new CollectionErrorErrorCode("NO_PERMISSIONS"); + public static final CollectionErrorErrorCode CORRUPT_ITEM = new CollectionErrorErrorCode("CORRUPT_ITEM"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -108,6 +109,7 @@ private static final Map createValuesMap() { map.put("HEIGHT_VIOLATION", HEIGHT_VIOLATION); map.put("WIDTH_VIOLATION", WIDTH_VIOLATION); map.put("NO_PERMISSIONS", NO_PERMISSIONS); + map.put("CORRUPT_ITEM", CORRUPT_ITEM); return map; } @@ -120,6 +122,7 @@ private static final Map createEnumsMap() map.put("HEIGHT_VIOLATION", CollectionErrorErrorCodeEnum.HEIGHT_VIOLATION); map.put("WIDTH_VIOLATION", CollectionErrorErrorCodeEnum.WIDTH_VIOLATION); map.put("NO_PERMISSIONS", CollectionErrorErrorCodeEnum.NO_PERMISSIONS); + map.put("CORRUPT_ITEM", CollectionErrorErrorCodeEnum.CORRUPT_ITEM); return map; } @@ -132,7 +135,8 @@ public enum CollectionErrorErrorCodeEnum { CONCURRENT_HIERARCHY_EDIT("CONCURRENT_HIERARCHY_EDIT"), HEIGHT_VIOLATION("HEIGHT_VIOLATION"), WIDTH_VIOLATION("WIDTH_VIOLATION"), - NO_PERMISSIONS("NO_PERMISSIONS"),; + NO_PERMISSIONS("NO_PERMISSIONS"), + CORRUPT_ITEM("CORRUPT_ITEM"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CurrentActiveUsers.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CurrentActiveUsers.java index 3339cfa9..682bf0a8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CurrentActiveUsers.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CurrentActiveUsers.java @@ -18,14 +18,14 @@ public class CurrentActiveUsers { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("monthlyActiveUsers") private Optional monthlyActiveUsers; /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("weeklyActiveUsers") @@ -46,7 +46,7 @@ public CurrentActiveUsers() { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonIgnore public Optional monthlyActiveUsers() { @@ -54,7 +54,7 @@ public Optional monthlyActiveUsers() { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonIgnore public Optional weeklyActiveUsers() { @@ -67,7 +67,7 @@ public static Builder builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public CurrentActiveUsers withMonthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -77,7 +77,7 @@ public CurrentActiveUsers withMonthlyActiveUsers(long monthlyActiveUsers) { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public CurrentActiveUsers withMonthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -86,7 +86,7 @@ public CurrentActiveUsers withMonthlyActiveUsers(Optional monthlyActiveUse } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public CurrentActiveUsers withWeeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -96,7 +96,7 @@ public CurrentActiveUsers withWeeklyActiveUsers(long weeklyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public CurrentActiveUsers withWeeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -144,7 +144,7 @@ private Builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -153,7 +153,7 @@ public Builder monthlyActiveUsers(long monthlyActiveUsers) { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -163,7 +163,7 @@ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -172,7 +172,7 @@ public Builder weeklyActiveUsers(long weeklyActiveUsers) { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatus.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatus.java new file mode 100644 index 00000000..3948af87 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatus.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8ce4a048ef1e + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * DatasourceCredentialStatus + * + *

Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin + * Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON + * is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID + * plus a non-null `expiresAt` in the past. + */ +public class DatasourceCredentialStatus { + + public static final DatasourceCredentialStatus VALID = new DatasourceCredentialStatus("VALID"); + public static final DatasourceCredentialStatus VALID_WITH_WARNINGS = new DatasourceCredentialStatus("VALID_WITH_WARNINGS"); + public static final DatasourceCredentialStatus VALIDATING = new DatasourceCredentialStatus("VALIDATING"); + public static final DatasourceCredentialStatus INVALID = new DatasourceCredentialStatus("INVALID"); + public static final DatasourceCredentialStatus MISSING = new DatasourceCredentialStatus("MISSING"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private DatasourceCredentialStatus(String value) { + this.value = value; + } + + /** + * Returns a DatasourceCredentialStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as DatasourceCredentialStatus + */ + @JsonCreator + public static DatasourceCredentialStatus of(String value) { + synchronized (DatasourceCredentialStatus.class) { + return values.computeIfAbsent(value, v -> new DatasourceCredentialStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + DatasourceCredentialStatus other = (DatasourceCredentialStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "DatasourceCredentialStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static DatasourceCredentialStatus[] values() { + synchronized (DatasourceCredentialStatus.class) { + return values.values().toArray(new DatasourceCredentialStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("VALID", VALID); + map.put("VALID_WITH_WARNINGS", VALID_WITH_WARNINGS); + map.put("VALIDATING", VALIDATING); + map.put("INVALID", INVALID); + map.put("MISSING", MISSING); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("VALID", DatasourceCredentialStatusEnum.VALID); + map.put("VALID_WITH_WARNINGS", DatasourceCredentialStatusEnum.VALID_WITH_WARNINGS); + map.put("VALIDATING", DatasourceCredentialStatusEnum.VALIDATING); + map.put("INVALID", DatasourceCredentialStatusEnum.INVALID); + map.put("MISSING", DatasourceCredentialStatusEnum.MISSING); + return map; + } + + + public enum DatasourceCredentialStatusEnum { + + VALID("VALID"), + VALID_WITH_WARNINGS("VALID_WITH_WARNINGS"), + VALIDATING("VALIDATING"), + INVALID("INVALID"), + MISSING("MISSING"),; + + private final String value; + + private DatasourceCredentialStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatusResponse.java new file mode 100644 index 00000000..54dc377a --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceCredentialStatusResponse.java @@ -0,0 +1,316 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6aa3d770bcc1 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; + +/** + * DatasourceCredentialStatusResponse + * + *

Status of the credentials currently installed for a datasource instance. + */ +public class DatasourceCredentialStatusResponse { + /** + * Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin + * Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON + * is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID + * plus a non-null `expiresAt` in the past. + */ + @JsonProperty("status") + private DatasourceCredentialStatus status; + + /** + * When the credentials were last rotated. Omitted when not known. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastRotatedAt") + private Optional lastRotatedAt; + + /** + * When the active credentials expire. Omitted when not known or not applicable to this credential + * type. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expiresAt") + private Optional expiresAt; + + /** + * Optional human-readable detail about the current credential status. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("message") + private Optional message; + + @JsonCreator + public DatasourceCredentialStatusResponse( + @JsonProperty("status") DatasourceCredentialStatus status, + @JsonProperty("lastRotatedAt") Optional lastRotatedAt, + @JsonProperty("expiresAt") Optional expiresAt, + @JsonProperty("message") Optional message) { + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(lastRotatedAt, "lastRotatedAt"); + Utils.checkNotNull(expiresAt, "expiresAt"); + Utils.checkNotNull(message, "message"); + this.status = status; + this.lastRotatedAt = lastRotatedAt; + this.expiresAt = expiresAt; + this.message = message; + } + + public DatasourceCredentialStatusResponse( + DatasourceCredentialStatus status) { + this(status, Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin + * Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON + * is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID + * plus a non-null `expiresAt` in the past. + */ + @JsonIgnore + public DatasourceCredentialStatus status() { + return status; + } + + /** + * When the credentials were last rotated. Omitted when not known. + */ + @JsonIgnore + public Optional lastRotatedAt() { + return lastRotatedAt; + } + + /** + * When the active credentials expire. Omitted when not known or not applicable to this credential + * type. + */ + @JsonIgnore + public Optional expiresAt() { + return expiresAt; + } + + /** + * Optional human-readable detail about the current credential status. + */ + @JsonIgnore + public Optional message() { + return message; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin + * Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON + * is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID + * plus a non-null `expiresAt` in the past. + */ + public DatasourceCredentialStatusResponse withStatus(DatasourceCredentialStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * When the credentials were last rotated. Omitted when not known. + */ + public DatasourceCredentialStatusResponse withLastRotatedAt(OffsetDateTime lastRotatedAt) { + Utils.checkNotNull(lastRotatedAt, "lastRotatedAt"); + this.lastRotatedAt = Optional.ofNullable(lastRotatedAt); + return this; + } + + + /** + * When the credentials were last rotated. Omitted when not known. + */ + public DatasourceCredentialStatusResponse withLastRotatedAt(Optional lastRotatedAt) { + Utils.checkNotNull(lastRotatedAt, "lastRotatedAt"); + this.lastRotatedAt = lastRotatedAt; + return this; + } + + /** + * When the active credentials expire. Omitted when not known or not applicable to this credential + * type. + */ + public DatasourceCredentialStatusResponse withExpiresAt(OffsetDateTime expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = Optional.ofNullable(expiresAt); + return this; + } + + + /** + * When the active credentials expire. Omitted when not known or not applicable to this credential + * type. + */ + public DatasourceCredentialStatusResponse withExpiresAt(Optional expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + /** + * Optional human-readable detail about the current credential status. + */ + public DatasourceCredentialStatusResponse withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + + /** + * Optional human-readable detail about the current credential status. + */ + public DatasourceCredentialStatusResponse withMessage(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasourceCredentialStatusResponse other = (DatasourceCredentialStatusResponse) o; + return + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.lastRotatedAt, other.lastRotatedAt) && + Utils.enhancedDeepEquals(this.expiresAt, other.expiresAt) && + Utils.enhancedDeepEquals(this.message, other.message); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + status, lastRotatedAt, expiresAt, + message); + } + + @Override + public String toString() { + return Utils.toString(DatasourceCredentialStatusResponse.class, + "status", status, + "lastRotatedAt", lastRotatedAt, + "expiresAt", expiresAt, + "message", message); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private DatasourceCredentialStatus status; + + private Optional lastRotatedAt = Optional.empty(); + + private Optional expiresAt = Optional.empty(); + + private Optional message = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Lifecycle state of the credentials installed for a datasource instance. Mirrors the internal admin + * Status enum so the handler can surface the same health signals already tracked today. EXPIRING_SOON + * is represented as VALID_WITH_WARNINGS (with detail in `message`); EXPIRED is surfaced as INVALID + * plus a non-null `expiresAt` in the past. + */ + public Builder status(DatasourceCredentialStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * When the credentials were last rotated. Omitted when not known. + */ + public Builder lastRotatedAt(OffsetDateTime lastRotatedAt) { + Utils.checkNotNull(lastRotatedAt, "lastRotatedAt"); + this.lastRotatedAt = Optional.ofNullable(lastRotatedAt); + return this; + } + + /** + * When the credentials were last rotated. Omitted when not known. + */ + public Builder lastRotatedAt(Optional lastRotatedAt) { + Utils.checkNotNull(lastRotatedAt, "lastRotatedAt"); + this.lastRotatedAt = lastRotatedAt; + return this; + } + + + /** + * When the active credentials expire. Omitted when not known or not applicable to this credential + * type. + */ + public Builder expiresAt(OffsetDateTime expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = Optional.ofNullable(expiresAt); + return this; + } + + /** + * When the active credentials expire. Omitted when not known or not applicable to this credential + * type. + */ + public Builder expiresAt(Optional expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + + /** + * Optional human-readable detail about the current credential status. + */ + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = Optional.ofNullable(message); + return this; + } + + /** + * Optional human-readable detail about the current credential status. + */ + public Builder message(Optional message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public DatasourceCredentialStatusResponse build() { + + return new DatasourceCredentialStatusResponse( + status, lastRotatedAt, expiresAt, + message); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponseErrorCode.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponseErrorCode.java index 145894a1..4a071696 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponseErrorCode.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponseErrorCode.java @@ -28,6 +28,7 @@ public class EditCollectionResponseErrorCode { public static final EditCollectionResponseErrorCode HEIGHT_VIOLATION = new EditCollectionResponseErrorCode("HEIGHT_VIOLATION"); public static final EditCollectionResponseErrorCode WIDTH_VIOLATION = new EditCollectionResponseErrorCode("WIDTH_VIOLATION"); public static final EditCollectionResponseErrorCode NO_PERMISSIONS = new EditCollectionResponseErrorCode("NO_PERMISSIONS"); + public static final EditCollectionResponseErrorCode CORRUPT_ITEM = new EditCollectionResponseErrorCode("CORRUPT_ITEM"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -108,6 +109,7 @@ private static final Map createValuesMa map.put("HEIGHT_VIOLATION", HEIGHT_VIOLATION); map.put("WIDTH_VIOLATION", WIDTH_VIOLATION); map.put("NO_PERMISSIONS", NO_PERMISSIONS); + map.put("CORRUPT_ITEM", CORRUPT_ITEM); return map; } @@ -120,6 +122,7 @@ private static final Map createEnum map.put("HEIGHT_VIOLATION", EditCollectionResponseErrorCodeEnum.HEIGHT_VIOLATION); map.put("WIDTH_VIOLATION", EditCollectionResponseErrorCodeEnum.WIDTH_VIOLATION); map.put("NO_PERMISSIONS", EditCollectionResponseErrorCodeEnum.NO_PERMISSIONS); + map.put("CORRUPT_ITEM", EditCollectionResponseErrorCodeEnum.CORRUPT_ITEM); return map; } @@ -132,7 +135,8 @@ public enum EditCollectionResponseErrorCodeEnum { CONCURRENT_HIERARCHY_EDIT("CONCURRENT_HIERARCHY_EDIT"), HEIGHT_VIOLATION("HEIGHT_VIOLATION"), WIDTH_VIOLATION("WIDTH_VIOLATION"), - NO_PERMISSIONS("NO_PERMISSIONS"),; + NO_PERMISSIONS("NO_PERMISSIONS"), + CORRUPT_ITEM("CORRUPT_ITEM"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java index 16c04adb..40b1bf9e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestCategory.java @@ -45,6 +45,7 @@ public enum FeedRequestCategory { FOLLOW_UP("FOLLOW_UP"), MILESTONE_TIMELINE_CHECK("MILESTONE_TIMELINE_CHECK"), PROJECT_DISCUSSION_DIGEST("PROJECT_DISCUSSION_DIGEST"), + PROJECT_FOCUS_BLOCK("PROJECT_FOCUS_BLOCK"), PROJECT_NEXT_STEP("PROJECT_NEXT_STEP"); @JsonValue diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java index fdc07be5..43fbfb66 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResultCategory.java @@ -61,6 +61,7 @@ public class FeedResultCategory { public static final FeedResultCategory FOLLOW_UP = new FeedResultCategory("FOLLOW_UP"); public static final FeedResultCategory MILESTONE_TIMELINE_CHECK = new FeedResultCategory("MILESTONE_TIMELINE_CHECK"); public static final FeedResultCategory PROJECT_DISCUSSION_DIGEST = new FeedResultCategory("PROJECT_DISCUSSION_DIGEST"); + public static final FeedResultCategory PROJECT_FOCUS_BLOCK = new FeedResultCategory("PROJECT_FOCUS_BLOCK"); public static final FeedResultCategory PROJECT_NEXT_STEP = new FeedResultCategory("PROJECT_NEXT_STEP"); // This map will grow whenever a Color gets created with a new @@ -170,6 +171,7 @@ private static final Map createValuesMap() { map.put("FOLLOW_UP", FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", MILESTONE_TIMELINE_CHECK); map.put("PROJECT_DISCUSSION_DIGEST", PROJECT_DISCUSSION_DIGEST); + map.put("PROJECT_FOCUS_BLOCK", PROJECT_FOCUS_BLOCK); map.put("PROJECT_NEXT_STEP", PROJECT_NEXT_STEP); return map; } @@ -211,6 +213,7 @@ private static final Map createEnumsMap() { map.put("FOLLOW_UP", FeedResultCategoryEnum.FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", FeedResultCategoryEnum.MILESTONE_TIMELINE_CHECK); map.put("PROJECT_DISCUSSION_DIGEST", FeedResultCategoryEnum.PROJECT_DISCUSSION_DIGEST); + map.put("PROJECT_FOCUS_BLOCK", FeedResultCategoryEnum.PROJECT_FOCUS_BLOCK); map.put("PROJECT_NEXT_STEP", FeedResultCategoryEnum.PROJECT_NEXT_STEP); return map; } @@ -253,6 +256,7 @@ public enum FeedResultCategoryEnum { FOLLOW_UP("FOLLOW_UP"), MILESTONE_TIMELINE_CHECK("MILESTONE_TIMELINE_CHECK"), PROJECT_DISCUSSION_DIGEST("PROJECT_DISCUSSION_DIGEST"), + PROJECT_FOCUS_BLOCK("PROJECT_FOCUS_BLOCK"), PROJECT_NEXT_STEP("PROJECT_NEXT_STEP"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsChatSummary.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsChatSummary.java index 28c1ee3b..4aaa1511 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsChatSummary.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsChatSummary.java @@ -18,14 +18,14 @@ public class InsightsChatSummary { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("monthlyActiveUsers") private Optional monthlyActiveUsers; /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("weeklyActiveUsers") @@ -67,7 +67,7 @@ public InsightsChatSummary() { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonIgnore public Optional monthlyActiveUsers() { @@ -75,7 +75,7 @@ public Optional monthlyActiveUsers() { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonIgnore public Optional weeklyActiveUsers() { @@ -104,7 +104,7 @@ public static Builder builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public InsightsChatSummary withMonthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -114,7 +114,7 @@ public InsightsChatSummary withMonthlyActiveUsers(long monthlyActiveUsers) { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public InsightsChatSummary withMonthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -123,7 +123,7 @@ public InsightsChatSummary withMonthlyActiveUsers(Optional monthlyActiveUs } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public InsightsChatSummary withWeeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -133,7 +133,7 @@ public InsightsChatSummary withWeeklyActiveUsers(long weeklyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public InsightsChatSummary withWeeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -228,7 +228,7 @@ private Builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -237,7 +237,7 @@ public Builder monthlyActiveUsers(long monthlyActiveUsers) { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -247,7 +247,7 @@ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -256,7 +256,7 @@ public Builder weeklyActiveUsers(long weeklyActiveUsers) { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); 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 ba67584f..e08b82f5 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 @@ -22,14 +22,14 @@ public class InsightsOverviewResponse { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("monthlyActiveUsers") private Optional monthlyActiveUsers; /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("weeklyActiveUsers") @@ -319,7 +319,7 @@ public InsightsOverviewResponse() { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonIgnore public Optional monthlyActiveUsers() { @@ -327,7 +327,7 @@ public Optional monthlyActiveUsers() { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonIgnore public Optional weeklyActiveUsers() { @@ -543,7 +543,7 @@ public static Builder builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public InsightsOverviewResponse withMonthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -553,7 +553,7 @@ public InsightsOverviewResponse withMonthlyActiveUsers(long monthlyActiveUsers) /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public InsightsOverviewResponse withMonthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -562,7 +562,7 @@ public InsightsOverviewResponse withMonthlyActiveUsers(Optional monthlyAct } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public InsightsOverviewResponse withWeeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -572,7 +572,7 @@ public InsightsOverviewResponse withWeeklyActiveUsers(long weeklyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public InsightsOverviewResponse withWeeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -1194,7 +1194,7 @@ private Builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -1203,7 +1203,7 @@ public Builder monthlyActiveUsers(long monthlyActiveUsers) { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -1213,7 +1213,7 @@ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -1222,7 +1222,7 @@ public Builder weeklyActiveUsers(long weeklyActiveUsers) { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java index 10a5aae4..58b725bb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java @@ -33,6 +33,11 @@ public class InsightsRequest { @JsonProperty("agentsRequest") private Optional agentsRequest; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mcpBreakdownRequest") + private Optional mcpBreakdownRequest; + /** * If true, suppresses the generation of per-user Insights in the response. Default is false. */ @@ -45,20 +50,23 @@ public InsightsRequest( @JsonProperty("overviewRequest") Optional overviewRequest, @JsonProperty("assistantRequest") Optional assistantRequest, @JsonProperty("agentsRequest") Optional agentsRequest, + @JsonProperty("mcpBreakdownRequest") Optional mcpBreakdownRequest, @JsonProperty("disablePerUserInsights") Optional disablePerUserInsights) { Utils.checkNotNull(overviewRequest, "overviewRequest"); Utils.checkNotNull(assistantRequest, "assistantRequest"); Utils.checkNotNull(agentsRequest, "agentsRequest"); + Utils.checkNotNull(mcpBreakdownRequest, "mcpBreakdownRequest"); Utils.checkNotNull(disablePerUserInsights, "disablePerUserInsights"); this.overviewRequest = overviewRequest; this.assistantRequest = assistantRequest; this.agentsRequest = agentsRequest; + this.mcpBreakdownRequest = mcpBreakdownRequest; this.disablePerUserInsights = disablePerUserInsights; } public InsightsRequest() { this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -79,6 +87,12 @@ public Optional agentsRequest() { return (Optional) agentsRequest; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mcpBreakdownRequest() { + return (Optional) mcpBreakdownRequest; + } + /** * If true, suppresses the generation of per-user Insights in the response. Default is false. */ @@ -131,6 +145,19 @@ public InsightsRequest withAgentsRequest(Optional mcpBreakdownRequest) { + Utils.checkNotNull(mcpBreakdownRequest, "mcpBreakdownRequest"); + this.mcpBreakdownRequest = mcpBreakdownRequest; + return this; + } + /** * If true, suppresses the generation of per-user Insights in the response. Default is false. */ @@ -163,6 +190,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.overviewRequest, other.overviewRequest) && Utils.enhancedDeepEquals(this.assistantRequest, other.assistantRequest) && Utils.enhancedDeepEquals(this.agentsRequest, other.agentsRequest) && + Utils.enhancedDeepEquals(this.mcpBreakdownRequest, other.mcpBreakdownRequest) && Utils.enhancedDeepEquals(this.disablePerUserInsights, other.disablePerUserInsights); } @@ -170,7 +198,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( overviewRequest, assistantRequest, agentsRequest, - disablePerUserInsights); + mcpBreakdownRequest, disablePerUserInsights); } @Override @@ -179,6 +207,7 @@ public String toString() { "overviewRequest", overviewRequest, "assistantRequest", assistantRequest, "agentsRequest", agentsRequest, + "mcpBreakdownRequest", mcpBreakdownRequest, "disablePerUserInsights", disablePerUserInsights); } @@ -191,6 +220,8 @@ public final static class Builder { private Optional agentsRequest = Optional.empty(); + private Optional mcpBreakdownRequest = Optional.empty(); + private Optional disablePerUserInsights = Optional.empty(); private Builder() { @@ -237,6 +268,19 @@ public Builder agentsRequest(Optional agentsR } + public Builder mcpBreakdownRequest(McpBreakdownInsightsRequest mcpBreakdownRequest) { + Utils.checkNotNull(mcpBreakdownRequest, "mcpBreakdownRequest"); + this.mcpBreakdownRequest = Optional.ofNullable(mcpBreakdownRequest); + return this; + } + + public Builder mcpBreakdownRequest(Optional mcpBreakdownRequest) { + Utils.checkNotNull(mcpBreakdownRequest, "mcpBreakdownRequest"); + this.mcpBreakdownRequest = mcpBreakdownRequest; + return this; + } + + /** * If true, suppresses the generation of per-user Insights in the response. Default is false. */ @@ -259,7 +303,7 @@ public InsightsRequest build() { return new InsightsRequest( overviewRequest, assistantRequest, agentsRequest, - disablePerUserInsights); + mcpBreakdownRequest, disablePerUserInsights); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsSearchSummary.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsSearchSummary.java index ed1fc5e5..3dc7eb61 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsSearchSummary.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsSearchSummary.java @@ -18,14 +18,14 @@ public class InsightsSearchSummary { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("monthlyActiveUsers") private Optional monthlyActiveUsers; /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("weeklyActiveUsers") @@ -67,7 +67,7 @@ public InsightsSearchSummary() { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ @JsonIgnore public Optional monthlyActiveUsers() { @@ -75,7 +75,7 @@ public Optional monthlyActiveUsers() { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ @JsonIgnore public Optional weeklyActiveUsers() { @@ -104,7 +104,7 @@ public static Builder builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public InsightsSearchSummary withMonthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -114,7 +114,7 @@ public InsightsSearchSummary withMonthlyActiveUsers(long monthlyActiveUsers) { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public InsightsSearchSummary withMonthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -123,7 +123,7 @@ public InsightsSearchSummary withMonthlyActiveUsers(Optional monthlyActive } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public InsightsSearchSummary withWeeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -133,7 +133,7 @@ public InsightsSearchSummary withWeeklyActiveUsers(long weeklyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public InsightsSearchSummary withWeeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -228,7 +228,7 @@ private Builder() { /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(long monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -237,7 +237,7 @@ public Builder monthlyActiveUsers(long monthlyActiveUsers) { } /** - * Number of current Monthly Active Users, in the specified departments. + * Number of current Monthly Active Users. */ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { Utils.checkNotNull(monthlyActiveUsers, "monthlyActiveUsers"); @@ -247,7 +247,7 @@ public Builder monthlyActiveUsers(Optional monthlyActiveUsers) { /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(long weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); @@ -256,7 +256,7 @@ public Builder weeklyActiveUsers(long weeklyActiveUsers) { } /** - * Number of current Weekly Active Users, in the specified departments. + * Number of current Weekly Active Users. */ public Builder weeklyActiveUsers(Optional weeklyActiveUsers) { Utils.checkNotNull(weeklyActiveUsers, "weeklyActiveUsers"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java index 6e1ed2a7..d422ebc1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/JustificationType.java @@ -74,6 +74,7 @@ public class JustificationType { public static final JustificationType FOLLOW_UP = new JustificationType("FOLLOW_UP"); public static final JustificationType MILESTONE_TIMELINE_CHECK = new JustificationType("MILESTONE_TIMELINE_CHECK"); public static final JustificationType PROJECT_DISCUSSION_DIGEST = new JustificationType("PROJECT_DISCUSSION_DIGEST"); + public static final JustificationType PROJECT_FOCUS_BLOCK = new JustificationType("PROJECT_FOCUS_BLOCK"); public static final JustificationType PROJECT_NEXT_STEP = new JustificationType("PROJECT_NEXT_STEP"); // This map will grow whenever a Color gets created with a new @@ -196,6 +197,7 @@ private static final Map createValuesMap() { map.put("FOLLOW_UP", FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", MILESTONE_TIMELINE_CHECK); map.put("PROJECT_DISCUSSION_DIGEST", PROJECT_DISCUSSION_DIGEST); + map.put("PROJECT_FOCUS_BLOCK", PROJECT_FOCUS_BLOCK); map.put("PROJECT_NEXT_STEP", PROJECT_NEXT_STEP); return map; } @@ -250,6 +252,7 @@ private static final Map createEnumsMap() { map.put("FOLLOW_UP", JustificationTypeEnum.FOLLOW_UP); map.put("MILESTONE_TIMELINE_CHECK", JustificationTypeEnum.MILESTONE_TIMELINE_CHECK); map.put("PROJECT_DISCUSSION_DIGEST", JustificationTypeEnum.PROJECT_DISCUSSION_DIGEST); + map.put("PROJECT_FOCUS_BLOCK", JustificationTypeEnum.PROJECT_FOCUS_BLOCK); map.put("PROJECT_NEXT_STEP", JustificationTypeEnum.PROJECT_NEXT_STEP); return map; } @@ -305,6 +308,7 @@ public enum JustificationTypeEnum { FOLLOW_UP("FOLLOW_UP"), MILESTONE_TIMELINE_CHECK("MILESTONE_TIMELINE_CHECK"), PROJECT_DISCUSSION_DIGEST("PROJECT_DISCUSSION_DIGEST"), + PROJECT_FOCUS_BLOCK("PROJECT_FOCUS_BLOCK"), PROJECT_NEXT_STEP("PROJECT_NEXT_STEP"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/McpBreakdownInsightsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/McpBreakdownInsightsRequest.java new file mode 100644 index 00000000..33490de9 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/McpBreakdownInsightsRequest.java @@ -0,0 +1,487 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 89a6d0bf179d + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class McpBreakdownInsightsRequest { + /** + * Departments for which Insights are requested. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("departments") + private Optional> departments; + + /** + * Manager user IDs whose teams should be filtered for. Empty array means no filtering. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("managerIds") + private Optional> managerIds; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("dayRange") + private Optional dayRange; + + /** + * Type of breakdown to return. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("breakdownType") + private Optional breakdownType; + + /** + * Host applications to filter by. Empty array means all host applications. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hostApplications") + private Optional> hostApplications; + + /** + * MCP tools to filter by. Empty array means all tools. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tools") + private Optional> tools; + + /** + * MCP servers to filter by. Empty array means all servers. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("servers") + private Optional> servers; + + @JsonCreator + public McpBreakdownInsightsRequest( + @JsonProperty("departments") Optional> departments, + @JsonProperty("managerIds") Optional> managerIds, + @JsonProperty("dayRange") Optional dayRange, + @JsonProperty("breakdownType") Optional breakdownType, + @JsonProperty("hostApplications") Optional> hostApplications, + @JsonProperty("tools") Optional> tools, + @JsonProperty("servers") Optional> servers) { + Utils.checkNotNull(departments, "departments"); + Utils.checkNotNull(managerIds, "managerIds"); + Utils.checkNotNull(dayRange, "dayRange"); + Utils.checkNotNull(breakdownType, "breakdownType"); + Utils.checkNotNull(hostApplications, "hostApplications"); + Utils.checkNotNull(tools, "tools"); + Utils.checkNotNull(servers, "servers"); + this.departments = departments; + this.managerIds = managerIds; + this.dayRange = dayRange; + this.breakdownType = breakdownType; + this.hostApplications = hostApplications; + this.tools = tools; + this.servers = servers; + } + + public McpBreakdownInsightsRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * Departments for which Insights are requested. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> departments() { + return (Optional>) departments; + } + + /** + * Manager user IDs whose teams should be filtered for. Empty array means no filtering. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> managerIds() { + return (Optional>) managerIds; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional dayRange() { + return (Optional) dayRange; + } + + /** + * Type of breakdown to return. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional breakdownType() { + return (Optional) breakdownType; + } + + /** + * Host applications to filter by. Empty array means all host applications. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> hostApplications() { + return (Optional>) hostApplications; + } + + /** + * MCP tools to filter by. Empty array means all tools. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> tools() { + return (Optional>) tools; + } + + /** + * MCP servers to filter by. Empty array means all servers. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> servers() { + return (Optional>) servers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Departments for which Insights are requested. + */ + public McpBreakdownInsightsRequest withDepartments(List departments) { + Utils.checkNotNull(departments, "departments"); + this.departments = Optional.ofNullable(departments); + return this; + } + + + /** + * Departments for which Insights are requested. + */ + public McpBreakdownInsightsRequest withDepartments(Optional> departments) { + Utils.checkNotNull(departments, "departments"); + this.departments = departments; + return this; + } + + /** + * Manager user IDs whose teams should be filtered for. Empty array means no filtering. + */ + public McpBreakdownInsightsRequest withManagerIds(List managerIds) { + Utils.checkNotNull(managerIds, "managerIds"); + this.managerIds = Optional.ofNullable(managerIds); + return this; + } + + + /** + * Manager user IDs whose teams should be filtered for. Empty array means no filtering. + */ + public McpBreakdownInsightsRequest withManagerIds(Optional> managerIds) { + Utils.checkNotNull(managerIds, "managerIds"); + this.managerIds = managerIds; + return this; + } + + public McpBreakdownInsightsRequest withDayRange(Period dayRange) { + Utils.checkNotNull(dayRange, "dayRange"); + this.dayRange = Optional.ofNullable(dayRange); + return this; + } + + + public McpBreakdownInsightsRequest withDayRange(Optional dayRange) { + Utils.checkNotNull(dayRange, "dayRange"); + this.dayRange = dayRange; + return this; + } + + /** + * Type of breakdown to return. + */ + public McpBreakdownInsightsRequest withBreakdownType(BreakdownType breakdownType) { + Utils.checkNotNull(breakdownType, "breakdownType"); + this.breakdownType = Optional.ofNullable(breakdownType); + return this; + } + + + /** + * Type of breakdown to return. + */ + public McpBreakdownInsightsRequest withBreakdownType(Optional breakdownType) { + Utils.checkNotNull(breakdownType, "breakdownType"); + this.breakdownType = breakdownType; + return this; + } + + /** + * Host applications to filter by. Empty array means all host applications. + */ + public McpBreakdownInsightsRequest withHostApplications(List hostApplications) { + Utils.checkNotNull(hostApplications, "hostApplications"); + this.hostApplications = Optional.ofNullable(hostApplications); + return this; + } + + + /** + * Host applications to filter by. Empty array means all host applications. + */ + public McpBreakdownInsightsRequest withHostApplications(Optional> hostApplications) { + Utils.checkNotNull(hostApplications, "hostApplications"); + this.hostApplications = hostApplications; + return this; + } + + /** + * MCP tools to filter by. Empty array means all tools. + */ + public McpBreakdownInsightsRequest withTools(List tools) { + Utils.checkNotNull(tools, "tools"); + this.tools = Optional.ofNullable(tools); + return this; + } + + + /** + * MCP tools to filter by. Empty array means all tools. + */ + public McpBreakdownInsightsRequest withTools(Optional> tools) { + Utils.checkNotNull(tools, "tools"); + this.tools = tools; + return this; + } + + /** + * MCP servers to filter by. Empty array means all servers. + */ + public McpBreakdownInsightsRequest withServers(List servers) { + Utils.checkNotNull(servers, "servers"); + this.servers = Optional.ofNullable(servers); + return this; + } + + + /** + * MCP servers to filter by. Empty array means all servers. + */ + public McpBreakdownInsightsRequest withServers(Optional> servers) { + Utils.checkNotNull(servers, "servers"); + this.servers = servers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpBreakdownInsightsRequest other = (McpBreakdownInsightsRequest) o; + return + Utils.enhancedDeepEquals(this.departments, other.departments) && + Utils.enhancedDeepEquals(this.managerIds, other.managerIds) && + Utils.enhancedDeepEquals(this.dayRange, other.dayRange) && + Utils.enhancedDeepEquals(this.breakdownType, other.breakdownType) && + Utils.enhancedDeepEquals(this.hostApplications, other.hostApplications) && + Utils.enhancedDeepEquals(this.tools, other.tools) && + Utils.enhancedDeepEquals(this.servers, other.servers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + departments, managerIds, dayRange, + breakdownType, hostApplications, tools, + servers); + } + + @Override + public String toString() { + return Utils.toString(McpBreakdownInsightsRequest.class, + "departments", departments, + "managerIds", managerIds, + "dayRange", dayRange, + "breakdownType", breakdownType, + "hostApplications", hostApplications, + "tools", tools, + "servers", servers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> departments = Optional.empty(); + + private Optional> managerIds = Optional.empty(); + + private Optional dayRange = Optional.empty(); + + private Optional breakdownType = Optional.empty(); + + private Optional> hostApplications = Optional.empty(); + + private Optional> tools = Optional.empty(); + + private Optional> servers = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Departments for which Insights are requested. + */ + public Builder departments(List departments) { + Utils.checkNotNull(departments, "departments"); + this.departments = Optional.ofNullable(departments); + return this; + } + + /** + * Departments for which Insights are requested. + */ + public Builder departments(Optional> departments) { + Utils.checkNotNull(departments, "departments"); + this.departments = departments; + return this; + } + + + /** + * Manager user IDs whose teams should be filtered for. Empty array means no filtering. + */ + public Builder managerIds(List managerIds) { + Utils.checkNotNull(managerIds, "managerIds"); + this.managerIds = Optional.ofNullable(managerIds); + return this; + } + + /** + * Manager user IDs whose teams should be filtered for. Empty array means no filtering. + */ + public Builder managerIds(Optional> managerIds) { + Utils.checkNotNull(managerIds, "managerIds"); + this.managerIds = managerIds; + return this; + } + + + public Builder dayRange(Period dayRange) { + Utils.checkNotNull(dayRange, "dayRange"); + this.dayRange = Optional.ofNullable(dayRange); + return this; + } + + public Builder dayRange(Optional dayRange) { + Utils.checkNotNull(dayRange, "dayRange"); + this.dayRange = dayRange; + return this; + } + + + /** + * Type of breakdown to return. + */ + public Builder breakdownType(BreakdownType breakdownType) { + Utils.checkNotNull(breakdownType, "breakdownType"); + this.breakdownType = Optional.ofNullable(breakdownType); + return this; + } + + /** + * Type of breakdown to return. + */ + public Builder breakdownType(Optional breakdownType) { + Utils.checkNotNull(breakdownType, "breakdownType"); + this.breakdownType = breakdownType; + return this; + } + + + /** + * Host applications to filter by. Empty array means all host applications. + */ + public Builder hostApplications(List hostApplications) { + Utils.checkNotNull(hostApplications, "hostApplications"); + this.hostApplications = Optional.ofNullable(hostApplications); + return this; + } + + /** + * Host applications to filter by. Empty array means all host applications. + */ + public Builder hostApplications(Optional> hostApplications) { + Utils.checkNotNull(hostApplications, "hostApplications"); + this.hostApplications = hostApplications; + return this; + } + + + /** + * MCP tools to filter by. Empty array means all tools. + */ + public Builder tools(List tools) { + Utils.checkNotNull(tools, "tools"); + this.tools = Optional.ofNullable(tools); + return this; + } + + /** + * MCP tools to filter by. Empty array means all tools. + */ + public Builder tools(Optional> tools) { + Utils.checkNotNull(tools, "tools"); + this.tools = tools; + return this; + } + + + /** + * MCP servers to filter by. Empty array means all servers. + */ + public Builder servers(List servers) { + Utils.checkNotNull(servers, "servers"); + this.servers = Optional.ofNullable(servers); + return this; + } + + /** + * MCP servers to filter by. Empty array means all servers. + */ + public Builder servers(Optional> servers) { + Utils.checkNotNull(servers, "servers"); + this.servers = servers; + return this; + } + + public McpBreakdownInsightsRequest build() { + + return new McpBreakdownInsightsRequest( + departments, managerIds, dayRange, + breakdownType, hostApplications, tools, + servers); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateDatasourceCredentialsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateDatasourceCredentialsRequest.java new file mode 100644 index 00000000..90d0b16b --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateDatasourceCredentialsRequest.java @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3289b4dd3617 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * RotateDatasourceCredentialsRequest + * + *

Request to rotate the credentials used by a datasource instance. Replaces the active credential + * material with the supplied values. + * `credentials.values` must contain only keys recognized as credential material for the datasource + * type (for example `clientSecret` for OAuth, `apiToken` for API-token auth, `privateKey` for + * certificate auth). Unrecognized keys, or keys that correspond to non-credential configuration, cause + * a 400; use the configure endpoint to change non-credential config. + */ +public class RotateDatasourceCredentialsRequest { + /** + * Configuration for a datasource instance + */ + @JsonProperty("credentials") + private DatasourceInstanceConfiguration credentials; + + @JsonCreator + public RotateDatasourceCredentialsRequest( + @JsonProperty("credentials") DatasourceInstanceConfiguration credentials) { + Utils.checkNotNull(credentials, "credentials"); + this.credentials = credentials; + } + + /** + * Configuration for a datasource instance + */ + @JsonIgnore + public DatasourceInstanceConfiguration credentials() { + return credentials; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Configuration for a datasource instance + */ + public RotateDatasourceCredentialsRequest withCredentials(DatasourceInstanceConfiguration credentials) { + Utils.checkNotNull(credentials, "credentials"); + this.credentials = credentials; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RotateDatasourceCredentialsRequest other = (RotateDatasourceCredentialsRequest) o; + return + Utils.enhancedDeepEquals(this.credentials, other.credentials); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + credentials); + } + + @Override + public String toString() { + return Utils.toString(RotateDatasourceCredentialsRequest.class, + "credentials", credentials); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private DatasourceInstanceConfiguration credentials; + + private Builder() { + // force use of static builder() method + } + + + /** + * Configuration for a datasource instance + */ + public Builder credentials(DatasourceInstanceConfiguration credentials) { + Utils.checkNotNull(credentials, "credentials"); + this.credentials = credentials; + return this; + } + + public RotateDatasourceCredentialsRequest build() { + + return new RotateDatasourceCredentialsRequest( + credentials); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UgcType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UgcType.java index f6198804..bbf4832b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UgcType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UgcType.java @@ -38,6 +38,7 @@ public class UgcType { public static final UgcType SHORTCUTS_TYPE = new UgcType("SHORTCUTS_TYPE"); public static final UgcType SLIDE_TYPE = new UgcType("SLIDE_TYPE"); public static final UgcType SPREADSHEET_TYPE = new UgcType("SPREADSHEET_TYPE"); + public static final UgcType INLINE_HTML_TYPE = new UgcType("INLINE_HTML_TYPE"); public static final UgcType WORKFLOWS_TYPE = new UgcType("WORKFLOWS_TYPE"); // This map will grow whenever a Color gets created with a new @@ -129,6 +130,7 @@ private static final Map createValuesMap() { map.put("SHORTCUTS_TYPE", SHORTCUTS_TYPE); map.put("SLIDE_TYPE", SLIDE_TYPE); map.put("SPREADSHEET_TYPE", SPREADSHEET_TYPE); + map.put("INLINE_HTML_TYPE", INLINE_HTML_TYPE); map.put("WORKFLOWS_TYPE", WORKFLOWS_TYPE); return map; } @@ -152,6 +154,7 @@ private static final Map createEnumsMap() { map.put("SHORTCUTS_TYPE", UgcTypeEnum.SHORTCUTS_TYPE); map.put("SLIDE_TYPE", UgcTypeEnum.SLIDE_TYPE); map.put("SPREADSHEET_TYPE", UgcTypeEnum.SPREADSHEET_TYPE); + map.put("INLINE_HTML_TYPE", UgcTypeEnum.INLINE_HTML_TYPE); map.put("WORKFLOWS_TYPE", UgcTypeEnum.WORKFLOWS_TYPE); return map; } @@ -176,6 +179,7 @@ public enum UgcTypeEnum { SHORTCUTS_TYPE("SHORTCUTS_TYPE"), SLIDE_TYPE("SLIDE_TYPE"), SPREADSHEET_TYPE("SPREADSHEET_TYPE"), + INLINE_HTML_TYPE("INLINE_HTML_TYPE"), WORKFLOWS_TYPE("WORKFLOWS_TYPE"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/errors/ErrorCode.java b/src/main/java/com/glean/api_client/glean_api_client/models/errors/ErrorCode.java index bbfff4a1..d41c9dd2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/errors/ErrorCode.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/errors/ErrorCode.java @@ -28,6 +28,7 @@ public class ErrorCode { public static final ErrorCode HEIGHT_VIOLATION = new ErrorCode("HEIGHT_VIOLATION"); public static final ErrorCode WIDTH_VIOLATION = new ErrorCode("WIDTH_VIOLATION"); public static final ErrorCode NO_PERMISSIONS = new ErrorCode("NO_PERMISSIONS"); + public static final ErrorCode CORRUPT_ITEM = new ErrorCode("CORRUPT_ITEM"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -108,6 +109,7 @@ private static final Map createValuesMap() { map.put("HEIGHT_VIOLATION", HEIGHT_VIOLATION); map.put("WIDTH_VIOLATION", WIDTH_VIOLATION); map.put("NO_PERMISSIONS", NO_PERMISSIONS); + map.put("CORRUPT_ITEM", CORRUPT_ITEM); return map; } @@ -120,6 +122,7 @@ private static final Map createEnumsMap() { map.put("HEIGHT_VIOLATION", ErrorCodeEnum.HEIGHT_VIOLATION); map.put("WIDTH_VIOLATION", ErrorCodeEnum.WIDTH_VIOLATION); map.put("NO_PERMISSIONS", ErrorCodeEnum.NO_PERMISSIONS); + map.put("CORRUPT_ITEM", ErrorCodeEnum.CORRUPT_ITEM); return map; } @@ -132,7 +135,8 @@ public enum ErrorCodeEnum { CONCURRENT_HIERARCHY_EDIT("CONCURRENT_HIERARCHY_EDIT"), HEIGHT_VIOLATION("HEIGHT_VIOLATION"), WIDTH_VIOLATION("WIDTH_VIOLATION"), - NO_PERMISSIONS("NO_PERMISSIONS"),; + NO_PERMISSIONS("NO_PERMISSIONS"), + CORRUPT_ITEM("CORRUPT_ITEM"),; private final String value; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequest.java new file mode 100644 index 00000000..9adcc4fa --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 54388988d5f7 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class GetDatasourceCredentialStatusRequest { + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=datasourceInstanceId") + private String datasourceInstanceId; + + @JsonCreator + public GetDatasourceCredentialStatusRequest( + String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + } + + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + @JsonIgnore + public String datasourceInstanceId() { + return datasourceInstanceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + public GetDatasourceCredentialStatusRequest withDatasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDatasourceCredentialStatusRequest other = (GetDatasourceCredentialStatusRequest) o; + return + Utils.enhancedDeepEquals(this.datasourceInstanceId, other.datasourceInstanceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasourceInstanceId); + } + + @Override + public String toString() { + return Utils.toString(GetDatasourceCredentialStatusRequest.class, + "datasourceInstanceId", datasourceInstanceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String datasourceInstanceId; + + private Builder() { + // force use of static builder() method + } + + + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + public Builder datasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + public GetDatasourceCredentialStatusRequest build() { + + return new GetDatasourceCredentialStatusRequest( + datasourceInstanceId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequestBuilder.java new file mode 100644 index 00000000..9d74a8f3 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusRequestBuilder.java @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 72f7fb8e0956 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.GetDatasourceCredentialStatus; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; + +public class GetDatasourceCredentialStatusRequestBuilder { + + private String datasourceInstanceId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public GetDatasourceCredentialStatusRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDatasourceCredentialStatusRequestBuilder datasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + + private GetDatasourceCredentialStatusRequest buildRequest() { + + GetDatasourceCredentialStatusRequest request = new GetDatasourceCredentialStatusRequest(datasourceInstanceId); + + return request; + } + + public GetDatasourceCredentialStatusResponse call() { + + RequestOperation operation + = new GetDatasourceCredentialStatus.Sync(sdkConfiguration, _headers); + GetDatasourceCredentialStatusRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusResponse.java new file mode 100644 index 00000000..cc413136 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetDatasourceCredentialStatusResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3a19b00e6bf5 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetDatasourceCredentialStatusResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional datasourceCredentialStatusResponse; + + @JsonCreator + public GetDatasourceCredentialStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + } + + public GetDatasourceCredentialStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional datasourceCredentialStatusResponse() { + return (Optional) datasourceCredentialStatusResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDatasourceCredentialStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDatasourceCredentialStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDatasourceCredentialStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDatasourceCredentialStatusResponse withDatasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + + /** + * OK + */ + public GetDatasourceCredentialStatusResponse withDatasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDatasourceCredentialStatusResponse other = (GetDatasourceCredentialStatusResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.datasourceCredentialStatusResponse, other.datasourceCredentialStatusResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + @Override + public String toString() { + return Utils.toString(GetDatasourceCredentialStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "datasourceCredentialStatusResponse", datasourceCredentialStatusResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional datasourceCredentialStatusResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + public GetDatasourceCredentialStatusResponse build() { + + return new GetDatasourceCredentialStatusResponse( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequest.java new file mode 100644 index 00000000..d3e4511c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequest.java @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 745ebb281581 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class RotateDatasourceCredentialsRequest { + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=datasourceInstanceId") + private String datasourceInstanceId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest; + + @JsonCreator + public RotateDatasourceCredentialsRequest( + String datasourceInstanceId, + com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + Utils.checkNotNull(rotateDatasourceCredentialsRequest, "rotateDatasourceCredentialsRequest"); + this.datasourceInstanceId = datasourceInstanceId; + this.rotateDatasourceCredentialsRequest = rotateDatasourceCredentialsRequest; + } + + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + @JsonIgnore + public String datasourceInstanceId() { + return datasourceInstanceId; + } + + @JsonIgnore + public com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest() { + return rotateDatasourceCredentialsRequest; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + public RotateDatasourceCredentialsRequest withDatasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + public RotateDatasourceCredentialsRequest withRotateDatasourceCredentialsRequest(com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + Utils.checkNotNull(rotateDatasourceCredentialsRequest, "rotateDatasourceCredentialsRequest"); + this.rotateDatasourceCredentialsRequest = rotateDatasourceCredentialsRequest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RotateDatasourceCredentialsRequest other = (RotateDatasourceCredentialsRequest) o; + return + Utils.enhancedDeepEquals(this.datasourceInstanceId, other.datasourceInstanceId) && + Utils.enhancedDeepEquals(this.rotateDatasourceCredentialsRequest, other.rotateDatasourceCredentialsRequest); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasourceInstanceId, rotateDatasourceCredentialsRequest); + } + + @Override + public String toString() { + return Utils.toString(RotateDatasourceCredentialsRequest.class, + "datasourceInstanceId", datasourceInstanceId, + "rotateDatasourceCredentialsRequest", rotateDatasourceCredentialsRequest); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String datasourceInstanceId; + + private com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest; + + private Builder() { + // force use of static builder() method + } + + + /** + * The full datasource instance identifier (e.g. o365sharepoint_abc123) + */ + public Builder datasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + + public Builder rotateDatasourceCredentialsRequest(com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + Utils.checkNotNull(rotateDatasourceCredentialsRequest, "rotateDatasourceCredentialsRequest"); + this.rotateDatasourceCredentialsRequest = rotateDatasourceCredentialsRequest; + return this; + } + + public RotateDatasourceCredentialsRequest build() { + + return new RotateDatasourceCredentialsRequest( + datasourceInstanceId, rotateDatasourceCredentialsRequest); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequestBuilder.java new file mode 100644 index 00000000..69e72adf --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9b020cd5c52b + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest; +import com.glean.api_client.glean_api_client.operations.RotateDatasourceCredentials; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; + +public class RotateDatasourceCredentialsRequestBuilder { + + private String datasourceInstanceId; + private RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public RotateDatasourceCredentialsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RotateDatasourceCredentialsRequestBuilder datasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + public RotateDatasourceCredentialsRequestBuilder rotateDatasourceCredentialsRequest(RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + Utils.checkNotNull(rotateDatasourceCredentialsRequest, "rotateDatasourceCredentialsRequest"); + this.rotateDatasourceCredentialsRequest = rotateDatasourceCredentialsRequest; + return this; + } + + + private com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest buildRequest() { + + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest request = new com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest(datasourceInstanceId, + rotateDatasourceCredentialsRequest); + + return request; + } + + public RotateDatasourceCredentialsResponse call() { + + RequestOperation operation + = new RotateDatasourceCredentials.Sync(sdkConfiguration, _headers); + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsResponse.java new file mode 100644 index 00000000..d6686240 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RotateDatasourceCredentialsResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c9cd40c8a35b + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class RotateDatasourceCredentialsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional datasourceCredentialStatusResponse; + + @JsonCreator + public RotateDatasourceCredentialsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + } + + public RotateDatasourceCredentialsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional datasourceCredentialStatusResponse() { + return (Optional) datasourceCredentialStatusResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RotateDatasourceCredentialsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RotateDatasourceCredentialsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RotateDatasourceCredentialsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public RotateDatasourceCredentialsResponse withDatasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + + /** + * OK + */ + public RotateDatasourceCredentialsResponse withDatasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RotateDatasourceCredentialsResponse other = (RotateDatasourceCredentialsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.datasourceCredentialStatusResponse, other.datasourceCredentialStatusResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + @Override + public String toString() { + return Utils.toString(RotateDatasourceCredentialsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "datasourceCredentialStatusResponse", datasourceCredentialStatusResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional datasourceCredentialStatusResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + public RotateDatasourceCredentialsResponse build() { + + return new RotateDatasourceCredentialsResponse( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusRequestBuilder.java new file mode 100644 index 00000000..86330b8f --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusRequestBuilder.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9c7d9528a7b4 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusRequest; +import com.glean.api_client.glean_api_client.operations.GetDatasourceCredentialStatus; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class GetDatasourceCredentialStatusRequestBuilder { + + private String datasourceInstanceId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public GetDatasourceCredentialStatusRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetDatasourceCredentialStatusRequestBuilder datasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + + private GetDatasourceCredentialStatusRequest buildRequest() { + + GetDatasourceCredentialStatusRequest request = new GetDatasourceCredentialStatusRequest(datasourceInstanceId); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new GetDatasourceCredentialStatus.Async(sdkConfiguration, _headers); + GetDatasourceCredentialStatusRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusResponse.java new file mode 100644 index 00000000..4e967b41 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/GetDatasourceCredentialStatusResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f3e85a5d5b2b + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetDatasourceCredentialStatusResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional datasourceCredentialStatusResponse; + + @JsonCreator + public GetDatasourceCredentialStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + } + + public GetDatasourceCredentialStatusResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional datasourceCredentialStatusResponse() { + return (Optional) datasourceCredentialStatusResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetDatasourceCredentialStatusResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetDatasourceCredentialStatusResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetDatasourceCredentialStatusResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetDatasourceCredentialStatusResponse withDatasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + + /** + * OK + */ + public GetDatasourceCredentialStatusResponse withDatasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDatasourceCredentialStatusResponse other = (GetDatasourceCredentialStatusResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.datasourceCredentialStatusResponse, other.datasourceCredentialStatusResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + @Override + public String toString() { + return Utils.toString(GetDatasourceCredentialStatusResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "datasourceCredentialStatusResponse", datasourceCredentialStatusResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional datasourceCredentialStatusResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + public GetDatasourceCredentialStatusResponse build() { + + return new GetDatasourceCredentialStatusResponse( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsRequestBuilder.java new file mode 100644 index 00000000..e4c61236 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsRequestBuilder.java @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5e8509595826 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.components.RotateDatasourceCredentialsRequest; +import com.glean.api_client.glean_api_client.operations.RotateDatasourceCredentials; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class RotateDatasourceCredentialsRequestBuilder { + + private String datasourceInstanceId; + private RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public RotateDatasourceCredentialsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RotateDatasourceCredentialsRequestBuilder datasourceInstanceId(String datasourceInstanceId) { + Utils.checkNotNull(datasourceInstanceId, "datasourceInstanceId"); + this.datasourceInstanceId = datasourceInstanceId; + return this; + } + + public RotateDatasourceCredentialsRequestBuilder rotateDatasourceCredentialsRequest(RotateDatasourceCredentialsRequest rotateDatasourceCredentialsRequest) { + Utils.checkNotNull(rotateDatasourceCredentialsRequest, "rotateDatasourceCredentialsRequest"); + this.rotateDatasourceCredentialsRequest = rotateDatasourceCredentialsRequest; + return this; + } + + + private com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest buildRequest() { + + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest request = new com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest(datasourceInstanceId, + rotateDatasourceCredentialsRequest); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new RotateDatasourceCredentials.Async(sdkConfiguration, _headers); + com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsResponse.java new file mode 100644 index 00000000..700a8969 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/RotateDatasourceCredentialsResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 572c78332148 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class RotateDatasourceCredentialsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional datasourceCredentialStatusResponse; + + @JsonCreator + public RotateDatasourceCredentialsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + } + + public RotateDatasourceCredentialsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional datasourceCredentialStatusResponse() { + return (Optional) datasourceCredentialStatusResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RotateDatasourceCredentialsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RotateDatasourceCredentialsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RotateDatasourceCredentialsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public RotateDatasourceCredentialsResponse withDatasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + + /** + * OK + */ + public RotateDatasourceCredentialsResponse withDatasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RotateDatasourceCredentialsResponse other = (RotateDatasourceCredentialsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.datasourceCredentialStatusResponse, other.datasourceCredentialStatusResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + @Override + public String toString() { + return Utils.toString(RotateDatasourceCredentialsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "datasourceCredentialStatusResponse", datasourceCredentialStatusResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional datasourceCredentialStatusResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(DatasourceCredentialStatusResponse datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = Optional.ofNullable(datasourceCredentialStatusResponse); + return this; + } + + /** + * OK + */ + public Builder datasourceCredentialStatusResponse(Optional datasourceCredentialStatusResponse) { + Utils.checkNotNull(datasourceCredentialStatusResponse, "datasourceCredentialStatusResponse"); + this.datasourceCredentialStatusResponse = datasourceCredentialStatusResponse; + return this; + } + + public RotateDatasourceCredentialsResponse build() { + + return new RotateDatasourceCredentialsResponse( + contentType, statusCode, rawResponse, + datasourceCredentialStatusResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/GetDatasourceCredentialStatus.java b/src/main/java/com/glean/api_client/glean_api_client/operations/GetDatasourceCredentialStatus.java new file mode 100644 index 00000000..a9b1049e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/GetDatasourceCredentialStatus.java @@ -0,0 +1,262 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 03caec3de5f5 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.ErrorResponse; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusRequest; +import com.glean.api_client.glean_api_client.models.operations.GetDatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class GetDatasourceCredentialStatus { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDatasourceCredentialStatus", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDatasourceCredentialStatus", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "getDatasourceCredentialStatus", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/rest/api/v1/datasource/{datasourceInstanceId}/credentialstatus", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(GetDatasourceCredentialStatusRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDatasourceCredentialStatusRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(GetDatasourceCredentialStatusRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public GetDatasourceCredentialStatusResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetDatasourceCredentialStatusResponse.Builder resBuilder = + GetDatasourceCredentialStatusResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetDatasourceCredentialStatusResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withDatasourceCredentialStatusResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401", "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(GetDatasourceCredentialStatusRequest request) throws Exception { + HttpRequest req = buildRequest(request, GetDatasourceCredentialStatusRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(GetDatasourceCredentialStatusRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceCredentialStatusResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceCredentialStatusResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.GetDatasourceCredentialStatusResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withDatasourceCredentialStatusResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/RotateDatasourceCredentials.java b/src/main/java/com/glean/api_client/glean_api_client/operations/RotateDatasourceCredentials.java new file mode 100644 index 00000000..e5743dc2 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/RotateDatasourceCredentials.java @@ -0,0 +1,279 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dcb749627166 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.components.DatasourceCredentialStatusResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.ErrorResponse; +import com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsRequest; +import com.glean.api_client.glean_api_client.models.operations.RotateDatasourceCredentialsResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.SerializedBody; +import com.glean.api_client.glean_api_client.utils.Utils.JsonShape; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class RotateDatasourceCredentials { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "rotateDatasourceCredentials", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "rotateDatasourceCredentials", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "rotateDatasourceCredentials", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/rest/api/v1/datasource/{datasourceInstanceId}/credentials", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "rotateDatasourceCredentialsRequest", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(RotateDatasourceCredentialsRequest request) throws Exception { + HttpRequest req = buildRequest(request, RotateDatasourceCredentialsRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RotateDatasourceCredentialsRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public RotateDatasourceCredentialsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RotateDatasourceCredentialsResponse.Builder resBuilder = + RotateDatasourceCredentialsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RotateDatasourceCredentialsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withDatasourceCredentialStatusResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401", "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(RotateDatasourceCredentialsRequest request) throws Exception { + HttpRequest req = buildRequest(request, RotateDatasourceCredentialsRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(RotateDatasourceCredentialsRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.RotateDatasourceCredentialsResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.RotateDatasourceCredentialsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.RotateDatasourceCredentialsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withDatasourceCredentialStatusResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +}