diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b5ac377c..ef23e870 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: 33958fda4f2b946f46f0593aac3a619d + docChecksum: 586f40e432b9bb469fad89ebabfbc480 docVersion: 0.9.0 - speakeasyVersion: 1.789.2 - generationVersion: 2.916.4 - releaseVersion: 0.14.3 - configChecksum: be03d2f5afbc5351e940b5326128717f + speakeasyVersion: 1.790.3 + generationVersion: 2.918.4 + releaseVersion: 0.14.4 + configChecksum: d5edf6a2d997b6ca0f087370023c40e2 repoURL: https://github.com/gleanwork/api-client-java.git installationURL: https://github.com/gleanwork/api-client-java published: true persistentEdits: - generation_id: da2ce852-fd82-4787-ab76-282c5d4a507f - pristine_commit_hash: e67e100bfc2d4e008318688c9b90c15832b1a62d - pristine_tree_hash: 3befd1d0abeb1604cecdd80affb5d2b0ad2a86f5 + generation_id: 9e45cd00-d062-4f3a-bf33-e8ad07f3309a + pristine_commit_hash: a88c2a4fd978a75f979bf1d78cef0f8ca0df74c4 + pristine_tree_hash: 127219ad2e167f35c49a019b2c22a0abfe45869a features: java: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 - additionalProperties: 0.0.1 + additionalProperties: 0.0.2 constsAndDefaults: 0.1.3 - core: 3.55.30 + core: 3.55.31 deprecations: 2.81.2 downloadStreams: 0.1.1 examples: 2.81.9 @@ -32,7 +32,7 @@ features: groups: 2.81.3 methodServerURLs: 2.82.2 nameOverrides: 2.81.5 - nullables: 0.1.0 + nullables: 0.1.1 sdkHooks: 1.2.0 unions: 0.3.6 uploadStreams: 0.1.0 @@ -47,8 +47,8 @@ trackedFiles: pristine_git_object: 3d1f9b105935ea1eded859513fe6b38b36bd9154 build.gradle: id: f07866736216 - last_write_checksum: sha1:bb0d4a1ec7e91057bfba5afc907f91d66b057ba6 - pristine_git_object: e78cd7dfbe8e8f06bd68c2450bd1ae6fe13bec1c + last_write_checksum: sha1:9be12a8d64d242b162875b3c21d0db48c7a4faa5 + pristine_git_object: c9b8956357d3ae8032e06aebaf16905b99cbf13c docs/models/components/ActionAuthType.md: id: 85f17dd1d9c7 last_write_checksum: sha1:e2e0e2b4617367b35aab4d1092d820c2b1856072 @@ -69,6 +69,10 @@ trackedFiles: id: 300b48ceb953 last_write_checksum: sha1:ab39efc4383c1eb016849c7b98f3c2168afb2694 pristine_git_object: 0db759c8c2bbf454a72eb53e14c2620cbe47ca7d + docs/models/components/ActionTypeSource.md: + id: 12e40639f150 + last_write_checksum: sha1:c46c3cdd5cce3f80cd2932f56cccba63fc5ef0a7 + pristine_git_object: e2a0f9c4c04287dcacc66c212d6e826fe8b17874 docs/models/components/Activity.md: id: 40ede959d6db last_write_checksum: sha1:baeecedaf433816a950ec296c6ac1c3dbed85115 @@ -903,16 +907,16 @@ trackedFiles: pristine_git_object: 1ef875526389e3ff8bd4554d0fca806982f67699 docs/models/components/DlpFindingFilter.md: id: 393e15b29070 - last_write_checksum: sha1:1c4eb8267094cc7544365bcf4fd135cd3f4ec817 - pristine_git_object: 108a7202ffb64fade3a17be1a1d48e9d51c7b5ba + last_write_checksum: sha1:7b2dd573f03a7d2bdb030fcf5884c0d6689a5653 + pristine_git_object: 42a0e927820c9f3e8fb5032c2e759e9e3170a765 docs/models/components/DlpFrequency.md: id: faa0e105561b last_write_checksum: sha1:c399109ccd6f639cef1a3e53aeda839d1aa79b9f pristine_git_object: c2f49c25bfdccfc9f56959c2fc639df4d7656adb docs/models/components/DlpIssueFilter.md: id: b57a3ab57eab - last_write_checksum: sha1:a01d1cc11d4a042342c9cf4a17825ac3bd69fed5 - pristine_git_object: 320c8610b543dafd1334bdefa6295504f0628b25 + last_write_checksum: sha1:0e05886a3ff500b5c9c0728f32ae2c83068785d2 + pristine_git_object: 55ae0f6cc2e6e95002959f5fadec761490e50b70 docs/models/components/DlpIssueStatus.md: id: b7ee9c461b20 last_write_checksum: sha1:498a85c82133f124fefe017492eaf9ef18dab57a @@ -935,8 +939,8 @@ trackedFiles: pristine_git_object: 8fdd52ef21fba54bd430384b32ba28f966aa02d4 docs/models/components/DlpSeverity.md: id: 6c57ae37246e - last_write_checksum: sha1:dfdb6488f0ee8fe479e4cb88327f15fafc996ffc - pristine_git_object: daf90f11eb0d40d51468e7d3ca00177ae37af455 + last_write_checksum: sha1:4801297f37c4bd61fa377c4d7ad5c4d38c800714 + pristine_git_object: 5ab3aa7f513def7d7048bebe46446ed74bd3f8cf docs/models/components/DlpSimpleResult.md: id: 3b5204acf80c last_write_checksum: sha1:ad40cf017a5b13cface97bb154ad1f11951d173e @@ -1225,10 +1229,6 @@ trackedFiles: id: 888461be0907 last_write_checksum: sha1:00f1c6da082d74a0a191b7ac23268f104466829b pristine_git_object: d0fd36607eb03356c55a26453907acbcf3963878 - docs/models/components/File.md: - id: 0fb401ec6d4a - last_write_checksum: sha1:7953e0ab989e40fddf8c8f61d528e099868816e8 - pristine_git_object: 714259dd6db319e1cb624c8ec01b18bbda111683 docs/models/components/FollowupAction.md: id: fee3a08ba67f last_write_checksum: sha1:dcf313ae75cc28c3fa06fab3ecb87f117510c247 @@ -1913,6 +1913,94 @@ trackedFiles: id: 5f92876fb5c8 last_write_checksum: sha1:d463001b22ff3419918e31ec7832587341fb35a1 pristine_git_object: 083cad412eb152684e3895da619d1f4f393ae0bf + docs/models/components/PlatformSkill.md: + id: 48b17cdbdcf3 + last_write_checksum: sha1:6a89514c591aa917f1859e7f695b5a2e67d0ce1f + pristine_git_object: ae055121bbcfc7fcdd5fdbe10ca373d84c54e638 + docs/models/components/PlatformSkillCreateRequest.md: + id: 9955d115bd84 + last_write_checksum: sha1:e65f833fa72540130a427a7b579be1a2932a4eec + pristine_git_object: 8063c065c68b78da0a7026368dbbfc4342fdd6ed + docs/models/components/PlatformSkillCreateRequestFile.md: + id: bbf43f2772a4 + last_write_checksum: sha1:c65ae7c4817bf9a0f170df67f6cc247516b9ce10 + pristine_git_object: 85349c66f7e05beb1d5f931451453c2bbd7a6212 + docs/models/components/PlatformSkillCreateResponse.md: + id: c8a1ef84cd61 + last_write_checksum: sha1:6a7f35a369c2356fee620ec7001e66d3ca59bc6a + pristine_git_object: 2f780a0d7d13a4447dbcd7f33cbc3f6204448368 + docs/models/components/PlatformSkillGetResponse.md: + id: 9463c73e1a4f + last_write_checksum: sha1:7003d9e9b76b756614e56b880a7c1c94826c9173 + pristine_git_object: 295031b7d5aaea130707b845293c4e8c0e3477bb + docs/models/components/PlatformSkillOrigin.md: + id: 3f51c4b399cd + last_write_checksum: sha1:60470475b7e2bf5c205090330b0e592b6a3a4f28 + pristine_git_object: aa217c27d2ecf215776707434717e38960439948 + docs/models/components/PlatformSkillSourceProvenance.md: + id: b3c0d1b1c723 + last_write_checksum: sha1:0e672c92cecb5cfecaa887dc16afb52f970d3eff + pristine_git_object: a42f8d71a53b1a3422e55325ab4259157dfa2677 + docs/models/components/PlatformSkillStatus.md: + id: 9c586f4b13dd + last_write_checksum: sha1:4297a7da9090e5fc5374779ebd20c2ceef751ecc + pristine_git_object: f3ebbcf2410f7df6b49920e0611ffd1c6c81053f + docs/models/components/PlatformSkillSyncStatus.md: + id: 0475ccc16596 + last_write_checksum: sha1:8560f0773fe9ce87d41c1f499bf30766dbf50e2b + pristine_git_object: d8195068b74dd1f14eb8649ec44e53ae551d143c + docs/models/components/PlatformSkillValidationFile.md: + id: 378df9889c2f + last_write_checksum: sha1:d2d16851d4af2069e171161172ad11b7c377ac35 + pristine_git_object: 5ec60b18700194f7bb2fdbaab731743fdaba86b7 + docs/models/components/PlatformSkillValidationMetadata.md: + id: 3b6dd9b2e6ee + last_write_checksum: sha1:659d029825abca1a575b8a672a1fc8747eff618a + pristine_git_object: 93c106a60ba60bc8d7aa664366313518376f5ffb + docs/models/components/PlatformSkillValidationRequest.md: + id: 20113713adac + last_write_checksum: sha1:d84fe2ac6420d500259a26010240a049167dadf4 + pristine_git_object: 8f3687b4001c8fdb8d6eac227fa7c881b6e0e803 + docs/models/components/PlatformSkillValidationRequestFile.md: + id: 2d3f7cbe9723 + last_write_checksum: sha1:7203f5eeb67a55921c6faaa03fe8f43755ecdc70 + pristine_git_object: ea04d8e06d58013b7e2f107eb120f6888808f233 + docs/models/components/PlatformSkillValidationResponse.md: + id: a5a2bc520b33 + last_write_checksum: sha1:cefb02a857062fbb3c4e3a2fa8e75c0a274ab9d4 + pristine_git_object: 29d844913a5e7b100b2e81e0516cdc30a2818e50 + docs/models/components/PlatformSkillValidationWarning.md: + id: 075c0a237d51 + last_write_checksum: sha1:616a6347fe86a9860b6c32578bbc690c61bb245a + pristine_git_object: 844c546fab55a357fdeae147cf042bdcd8f1524a + docs/models/components/PlatformSkillVersion.md: + id: 3aa27198b59f + last_write_checksum: sha1:e4a3220ae2b9ae4b2e24ef9994d55d6c6bb581cb + pristine_git_object: 68f3b3f9267dc02b51ccf58b733c41ffbf394960 + docs/models/components/PlatformSkillVersionCreateRequest.md: + id: 162f2120c0e8 + last_write_checksum: sha1:abb2598398be8ed3987836a2b23eef0d9718d2c8 + pristine_git_object: f12b3e93b68728d74555b0cfa24d52929f131862 + docs/models/components/PlatformSkillVersionCreateRequestFile.md: + id: d2eb059149db + last_write_checksum: sha1:84254249a061b2cb129d8410a76d1fc7f020eb96 + pristine_git_object: 1058233b6acb9b97e69a89aae9d83c7bbe2249ef + docs/models/components/PlatformSkillVersionCreateResponse.md: + id: 2abed69a0981 + last_write_checksum: sha1:8ea1776eabaa7e14f85854c1d36cb310d769b396 + pristine_git_object: 5480bf91d46adf7c1d77d183f351ab994afc7999 + docs/models/components/PlatformSkillVersionGetResponse.md: + id: ac8901d1afd7 + last_write_checksum: sha1:e8a52d8ca1b29ae583d46eed61e3b3fd484c4f90 + pristine_git_object: 8c0f38cec0d7754037c3cec1078e829a5fc78f3f + docs/models/components/PlatformSkillVersionsListResponse.md: + id: d2d7da9efee4 + last_write_checksum: sha1:4c69c9273a301358c699c1835f64d8d8f5f7eb72 + pristine_git_object: 7fad46d7e05d89c29e53824bc27b670616c3c2d0 + docs/models/components/PlatformSkillsListResponse.md: + id: 26c44c678682 + last_write_checksum: sha1:285e8b28837c7b6cd376aa5fe63ceb1dd7e402b6 + pristine_git_object: 1a206faa97db13103b326b757737cb9882083914 docs/models/components/PlatformTimeRange.md: id: e23ca7368dc2 last_write_checksum: sha1:48c1a8a19bac073372bdf5b5e688865d568d6225 @@ -2347,8 +2435,8 @@ trackedFiles: pristine_git_object: 1134a9832912848d3bbf03bed441b272db6e8492 docs/models/components/ToolMetadata.md: id: 75462b106367 - last_write_checksum: sha1:83b890c487f0a91d5c072babacdc19f7aeab20c6 - pristine_git_object: 0f42b42fcca9e0c8db2f9f191b244d71cef96c8c + last_write_checksum: sha1:66c19a04f7a88891b30caa8583eab9ca022559f6 + pristine_git_object: 83acea7f020c244ca9c1cdec7a3f6539fd2edb27 docs/models/components/ToolMetadataType.md: id: 1cd209a54016 last_write_checksum: sha1:baad76ab8ac32b75b8cf6467efa228e2ffa7af26 @@ -2471,8 +2559,12 @@ trackedFiles: pristine_git_object: 749b24f3d81ece35d8762113e6ece27464d11d98 docs/models/components/UploadChatFilesRequest.md: id: dc1aafa84119 - last_write_checksum: sha1:ae149a5eefe87ebd3ac5543bdb520b2df86330f1 - pristine_git_object: b5e24245b7c2525c7b83cfcd8329d4be01c2395d + last_write_checksum: sha1:7e854322ed9e79d603444a983ff4bc5a260193d9 + pristine_git_object: 5942e032521fca4a13e18397e9d585258049e387 + docs/models/components/UploadChatFilesRequestFile.md: + id: cfd78be2042c + last_write_checksum: sha1:cc3dcfdf767dc479747188c3497b9c8c387a29b0 + pristine_git_object: 819ca139226c8a8ec3f331180112bf838d65ff69 docs/models/components/UploadChatFilesResponse.md: id: 9729ab1365b0 last_write_checksum: sha1:c6b1f69bcb492698ca44f0e1cc7b7246fd82c4e3 @@ -2559,8 +2651,8 @@ trackedFiles: pristine_git_object: 18849148ae82d2cbcd0af4a57b2c5d76b4dc8908 docs/models/components/Workflow.md: id: 891cae27e805 - last_write_checksum: sha1:996be9a34efa7192d527eeae727f9a6dc713ad22 - pristine_git_object: 9212a9afb7ae734cc7605b5b717b010c3a6690df + last_write_checksum: sha1:0e247c05b41cb8272b148393d343bc8f3aa03e5b + pristine_git_object: a33f5dca5a33173762ed4dfb145396c77edc91bc docs/models/components/WorkflowFeedbackInfo.md: id: 0c46cf382b83 last_write_checksum: sha1:400c9e65d35295047f35fc437160616ff09957d2 @@ -3241,6 +3333,70 @@ trackedFiles: id: 7ab2beea5f75 last_write_checksum: sha1:b019dc80b72396e4103f40bc931b1a39b8b00117 pristine_git_object: 10908aeaba0726a7003a58e259f514c0cb3d33ba + docs/models/operations/PlatformSkillsCreateResponse.md: + id: 96b86585c676 + last_write_checksum: sha1:974778f39663cc8d3463668fe26100c2ada62aee + pristine_git_object: 89a09bdbe0bb59863d51a0920a052f7f372ae171 + docs/models/operations/PlatformSkillsCreateVersionRequest.md: + id: ef53ec037250 + last_write_checksum: sha1:59d3b0b90649dd1d77abd573e662f0c5741420da + pristine_git_object: f84aa0e8ad93dd95ef696d83703a04697b909965 + docs/models/operations/PlatformSkillsCreateVersionResponse.md: + id: d0a581ff3760 + last_write_checksum: sha1:998534f29a92bf1ac3ffb27cb3ccd14172193acd + pristine_git_object: 712dfb51fd7cc7c2fe2995ce1ef6b050f3d0ee1e + docs/models/operations/PlatformSkillsGetContentRequest.md: + id: 040abbac04eb + last_write_checksum: sha1:31c64954bbaac47417a34588c66f0686cf62a325 + pristine_git_object: 4651dffe41395b4b355bd83ba99882de256220c1 + docs/models/operations/PlatformSkillsGetContentResponse.md: + id: c5e9eeb2990a + last_write_checksum: sha1:abe3c57a0aaa653b338411982153d846d603c8bc + pristine_git_object: 8b8572043c86fa20d5ea5a35ddb3d0b6766b340e + docs/models/operations/PlatformSkillsGetRequest.md: + id: 6bcca0e1d876 + last_write_checksum: sha1:6fb8769f827b2ac8b85140e1223e1369dc708cd1 + pristine_git_object: 1e6a21c8542c5444c38e944bdd200dac7d56e71d + docs/models/operations/PlatformSkillsGetResponse.md: + id: a178cbde7bf1 + last_write_checksum: sha1:29e127c2743edc3bf93cca5b2f639736d6be73ae + pristine_git_object: a2da05c0c876106339be78dc15ede106b3eeab3a + docs/models/operations/PlatformSkillsGetVersionContentRequest.md: + id: eb61e4f303b3 + last_write_checksum: sha1:63a65acc6a3626a3eed23f72f612eb57471811b1 + pristine_git_object: 8e955d01fd73899ab13fbde106e0781fbf2ff741 + docs/models/operations/PlatformSkillsGetVersionContentResponse.md: + id: c619d0c1a240 + last_write_checksum: sha1:de22ad9f975263986e60e689cebda56b543723a8 + pristine_git_object: ad3c392ef9c1a76294ddfc5575e32e427f5e393a + docs/models/operations/PlatformSkillsGetVersionRequest.md: + id: b5d9450a0b00 + last_write_checksum: sha1:fc04fc26c0a75f398cbc1a3db7068e260ade870a + pristine_git_object: a05306f0bfc90bd7332063ffcc484950fe87a431 + docs/models/operations/PlatformSkillsGetVersionResponse.md: + id: 6b0bd382f93b + last_write_checksum: sha1:c0c162ac17de0df75aee9611193724599937f52f + pristine_git_object: 735c5c8b08ca671704ae27fc83e75af45337c11d + docs/models/operations/PlatformSkillsListRequest.md: + id: a2df3ca6e157 + last_write_checksum: sha1:df7ccb85f8be9bcc2d3d3171220d99a153530755 + pristine_git_object: 15f66cfe08bdc084dcfc4570d020d7b4094de670 + docs/models/operations/PlatformSkillsListResponse.md: + id: ed5d42d5c8ff + last_write_checksum: sha1:79b3a9ccf00e0280e3f960cffe929808fbb389ae + pristine_git_object: c362bbc10764f3342faefe3b31e5d77851615270 + docs/models/operations/PlatformSkillsListVersionsRequest.md: + id: 42b2f47edfdc + last_write_checksum: sha1:88acd6ddc6d2cd863dd9e410f082b89270de4fc1 + pristine_git_object: f9989e8563cd79eeb59b9305870765bab1eb480c + docs/models/operations/PlatformSkillsListVersionsResponse.md: + id: 9fcdd9511f77 + last_write_checksum: sha1:a19e19a240de4f6032549e9131b4ac8ef172c541 + pristine_git_object: b3b9b7616cf54e49f8d709c0037f7a466aa752f6 + docs/models/operations/PlatformSkillsValidateResponse.md: + id: 39c4aab4c440 + last_write_checksum: sha1:2c97446eb0319b0ea865cead2f52e8a9b25a3b33 + pristine_git_object: b5ced65a6250a643e9e9163762ab2b5bf100c851 docs/models/operations/PostApiIndexV1AdddatasourceResponse.md: id: 6cd8415eee56 last_write_checksum: sha1:0b68cdac07ec9e7f87091e7dfc4a45184dedb70d @@ -3413,6 +3569,18 @@ trackedFiles: id: 2c89658daeb9 last_write_checksum: sha1:1f70ea386c54fba3cfae8113f3ad163eaadfc789 pristine_git_object: 907826eac37b40c1e5c7da923ecfbaa8aa4c932e + docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md: + id: ac201f74f31c + last_write_checksum: sha1:1b3e1ac050ebdb98b62ed8e27c1fe60e95ec428e + pristine_git_object: 5240e204ef286419706a31978cce18608035d760 + docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md: + id: 17a5df3fddb2 + last_write_checksum: sha1:26a196baed97f24e26df9d709886d68f1b02f6ae + pristine_git_object: 57dda74eb0035583b408acbd6002a329be805c16 + docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md: + id: 9ec31b9509fe + last_write_checksum: sha1:fc0f1e3de98796e9c04145065153b9fbc856fd48 + pristine_git_object: 202f59dd47ceeb9769b125eb25b44160d5e270b6 docs/models/operations/PostRestApiV1ToolsCallResponse.md: id: 83345495310c last_write_checksum: sha1:071ae496fa93ff207a262eaccf3bfd7f985f3f76 @@ -3555,8 +3723,8 @@ trackedFiles: pristine_git_object: 6603db8c8828357d67059a746ee541aee6c45301 docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:ade661010cbab46a895b5086382fcbf9281e4cff - pristine_git_object: d38cf187d02dd13b1ee3b610410648a0d2d73d08 + last_write_checksum: sha1:86df183211d18a2e10078356acee97d75646a04d + pristine_git_object: 441cf94f7eb389b36a606c58ec3a8dd28f128895 docs/sdks/clientagents/README.md: id: 8e00e6d6b64e last_write_checksum: sha1:54f8ce2cc631099c310bccb470a0967d84215a67 @@ -3607,8 +3775,8 @@ trackedFiles: pristine_git_object: 2b5ea396586844a3e738b00c408491f8db9986c2 docs/sdks/indexingdatasources/README.md: id: aa113bda8cbc - last_write_checksum: sha1:0fb77e6b7ce90ed5c388c2b35fe3af1e22b61163 - pristine_git_object: 8806406063917507f03e54c6be099807518b25d1 + last_write_checksum: sha1:2b687f13e8f859ebda00137b350e1b0076f016ad + pristine_git_object: 5184de29e10e0dfaa31007b82ac9f06b8d9f5d3e docs/sdks/indexingdocuments/README.md: id: 7ca38da53414 last_write_checksum: sha1:2d8c525b2cd55d063e285d2cce46e98ada2ac31a @@ -3649,6 +3817,10 @@ trackedFiles: id: 5c534716244c last_write_checksum: sha1:fcf7c1cf8c87935eca2cc104391ffdd2b25473d4 pristine_git_object: 6555e422489b48401d8c5896d8902dd40752d251 + docs/sdks/skills/README.md: + id: 3a14a5c90791 + last_write_checksum: sha1:6ae19a0cf5863abaca6a9a84f015bc2a3529e78b + pristine_git_object: d69c628dd1d33d6fdbb33fed97b59edad07a3cac docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:f463db245c247de5af8035245870ca014bbe82fc @@ -3667,8 +3839,8 @@ trackedFiles: pristine_git_object: 3decbce5bd40edbe278c1c5d2dbf585808e51d9a gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:8379af9fa277a6752c1e33a237c83a9c494333db - pristine_git_object: 947c27d5aa59d385012bc2e657ef72db71c1959c + last_write_checksum: sha1:befc4a3824a4d11786b3517a0cc3c5fe9555903c + pristine_git_object: 706f89784c40c2e0255d6d368812ff7505eff14b gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -3783,8 +3955,8 @@ trackedFiles: pristine_git_object: b688538c7b9c976d4493061d3608ebff442b6875 src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java: id: 41f5be2f8342 - last_write_checksum: sha1:454467031a5fa7d6a7abb56ccdeddf7e1a778a7e - pristine_git_object: 043e1a834f9199a6e52545d2a6e6c46872ca5753 + last_write_checksum: sha1:eaa06c4b67e38408dddada77a5e77ce18d3382cf + pristine_git_object: ec55bc7dd2778bc301453710fb896ae15aae5bcf src/main/java/com/glean/api_client/glean_api_client/AsyncGovernance.java: id: 38b2443ece41 last_write_checksum: sha1:d98fcd8de4bbdd2455f0b186d630f68cf0aede69 @@ -3803,8 +3975,8 @@ trackedFiles: pristine_git_object: 4f05d364ccbdac188eee0257a4db815fb85ac61a src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java: id: dae1595db559 - last_write_checksum: sha1:8772da60d5be2abfaac9afd129d35762ed92d29a - pristine_git_object: 5976744e34c4f0e7b188d1837784f11c4dc12d8a + last_write_checksum: sha1:ed2121792db8bff0f66c13cccbfbbe7fae6318bb + pristine_git_object: 7598fae7a83360b8594da52f52bcb33a194c51af src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDocuments.java: id: 979f8541bead last_write_checksum: sha1:afadb6995b7992b3287b1188025343d72677f529 @@ -3845,6 +4017,10 @@ trackedFiles: id: 443645b885fa last_write_checksum: sha1:0241338c962eda005c9e6c3fe4f66d78030a20d2 pristine_git_object: 4a17ff91f2cad3a65578dd16fac8bfbb864699e5 + src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java: + id: 809381bacfb1 + last_write_checksum: sha1:29d6819f9484b63146b5adcb60c83007420a0712 + pristine_git_object: c1f1a5a298ae000e83bb2cc494aa25d22f96d20a src/main/java/com/glean/api_client/glean_api_client/AsyncTools.java: id: 02ad87504d7a last_write_checksum: sha1:506200f5eeb1be124b9352d28f9db587d0b12cad @@ -3915,8 +4091,8 @@ trackedFiles: pristine_git_object: e9ce0228b65e0b98e94830159dd24e3cd4abb9d3 src/main/java/com/glean/api_client/glean_api_client/Glean.java: id: ebe9053b14eb - last_write_checksum: sha1:0d365163ee1902e4797ba948db1a93f9f8a29ad1 - pristine_git_object: 3a9023767e0eb05306b07dd990a5e9d59b6958a1 + last_write_checksum: sha1:3cf8f8d0570426c19edc5a00e3de14d0c3f12b69 + pristine_git_object: fe8fc29c2dc444fc98c17f7dc8ff64af86bb1f18 src/main/java/com/glean/api_client/glean_api_client/Governance.java: id: 2d4a3c95da6a last_write_checksum: sha1:66221fd24d5e17ecdfed6bf44bbd6f73a1f93c67 @@ -3935,8 +4111,8 @@ trackedFiles: pristine_git_object: e6bed06813bf7f083e5ff0a60416185556f55a2e src/main/java/com/glean/api_client/glean_api_client/IndexingDatasources.java: id: 1437e6488e50 - last_write_checksum: sha1:f0efbcc7246a51742448bd5b69b4c2220573c740 - pristine_git_object: fa37373f9b7472a2e16d9f653f18eaeb033118ec + last_write_checksum: sha1:1beb6d86531442d96bd1c58c887efe1afede442a + pristine_git_object: 54668f98218e77c84929762cd13b3d1990eff256 src/main/java/com/glean/api_client/glean_api_client/IndexingDocuments.java: id: b8e047968f3b last_write_checksum: sha1:be58287d33e4d34fde481a016fe1606652642ca8 @@ -3975,8 +4151,8 @@ trackedFiles: pristine_git_object: ffae914775eb41ff311371f62504344a59d090fd src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java: id: d5fcc61f5992 - last_write_checksum: sha1:0425f25702347060031630a96596cd0a8c713edb - pristine_git_object: f24764cdd8070d3dd11fbfd5a0ef3ee8657a898e + last_write_checksum: sha1:5f2abe4bd5f2bbe9151296557cc32c364087f6da + pristine_git_object: 168fb957972ca8e89a55089205bf4d11ff6078e6 src/main/java/com/glean/api_client/glean_api_client/Search.java: id: f22d94b920b5 last_write_checksum: sha1:803fcb8e55cb4a76ec275ae45b83730fc7ed18c7 @@ -3985,6 +4161,10 @@ trackedFiles: id: add211a7c1dd last_write_checksum: sha1:060fd502a5844abda3dba22f9e00ca79f8317f94 pristine_git_object: f1e58a1696e5159e96259e20e83ca6f5584f810a + src/main/java/com/glean/api_client/glean_api_client/Skills.java: + id: 6903ae835067 + last_write_checksum: sha1:54a4186811b3fcdafadec8eb744ca047ac877a3e + pristine_git_object: 0859b0db256a7e69e48cca31377a339dac27e07f src/main/java/com/glean/api_client/glean_api_client/Tools.java: id: bb072637f39b last_write_checksum: sha1:052d5febd57bebffbebd0884fd5698bff5cd20a7 @@ -4017,6 +4197,10 @@ trackedFiles: id: 9ed3dcd26676 last_write_checksum: sha1:a1c7b9aadfc2dc06c140e748b55e8cd2326bd58a pristine_git_object: db315fd0cfa57226062f1331fb1a40e827d4d101 + src/main/java/com/glean/api_client/glean_api_client/models/components/ActionTypeSource.java: + id: e0b3f77e465b + last_write_checksum: sha1:95d7fc7ea85948a062075175e0b793a693331d05 + pristine_git_object: 9fdeb3ad7369c16540b798a338d93ab7d24fbd70 src/main/java/com/glean/api_client/glean_api_client/models/components/Activity.java: id: be1b046048ca last_write_checksum: sha1:9534cbc8b5d06901e546af50c28019dc8d3ed074 @@ -4851,16 +5035,16 @@ trackedFiles: pristine_git_object: 1970433c9d5d8903ee9d5a195adfa48c9c5c60ea src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java: id: dc525d4858a5 - last_write_checksum: sha1:96f3ae141922c7d9bde996a60c84e46e6eba3e6c - pristine_git_object: 478d86925438a5315209d92a0c7dec717e77536b + last_write_checksum: sha1:318dc60c932de213985c506185a82625dd6124f9 + pristine_git_object: 92425052aa29e9f60cfdbd76b26f9984a7eca857 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFrequency.java: id: 28cba0614d04 last_write_checksum: sha1:58ac2414e61346b2aad1fb35dc2eaa5aaf728111 pristine_git_object: c5c97734fcd128a6065bb6a73d640a6dc8df4954 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpIssueFilter.java: id: 6ff00a980f91 - last_write_checksum: sha1:f8e8a4971363e6a45c373cb95880372854088c9a - pristine_git_object: a56dabf37cfd58cf380a67f8bde3ed04e1bee531 + last_write_checksum: sha1:5ddfc92fe07c3bff781f1b23e553e1361fed65f5 + pristine_git_object: ce30dc8d1981a2f2022e79f628ebe6466bcf76ac src/main/java/com/glean/api_client/glean_api_client/models/components/DlpIssueStatus.java: id: 42641eb02b5e last_write_checksum: sha1:09026611cb4ee4f4d2e2f1e9a1e7d224802ea73a @@ -4883,8 +5067,8 @@ trackedFiles: pristine_git_object: bf1c5d79ebbebc0021f2e9be328902e4193a2a30 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java: id: 2e2142ed7cb7 - last_write_checksum: sha1:32aa19858a221982e9f0e2ee76c1cdbbef4abc2f - pristine_git_object: 2f7a0d6a20638c453037102979398cd7d2a9d4fd + last_write_checksum: sha1:29c6e17a58c704003b84700e0b5a6c1ba8e0c37d + pristine_git_object: db14be57b4b77fb249f302138311d0bec8a737a9 src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSimpleResult.java: id: 56f2d153b80a last_write_checksum: sha1:a7928fb22f5d5d063a16c563bc23de6baafefe26 @@ -5173,10 +5357,6 @@ trackedFiles: id: 0ddc68d1cc6e last_write_checksum: sha1:bfeb24deff759827001f2d2009fc198a1da1fe8f pristine_git_object: d7f0c4e4119c65240e5b32932de9c6e80c080510 - src/main/java/com/glean/api_client/glean_api_client/models/components/File.java: - id: d3cadec42992 - last_write_checksum: sha1:68ed36e37944c612b846290f88de33f5d75d0641 - pristine_git_object: aaa9293ffcdaa77f581eb37e92ce392ec1702571 src/main/java/com/glean/api_client/glean_api_client/models/components/FollowupAction.java: id: cbc109022739 last_write_checksum: sha1:5f324b1fa1ababe8c94ac16d2d15b786327871d1 @@ -5861,6 +6041,94 @@ trackedFiles: id: 170859d5c40a last_write_checksum: sha1:f6bb81d05003571db41220e1d40d54a854206d97 pristine_git_object: bba2b20565c5103d873fb2de0ca511298695c829 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkill.java: + id: 11a29891a283 + last_write_checksum: sha1:e77a0aafec5bb5d8d40466d462b0dad59d2c81db + pristine_git_object: 06ad3a2718f4d3fed8a3875f57099390eb1ff046 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillCreateRequest.java: + id: 79c8c487164f + last_write_checksum: sha1:c882d4ca392fb7e770eac10f51a68457d485525f + pristine_git_object: c12e327a8c414af037f005cdc30f35eafb81b414 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillCreateRequestFile.java: + id: 8fb36cf804ac + last_write_checksum: sha1:0fd154c9716a2fd081d67a52255f4c6838eecbaf + pristine_git_object: 4f533cb92f63974350c795addb017f421c6d7ec2 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillCreateResponse.java: + id: 5ea0a59847e3 + last_write_checksum: sha1:12c857ec8034bf32a501eed5c98502841e294081 + pristine_git_object: b0b85a5a09db995238c6d98a722dcbb22ed39090 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillGetResponse.java: + id: 88de4cd9201f + last_write_checksum: sha1:6c648eb968a6315e75b300f64bac9535c5b4ad02 + pristine_git_object: f442b75f10fdaef7ca8b3114292ea367933bd5f4 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillOrigin.java: + id: 673d58eb0c96 + last_write_checksum: sha1:c5f62255b8b368c6b850127f99cc7e09e35d14a8 + pristine_git_object: 2694ce8a273231a3f3ee30422e5694273ae5d3ca + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSourceProvenance.java: + id: 1fb785647231 + last_write_checksum: sha1:318bcb6327c7023217b0aff63cbabab2d3edacd2 + pristine_git_object: de7125a5376fa7a396097349518bff00c0c9642a + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillStatus.java: + id: d165c204cdfe + last_write_checksum: sha1:89b04089b9f7138b635380c39a0ab8bf1eb28cef + pristine_git_object: e699f0936477647cce8b2b63fb9e11c87385dfde + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillSyncStatus.java: + id: 9b52c0471fec + last_write_checksum: sha1:cec4bc12d4d8c5b20508d90697efd3d7b8423fef + pristine_git_object: 201289404dd7c8e35dc64503796481f4cd2fd79b + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationFile.java: + id: ab9dc998ea08 + last_write_checksum: sha1:e7848766e9390157fff320554a1a4d27431c3403 + pristine_git_object: 23a88dfda0b173ea2ab8d7434c0d184f531f97c5 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationMetadata.java: + id: 8a21225a4276 + last_write_checksum: sha1:8a1bfff0f4a3faa9fb7cd3877af28ef1ccc2dc6a + pristine_git_object: 47fafe3b19f2a7c3aa559ff98d486eda9dd388ed + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequest.java: + id: 05218a29e837 + last_write_checksum: sha1:876c4f3cde6d6e8d3f44a944475d06da21807d85 + pristine_git_object: 200069e395c48c36a94ed5570368a257117c57b5 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequestFile.java: + id: cccf15ffd7ee + last_write_checksum: sha1:1cf58a2cfb2cacaa680c558187276355ab1fa2a3 + pristine_git_object: 8f091310d9bf706abb2751877017601c98f4101b + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java: + id: e6f17469edd8 + last_write_checksum: sha1:4717ee8627173ba568b8fa7fa2abe58c0ec46815 + pristine_git_object: 6ca7a5d51183f91d990c9f9bb9063f885e341dd6 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java: + id: c77caa9172f6 + last_write_checksum: sha1:e0e6ad69447149766419efd5bf5c6292d5752c2d + pristine_git_object: 32e7d04b122203a058fdbeaa704f12622ab1831e + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersion.java: + id: 75d21c0e97e9 + last_write_checksum: sha1:ba6a0ff5f12620ff897fb05f690f177146f9dca7 + pristine_git_object: abd2dc9a7dcc98f2416c9d0ce9c4747bf6df1717 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequest.java: + id: 79f6ea0ae982 + last_write_checksum: sha1:4d50ad813df11db3744fcf6d3c3aac1ebe1d8466 + pristine_git_object: 6faa3454dad58f9bab82716a743acd2af59fd7e7 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequestFile.java: + id: 3faa3ee4aa50 + last_write_checksum: sha1:ba7c4fdcb7f3698ce60d048c6cf55a1f46ca9040 + pristine_git_object: 30286eb29a2b0ddf5cadf7b693f413879ea2a17a + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateResponse.java: + id: 4de73b25c284 + last_write_checksum: sha1:4c84026ec981814b9160aea545960fbefbce68b1 + pristine_git_object: 95b938aa36e7d17525f45969ac8326a13499a2f8 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionGetResponse.java: + id: fdb7937e248e + last_write_checksum: sha1:30313366161c5e895fd767af9eacf62aa64a0383 + pristine_git_object: 1e01cab6a00210f49537a3d1db5ccc296a832055 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionsListResponse.java: + id: dc1aeabade78 + last_write_checksum: sha1:506a7531054c8b4506a0359aeb6ed6ce37432272 + pristine_git_object: 54ae3c219f52bf472bfb615a9da191e5b530c571 + src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java: + id: 33ab82accff8 + last_write_checksum: sha1:2428e90bdb520d8f5932542298d3247c4e2b7fb4 + pristine_git_object: 174834b7e10119ec5e4819959a975a0d03231eb0 src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformTimeRange.java: id: ab9269c32c6a last_write_checksum: sha1:6f3c5cb8d6d2a61f8d2b7ee42a1d7b73ac02c6b7 @@ -6295,8 +6563,8 @@ trackedFiles: pristine_git_object: 2e05317d939cd2a9e150f8e7345ab2228458b1a0 src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java: id: 1cf9a2c7160f - last_write_checksum: sha1:f928fc8a3a1757a865007cd77e4f335df473cfd7 - pristine_git_object: 5a26eff748cd0c49d1d553e243e34f6440566a10 + last_write_checksum: sha1:c416d5d832b757f36a783b460968faa511c5f6ca + pristine_git_object: edf1002d9a10c03b92831285ac2f286d81921077 src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadataType.java: id: 2b9cf4b714da last_write_checksum: sha1:3de19dbf1950823a017ab9d1b44325689627c046 @@ -6419,8 +6687,12 @@ trackedFiles: pristine_git_object: 404709ae90528674817fd3e63a51a1de34440939 src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java: id: 2ecd2a5f0d41 - last_write_checksum: sha1:8145982c75338bae1f919a03d38fc07d3842b41c - pristine_git_object: b88e34c81ceee0b120b83666725cb715e4ecd074 + last_write_checksum: sha1:6aecd23e24269a3dd2624bc659d2bf59dfbb9ea4 + pristine_git_object: 1f957f8a09ddc8b289fc27c4893593a8abfb2fa6 + src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequestFile.java: + id: 5ff194530553 + last_write_checksum: sha1:d0510c7c338e8be5a4961523dd0886eec06cafff + pristine_git_object: c566f168ea7e180b32ea94a17bd4201d3d7d503f src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesResponse.java: id: dbf9ec12e481 last_write_checksum: sha1:aba3bef8d7f8e2bc84a4bf168a534343788c1446 @@ -6507,8 +6779,8 @@ trackedFiles: pristine_git_object: 347842229349fb95234660d05bcdb239186b80c4 src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java: id: 362d77a90ee3 - last_write_checksum: sha1:ff4df4460e8e2c8aaf3e17715a9bddf4c03f782c - pristine_git_object: f6b7f60b6ff1a0d5ab7758d28057e38ade48c000 + last_write_checksum: sha1:e395074204467f1ba976acadd7fa6e20ca578763 + pristine_git_object: 774d0e88cb7cbd1cbd045f175211b14601b997fe src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowFeedbackInfo.java: id: b19d5571d1d0 last_write_checksum: sha1:3b1f51a698d75f93eef07f9fbf7e4fdb6114e2c8 @@ -6909,6 +7181,42 @@ trackedFiles: id: 82db0b41fde4 last_write_checksum: sha1:7af4c73a77eeb27581501f320f4b69e76cf83d62 pristine_git_object: 18d1426633220ae8c17fb39a810f941ece0a2713 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsCreateRequestBuilder.java: + id: 34e6aff56995 + last_write_checksum: sha1:cd6eea55a65cf4132ac85f8303682e7be270b341 + pristine_git_object: c1a970c852c653262a4bbef2c8373c9551f6fecf + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsCreateVersionRequestBuilder.java: + id: e7cecbc11235 + last_write_checksum: sha1:cbfa979de3aacfdefba233945e3e04f42f7f24d7 + pristine_git_object: befd6c6656bd6864d7919c18b93784becac676f3 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsGetContentRequestBuilder.java: + id: d5635651d046 + last_write_checksum: sha1:1789ec11e0197d39c7dcde5c508e9618490d650b + pristine_git_object: 36bdaae73646c498c5c7976216f3288b57b865c8 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsGetRequestBuilder.java: + id: 6446a69d453f + last_write_checksum: sha1:17bd5be18252d9907fa1f81155f67c125a9275fc + pristine_git_object: af6066c6c3728f1b96a393f9d1cfb3e91d3a1847 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsGetVersionContentRequestBuilder.java: + id: 27b1c9f6a19c + last_write_checksum: sha1:07471b8396e8345f9ab21a6ab1d6f8ddae5c4798 + pristine_git_object: 3e6570eaedb3dbd1291db9be49ba1afbe52ec136 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsGetVersionRequestBuilder.java: + id: e76fc3a6e16a + last_write_checksum: sha1:c984584f1f1359792cb0060001ae28a98da66591 + pristine_git_object: ca38790c005c00955448bcad13e03c4990c6c4e6 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsListRequestBuilder.java: + id: 9ce19ecbdb6d + last_write_checksum: sha1:fece1fc2d4f39e8e5e704f5db8d177b19958544a + pristine_git_object: bac4251507ff67e2e21de3b73c423e33425955f1 + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsListVersionsRequestBuilder.java: + id: 4ed6e7226174 + last_write_checksum: sha1:c839dba1a5d49f729457ae2f0f30b14c03ec1ce6 + pristine_git_object: a3cef301597cec13f613882f249caad5b2607b6c + src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PlatformSkillsValidateRequestBuilder.java: + id: 17451af832bd + last_write_checksum: sha1:20faca92a1b8dc1378d9e5be04be86197ff35cc3 + pristine_git_object: 208b76f5640f75610e15831717d49e6b5764d749 src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PostApiIndexV1AdddatasourceRequestBuilder.java: id: 3c6f34b93b68 last_write_checksum: sha1:4e8bdefb602c072ec9b82058b5593546e04e059b @@ -7061,6 +7369,10 @@ trackedFiles: id: 86e942619ead last_write_checksum: sha1:a73d2a4f6d6c2f28d7303c0873345f6fedc39ea3 pristine_git_object: 955fa3c101a017bef081f20a1be90dacae1d9d89 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java + : id: e25df155fed4 + last_write_checksum: sha1:dea6aee16f5710024337f99ad8c6a35ee890aeb3 + pristine_git_object: 8fc40901ce6d9d135490d3258dad56b7fce998f2 src/main/java/com/glean/api_client/glean_api_client/models/operations//async/PostRestApiV1ToolsCallRequestBuilder.java: id: 317701276b4e last_write_checksum: sha1:68f22995144546799be933c2770348ffb652fb19 @@ -8085,6 +8397,106 @@ trackedFiles: id: 68bd184c4656 last_write_checksum: sha1:602ef94742690f30edd18aed6eeb9c6b0ff5b846 pristine_git_object: f019690379285f41adeeae32dce29d9891e6f82d + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateRequestBuilder.java: + id: 9624f91e76de + last_write_checksum: sha1:a71ba8c83a51781509437a985e6f378893b3b8ef + pristine_git_object: a3585d11b1a9b2a391363fefe703f33c58cadcf6 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateResponse.java: + id: 05d53155ee6c + last_write_checksum: sha1:5e5787e4f92edaacf98552aed82e1d6580874d8b + pristine_git_object: 28a716ef9c71344a9ea31432dac02a0ea9e36c31 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequest.java: + id: 92093678ab78 + last_write_checksum: sha1:7f2ca86009edd0eb049467fe204a22a6d2c0da47 + pristine_git_object: 8d5b4d0ea4a43c4ee5ebebcf74123bc008c6e232 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequestBuilder.java: + id: f9466a2082f6 + last_write_checksum: sha1:6eee957155498671c2a9054e4bf30421a5a3c2b4 + pristine_git_object: cfcb60c3a4823cac8c7ffe74ad45acfcbf5e0083 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionResponse.java: + id: c74b0789e08d + last_write_checksum: sha1:e43534a96e77ea59d1038b8e3f313778c6944296 + pristine_git_object: 4adf7888ef9ee588729dfdc00456e1c668238fdf + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequest.java: + id: 8af72a80fe73 + last_write_checksum: sha1:9391f9aedf2254e2cd59ce851cff410975aaa133 + pristine_git_object: 7fb9543ccb457c457a44cb387aeda064714d6a02 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequestBuilder.java: + id: eea5eaed71ec + last_write_checksum: sha1:12ee46485f66e517b6dace6f9d5171a78497b427 + pristine_git_object: 08eb687802646001e8ef0839235756569b75e11f + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentResponse.java: + id: d454386b9ea2 + last_write_checksum: sha1:73c0effa794b9d09ca6cfa5be5bc3a5f29c5edcb + pristine_git_object: a0a9eb329f7f8145fa4836903b9c6c6835575387 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java: + id: b1a1021e45fa + last_write_checksum: sha1:ff261484abc6ca03a3bb2a33f1c9214c559ddc69 + pristine_git_object: e95a3f18e24713fb10f58e05daef68fd8b189793 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java: + id: acf97a47458e + last_write_checksum: sha1:38e59bac457dcd87319b58620a095a3f2d06348f + pristine_git_object: 7c12088cde716fdfb0498a8c12fbe8728b11bddd + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java: + id: 10e964f47660 + last_write_checksum: sha1:f95774eddeaf8c0cf53b6e4c312c1cffd8735eab + pristine_git_object: 85f533a8b7cd39d355ce6d494623918836a843c6 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequest.java: + id: 52538c2814ff + last_write_checksum: sha1:75fbf52407b3688fe7858557a352cb4bb278ada8 + pristine_git_object: f34cf38045df837ab503f094954eea49cbed0de7 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequestBuilder.java: + id: 1dda340266d7 + last_write_checksum: sha1:002f3875340d3986225c0092d1aedf27fb8d02f4 + pristine_git_object: 18e5f516102f68647d0317f1c2c29f08cb050c57 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentResponse.java: + id: 7dbfabe02f31 + last_write_checksum: sha1:2766d33f87127184f9496dae927c8e4a015d96c4 + pristine_git_object: f5ca3391ed1a13357295e3b4b8710acda36e2e58 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequest.java: + id: 404caec96d06 + last_write_checksum: sha1:2e4a9f8714d1554b607068da837d09dba32ddea3 + pristine_git_object: 2ce8c18190264cb16de11d3320c8c93576c75822 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequestBuilder.java: + id: c27a1e5e8176 + last_write_checksum: sha1:a234f4045656e5b9a90f90696c4dd07def7c511b + pristine_git_object: fd22892e5c0e7900208ad9976dd706abcafb1615 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionResponse.java: + id: 4356a29f4193 + last_write_checksum: sha1:4bf13a7dc0b65c57fd6986d46f0b372330a34925 + pristine_git_object: 1b1085dbf8fd9e7c2c26d7812449609870169234 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java: + id: 0c784c11f038 + last_write_checksum: sha1:c3f6882b97ce023c15b636b7ebe9c5a36c492f0a + pristine_git_object: ad2303005c0384c3f9619d2a830802d5c1d1d590 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java: + id: c4faa9ffd8e1 + last_write_checksum: sha1:3bceb47670a1e9b7ad60b723dc20d1d5f5d87212 + pristine_git_object: b242ac171532c22c30286be83cef859f9e78b70f + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java: + id: 61140aa877b7 + last_write_checksum: sha1:6775d5e44002f34ae44149a052c6e021f95eaf8f + pristine_git_object: 4194c210069a13c26c2fb968462ac25ffecbe13f + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequest.java: + id: 72e123b416a3 + last_write_checksum: sha1:6c5970cb2703ff20e8d0c76641bba9ad8b4e9ac6 + pristine_git_object: 2f88e2e47bc10f7a34b3ec20a7401ab9f115e637 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequestBuilder.java: + id: 1f603f0201fa + last_write_checksum: sha1:82c2bcd557b2306d599bc97a1d3b10c3ac03f7f6 + pristine_git_object: 0a99f06e3ac672f7b620582644f9c6d619e9c59c + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsResponse.java: + id: b3dd6f59bb8e + last_write_checksum: sha1:46293d7c1050f140f1bb6644c5b875bdfee50d42 + pristine_git_object: b3732fd431b6a0c270950048f6154b05b7f81ff6 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateRequestBuilder.java: + id: bdf1d71df643 + last_write_checksum: sha1:a64582e1c9aa9584bad5baf0e379c159fc4da5aa + pristine_git_object: 3de5bcd53aa1c10b77a1f5904032ce57bad116f2 + src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateResponse.java: + id: f09b3bdf6822 + last_write_checksum: sha1:b2f2a4a28b27be14c7bf043b19231f470c208044 + pristine_git_object: be61ab2057e65a8e9723656710fbbce60117fd87 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceRequestBuilder.java: id: 12cfb3a208c3 last_write_checksum: sha1:46483ea129771ac3bc157a1e7bfcc5f672bb645b @@ -8409,6 +8821,22 @@ trackedFiles: id: b2a687f6f2a1 last_write_checksum: sha1:272480ac5f6668da9604c8546a4ddf1777691117 pristine_git_object: 5b96a78b08496a87c6bf93d1dca70f0f460616b6 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java + : id: d6f9533fb152 + last_write_checksum: sha1:03c6949fdd5d0f97cc8280d030c8ea03e47ab6f6 + pristine_git_object: 9fa2ad638c0746a54ee93af5005b1c5c8905d57e + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java + : id: ff1570f7277a + last_write_checksum: sha1:2fc8dab81c86a66c60f32ba8c0bb49aeca1dbbb1 + pristine_git_object: 6ba0274c13c36e04a0ac10c15cb4e389d5e049ea + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java + : id: 54e49721adf9 + last_write_checksum: sha1:d2a88b0270db6cb7e24b4dee57d6557559983ccd + pristine_git_object: 6c497c530babf3f737d455646a24db2d8c99eb90 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java + : id: d33d42046743 + last_write_checksum: sha1:e7479dffe11ab8eb769609adcc0734fbeb38b76b + pristine_git_object: 31449692e395cc89f97de96d85ac10bb5ba0b3a4 src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallRequestBuilder.java: id: e614321e3a7d last_write_checksum: sha1:cd4f3efc411552bd798c186c918e39bc08c85fd1 @@ -8929,6 +9357,42 @@ trackedFiles: id: c324b8a2e02b last_write_checksum: sha1:0ce35493af407ceddc10f68564a406736d6a2247 pristine_git_object: 2fe9dd653b898a2ac834b9bc870086e4e200f75f + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateResponse.java: + id: 42b466e752d4 + last_write_checksum: sha1:7526c5796102914553f222539fa44207c8eba80d + pristine_git_object: cae76a72f758bccbfba4f39eb4979e092a068802 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateVersionResponse.java: + id: 8022fde5faa5 + last_write_checksum: sha1:4e31db25e537b7128d3f7efd75df35c2634e752c + pristine_git_object: cb961fe14c7d3b5503e878856f54133b95f7e119 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetContentResponse.java: + id: 3973d5645c9c + last_write_checksum: sha1:14b86c2639c2fb25fc6d79c2d6a937a404c69234 + pristine_git_object: 7f211ce51c766121b40745a844494bba01c9dcb0 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java: + id: d9bcb05e5190 + last_write_checksum: sha1:4e382b701048c2bb3730a1b7a0874016aae8cfb6 + pristine_git_object: bcb83e3e72f78a50f7775192ee046e8bbb99a5eb + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionContentResponse.java: + id: 9b3aab9dd24b + last_write_checksum: sha1:57f85751b559b1aa1daf06894902bf2c8c061bf0 + pristine_git_object: 81725a1c303ccdb56931f0e7254d040b29a6fa3a + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionResponse.java: + id: db98b3a89eb8 + last_write_checksum: sha1:60037429b820c18c067265c1e25daf89d08eb994 + pristine_git_object: a75ff42a7baec507c509cb4afe5c62d38322a9d2 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java: + id: 7213f13e0653 + last_write_checksum: sha1:d14803de77e8aab0f74f6184bcb144234469ddbd + pristine_git_object: f2aa06a9634325edd0eae111a7be75a80b5c6aa4 + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListVersionsResponse.java: + id: 0423c13be505 + last_write_checksum: sha1:2c01abcd2cac013be34b46c4e7ec507e962db792 + pristine_git_object: 8a5b1a02b1fb12b0541cdc88c25abe56eac08bbf + src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateResponse.java: + id: eeb57d48c7a4 + last_write_checksum: sha1:90caa5bbd4398d1e80bf4d346382473ee0c3f3bf + pristine_git_object: e87bf45c48dbf475cdb5a80530fe9d57f1ecd668 src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostApiIndexV1AdddatasourceResponse.java: id: 8063718dd4c6 last_write_checksum: sha1:8f5180b2a2f460afab4f8278f71524ab24d411eb @@ -9081,6 +9545,10 @@ trackedFiles: id: a9a0a1c4e85b last_write_checksum: sha1:22a8145d78806f152653ad293d6817ddd1fbd7d2 pristine_git_object: 476e24b20e3b39cac8f20a1f275c17c39ec096f0 + ? src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java + : id: c9f17492a7bd + last_write_checksum: sha1:999d7fb626252c67d1993b2eb3078722c6a4949d + pristine_git_object: d4d7b81b50e2a5b5f7e80bdcb7de4e7504b040fe src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiV1ToolsCallResponse.java: id: 897a0bcc60d4 last_write_checksum: sha1:e04f834c9052c9a6c0ad321a1e113fa75b1d7540 @@ -9481,6 +9949,42 @@ trackedFiles: id: 9b5d67796029 last_write_checksum: sha1:f5c9d065cb970a5852c4c8fa32456c92d63d3095 pristine_git_object: 9cf91fe44e9b5e8e4cc98dd62a2adce6b40df81a + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreate.java: + id: e8e20e07b55d + last_write_checksum: sha1:0cf5ee998ac44cf9eeb127cb2bd140ef8651a16e + pristine_git_object: 784adafe32c18456325d7a9c5eeb527f8ac20c04 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreateVersion.java: + id: 9fe4b8b292df + last_write_checksum: sha1:0b8f5fab8dd4a4eb77dd2924f092dbba3d1574a9 + pristine_git_object: bf85fe3015be4bf45224a728f9958ee1bbd30a6d + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java: + id: 35379a4f4ed2 + last_write_checksum: sha1:e7dca9cc453438718bcfa8f84348362b02e2f655 + pristine_git_object: 612b0dfc1430a9af27b9956c4575229c14e7b084 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetContent.java: + id: 62b110965e4f + last_write_checksum: sha1:d091e7de2915a4e78cbdeb273a5419e909550120 + pristine_git_object: bcba9f6d4daf2b885fa24ae2eb668e515be558f2 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersion.java: + id: a4875fce2f5c + last_write_checksum: sha1:f143dffd3774d1c59588aa8d4d15ef7e61ece6c7 + pristine_git_object: 2e3f2f7666e0fcc27856406a8b3dbf911d77e587 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersionContent.java: + id: e7f17e3d678d + last_write_checksum: sha1:e5e68d93ea0a7be35b14b0b6c54f8db48d71abf2 + pristine_git_object: f0f79dc472c988bdd8ad0166476e44d50be82ee5 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java: + id: f9f1d5a5462f + last_write_checksum: sha1:8974aef09c86c4ed1aa10691bad55f7c336da56d + pristine_git_object: 1bb80ab1ef4611a76cd715b5bbde367ce8304ec6 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsListVersions.java: + id: 4fa60c778985 + last_write_checksum: sha1:9f76e8f8f2e9fddb475cd4eba8d9b953b7c0228d + pristine_git_object: a21321ef95702fc78d9ac063f69cfda09d33c8e9 + src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsValidate.java: + id: 3ecfc797f173 + last_write_checksum: sha1:35e6c42944d2ba7ba7d29af3a5970a699fc378ca + pristine_git_object: dc998319e6a4786583b6be5c062277ab7f1e2938 src/main/java/com/glean/api_client/glean_api_client/operations/PostApiIndexV1Adddatasource.java: id: 06627a85321f last_write_checksum: sha1:0a738b10de0b1c822504f5cee019a66bb4bdf35c @@ -9633,6 +10137,10 @@ trackedFiles: id: 7a5bb4c26cb6 last_write_checksum: sha1:3a16202cd328d05faa837d3d8e869d274fb4fc71 pristine_git_object: 13c3200db8fdf5d16696bb1d186c93928c4be0c0 + src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java: + id: 59cfdb0a7588 + last_write_checksum: sha1:4934cf034ddb8e070d84f7f4f2cc68e1e3e2b405 + pristine_git_object: 839ba941d2a59952cac3976e106f94ba06c167c2 src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiV1ToolsCall.java: id: c2d8aff1344a last_write_checksum: sha1:7dbf53b0404d006226789a4f112f9a43a51ac0a8 @@ -10969,6 +11477,128 @@ examples: responses: "200": application/json: {"authorizationUrl": "https://shocked-casket.name/"} + platform-skills-create: + speakeasy-default-platform-skills-create: + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Merl18", "description": "rural ugh unexpectedly excepting livid", "latest_version": 504149, "latest_minor_version": 106110, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2025-01-04T03:16:16.951Z", "updated_at": "2025-09-10T16:05:46.046Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-list: + speakeasy-default-platform-skills-list: + responses: + "200": + application/json: {"skills": [], "has_more": true, "next_cursor": "", "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-validate: + speakeasy-default-platform-skills-validate: + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {"metadata": {"display_name": "Hattie10", "description": "overburden actual impact"}, "files": [], "warnings": [], "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-get: + speakeasy-default-platform-skills-get: + parameters: + path: + skill_id: "" + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Chad_Herzog", "description": "whenever up aha controvert", "latest_version": 151495, "latest_minor_version": 170771, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2024-12-25T16:41:00.099Z", "updated_at": "2026-12-07T21:59:59.375Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-get-content: + speakeasy-default-platform-skills-get-content: + parameters: + path: + skill_id: "" + responses: + "200": + application/octet-stream: "x-file: example.file" + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-create-version: + speakeasy-default-platform-skills-create-version: + parameters: + path: + skill_id: "" + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {"version": {"skill_id": "", "version": 375506, "minor_version": 600322, "is_latest": false, "created_by": {"name": ""}, "created_at": "2026-09-27T14:37:09.109Z", "updated_at": "2024-05-30T08:59:58.715Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-list-versions: + speakeasy-default-platform-skills-list-versions: + parameters: + path: + skill_id: "" + responses: + "200": + application/json: {"versions": [], "has_more": false, "next_cursor": "", "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-get-version: + speakeasy-default-platform-skills-get-version: + parameters: + path: + skill_id: "" + version: 495658 + responses: + "200": + application/json: {"version": {"skill_id": "", "version": 81632, "minor_version": 646412, "is_latest": false, "created_by": {"name": ""}, "created_at": "2025-02-17T18:47:57.025Z", "updated_at": "2024-12-19T03:10:35.770Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-get-version-content: + speakeasy-default-platform-skills-get-version-content: + parameters: + path: + skill_id: "" + version: 117760 + responses: + "200": + application/octet-stream: "x-file: example.file" + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + post_/rest/api/index/submissions/{datasourceInstance}/{type}: + speakeasy-default-post-/rest/api/index/submissions/{datasource-instance}/{type}: + parameters: + path: + datasourceInstance: "" + type: "" + requestBody: + application/json: {"key": "", "key1": "", "key2": ""} + responses: + "202": + application/json: {"requestId": ""} + "400": + application/json: {"error": ""} + "500": + application/json: {"error": ""} examplesVersion: 1.0.2 generatedTests: activity: "2025-06-09T18:03:44Z" @@ -11111,7 +11741,7 @@ generatedTests: get_/rest/api/v1/tools/list: "2025-06-09T18:03:44Z" post_/rest/api/v1/tools/call: "2025-06-09T18:03:44Z" listpolicies: "2025-06-09T18:03:44Z" -releaseNotes: "## Java SDK Changes:\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].fragments[]` **Changed**\n * `response.messages[].fragments[]` **Changed**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[]` **Changed**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].fragments[]` **Changed**\n" +releaseNotes: "## Java SDK Changes:\n* `glean.skills.create()`: **Added**\n* `glean.skills.list()`: **Added**\n* `glean.skills.validate()`: **Added**\n* `glean.skills.retrieve()`: **Added**\n* `glean.skills.retrieveContent()`: **Added**\n* `glean.skills.createVersion()`: **Added**\n* `glean.skills.listVersions()`: **Added**\n* `glean.skills.retrieveVersion()`: **Added**\n* `glean.skills.retrieveVersionContent()`: **Added**\n* `glean.indexing.datasources.submit()`: **Added**\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n * `response.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.agents.create()`: `response.workflow.webhookUrl` **Added**\n* `glean.client.search.retrieveFeed()`: `response.results[].primaryEntry.workflow.workflow.webhookUrl` **Added**\n* `glean.client.governance.data.findings.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `glean.client.governance.data.findings.list()`: `response.exports[]` **Changed**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 786fdb02..c0ca718b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.14.3 + version: 0.14.4 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index a1f493a7..9b00266d 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.0.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 270b693d49bac2f68e751b2345bac0c267741119 - x-open-api-commit-sha: 592aec2b4913505edb8161645eaf9a72b5286f20 + x-source-commit-sha: 2822daae55430107c738db822cbeeb5a6bef463b + x-open-api-commit-sha: 0bdefe83a21f917592624e6f1dbaa180e89d5224 description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -250,6 +250,489 @@ paths: x-speakeasy-name-override: createRun security: - APIToken: [] + /api/skills: + post: + tags: + - Skills + summary: Create skill + description: | + Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + operationId: platform-skills-create + x-visibility: Public + x-glean-experimental: + id: 3cd55572-0d5c-4898-9ecf-1b86c520d1c7 + introduced: "2026-06-24" + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillCreateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillCreateResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: create + security: + - APIToken: [] + get: + tags: + - Skills + summary: List skills + description: | + List skills available to the authenticated user. + operationId: platform-skills-list + x-visibility: Public + x-glean-experimental: + id: 3eb65937-03a3-472b-9a00-be713f302b5f + introduced: "2026-06-23" + parameters: + - in: query + name: page_size + description: Maximum number of skills to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - in: query + name: cursor + description: Opaque pagination cursor from a previous response. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillsListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: list + security: + - APIToken: [] + /api/skills/validation: + post: + tags: + - Skills + summary: Validate skill bundle + description: | + Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + operationId: platform-skills-validate + x-visibility: Public + x-glean-experimental: + id: 0b086fa6-30f8-4279-8d11-10ab0059c14a + introduced: "2026-06-24" + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillValidationRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillValidationResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: validate + security: + - APIToken: [] + /api/skills/{skill_id}: + get: + tags: + - Skills + summary: Retrieve skill + description: | + Retrieve metadata for a skill available to the authenticated user. + operationId: platform-skills-get + x-visibility: Public + x-glean-experimental: + id: 8f8d1c92-a484-4769-9903-200613dc8a72 + introduced: "2026-06-23" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillGetResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: retrieve + security: + - APIToken: [] + /api/skills/{skill_id}/content: + get: + tags: + - Skills + summary: Download skill content + description: | + Download the latest installable bundle for a skill available to the authenticated user. + operationId: platform-skills-get-content + x-visibility: Public + x-glean-experimental: + id: fd6908d8-f230-4cd5-bf45-f71e69266b1d + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + headers: + Content-Disposition: + description: Attachment filename for the skill bundle. + schema: + type: string + content: + application/octet-stream: + schema: + type: string + format: binary + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: retrieveContent + security: + - APIToken: [] + /api/skills/{skill_id}/versions: + post: + tags: + - Skills + summary: Create skill version + description: | + Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + operationId: platform-skills-create-version + x-visibility: Public + x-glean-experimental: + id: 0d5e48e2-7a41-4d54-b3aa-5026f0dd65df + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillVersionCreateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionCreateResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "409": + $ref: "#/components/responses/PlatformConflict" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: createVersion + security: + - APIToken: [] + get: + tags: + - Skills + summary: List skill versions + description: | + List versions for a skill available to the authenticated user. + operationId: platform-skills-list-versions + x-visibility: Public + x-glean-experimental: + id: 9efbb8a3-d546-4304-a653-09bb427e3681 + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - in: query + name: page_size + description: Maximum number of versions to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - in: query + name: cursor + description: Opaque pagination cursor from a previous response. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionsListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: listVersions + security: + - APIToken: [] + /api/skills/{skill_id}/versions/{version}: + get: + tags: + - Skills + summary: Retrieve skill version + description: | + Retrieve metadata for a skill version available to the authenticated user. + operationId: platform-skills-get-version + x-visibility: Public + x-glean-experimental: + id: d70986b1-ad80-48dd-8e52-f294e7251dda + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - name: version + in: path + required: true + description: Major version number. + schema: + type: integer + minimum: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionGetResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: retrieveVersion + security: + - APIToken: [] + /api/skills/{skill_id}/versions/{version}/content: + get: + tags: + - Skills + summary: Download skill version content + description: | + Download the installable bundle for a skill version available to the authenticated user. + operationId: platform-skills-get-version-content + x-visibility: Public + x-glean-experimental: + id: 70c85692-7042-403a-a3a5-5b315576432a + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - name: version + in: path + required: true + description: Major version number. + schema: + type: integer + minimum: 1 + responses: + "200": + description: Successful response. + headers: + Content-Disposition: + description: Attachment filename for the skill bundle. + schema: + type: string + content: + application/octet-stream: + schema: + type: string + format: binary + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: retrieveVersionContent + security: + - APIToken: [] /api/search: post: tags: @@ -4158,25 +4641,88 @@ paths: content: application/json; charset=UTF-8: schema: - $ref: '#/components/schemas/DebugDocumentLifecycleRequest' + $ref: '#/components/schemas/DebugDocumentLifecycleRequest' + required: true + x-exportParamName: DebugDocumentLifecycleRequest + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: '#/components/schemas/DebugDocumentLifecycleResponse' + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-beta: true + x-speakeasy-group: indexing.documents + x-speakeasy-name-override: debugEvents + /rest/api/index/submissions/{datasourceInstance}/{type}: + post: + summary: Submit datasource data + description: Validates and asynchronously processes a datasource-specific submission. + tags: + - Datasources + security: + - APIToken: [] + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: true required: true - x-exportParamName: DebugDocumentLifecycleRequest + x-exportParamName: SubmissionRequest responses: - "200": - description: OK + "202": + description: Accepted content: - application/json; charset=UTF-8: + application/json: schema: - $ref: '#/components/schemas/DebugDocumentLifecycleResponse' + type: object + properties: + requestId: + type: string + required: + - requestId "400": - description: Bad Request + $ref: '#/components/responses/BadRequestError' "401": - description: Not Authorized - "429": - description: Too Many Requests - x-beta: true - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: debugEvents + $ref: '#/components/responses/UnauthorizedError' + "404": + $ref: '#/components/responses/NotFoundError' + "405": + description: Method Not Allowed + "413": + description: Payload Too Large + "500": + $ref: '#/components/responses/InternalServerError' + "503": + description: Service Unavailable + x-speakeasy-name-override: submit + x-speakeasy-group: indexing.datasources + servers: + - url: https://{instance}-be.glean.com + variables: + instance: + default: instance-name + description: The instance name (typically the email domain without the TLD) that determines the deployment backend. + parameters: + - name: datasourceInstance + in: path + description: Datasource instance that should process the submission + required: true + schema: + type: string + - name: type + in: path + description: Submission type registered for the datasource + required: true + schema: + type: string /rest/api/index/document/{docId}/custom-metadata/{groupName}: put: summary: Add or update custom metadata @@ -5479,6 +6025,322 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillStatus: + type: string + enum: + - DRAFT + - ENABLED + - DISABLED + description: Current skill status. + PlatformSkillOrigin: + type: string + enum: + - CUSTOM + description: Source category for the skill. + PlatformSkillSyncStatus: + type: string + enum: + - UP_TO_DATE + - UPDATE_AVAILABLE + - SYNC_FAILED + description: Current external-source sync status. + PlatformSkillSourceProvenance: + type: object + properties: + source_url: + type: string + description: URL of the external source the skill was imported from. + commit_sha: + type: string + description: Source commit SHA for the imported skill. + imported_at: + type: string + format: date-time + description: Time the skill was imported. + last_synced_at: + type: string + format: date-time + description: Time the skill was last synced from its source. + sync_status: + $ref: "#/components/schemas/PlatformSkillSyncStatus" + sync_error: + type: string + description: Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + PlatformPersonReference: + type: object + description: A lightweight reference to a person, used where a payload merely points at someone. + required: + - name + properties: + id: + type: string + description: Opaque Glean person ID. + name: + type: string + description: Display name. + PlatformSkill: + type: object + required: + - id + - display_name + - description + - latest_version + - latest_minor_version + - status + - origin + - owner + - created_at + - updated_at + properties: + id: + type: string + description: Glean skill ID. + display_name: + type: string + description: Human-readable skill name. + description: + type: string + description: Human-readable skill description. + latest_version: + type: integer + description: Latest major version number for the skill. + latest_minor_version: + type: integer + description: Latest minor version number for the skill. + status: + $ref: "#/components/schemas/PlatformSkillStatus" + origin: + $ref: "#/components/schemas/PlatformSkillOrigin" + source_provenance: + $ref: "#/components/schemas/PlatformSkillSourceProvenance" + owner: + $ref: "#/components/schemas/PlatformPersonReference" + created_at: + type: string + format: date-time + description: Time the skill was created. + updated_at: + type: string + format: date-time + description: Time the skill was last updated. + PlatformSkillsListResponse: + type: object + required: + - skills + - has_more + - next_cursor + - request_id + properties: + skills: + type: array + description: Skills available to the user. + items: + $ref: "#/components/schemas/PlatformSkill" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: string + nullable: true + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillCreateRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to create. + PlatformSkillCreateResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillValidationRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to validate. + PlatformSkillValidationMetadata: + type: object + required: + - display_name + - description + properties: + display_name: + type: string + description: Skill name parsed from SKILL.md frontmatter. + description: + type: string + description: Skill description parsed from SKILL.md frontmatter. + PlatformSkillValidationFile: + type: object + required: + - path + - size_bytes + - is_manifest + properties: + path: + type: string + description: Normalized relative path in the skill bundle. + size_bytes: + type: integer + description: File size in bytes. + is_manifest: + type: boolean + description: Whether this file is the skill manifest. + PlatformSkillValidationWarning: + type: object + required: + - code + - message + properties: + code: + type: string + description: Stable warning code. + message: + type: string + description: Human-readable warning message. + PlatformSkillValidationResponse: + type: object + required: + - metadata + - files + - warnings + - request_id + properties: + metadata: + $ref: "#/components/schemas/PlatformSkillValidationMetadata" + files: + type: array + description: Normalized files in the bundle after stripping an optional single root folder. + items: + $ref: "#/components/schemas/PlatformSkillValidationFile" + warnings: + type: array + description: Non-blocking validation warnings. + items: + $ref: "#/components/schemas/PlatformSkillValidationWarning" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillGetResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillVersion: + type: object + required: + - skill_id + - version + - minor_version + - is_latest + - created_by + - created_at + - updated_at + properties: + skill_id: + type: string + description: Glean skill ID. + version: + type: integer + description: Major version number. + minor_version: + type: integer + description: Minor version number. + is_latest: + type: boolean + description: Whether this is the latest version of the skill. + created_by: + $ref: "#/components/schemas/PlatformPersonReference" + created_at: + type: string + format: date-time + description: Time this version was created. + updated_at: + type: string + format: date-time + description: Time this version was last updated. + source_provenance: + $ref: "#/components/schemas/PlatformSkillSourceProvenance" + PlatformSkillVersionsListResponse: + type: object + required: + - versions + - has_more + - next_cursor + - request_id + properties: + versions: + type: array + description: Versions available for the skill. + items: + $ref: "#/components/schemas/PlatformSkillVersion" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: string + nullable: true + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillVersionCreateRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to store as a new version. + PlatformSkillVersionCreateResponse: + type: object + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformSkillVersion" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillVersionGetResponse: + type: object + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformSkillVersion" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformFilterOperator: type: string description: Supported filter operator. @@ -5579,18 +6441,6 @@ components: Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set. time_range: $ref: "#/components/schemas/PlatformTimeRange" - PlatformPersonReference: - type: object - description: A lightweight reference to a person, used where a payload merely points at someone. - required: - - name - properties: - id: - type: string - description: Opaque Glean person ID. - name: - type: string - description: Display name. PlatformResult: type: object required: @@ -9635,6 +10485,22 @@ components: - EXECUTION - MCP description: Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. + actionTypeSource: + type: string + enum: + - MCP_ANNOTATION + - ADMIN_OVERRIDE + - NONE + - NATIVE_TOOL_DEFINITION + description: | + Analytics-only signal (product snapshot) describing WHERE the action's + read/write determination came from. Complementary to the effective + read/write value (the tool's ToolType, which drives HITL): the value says + read-or-write, this says how confident that is. MCP_ANNOTATION = from the + tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + NONE = no usable hint (the effective value then defaults to write); + NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + Does not affect runtime behavior. authType: type: string enum: @@ -10223,6 +11089,11 @@ components: type: boolean description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. readOnly: true + webhookUrl: + type: string + description: | + For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types. + readOnly: true WorkflowResult: type: object properties: @@ -15753,7 +16624,8 @@ components: - LOW - MEDIUM - HIGH - description: Severity levels for DLP findings and analyses. + - FALSE_POSITIVE + description: Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. x-include-enum-class-prefix: true DlpIssueStatus: type: string @@ -15819,11 +16691,31 @@ components: description: Filter by one or more issue statuses. assigneeId: type: string - description: Filter by assignee user ID. + description: Filter by a single assignee user ID. Deprecated; use assigneeIds. + deprecated: true + assigneeIds: + type: array + items: + type: string + description: Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no assignee. infoType: type: string + description: Filter by a single built-in info type. Deprecated; use infoTypes. + deprecated: true + infoTypes: + type: array + items: + type: string + description: Filter by one or more built-in info types. regexId: type: string + description: Filter by a single regex rule ID. Deprecated; use regexIds. + deprecated: true + regexIds: + type: array + items: + type: string + description: Filter by one or more regex rule IDs. reportIds: type: array items: @@ -15833,6 +16725,13 @@ components: type: string datasource: type: string + description: Filter by a single datasource. Deprecated; use datasources. + deprecated: true + datasources: + type: array + items: + type: string + description: Filter by one or more datasources. visibility: type: string severities: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ed0d1379..7a394788 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.789.2 +speakeasyVersion: 1.790.3 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb + sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b tags: - latest Glean-OAS: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb + sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:8ece00a5293a8b8a6ba95820e2cbeb8403fe62126b980b4fe41338b20b87982a + codeSamplesRevisionDigest: sha256:e3c929dc27f770d7e9fc2453e5efcdb9b60be3e68c39fa24fc2726fb0ffd18a5 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 83329c00..2109d672 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.14.3' +implementation 'com.glean.api-client:glean-api-client:0.14.4' ``` Maven: @@ -75,7 +75,7 @@ Maven: com.glean.api-client glean-api-client - 0.14.3 + 0.14.4 ``` @@ -547,6 +547,7 @@ For more information on obtaining the appropriate token type, please contact you * [add](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource * [retrieveConfig](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config +* [submit](docs/sdks/indexingdatasources/README.md#submit) - Submit datasource data ### [Indexing.Documents](docs/sdks/indexingdocuments/README.md) @@ -602,6 +603,18 @@ For more information on obtaining the appropriate token type, please contact you * [query](docs/sdks/search/README.md#query) - Search +### [Skills](docs/sdks/skills/README.md) + +* [create](docs/sdks/skills/README.md#create) - Create skill +* [list](docs/sdks/skills/README.md#list) - List skills +* [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle +* [retrieve](docs/sdks/skills/README.md#retrieve) - Retrieve skill +* [retrieveContent](docs/sdks/skills/README.md#retrievecontent) - Download skill content +* [createVersion](docs/sdks/skills/README.md#createversion) - Create skill version +* [listVersions](docs/sdks/skills/README.md#listversions) - List skill versions +* [retrieveVersion](docs/sdks/skills/README.md#retrieveversion) - Retrieve skill version +* [retrieveVersionContent](docs/sdks/skills/README.md#retrieveversioncontent) - Download skill version content + @@ -707,11 +720,11 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`GleanError`](./src/main/java/models/errors/GleanError.java)**: -* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 9 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException.java): Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. Applicable to 5 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 5 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 137 methods.* -* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 137 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException.java): Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. Applicable to 14 of 147 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 9 of 147 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 6 of 147 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 147 methods.* +* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 147 methods.* @@ -809,11 +822,10 @@ The server URL can also be overridden on a per-operation basis, provided a serve package hello.world; import com.glean.api_client.glean_api_client.Glean; -import com.glean.api_client.glean_api_client.models.components.CustomMetadataPutRequest; import com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse; -import com.glean.api_client.glean_api_client.models.operations.PutRestApiIndexDocumentDocIdCustomMetadataGroupNameResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; import java.lang.Exception; -import java.util.List; +import java.util.Map; public class Application { @@ -823,17 +835,18 @@ public class Application { .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) .build(); - PutRestApiIndexDocumentDocIdCustomMetadataGroupNameResponse res = sdk.indexing().customMetadata().upsert() + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = sdk.indexing().datasources().submit() .serverURL("https://instance-name-be.glean.com") - .docId("") - .groupName("") - .customMetadataPutRequest(CustomMetadataPutRequest.builder() - .customMetadata(List.of()) - .build()) + .datasourceInstance("") + .type("") + .requestBody(Map.ofEntries( + Map.entry("key", ""), + Map.entry("key1", ""), + Map.entry("key2", ""))) .call(); - if (res.successResponse().isPresent()) { - System.out.println(res.successResponse().get()); + if (res.object().isPresent()) { + System.out.println(res.object().get()); } } } diff --git a/RELEASES.md b/RELEASES.md index a0a4eb51..f0376722 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -798,4 +798,14 @@ Based on: ### Generated - [java v0.14.3] . ### Releases -- [Maven Central v0.14.3] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.3 - . \ No newline at end of file +- [Maven Central v0.14.3] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.3 - . + +## 2026-07-21 08:58:39 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.3 (2.918.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.14.4] . +### Releases +- [Maven Central v0.14.4] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.14.4 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index e78cd7df..c9b89563 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,7 @@ javadocJar { dependencies { api 'com.fasterxml.jackson.core:jackson-annotations:2.22' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.22.0' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.22.1' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.22.0' api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'} diff --git a/docs/models/components/ActionTypeSource.md b/docs/models/components/ActionTypeSource.md new file mode 100644 index 00000000..e2a0f9c4 --- /dev/null +++ b/docs/models/components/ActionTypeSource.md @@ -0,0 +1,32 @@ +# ActionTypeSource + +Analytics-only signal (product snapshot) describing WHERE the action's +read/write determination came from. Complementary to the effective +read/write value (the tool's ToolType, which drives HITL): the value says +read-or-write, this says how confident that is. MCP_ANNOTATION = from the +tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; +NONE = no usable hint (the effective value then defaults to write); +NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). +Does not affect runtime behavior. + + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.ActionTypeSource; + +ActionTypeSource value = ActionTypeSource.MCP_ANNOTATION; + +// Open enum: use .of() to create instances from custom string values +ActionTypeSource custom = ActionTypeSource.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `MCP_ANNOTATION` | MCP_ANNOTATION | +| `ADMIN_OVERRIDE` | ADMIN_OVERRIDE | +| `NONE` | NONE | +| `NATIVE_TOOL_DEFINITION` | NATIVE_TOOL_DEFINITION | \ No newline at end of file diff --git a/docs/models/components/DlpFindingFilter.md b/docs/models/components/DlpFindingFilter.md index 108a7202..42a0e927 100644 --- a/docs/models/components/DlpFindingFilter.md +++ b/docs/models/components/DlpFindingFilter.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `infoType` | *Optional\* | :heavy_minus_sign: | N/A | -| `regexId` | *Optional\* | :heavy_minus_sign: | N/A | -| `reportId` | *Optional\* | :heavy_minus_sign: | N/A | -| `datasource` | *Optional\* | :heavy_minus_sign: | N/A | -| `visibility` | *Optional\* | :heavy_minus_sign: | N/A | -| `documentIds` | List\<*String*> | :heavy_minus_sign: | N/A | -| `severity` | [Optional\](../../models/components/DlpSeverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. | -| `documentSeverity` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | N/A | -| `statuses` | List\<[DlpIssueStatus](../../models/components/DlpIssueStatus.md)> | :heavy_minus_sign: | N/A | -| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | -| `archived` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `infoType` | *Optional\* | :heavy_minus_sign: | N/A | +| `regexId` | *Optional\* | :heavy_minus_sign: | N/A | +| `reportId` | *Optional\* | :heavy_minus_sign: | N/A | +| `datasource` | *Optional\* | :heavy_minus_sign: | N/A | +| `visibility` | *Optional\* | :heavy_minus_sign: | N/A | +| `documentIds` | List\<*String*> | :heavy_minus_sign: | N/A | +| `severity` | [Optional\](../../models/components/DlpSeverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. | +| `documentSeverity` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | N/A | +| `statuses` | List\<[DlpIssueStatus](../../models/components/DlpIssueStatus.md)> | :heavy_minus_sign: | N/A | +| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | +| `archived` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/DlpIssueFilter.md b/docs/models/components/DlpIssueFilter.md index 320c8610..55ae0f6c 100644 --- a/docs/models/components/DlpIssueFilter.md +++ b/docs/models/components/DlpIssueFilter.md @@ -5,16 +5,20 @@ Filter for DLP issues. Includes document-level filters and issue-specific filter ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `searchText` | *Optional\* | :heavy_minus_sign: | Text to search for in issue fields. | -| `statuses` | List\<[DlpIssueStatus](../../models/components/DlpIssueStatus.md)> | :heavy_minus_sign: | Filter by one or more issue statuses. | -| `assigneeId` | *Optional\* | :heavy_minus_sign: | Filter by assignee user ID. | -| `infoType` | *Optional\* | :heavy_minus_sign: | N/A | -| `regexId` | *Optional\* | :heavy_minus_sign: | N/A | -| `reportIds` | List\<*String*> | :heavy_minus_sign: | Filter by one or more report/policy IDs. | -| `docId` | *Optional\* | :heavy_minus_sign: | N/A | -| `datasource` | *Optional\* | :heavy_minus_sign: | N/A | -| `visibility` | *Optional\* | :heavy_minus_sign: | N/A | -| `severities` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | Filter by one or more severity levels. | -| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `searchText` | *Optional\* | :heavy_minus_sign: | Text to search for in issue fields. | +| `statuses` | List\<[DlpIssueStatus](../../models/components/DlpIssueStatus.md)> | :heavy_minus_sign: | Filter by one or more issue statuses. | +| ~~`assigneeId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single assignee user ID. Deprecated; use assigneeIds. | +| `assigneeIds` | List\<*String*> | :heavy_minus_sign: | Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no assignee. | +| ~~`infoType`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single built-in info type. Deprecated; use infoTypes. | +| `infoTypes` | List\<*String*> | :heavy_minus_sign: | Filter by one or more built-in info types. | +| ~~`regexId`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single regex rule ID. Deprecated; use regexIds. | +| `regexIds` | List\<*String*> | :heavy_minus_sign: | Filter by one or more regex rule IDs. | +| `reportIds` | List\<*String*> | :heavy_minus_sign: | Filter by one or more report/policy IDs. | +| `docId` | *Optional\* | :heavy_minus_sign: | N/A | +| ~~`datasource`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single datasource. Deprecated; use datasources. | +| `datasources` | List\<*String*> | :heavy_minus_sign: | Filter by one or more datasources. | +| `visibility` | *Optional\* | :heavy_minus_sign: | N/A | +| `severities` | List\<[DlpSeverity](../../models/components/DlpSeverity.md)> | :heavy_minus_sign: | Filter by one or more severity levels. | +| `timeRange` | [Optional\](../../models/components/TimeRangeFilter.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/DlpSeverity.md b/docs/models/components/DlpSeverity.md index daf90f11..5ab3aa7f 100644 --- a/docs/models/components/DlpSeverity.md +++ b/docs/models/components/DlpSeverity.md @@ -1,6 +1,6 @@ # DlpSeverity -Severity levels for DLP findings and analyses. +Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. ## Example Usage @@ -16,9 +16,10 @@ DlpSeverity custom = DlpSeverity.of("custom_value"); ## Values -| Name | Value | -| ------------- | ------------- | -| `UNSPECIFIED` | UNSPECIFIED | -| `LOW` | LOW | -| `MEDIUM` | MEDIUM | -| `HIGH` | HIGH | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `UNSPECIFIED` | UNSPECIFIED | +| `LOW` | LOW | +| `MEDIUM` | MEDIUM | +| `HIGH` | HIGH | +| `FALSE_POSITIVE` | FALSE_POSITIVE | \ No newline at end of file diff --git a/docs/models/components/PlatformSkill.md b/docs/models/components/PlatformSkill.md new file mode 100644 index 00000000..ae055121 --- /dev/null +++ b/docs/models/components/PlatformSkill.md @@ -0,0 +1,18 @@ +# PlatformSkill + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | Glean skill ID. | +| `displayName` | *String* | :heavy_check_mark: | Human-readable skill name. | +| `description` | *String* | :heavy_check_mark: | Human-readable skill description. | +| `latestVersion` | *long* | :heavy_check_mark: | Latest major version number for the skill. | +| `latestMinorVersion` | *long* | :heavy_check_mark: | Latest minor version number for the skill. | +| `status` | [PlatformSkillStatus](../../models/components/PlatformSkillStatus.md) | :heavy_check_mark: | Current skill status. | +| `origin` | [PlatformSkillOrigin](../../models/components/PlatformSkillOrigin.md) | :heavy_check_mark: | Source category for the skill. | +| `sourceProvenance` | [Optional\](../../models/components/PlatformSkillSourceProvenance.md) | :heavy_minus_sign: | N/A | +| `owner` | [PlatformPersonReference](../../models/components/PlatformPersonReference.md) | :heavy_check_mark: | A lightweight reference to a person, used where a payload merely points at someone. | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | Time the skill was created. | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | Time the skill was last updated. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillCreateRequest.md b/docs/models/components/PlatformSkillCreateRequest.md new file mode 100644 index 00000000..8063c065 --- /dev/null +++ b/docs/models/components/PlatformSkillCreateRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillCreateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `file` | [PlatformSkillCreateRequestFile](../../models/components/PlatformSkillCreateRequestFile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to create. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillCreateRequestFile.md b/docs/models/components/PlatformSkillCreateRequestFile.md new file mode 100644 index 00000000..85349c66 --- /dev/null +++ b/docs/models/components/PlatformSkillCreateRequestFile.md @@ -0,0 +1,9 @@ +# PlatformSkillCreateRequestFile + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `fileName` | *String* | :heavy_check_mark: | N/A | +| `content` | byte[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillCreateResponse.md b/docs/models/components/PlatformSkillCreateResponse.md new file mode 100644 index 00000000..2f780a0d --- /dev/null +++ b/docs/models/components/PlatformSkillCreateResponse.md @@ -0,0 +1,9 @@ +# PlatformSkillCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `skill` | [PlatformSkill](../../models/components/PlatformSkill.md) | :heavy_check_mark: | N/A | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillGetResponse.md b/docs/models/components/PlatformSkillGetResponse.md new file mode 100644 index 00000000..295031b7 --- /dev/null +++ b/docs/models/components/PlatformSkillGetResponse.md @@ -0,0 +1,9 @@ +# PlatformSkillGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `skill` | [PlatformSkill](../../models/components/PlatformSkill.md) | :heavy_check_mark: | N/A | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillOrigin.md b/docs/models/components/PlatformSkillOrigin.md new file mode 100644 index 00000000..aa217c27 --- /dev/null +++ b/docs/models/components/PlatformSkillOrigin.md @@ -0,0 +1,18 @@ +# PlatformSkillOrigin + +Source category for the skill. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillOrigin; + +PlatformSkillOrigin value = PlatformSkillOrigin.CUSTOM; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `CUSTOM` | CUSTOM | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillSourceProvenance.md b/docs/models/components/PlatformSkillSourceProvenance.md new file mode 100644 index 00000000..a42f8d71 --- /dev/null +++ b/docs/models/components/PlatformSkillSourceProvenance.md @@ -0,0 +1,13 @@ +# PlatformSkillSourceProvenance + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `sourceUrl` | *Optional\* | :heavy_minus_sign: | URL of the external source the skill was imported from. | +| `commitSha` | *Optional\* | :heavy_minus_sign: | Source commit SHA for the imported skill. | +| `importedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Time the skill was imported. | +| `lastSyncedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Time the skill was last synced from its source. | +| `syncStatus` | [Optional\](../../models/components/PlatformSkillSyncStatus.md) | :heavy_minus_sign: | Current external-source sync status. | +| `syncError` | *Optional\* | :heavy_minus_sign: | Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillStatus.md b/docs/models/components/PlatformSkillStatus.md new file mode 100644 index 00000000..f3ebbcf2 --- /dev/null +++ b/docs/models/components/PlatformSkillStatus.md @@ -0,0 +1,23 @@ +# PlatformSkillStatus + +Current skill status. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillStatus; + +PlatformSkillStatus value = PlatformSkillStatus.DRAFT; + +// Open enum: use .of() to create instances from custom string values +PlatformSkillStatus custom = PlatformSkillStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `DRAFT` | DRAFT | +| `ENABLED` | ENABLED | +| `DISABLED` | DISABLED | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillSyncStatus.md b/docs/models/components/PlatformSkillSyncStatus.md new file mode 100644 index 00000000..d8195068 --- /dev/null +++ b/docs/models/components/PlatformSkillSyncStatus.md @@ -0,0 +1,23 @@ +# PlatformSkillSyncStatus + +Current external-source sync status. + +## Example Usage + +```java +import com.glean.api_client.glean_api_client.models.components.PlatformSkillSyncStatus; + +PlatformSkillSyncStatus value = PlatformSkillSyncStatus.UP_TO_DATE; + +// Open enum: use .of() to create instances from custom string values +PlatformSkillSyncStatus custom = PlatformSkillSyncStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `UP_TO_DATE` | UP_TO_DATE | +| `UPDATE_AVAILABLE` | UPDATE_AVAILABLE | +| `SYNC_FAILED` | SYNC_FAILED | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationFile.md b/docs/models/components/PlatformSkillValidationFile.md new file mode 100644 index 00000000..5ec60b18 --- /dev/null +++ b/docs/models/components/PlatformSkillValidationFile.md @@ -0,0 +1,10 @@ +# PlatformSkillValidationFile + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `path` | *String* | :heavy_check_mark: | Normalized relative path in the skill bundle. | +| `sizeBytes` | *long* | :heavy_check_mark: | File size in bytes. | +| `isManifest` | *boolean* | :heavy_check_mark: | Whether this file is the skill manifest. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationMetadata.md b/docs/models/components/PlatformSkillValidationMetadata.md new file mode 100644 index 00000000..93c106a6 --- /dev/null +++ b/docs/models/components/PlatformSkillValidationMetadata.md @@ -0,0 +1,9 @@ +# PlatformSkillValidationMetadata + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `displayName` | *String* | :heavy_check_mark: | Skill name parsed from SKILL.md frontmatter. | +| `description` | *String* | :heavy_check_mark: | Skill description parsed from SKILL.md frontmatter. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationRequest.md b/docs/models/components/PlatformSkillValidationRequest.md new file mode 100644 index 00000000..8f3687b4 --- /dev/null +++ b/docs/models/components/PlatformSkillValidationRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillValidationRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `file` | [PlatformSkillValidationRequestFile](../../models/components/PlatformSkillValidationRequestFile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to validate. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationRequestFile.md b/docs/models/components/PlatformSkillValidationRequestFile.md new file mode 100644 index 00000000..ea04d8e0 --- /dev/null +++ b/docs/models/components/PlatformSkillValidationRequestFile.md @@ -0,0 +1,9 @@ +# PlatformSkillValidationRequestFile + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `fileName` | *String* | :heavy_check_mark: | N/A | +| `content` | byte[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationResponse.md b/docs/models/components/PlatformSkillValidationResponse.md new file mode 100644 index 00000000..29d84491 --- /dev/null +++ b/docs/models/components/PlatformSkillValidationResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillValidationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `metadata` | [PlatformSkillValidationMetadata](../../models/components/PlatformSkillValidationMetadata.md) | :heavy_check_mark: | N/A | +| `files` | List\<[PlatformSkillValidationFile](../../models/components/PlatformSkillValidationFile.md)> | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | +| `warnings` | List\<[PlatformSkillValidationWarning](../../models/components/PlatformSkillValidationWarning.md)> | :heavy_check_mark: | Non-blocking validation warnings. | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillValidationWarning.md b/docs/models/components/PlatformSkillValidationWarning.md new file mode 100644 index 00000000..844c546f --- /dev/null +++ b/docs/models/components/PlatformSkillValidationWarning.md @@ -0,0 +1,9 @@ +# PlatformSkillValidationWarning + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *String* | :heavy_check_mark: | Stable warning code. | +| `message` | *String* | :heavy_check_mark: | Human-readable warning message. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillVersion.md b/docs/models/components/PlatformSkillVersion.md new file mode 100644 index 00000000..68f3b3f9 --- /dev/null +++ b/docs/models/components/PlatformSkillVersion.md @@ -0,0 +1,15 @@ +# PlatformSkillVersion + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `version` | *long* | :heavy_check_mark: | Major version number. | +| `minorVersion` | *long* | :heavy_check_mark: | Minor version number. | +| `isLatest` | *boolean* | :heavy_check_mark: | Whether this is the latest version of the skill. | +| `createdBy` | [PlatformPersonReference](../../models/components/PlatformPersonReference.md) | :heavy_check_mark: | A lightweight reference to a person, used where a payload merely points at someone. | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | Time this version was created. | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | Time this version was last updated. | +| `sourceProvenance` | [Optional\](../../models/components/PlatformSkillSourceProvenance.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillVersionCreateRequest.md b/docs/models/components/PlatformSkillVersionCreateRequest.md new file mode 100644 index 00000000..f12b3e93 --- /dev/null +++ b/docs/models/components/PlatformSkillVersionCreateRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillVersionCreateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `file` | [PlatformSkillVersionCreateRequestFile](../../models/components/PlatformSkillVersionCreateRequestFile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to store as a new version. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillVersionCreateRequestFile.md b/docs/models/components/PlatformSkillVersionCreateRequestFile.md new file mode 100644 index 00000000..1058233b --- /dev/null +++ b/docs/models/components/PlatformSkillVersionCreateRequestFile.md @@ -0,0 +1,9 @@ +# PlatformSkillVersionCreateRequestFile + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `fileName` | *String* | :heavy_check_mark: | N/A | +| `content` | byte[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillVersionCreateResponse.md b/docs/models/components/PlatformSkillVersionCreateResponse.md new file mode 100644 index 00000000..5480bf91 --- /dev/null +++ b/docs/models/components/PlatformSkillVersionCreateResponse.md @@ -0,0 +1,9 @@ +# PlatformSkillVersionCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `version` | [PlatformSkillVersion](../../models/components/PlatformSkillVersion.md) | :heavy_check_mark: | N/A | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillVersionGetResponse.md b/docs/models/components/PlatformSkillVersionGetResponse.md new file mode 100644 index 00000000..8c0f38ce --- /dev/null +++ b/docs/models/components/PlatformSkillVersionGetResponse.md @@ -0,0 +1,9 @@ +# PlatformSkillVersionGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `version` | [PlatformSkillVersion](../../models/components/PlatformSkillVersion.md) | :heavy_check_mark: | N/A | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillVersionsListResponse.md b/docs/models/components/PlatformSkillVersionsListResponse.md new file mode 100644 index 00000000..7fad46d7 --- /dev/null +++ b/docs/models/components/PlatformSkillVersionsListResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillVersionsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `versions` | List\<[PlatformSkillVersion](../../models/components/PlatformSkillVersion.md)> | :heavy_check_mark: | Versions available for the skill. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether additional results are available. | +| `nextCursor` | *Optional\* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/PlatformSkillsListResponse.md b/docs/models/components/PlatformSkillsListResponse.md new file mode 100644 index 00000000..1a206faa --- /dev/null +++ b/docs/models/components/PlatformSkillsListResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsListResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `skills` | List\<[PlatformSkill](../../models/components/PlatformSkill.md)> | :heavy_check_mark: | Skills available to the user. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether additional results are available. | +| `nextCursor` | *Optional\* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `requestId` | *String* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/ToolMetadata.md b/docs/models/components/ToolMetadata.md index 0f42b42f..83acea7f 100644 --- a/docs/models/components/ToolMetadata.md +++ b/docs/models/components/ToolMetadata.md @@ -5,23 +5,24 @@ The manifest for a tool that can be used to augment Glean Assistant. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [ToolMetadataType](../../models/components/ToolMetadataType.md) | :heavy_check_mark: | The type of tool. | | -| `name` | *String* | :heavy_check_mark: | Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. | | -| `displayName` | *String* | :heavy_check_mark: | Human understandable name of the tool. Max 50 characters. | | -| `toolId` | *Optional\* | :heavy_minus_sign: | An opaque id which is unique identifier for the tool. | | -| `displayDescription` | *String* | :heavy_check_mark: | Description of the tool meant for a human. | | -| `logoUrl` | *Optional\* | :heavy_minus_sign: | URL used to fetch the logo. | | -| `objectName` | *Optional\* | :heavy_minus_sign: | Name of the generated object. This will be used to indicate to the end user what the generated object contains. | [
"HR ticket",
"Email",
"Chat message"
] | -| `knowledgeType` | [Optional\](../../models/components/KnowledgeType.md) | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify. | | -| `createdBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | -| `lastUpdatedBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was created in ISO format (ISO 8601) | | -| `lastUpdatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was last updated in ISO format (ISO 8601) | | -| `writeActionType` | [Optional\](../../models/components/WriteActionType.md) | :heavy_minus_sign: | Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. | | -| `authType` | [Optional\](../../models/components/AuthType.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| | -| `auth` | [Optional\](../../models/components/AuthConfig.md) | :heavy_minus_sign: | Config for tool's authentication method. | | -| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | -| `usageInstructions` | *Optional\* | :heavy_minus_sign: | Usage instructions for the LLM to use this action. | | -| `isSetupFinished` | *Optional\* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [ToolMetadataType](../../models/components/ToolMetadataType.md) | :heavy_check_mark: | The type of tool. | | +| `name` | *String* | :heavy_check_mark: | Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. | | +| `displayName` | *String* | :heavy_check_mark: | Human understandable name of the tool. Max 50 characters. | | +| `toolId` | *Optional\* | :heavy_minus_sign: | An opaque id which is unique identifier for the tool. | | +| `displayDescription` | *String* | :heavy_check_mark: | Description of the tool meant for a human. | | +| `logoUrl` | *Optional\* | :heavy_minus_sign: | URL used to fetch the logo. | | +| `objectName` | *Optional\* | :heavy_minus_sign: | Name of the generated object. This will be used to indicate to the end user what the generated object contains. | [
"HR ticket",
"Email",
"Chat message"
] | +| `knowledgeType` | [Optional\](../../models/components/KnowledgeType.md) | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify. | | +| `createdBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | +| `lastUpdatedBy` | [Optional\](../../models/components/PersonObject.md) | :heavy_minus_sign: | N/A | | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was created in ISO format (ISO 8601) | | +| `lastUpdatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The time the tool was last updated in ISO format (ISO 8601) | | +| `writeActionType` | [Optional\](../../models/components/WriteActionType.md) | :heavy_minus_sign: | Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. | | +| `actionTypeSource` | [Optional\](../../models/components/ActionTypeSource.md) | :heavy_minus_sign: | Analytics-only signal (product snapshot) describing WHERE the action's
read/write determination came from. Complementary to the effective
read/write value (the tool's ToolType, which drives HITL): the value says
read-or-write, this says how confident that is. MCP_ANNOTATION = from the
tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it;
NONE = no usable hint (the effective value then defaults to write);
NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived).
Does not affect runtime behavior.
| | +| `authType` | [Optional\](../../models/components/AuthType.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| | +| `auth` | [Optional\](../../models/components/AuthConfig.md) | :heavy_minus_sign: | Config for tool's authentication method. | | +| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | +| `usageInstructions` | *Optional\* | :heavy_minus_sign: | Usage instructions for the LLM to use this action. | | +| `isSetupFinished` | *Optional\* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | | \ No newline at end of file diff --git a/docs/models/components/UploadChatFilesRequest.md b/docs/models/components/UploadChatFilesRequest.md index b5e24245..5942e032 100644 --- a/docs/models/components/UploadChatFilesRequest.md +++ b/docs/models/components/UploadChatFilesRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `files` | List\<[File](../../models/components/File.md)> | :heavy_check_mark: | Raw files to be uploaded for chat in binary format. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `files` | List\<[UploadChatFilesRequestFile](../../models/components/UploadChatFilesRequestFile.md)> | :heavy_check_mark: | Raw files to be uploaded for chat in binary format. | \ No newline at end of file diff --git a/docs/models/components/File.md b/docs/models/components/UploadChatFilesRequestFile.md similarity index 92% rename from docs/models/components/File.md rename to docs/models/components/UploadChatFilesRequestFile.md index 714259dd..819ca139 100644 --- a/docs/models/components/File.md +++ b/docs/models/components/UploadChatFilesRequestFile.md @@ -1,4 +1,4 @@ -# File +# UploadChatFilesRequestFile ## Fields diff --git a/docs/models/components/Workflow.md b/docs/models/components/Workflow.md index 9212a9af..a33f5dca 100644 --- a/docs/models/components/Workflow.md +++ b/docs/models/components/Workflow.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *Optional\* | :heavy_minus_sign: | The name of the workflow. | | -| `author` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `createTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | -| `lastUpdateTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | -| `lastDraftSavedAt` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | -| `lastDraftSavedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `lastDraftGitAuthorId` | *Optional\* | :heavy_minus_sign: | ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. | | -| `lastUpdatedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | -| `id` | *Optional\* | :heavy_minus_sign: | The ID of the workflow. | | -| `verified` | *Optional\* | :heavy_minus_sign: | When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. | | -| `showOrganizationAsAuthor` | *Optional\* | :heavy_minus_sign: | When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the workflow. | | +| `author` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `createTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | +| `lastUpdateTimestamp` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | +| `lastDraftSavedAt` | *Optional\* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | +| `lastDraftSavedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `lastDraftGitAuthorId` | *Optional\* | :heavy_minus_sign: | ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. | | +| `lastUpdatedBy` | [Optional\](../../models/components/Person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `permissions` | [Optional\](../../models/components/ObjectPermissions.md) | :heavy_minus_sign: | N/A | | +| `id` | *Optional\* | :heavy_minus_sign: | The ID of the workflow. | | +| `verified` | *Optional\* | :heavy_minus_sign: | When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. | | +| `showOrganizationAsAuthor` | *Optional\* | :heavy_minus_sign: | When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. | | +| `webhookUrl` | *Optional\* | :heavy_minus_sign: | For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types.
| | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsCreateResponse.md b/docs/models/operations/PlatformSkillsCreateResponse.md new file mode 100644 index 00000000..89a09bdb --- /dev/null +++ b/docs/models/operations/PlatformSkillsCreateResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsCreateResponse + + +## 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 | +| `platformSkillCreateResponse` | [Optional\](../../models/components/PlatformSkillCreateResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsCreateVersionRequest.md b/docs/models/operations/PlatformSkillsCreateVersionRequest.md new file mode 100644 index 00000000..f84aa0e8 --- /dev/null +++ b/docs/models/operations/PlatformSkillsCreateVersionRequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsCreateVersionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillVersionCreateRequest` | [PlatformSkillVersionCreateRequest](../../models/components/PlatformSkillVersionCreateRequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsCreateVersionResponse.md b/docs/models/operations/PlatformSkillsCreateVersionResponse.md new file mode 100644 index 00000000..712dfb51 --- /dev/null +++ b/docs/models/operations/PlatformSkillsCreateVersionResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsCreateVersionResponse + + +## 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 | +| `platformSkillVersionCreateResponse` | [Optional\](../../models/components/PlatformSkillVersionCreateResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetContentRequest.md b/docs/models/operations/PlatformSkillsGetContentRequest.md new file mode 100644 index 00000000..4651dffe --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetContentRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillsGetContentRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetContentResponse.md b/docs/models/operations/PlatformSkillsGetContentResponse.md new file mode 100644 index 00000000..8b857204 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetContentResponse.md @@ -0,0 +1,12 @@ +# PlatformSkillsGetContentResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | Successful response. | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetRequest.md b/docs/models/operations/PlatformSkillsGetRequest.md new file mode 100644 index 00000000..1e6a21c8 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetRequest.md @@ -0,0 +1,8 @@ +# PlatformSkillsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetResponse.md b/docs/models/operations/PlatformSkillsGetResponse.md new file mode 100644 index 00000000..a2da05c0 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `platformSkillGetResponse` | [Optional\](../../models/components/PlatformSkillGetResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetVersionContentRequest.md b/docs/models/operations/PlatformSkillsGetVersionContentRequest.md new file mode 100644 index 00000000..8e955d01 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetVersionContentRequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsGetVersionContentRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `version` | *long* | :heavy_check_mark: | Major version number. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetVersionContentResponse.md b/docs/models/operations/PlatformSkillsGetVersionContentResponse.md new file mode 100644 index 00000000..ad3c392e --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetVersionContentResponse.md @@ -0,0 +1,12 @@ +# PlatformSkillsGetVersionContentResponse + + +## 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 | +| `responseStream` | *Optional\* | :heavy_minus_sign: | Successful response. | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetVersionRequest.md b/docs/models/operations/PlatformSkillsGetVersionRequest.md new file mode 100644 index 00000000..a05306f0 --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetVersionRequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsGetVersionRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `version` | *long* | :heavy_check_mark: | Major version number. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsGetVersionResponse.md b/docs/models/operations/PlatformSkillsGetVersionResponse.md new file mode 100644 index 00000000..735c5c8b --- /dev/null +++ b/docs/models/operations/PlatformSkillsGetVersionResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsGetVersionResponse + + +## 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 | +| `platformSkillVersionGetResponse` | [Optional\](../../models/components/PlatformSkillVersionGetResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsListRequest.md b/docs/models/operations/PlatformSkillsListRequest.md new file mode 100644 index 00000000..15f66cfe --- /dev/null +++ b/docs/models/operations/PlatformSkillsListRequest.md @@ -0,0 +1,9 @@ +# PlatformSkillsListRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Maximum number of skills to return. | +| `cursor` | *Optional\* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsListResponse.md b/docs/models/operations/PlatformSkillsListResponse.md new file mode 100644 index 00000000..c362bbc1 --- /dev/null +++ b/docs/models/operations/PlatformSkillsListResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `platformSkillsListResponse` | [Optional\](../../models/components/PlatformSkillsListResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsListVersionsRequest.md b/docs/models/operations/PlatformSkillsListVersionsRequest.md new file mode 100644 index 00000000..f9989e85 --- /dev/null +++ b/docs/models/operations/PlatformSkillsListVersionsRequest.md @@ -0,0 +1,10 @@ +# PlatformSkillsListVersionsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Maximum number of versions to return. | +| `cursor` | *Optional\* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsListVersionsResponse.md b/docs/models/operations/PlatformSkillsListVersionsResponse.md new file mode 100644 index 00000000..b3b9b761 --- /dev/null +++ b/docs/models/operations/PlatformSkillsListVersionsResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsListVersionsResponse + + +## 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 | +| `platformSkillVersionsListResponse` | [Optional\](../../models/components/PlatformSkillVersionsListResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PlatformSkillsValidateResponse.md b/docs/models/operations/PlatformSkillsValidateResponse.md new file mode 100644 index 00000000..b5ced65a --- /dev/null +++ b/docs/models/operations/PlatformSkillsValidateResponse.md @@ -0,0 +1,11 @@ +# PlatformSkillsValidateResponse + + +## 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 | +| `platformSkillValidationResponse` | [Optional\](../../models/components/PlatformSkillValidationResponse.md) | :heavy_minus_sign: | Successful response. | \ No newline at end of file diff --git a/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md new file mode 100644 index 00000000..5240e204 --- /dev/null +++ b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.md @@ -0,0 +1,10 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `datasourceInstance` | *String* | :heavy_check_mark: | Datasource instance that should process the submission | +| `type` | *String* | :heavy_check_mark: | Submission type registered for the datasource | +| `requestBody` | Map\ | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md new file mode 100644 index 00000000..57dda74e --- /dev/null +++ b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md @@ -0,0 +1,11 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md) | :heavy_minus_sign: | Accepted | \ No newline at end of file diff --git a/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md new file mode 100644 index 00000000..202f59dd --- /dev/null +++ b/docs/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.md @@ -0,0 +1,10 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody + +Accepted + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `requestId` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index d38cf187..441cf94f 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -49982,8 +49982,8 @@ Upload files for Chat. package hello.world; import com.glean.api_client.glean_api_client.Glean; -import com.glean.api_client.glean_api_client.models.components.File; import com.glean.api_client.glean_api_client.models.components.UploadChatFilesRequest; +import com.glean.api_client.glean_api_client.models.components.UploadChatFilesRequestFile; import com.glean.api_client.glean_api_client.models.operations.UploadchatfilesResponse; import com.glean.api_client.glean_api_client.utils.Utils; import java.io.FileInputStream; @@ -50001,7 +50001,7 @@ public class Application { UploadchatfilesResponse res = sdk.client().chat().uploadFiles() .uploadChatFilesRequest(UploadChatFilesRequest.builder() .files(List.of( - File.builder() + UploadChatFilesRequestFile.builder() .fileName("example.file") .content(Utils.readBytesAndClose(new FileInputStream("example.file"))) .build())) diff --git a/docs/sdks/indexingdatasources/README.md b/docs/sdks/indexingdatasources/README.md index 88064060..5184de29 100644 --- a/docs/sdks/indexingdatasources/README.md +++ b/docs/sdks/indexingdatasources/README.md @@ -6,6 +6,7 @@ * [add](#add) - Add or update datasource * [retrieveConfig](#retrieveconfig) - Get datasource config +* [submit](#submit) - Submit datasource data ## add @@ -122,4 +123,65 @@ public class Application { | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | -| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## submit + +Validates and asynchronously processes a datasource-specific submission. + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; +import java.lang.Exception; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws ErrorInfoResponse, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = sdk.indexing().datasources().submit() + .datasourceInstance("") + .type("") + .requestBody(Map.ofEntries( + Map.entry("key", ""), + Map.entry("key1", ""), + Map.entry("key2", ""))) + .call(); + + if (res.object().isPresent()) { + System.out.println(res.object().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `datasourceInstance` | *String* | :heavy_check_mark: | Datasource instance that should process the submission | +| `type` | *String* | :heavy_check_mark: | Submission type registered for the datasource | +| `requestBody` | Map\ | :heavy_check_mark: | N/A | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | + +### Response + +**[PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse](../../models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| models/errors/ErrorInfoResponse | 400, 401, 404 | application/json | +| models/errors/ErrorInfoResponse | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md new file mode 100644 index 00000000..d69c628d --- /dev/null +++ b/docs/sdks/skills/README.md @@ -0,0 +1,522 @@ +# Skills + +## Overview + +### Available Operations + +* [create](#create) - Create skill +* [list](#list) - List skills +* [validate](#validate) - Validate skill bundle +* [retrieve](#retrieve) - Retrieve skill +* [retrieveContent](#retrievecontent) - Download skill content +* [createVersion](#createversion) - Create skill version +* [listVersions](#listversions) - List skill versions +* [retrieveVersion](#retrieveversion) - Retrieve skill version +* [retrieveVersionContent](#retrieveversioncontent) - Download skill version content + +## create + +Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + + +### 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.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillCreateRequestFile; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.FileInputStream; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillCreateRequest req = PlatformSkillCreateRequest.builder() + .file(PlatformSkillCreateRequestFile.builder() + .fileName("example.file") + .content(Utils.readBytesAndClose(new FileInputStream("example.file"))) + .build()) + .build(); + + PlatformSkillsCreateResponse res = sdk.skills().create() + .request(req) + .call(); + + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [PlatformSkillCreateRequest](../../models/shared/PlatformSkillCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[PlatformSkillsCreateResponse](../../models/operations/PlatformSkillsCreateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## list + +List skills available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsListResponse res = sdk.skills().list() + .call(); + + if (res.platformSkillsListResponse().isPresent()) { + System.out.println(res.platformSkillsListResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Maximum number of skills to return. | +| `cursor` | *Optional\* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | + +### Response + +**[PlatformSkillsListResponse](../../models/operations/PlatformSkillsListResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## validate + +Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + + +### 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.PlatformSkillValidationRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillValidationRequestFile; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsValidateResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.FileInputStream; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillValidationRequest req = PlatformSkillValidationRequest.builder() + .file(PlatformSkillValidationRequestFile.builder() + .fileName("example.file") + .content(Utils.readBytesAndClose(new FileInputStream("example.file"))) + .build()) + .build(); + + PlatformSkillsValidateResponse res = sdk.skills().validate() + .request(req) + .call(); + + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [PlatformSkillValidationRequest](../../models/shared/PlatformSkillValidationRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[PlatformSkillsValidateResponse](../../models/operations/PlatformSkillsValidateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## retrieve + +Retrieve metadata for a skill available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsGetResponse res = sdk.skills().retrieve() + .skillId("") + .call(); + + if (res.platformSkillGetResponse().isPresent()) { + System.out.println(res.platformSkillGetResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | + +### Response + +**[PlatformSkillsGetResponse](../../models/operations/PlatformSkillsGetResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## retrieveContent + +Download the latest installable bundle for a skill available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsGetContentResponse res = sdk.skills().retrieveContent() + .skillId("") + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | + +### Response + +**[PlatformSkillsGetContentResponse](../../models/operations/PlatformSkillsGetContentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## createVersion + +Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + + +### 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.PlatformSkillVersionCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillVersionCreateRequestFile; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.FileInputStream; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsCreateVersionResponse res = sdk.skills().createVersion() + .skillId("") + .platformSkillVersionCreateRequest(PlatformSkillVersionCreateRequest.builder() + .file(PlatformSkillVersionCreateRequestFile.builder() + .fileName("example.file") + .content(Utils.readBytesAndClose(new FileInputStream("example.file"))) + .build()) + .build()) + .call(); + + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillVersionCreateRequest` | [PlatformSkillVersionCreateRequest](../../models/components/PlatformSkillVersionCreateRequest.md) | :heavy_check_mark: | N/A | + +### Response + +**[PlatformSkillsCreateVersionResponse](../../models/operations/PlatformSkillsCreateVersionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 409, 413, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## listVersions + +List versions for a skill available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsListVersionsResponse res = sdk.skills().listVersions() + .skillId("") + .call(); + + if (res.platformSkillVersionsListResponse().isPresent()) { + System.out.println(res.platformSkillVersionsListResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Maximum number of versions to return. | +| `cursor` | *Optional\* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | + +### Response + +**[PlatformSkillsListVersionsResponse](../../models/operations/PlatformSkillsListVersionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## retrieveVersion + +Retrieve metadata for a skill version available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsGetVersionResponse res = sdk.skills().retrieveVersion() + .skillId("") + .version(495658L) + .call(); + + if (res.platformSkillVersionGetResponse().isPresent()) { + System.out.println(res.platformSkillVersionGetResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `version` | *long* | :heavy_check_mark: | Major version number. | + +### Response + +**[PlatformSkillsGetVersionResponse](../../models/operations/PlatformSkillsGetVersionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## retrieveVersionContent + +Download the installable bundle for a skill version available to the authenticated user. + + +### Example Usage + + +```java +package hello.world; + +import com.glean.api_client.glean_api_client.Glean; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws PlatformProblemDetailException, Exception { + + Glean sdk = Glean.builder() + .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) + .build(); + + PlatformSkillsGetVersionContentResponse res = sdk.skills().retrieveVersionContent() + .skillId("") + .version(117760L) + .call(); + + if (res.responseStream().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `skillId` | *String* | :heavy_check_mark: | Glean skill ID. | +| `version` | *long* | :heavy_check_mark: | Major version number. | + +### Response + +**[PlatformSkillsGetVersionContentResponse](../../models/operations/PlatformSkillsGetVersionContentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| models/errors/PlatformProblemDetailException | 400, 401, 403, 404, 408, 429 | application/problem+json | +| models/errors/PlatformProblemDetailException | 500, 503 | application/problem+json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 947c27d5..706f8978 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.14.3 +version=0.14.4 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java index 043e1a83..ec55bc7d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncGlean.java @@ -36,6 +36,8 @@ public class AsyncGlean { private final AsyncAgents agents; + private final AsyncSkills skills; + private final AsyncSearch search; private final AsyncClient client; @@ -46,6 +48,10 @@ public AsyncAgents agents() { return agents; } + public AsyncSkills skills() { + return skills; + } + public AsyncSearch search() { return search; } @@ -65,6 +71,7 @@ public AsyncIndexing indexing() { this.syncSDK = syncSDK; this.sdkConfiguration = sdkConfiguration; this.agents = new AsyncAgents(syncSDK.agents(), sdkConfiguration); + this.skills = new AsyncSkills(syncSDK.skills(), sdkConfiguration); this.search = new AsyncSearch(syncSDK.search(), sdkConfiguration); this.client = new AsyncClient(syncSDK.client(), sdkConfiguration); this.indexing = new AsyncIndexing(syncSDK.indexing(), sdkConfiguration); diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java index 5976744e..7598fae7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncIndexingDatasources.java @@ -8,13 +8,21 @@ import com.glean.api_client.glean_api_client.models.components.CustomDatasourceConfig; import com.glean.api_client.glean_api_client.models.components.GetDatasourceConfigRequest; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1AdddatasourceRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1AdddatasourceResponse; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1GetdatasourceconfigRequestBuilder; import com.glean.api_client.glean_api_client.models.operations.async.PostApiIndexV1GetdatasourceconfigResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; import com.glean.api_client.glean_api_client.operations.PostApiIndexV1Adddatasource; import com.glean.api_client.glean_api_client.operations.PostApiIndexV1Getdatasourceconfig; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Object; +import java.lang.String; +import java.util.Map; +import java.util.Optional; import java.util.concurrent.CompletableFuture; @@ -91,4 +99,61 @@ public CompletableFuture retrieveConf .thenCompose(operation::handleResponse); } + + /** + * Submit datasource data + * + *

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

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

Validates and asynchronously processes a datasource-specific submission. + * + * @param datasourceInstance Datasource instance that should process the submission + * @param type Submission type registered for the datasource + * @param requestBody + * @param serverURL Overrides the server URL. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture submit( + String datasourceInstance, String type, + Map requestBody, Optional serverURL) { + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + .builder() + .datasourceInstance(datasourceInstance) + .type(type) + .requestBody(requestBody) + .build(); + AsyncRequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Async(sdkConfiguration, serverURL, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + } diff --git a/src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java b/src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java new file mode 100644 index 00000000..c1f1a5a2 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/AsyncSkills.java @@ -0,0 +1,393 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 809381bacfb1 + */ +package com.glean.api_client.glean_api_client; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.models.components.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillValidationRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillVersionCreateRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequest; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateVersionRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateVersionResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetContentRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetContentResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionContentRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionContentResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListVersionsRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListVersionsResponse; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsValidateRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsValidateResponse; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreate; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreateVersion; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetContent; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersion; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersionContent; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsListVersions; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsValidate; +import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + + +public class AsyncSkills { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final Skills syncSDK; + + AsyncSkills(Skills syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Skills sync() { + return syncSDK; + } + + + /** + * Create skill + * + *

Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already + * has a skill with the same name, the existing skill is superseded with a new version. + * + * @return The async call builder + */ + public PlatformSkillsCreateRequestBuilder create() { + return new PlatformSkillsCreateRequestBuilder(sdkConfiguration); + } + + /** + * Create skill + * + *

Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already + * has a skill with the same name, the existing skill is superseded with a new version. + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture create(PlatformSkillCreateRequest request) { + AsyncRequestOperation operation + = new PlatformSkillsCreate.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * List skills + * + *

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

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

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

Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and + * returns parsed metadata plus the normalized file layout. + * + * @return The async call builder + */ + public PlatformSkillsValidateRequestBuilder validate() { + return new PlatformSkillsValidateRequestBuilder(sdkConfiguration); + } + + /** + * Validate skill bundle + * + *

Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and + * returns parsed metadata plus the normalized file layout. + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture validate(PlatformSkillValidationRequest request) { + AsyncRequestOperation operation + = new PlatformSkillsValidate.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve skill + * + *

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

Retrieve metadata for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture retrieve(String skillId) { + PlatformSkillsGetRequest request = + PlatformSkillsGetRequest + .builder() + .skillId(skillId) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsGet.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Download skill content + * + *

Download the latest installable bundle for a skill available to the authenticated user. + * + * @return The async call builder + */ + public PlatformSkillsGetContentRequestBuilder retrieveContent() { + return new PlatformSkillsGetContentRequestBuilder(sdkConfiguration); + } + + /** + * Download skill content + * + *

Download the latest installable bundle for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture retrieveContent(String skillId) { + PlatformSkillsGetContentRequest request = + PlatformSkillsGetContentRequest + .builder() + .skillId(skillId) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsGetContent.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create skill version + * + *

Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, + * or .skill bundle. + * + * @return The async call builder + */ + public PlatformSkillsCreateVersionRequestBuilder createVersion() { + return new PlatformSkillsCreateVersionRequestBuilder(sdkConfiguration); + } + + /** + * Create skill version + * + *

Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, + * or .skill bundle. + * + * @param skillId Glean skill ID. + * @param platformSkillVersionCreateRequest + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture createVersion(String skillId, PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + PlatformSkillsCreateVersionRequest request = + PlatformSkillsCreateVersionRequest + .builder() + .skillId(skillId) + .platformSkillVersionCreateRequest(platformSkillVersionCreateRequest) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsCreateVersion.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * List skill versions + * + *

List versions for a skill available to the authenticated user. + * + * @return The async call builder + */ + public PlatformSkillsListVersionsRequestBuilder listVersions() { + return new PlatformSkillsListVersionsRequestBuilder(sdkConfiguration); + } + + /** + * List skill versions + * + *

List versions for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listVersions(String skillId) { + return listVersions(skillId, Optional.empty(), Optional.empty()); + } + + /** + * List skill versions + * + *

List versions for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @param pageSize Maximum number of versions to return. + * @param cursor Opaque pagination cursor from a previous response. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listVersions( + String skillId, Optional pageSize, + Optional cursor) { + PlatformSkillsListVersionsRequest request = + PlatformSkillsListVersionsRequest + .builder() + .skillId(skillId) + .pageSize(pageSize) + .cursor(cursor) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsListVersions.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve skill version + * + *

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

Retrieve metadata for a skill version available to the authenticated user. + * + * @param skillId Glean skill ID. + * @param version Major version number. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture retrieveVersion(String skillId, long version) { + PlatformSkillsGetVersionRequest request = + PlatformSkillsGetVersionRequest + .builder() + .skillId(skillId) + .version(version) + .build(); + AsyncRequestOperation operation + = new PlatformSkillsGetVersion.Async(sdkConfiguration, _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Download skill version content + * + *

Download the installable bundle for a skill version available to the authenticated user. + * + * @return The async call builder + */ + public PlatformSkillsGetVersionContentRequestBuilder retrieveVersionContent() { + return new PlatformSkillsGetVersionContentRequestBuilder(sdkConfiguration); + } + + /** + * Download skill version content + * + *

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

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

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

Validates and asynchronously processes a datasource-specific submission. + * + * @param datasourceInstance Datasource instance that should process the submission + * @param type Submission type registered for the datasource + * @param requestBody + * @param serverURL Overrides the server URL. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse submit( + String datasourceInstance, String type, + Map requestBody, Optional serverURL) { + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + .builder() + .datasourceInstance(datasourceInstance) + .type(type) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Sync(sdkConfiguration, serverURL, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java index f24764cd..168fb957 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java +++ b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java @@ -25,8 +25,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.14.3"; - public static final String GEN_VERSION = "2.916.4"; + public static final String SDK_VERSION = "0.14.4"; + public static final String GEN_VERSION = "2.918.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/Skills.java b/src/main/java/com/glean/api_client/glean_api_client/Skills.java new file mode 100644 index 00000000..0859b0db --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/Skills.java @@ -0,0 +1,385 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6903ae835067 + */ +package com.glean.api_client.glean_api_client; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.models.components.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillValidationRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillVersionCreateRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsResponse; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsValidateRequestBuilder; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsValidateResponse; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreate; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreateVersion; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetContent; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersion; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersionContent; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsListVersions; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsValidate; +import com.glean.api_client.glean_api_client.utils.Headers; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + + +public class Skills { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncSkills asyncSDK; + + Skills(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncSkills(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncSkills async() { + return asyncSDK; + } + + /** + * Create skill + * + *

Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already + * has a skill with the same name, the existing skill is superseded with a new version. + * + * @return The call builder + */ + public PlatformSkillsCreateRequestBuilder create() { + return new PlatformSkillsCreateRequestBuilder(sdkConfiguration); + } + + /** + * Create skill + * + *

Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already + * has a skill with the same name, the existing skill is superseded with a new version. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsCreateResponse create(PlatformSkillCreateRequest request) { + RequestOperation operation + = new PlatformSkillsCreate.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * List skills + * + *

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

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

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

Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and + * returns parsed metadata plus the normalized file layout. + * + * @return The call builder + */ + public PlatformSkillsValidateRequestBuilder validate() { + return new PlatformSkillsValidateRequestBuilder(sdkConfiguration); + } + + /** + * Validate skill bundle + * + *

Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and + * returns parsed metadata plus the normalized file layout. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsValidateResponse validate(PlatformSkillValidationRequest request) { + RequestOperation operation + = new PlatformSkillsValidate.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve skill + * + *

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

Retrieve metadata for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsGetResponse retrieve(String skillId) { + PlatformSkillsGetRequest request = + PlatformSkillsGetRequest + .builder() + .skillId(skillId) + .build(); + RequestOperation operation + = new PlatformSkillsGet.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Download skill content + * + *

Download the latest installable bundle for a skill available to the authenticated user. + * + * @return The call builder + */ + public PlatformSkillsGetContentRequestBuilder retrieveContent() { + return new PlatformSkillsGetContentRequestBuilder(sdkConfiguration); + } + + /** + * Download skill content + * + *

Download the latest installable bundle for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsGetContentResponse retrieveContent(String skillId) { + PlatformSkillsGetContentRequest request = + PlatformSkillsGetContentRequest + .builder() + .skillId(skillId) + .build(); + RequestOperation operation + = new PlatformSkillsGetContent.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create skill version + * + *

Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, + * or .skill bundle. + * + * @return The call builder + */ + public PlatformSkillsCreateVersionRequestBuilder createVersion() { + return new PlatformSkillsCreateVersionRequestBuilder(sdkConfiguration); + } + + /** + * Create skill version + * + *

Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, + * or .skill bundle. + * + * @param skillId Glean skill ID. + * @param platformSkillVersionCreateRequest + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsCreateVersionResponse createVersion(String skillId, PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + PlatformSkillsCreateVersionRequest request = + PlatformSkillsCreateVersionRequest + .builder() + .skillId(skillId) + .platformSkillVersionCreateRequest(platformSkillVersionCreateRequest) + .build(); + RequestOperation operation + = new PlatformSkillsCreateVersion.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * List skill versions + * + *

List versions for a skill available to the authenticated user. + * + * @return The call builder + */ + public PlatformSkillsListVersionsRequestBuilder listVersions() { + return new PlatformSkillsListVersionsRequestBuilder(sdkConfiguration); + } + + /** + * List skill versions + * + *

List versions for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsListVersionsResponse listVersions(String skillId) { + return listVersions(skillId, Optional.empty(), Optional.empty()); + } + + /** + * List skill versions + * + *

List versions for a skill available to the authenticated user. + * + * @param skillId Glean skill ID. + * @param pageSize Maximum number of versions to return. + * @param cursor Opaque pagination cursor from a previous response. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsListVersionsResponse listVersions( + String skillId, Optional pageSize, + Optional cursor) { + PlatformSkillsListVersionsRequest request = + PlatformSkillsListVersionsRequest + .builder() + .skillId(skillId) + .pageSize(pageSize) + .cursor(cursor) + .build(); + RequestOperation operation + = new PlatformSkillsListVersions.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve skill version + * + *

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

Retrieve metadata for a skill version available to the authenticated user. + * + * @param skillId Glean skill ID. + * @param version Major version number. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PlatformSkillsGetVersionResponse retrieveVersion(String skillId, long version) { + PlatformSkillsGetVersionRequest request = + PlatformSkillsGetVersionRequest + .builder() + .skillId(skillId) + .version(version) + .build(); + RequestOperation operation + = new PlatformSkillsGetVersion.Sync(sdkConfiguration, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Download skill version content + * + *

Download the installable bundle for a skill version available to the authenticated user. + * + * @return The call builder + */ + public PlatformSkillsGetVersionContentRequestBuilder retrieveVersionContent() { + return new PlatformSkillsGetVersionContentRequestBuilder(sdkConfiguration); + } + + /** + * Download skill version content + * + *

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

Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ +public class ActionTypeSource { + + public static final ActionTypeSource MCP_ANNOTATION = new ActionTypeSource("MCP_ANNOTATION"); + public static final ActionTypeSource ADMIN_OVERRIDE = new ActionTypeSource("ADMIN_OVERRIDE"); + public static final ActionTypeSource NONE = new ActionTypeSource("NONE"); + public static final ActionTypeSource NATIVE_TOOL_DEFINITION = new ActionTypeSource("NATIVE_TOOL_DEFINITION"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ActionTypeSource(String value) { + this.value = value; + } + + /** + * Returns a ActionTypeSource with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ActionTypeSource + */ + @JsonCreator + public static ActionTypeSource of(String value) { + synchronized (ActionTypeSource.class) { + return values.computeIfAbsent(value, v -> new ActionTypeSource(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ActionTypeSource other = (ActionTypeSource) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ActionTypeSource [value=" + value + "]"; + } + + // return an array just like an enum + public static ActionTypeSource[] values() { + synchronized (ActionTypeSource.class) { + return values.values().toArray(new ActionTypeSource[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("MCP_ANNOTATION", MCP_ANNOTATION); + map.put("ADMIN_OVERRIDE", ADMIN_OVERRIDE); + map.put("NONE", NONE); + map.put("NATIVE_TOOL_DEFINITION", NATIVE_TOOL_DEFINITION); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("MCP_ANNOTATION", ActionTypeSourceEnum.MCP_ANNOTATION); + map.put("ADMIN_OVERRIDE", ActionTypeSourceEnum.ADMIN_OVERRIDE); + map.put("NONE", ActionTypeSourceEnum.NONE); + map.put("NATIVE_TOOL_DEFINITION", ActionTypeSourceEnum.NATIVE_TOOL_DEFINITION); + return map; + } + + + public enum ActionTypeSourceEnum { + + MCP_ANNOTATION("MCP_ANNOTATION"), + ADMIN_OVERRIDE("ADMIN_OVERRIDE"), + NONE("NONE"), + NATIVE_TOOL_DEFINITION("NATIVE_TOOL_DEFINITION"),; + + private final String value; + + private ActionTypeSourceEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java index 478d8692..92425052 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpFindingFilter.java @@ -50,7 +50,8 @@ public class DlpFindingFilter { private Optional> documentIds; /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("severity") @@ -152,7 +153,8 @@ public Optional> documentIds() { } /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -267,7 +269,8 @@ public DlpFindingFilter withDocumentIds(Optional> documen } /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public DlpFindingFilter withSeverity(DlpSeverity severity) { Utils.checkNotNull(severity, "severity"); @@ -277,7 +280,8 @@ public DlpFindingFilter withSeverity(DlpSeverity severity) { /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public DlpFindingFilter withSeverity(Optional severity) { Utils.checkNotNull(severity, "severity"); @@ -494,7 +498,8 @@ public Builder documentIds(Optional> documentIds) { /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public Builder severity(DlpSeverity severity) { Utils.checkNotNull(severity, "severity"); @@ -503,7 +508,8 @@ public Builder severity(DlpSeverity severity) { } /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses + * that concluded every flagged entity is a detector false positive. */ public Builder severity(Optional severity) { Utils.checkNotNull(severity, "severity"); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpIssueFilter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpIssueFilter.java index a56dabf3..ce30dc8d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpIssueFilter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpIssueFilter.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Deprecated; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -37,22 +38,57 @@ public class DlpIssueFilter { private Optional> statuses; /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("assigneeId") + @Deprecated private Optional assigneeId; + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no + * assignee. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("assigneeIds") + private Optional> assigneeIds; + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("infoType") + @Deprecated private Optional infoType; + /** + * Filter by one or more built-in info types. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("infoTypes") + private Optional> infoTypes; + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("regexId") + @Deprecated private Optional regexId; + /** + * Filter by one or more regex rule IDs. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("regexIds") + private Optional> regexIds; + /** * Filter by one or more report/policy IDs. */ @@ -65,11 +101,23 @@ public class DlpIssueFilter { @JsonProperty("docId") private Optional docId; - + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("datasource") + @Deprecated private Optional datasource; + /** + * Filter by one or more datasources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("datasources") + private Optional> datasources; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("visibility") @@ -92,33 +140,45 @@ public DlpIssueFilter( @JsonProperty("searchText") Optional searchText, @JsonProperty("statuses") Optional> statuses, @JsonProperty("assigneeId") Optional assigneeId, + @JsonProperty("assigneeIds") Optional> assigneeIds, @JsonProperty("infoType") Optional infoType, + @JsonProperty("infoTypes") Optional> infoTypes, @JsonProperty("regexId") Optional regexId, + @JsonProperty("regexIds") Optional> regexIds, @JsonProperty("reportIds") Optional> reportIds, @JsonProperty("docId") Optional docId, @JsonProperty("datasource") Optional datasource, + @JsonProperty("datasources") Optional> datasources, @JsonProperty("visibility") Optional visibility, @JsonProperty("severities") Optional> severities, @JsonProperty("timeRange") Optional timeRange) { Utils.checkNotNull(searchText, "searchText"); Utils.checkNotNull(statuses, "statuses"); Utils.checkNotNull(assigneeId, "assigneeId"); + Utils.checkNotNull(assigneeIds, "assigneeIds"); Utils.checkNotNull(infoType, "infoType"); + Utils.checkNotNull(infoTypes, "infoTypes"); Utils.checkNotNull(regexId, "regexId"); + Utils.checkNotNull(regexIds, "regexIds"); Utils.checkNotNull(reportIds, "reportIds"); Utils.checkNotNull(docId, "docId"); Utils.checkNotNull(datasource, "datasource"); + Utils.checkNotNull(datasources, "datasources"); Utils.checkNotNull(visibility, "visibility"); Utils.checkNotNull(severities, "severities"); Utils.checkNotNull(timeRange, "timeRange"); this.searchText = searchText; this.statuses = statuses; this.assigneeId = assigneeId; + this.assigneeIds = assigneeIds; this.infoType = infoType; + this.infoTypes = infoTypes; this.regexId = regexId; + this.regexIds = regexIds; this.reportIds = reportIds; this.docId = docId; this.datasource = datasource; + this.datasources = datasources; this.visibility = visibility; this.severities = severities; this.timeRange = timeRange; @@ -128,7 +188,8 @@ public DlpIssueFilter() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -149,23 +210,66 @@ public Optional> statuses() { } /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated @JsonIgnore public Optional assigneeId() { return assigneeId; } + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no + * assignee. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> assigneeIds() { + return (Optional>) assigneeIds; + } + + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated @JsonIgnore public Optional infoType() { return infoType; } + /** + * Filter by one or more built-in info types. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> infoTypes() { + return (Optional>) infoTypes; + } + + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated @JsonIgnore public Optional regexId() { return regexId; } + /** + * Filter by one or more regex rule IDs. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> regexIds() { + return (Optional>) regexIds; + } + /** * Filter by one or more report/policy IDs. */ @@ -180,11 +284,26 @@ public Optional docId() { return docId; } + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated @JsonIgnore public Optional datasource() { return datasource; } + /** + * Filter by one or more datasources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> datasources() { + return (Optional>) datasources; + } + @JsonIgnore public Optional visibility() { return visibility; @@ -249,8 +368,11 @@ public DlpIssueFilter withStatuses(Optional> stat } /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public DlpIssueFilter withAssigneeId(String assigneeId) { Utils.checkNotNull(assigneeId, "assigneeId"); this.assigneeId = Optional.ofNullable(assigneeId); @@ -259,14 +381,44 @@ public DlpIssueFilter withAssigneeId(String assigneeId) { /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public DlpIssueFilter withAssigneeId(Optional assigneeId) { Utils.checkNotNull(assigneeId, "assigneeId"); this.assigneeId = assigneeId; return this; } + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no + * assignee. + */ + public DlpIssueFilter withAssigneeIds(List assigneeIds) { + Utils.checkNotNull(assigneeIds, "assigneeIds"); + this.assigneeIds = Optional.ofNullable(assigneeIds); + return this; + } + + + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no + * assignee. + */ + public DlpIssueFilter withAssigneeIds(Optional> assigneeIds) { + Utils.checkNotNull(assigneeIds, "assigneeIds"); + this.assigneeIds = assigneeIds; + return this; + } + + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public DlpIssueFilter withInfoType(String infoType) { Utils.checkNotNull(infoType, "infoType"); this.infoType = Optional.ofNullable(infoType); @@ -274,12 +426,43 @@ public DlpIssueFilter withInfoType(String infoType) { } + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public DlpIssueFilter withInfoType(Optional infoType) { Utils.checkNotNull(infoType, "infoType"); this.infoType = infoType; return this; } + /** + * Filter by one or more built-in info types. + */ + public DlpIssueFilter withInfoTypes(List infoTypes) { + Utils.checkNotNull(infoTypes, "infoTypes"); + this.infoTypes = Optional.ofNullable(infoTypes); + return this; + } + + + /** + * Filter by one or more built-in info types. + */ + public DlpIssueFilter withInfoTypes(Optional> infoTypes) { + Utils.checkNotNull(infoTypes, "infoTypes"); + this.infoTypes = infoTypes; + return this; + } + + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public DlpIssueFilter withRegexId(String regexId) { Utils.checkNotNull(regexId, "regexId"); this.regexId = Optional.ofNullable(regexId); @@ -287,12 +470,37 @@ public DlpIssueFilter withRegexId(String regexId) { } + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public DlpIssueFilter withRegexId(Optional regexId) { Utils.checkNotNull(regexId, "regexId"); this.regexId = regexId; return this; } + /** + * Filter by one or more regex rule IDs. + */ + public DlpIssueFilter withRegexIds(List regexIds) { + Utils.checkNotNull(regexIds, "regexIds"); + this.regexIds = Optional.ofNullable(regexIds); + return this; + } + + + /** + * Filter by one or more regex rule IDs. + */ + public DlpIssueFilter withRegexIds(Optional> regexIds) { + Utils.checkNotNull(regexIds, "regexIds"); + this.regexIds = regexIds; + return this; + } + /** * Filter by one or more report/policy IDs. */ @@ -325,6 +533,12 @@ public DlpIssueFilter withDocId(Optional docId) { return this; } + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public DlpIssueFilter withDatasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = Optional.ofNullable(datasource); @@ -332,12 +546,37 @@ public DlpIssueFilter withDatasource(String datasource) { } + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public DlpIssueFilter withDatasource(Optional datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; return this; } + /** + * Filter by one or more datasources. + */ + public DlpIssueFilter withDatasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = Optional.ofNullable(datasources); + return this; + } + + + /** + * Filter by one or more datasources. + */ + public DlpIssueFilter withDatasources(Optional> datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + public DlpIssueFilter withVisibility(String visibility) { Utils.checkNotNull(visibility, "visibility"); this.visibility = Optional.ofNullable(visibility); @@ -396,11 +635,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.searchText, other.searchText) && Utils.enhancedDeepEquals(this.statuses, other.statuses) && Utils.enhancedDeepEquals(this.assigneeId, other.assigneeId) && + Utils.enhancedDeepEquals(this.assigneeIds, other.assigneeIds) && Utils.enhancedDeepEquals(this.infoType, other.infoType) && + Utils.enhancedDeepEquals(this.infoTypes, other.infoTypes) && Utils.enhancedDeepEquals(this.regexId, other.regexId) && + Utils.enhancedDeepEquals(this.regexIds, other.regexIds) && Utils.enhancedDeepEquals(this.reportIds, other.reportIds) && Utils.enhancedDeepEquals(this.docId, other.docId) && Utils.enhancedDeepEquals(this.datasource, other.datasource) && + Utils.enhancedDeepEquals(this.datasources, other.datasources) && Utils.enhancedDeepEquals(this.visibility, other.visibility) && Utils.enhancedDeepEquals(this.severities, other.severities) && Utils.enhancedDeepEquals(this.timeRange, other.timeRange); @@ -410,9 +653,10 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( searchText, statuses, assigneeId, - infoType, regexId, reportIds, - docId, datasource, visibility, - severities, timeRange); + assigneeIds, infoType, infoTypes, + regexId, regexIds, reportIds, + docId, datasource, datasources, + visibility, severities, timeRange); } @Override @@ -421,11 +665,15 @@ public String toString() { "searchText", searchText, "statuses", statuses, "assigneeId", assigneeId, + "assigneeIds", assigneeIds, "infoType", infoType, + "infoTypes", infoTypes, "regexId", regexId, + "regexIds", regexIds, "reportIds", reportIds, "docId", docId, "datasource", datasource, + "datasources", datasources, "visibility", visibility, "severities", severities, "timeRange", timeRange); @@ -438,18 +686,30 @@ public final static class Builder { private Optional> statuses = Optional.empty(); + @Deprecated private Optional assigneeId = Optional.empty(); + private Optional> assigneeIds = Optional.empty(); + + @Deprecated private Optional infoType = Optional.empty(); + private Optional> infoTypes = Optional.empty(); + + @Deprecated private Optional regexId = Optional.empty(); + private Optional> regexIds = Optional.empty(); + private Optional> reportIds = Optional.empty(); private Optional docId = Optional.empty(); + @Deprecated private Optional datasource = Optional.empty(); + private Optional> datasources = Optional.empty(); + private Optional visibility = Optional.empty(); private Optional> severities = Optional.empty(); @@ -500,8 +760,11 @@ public Builder statuses(Optional> statuses) { /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder assigneeId(String assigneeId) { Utils.checkNotNull(assigneeId, "assigneeId"); this.assigneeId = Optional.ofNullable(assigneeId); @@ -509,8 +772,11 @@ public Builder assigneeId(String assigneeId) { } /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder assigneeId(Optional assigneeId) { Utils.checkNotNull(assigneeId, "assigneeId"); this.assigneeId = assigneeId; @@ -518,12 +784,45 @@ public Builder assigneeId(Optional assigneeId) { } + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no + * assignee. + */ + public Builder assigneeIds(List assigneeIds) { + Utils.checkNotNull(assigneeIds, "assigneeIds"); + this.assigneeIds = Optional.ofNullable(assigneeIds); + return this; + } + + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no + * assignee. + */ + public Builder assigneeIds(Optional> assigneeIds) { + Utils.checkNotNull(assigneeIds, "assigneeIds"); + this.assigneeIds = assigneeIds; + return this; + } + + + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder infoType(String infoType) { Utils.checkNotNull(infoType, "infoType"); this.infoType = Optional.ofNullable(infoType); return this; } + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder infoType(Optional infoType) { Utils.checkNotNull(infoType, "infoType"); this.infoType = infoType; @@ -531,12 +830,43 @@ public Builder infoType(Optional infoType) { } + /** + * Filter by one or more built-in info types. + */ + public Builder infoTypes(List infoTypes) { + Utils.checkNotNull(infoTypes, "infoTypes"); + this.infoTypes = Optional.ofNullable(infoTypes); + return this; + } + + /** + * Filter by one or more built-in info types. + */ + public Builder infoTypes(Optional> infoTypes) { + Utils.checkNotNull(infoTypes, "infoTypes"); + this.infoTypes = infoTypes; + return this; + } + + + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder regexId(String regexId) { Utils.checkNotNull(regexId, "regexId"); this.regexId = Optional.ofNullable(regexId); return this; } + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder regexId(Optional regexId) { Utils.checkNotNull(regexId, "regexId"); this.regexId = regexId; @@ -544,6 +874,25 @@ public Builder regexId(Optional regexId) { } + /** + * Filter by one or more regex rule IDs. + */ + public Builder regexIds(List regexIds) { + Utils.checkNotNull(regexIds, "regexIds"); + this.regexIds = Optional.ofNullable(regexIds); + return this; + } + + /** + * Filter by one or more regex rule IDs. + */ + public Builder regexIds(Optional> regexIds) { + Utils.checkNotNull(regexIds, "regexIds"); + this.regexIds = regexIds; + return this; + } + + /** * Filter by one or more report/policy IDs. */ @@ -576,12 +925,24 @@ public Builder docId(Optional docId) { } + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder datasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = Optional.ofNullable(datasource); return this; } + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder datasource(Optional datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; @@ -589,6 +950,25 @@ public Builder datasource(Optional datasource) { } + /** + * Filter by one or more datasources. + */ + public Builder datasources(List datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = Optional.ofNullable(datasources); + return this; + } + + /** + * Filter by one or more datasources. + */ + public Builder datasources(Optional> datasources) { + Utils.checkNotNull(datasources, "datasources"); + this.datasources = datasources; + return this; + } + + public Builder visibility(String visibility) { Utils.checkNotNull(visibility, "visibility"); this.visibility = Optional.ofNullable(visibility); @@ -637,9 +1017,10 @@ public DlpIssueFilter build() { return new DlpIssueFilter( searchText, statuses, assigneeId, - infoType, regexId, reportIds, - docId, datasource, visibility, - severities, timeRange); + assigneeIds, infoType, infoTypes, + regexId, regexIds, reportIds, + docId, datasource, datasources, + visibility, severities, timeRange); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java index 2f7a0d6a..db14be57 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpSeverity.java @@ -22,7 +22,8 @@ /** * DlpSeverity * - *

Severity levels for DLP findings and analyses. + *

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

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

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

Current external-source sync status. + */ +public class PlatformSkillSyncStatus { + + public static final PlatformSkillSyncStatus UP_TO_DATE = new PlatformSkillSyncStatus("UP_TO_DATE"); + public static final PlatformSkillSyncStatus UPDATE_AVAILABLE = new PlatformSkillSyncStatus("UPDATE_AVAILABLE"); + public static final PlatformSkillSyncStatus SYNC_FAILED = new PlatformSkillSyncStatus("SYNC_FAILED"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private PlatformSkillSyncStatus(String value) { + this.value = value; + } + + /** + * Returns a PlatformSkillSyncStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as PlatformSkillSyncStatus + */ + @JsonCreator + public static PlatformSkillSyncStatus of(String value) { + synchronized (PlatformSkillSyncStatus.class) { + return values.computeIfAbsent(value, v -> new PlatformSkillSyncStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PlatformSkillSyncStatus other = (PlatformSkillSyncStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "PlatformSkillSyncStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static PlatformSkillSyncStatus[] values() { + synchronized (PlatformSkillSyncStatus.class) { + return values.values().toArray(new PlatformSkillSyncStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("UP_TO_DATE", UP_TO_DATE); + map.put("UPDATE_AVAILABLE", UPDATE_AVAILABLE); + map.put("SYNC_FAILED", SYNC_FAILED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("UP_TO_DATE", PlatformSkillSyncStatusEnum.UP_TO_DATE); + map.put("UPDATE_AVAILABLE", PlatformSkillSyncStatusEnum.UPDATE_AVAILABLE); + map.put("SYNC_FAILED", PlatformSkillSyncStatusEnum.SYNC_FAILED); + return map; + } + + + public enum PlatformSkillSyncStatusEnum { + + UP_TO_DATE("UP_TO_DATE"), + UPDATE_AVAILABLE("UPDATE_AVAILABLE"), + SYNC_FAILED("SYNC_FAILED"),; + + private final String value; + + private PlatformSkillSyncStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationFile.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationFile.java new file mode 100644 index 00000000..23a88dfd --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationFile.java @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ab9dc998ea08 + */ +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.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillValidationFile { + /** + * Normalized relative path in the skill bundle. + */ + @JsonProperty("path") + private String path; + + /** + * File size in bytes. + */ + @JsonProperty("size_bytes") + private long sizeBytes; + + /** + * Whether this file is the skill manifest. + */ + @JsonProperty("is_manifest") + private boolean isManifest; + + @JsonCreator + public PlatformSkillValidationFile( + @JsonProperty("path") String path, + @JsonProperty("size_bytes") long sizeBytes, + @JsonProperty("is_manifest") boolean isManifest) { + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(sizeBytes, "sizeBytes"); + Utils.checkNotNull(isManifest, "isManifest"); + this.path = path; + this.sizeBytes = sizeBytes; + this.isManifest = isManifest; + } + + /** + * Normalized relative path in the skill bundle. + */ + @JsonIgnore + public String path() { + return path; + } + + /** + * File size in bytes. + */ + @JsonIgnore + public long sizeBytes() { + return sizeBytes; + } + + /** + * Whether this file is the skill manifest. + */ + @JsonIgnore + public boolean isManifest() { + return isManifest; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Normalized relative path in the skill bundle. + */ + public PlatformSkillValidationFile withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * File size in bytes. + */ + public PlatformSkillValidationFile withSizeBytes(long sizeBytes) { + Utils.checkNotNull(sizeBytes, "sizeBytes"); + this.sizeBytes = sizeBytes; + return this; + } + + /** + * Whether this file is the skill manifest. + */ + public PlatformSkillValidationFile withIsManifest(boolean isManifest) { + Utils.checkNotNull(isManifest, "isManifest"); + this.isManifest = isManifest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillValidationFile other = (PlatformSkillValidationFile) o; + return + Utils.enhancedDeepEquals(this.path, other.path) && + Utils.enhancedDeepEquals(this.sizeBytes, other.sizeBytes) && + Utils.enhancedDeepEquals(this.isManifest, other.isManifest); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + path, sizeBytes, isManifest); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillValidationFile.class, + "path", path, + "sizeBytes", sizeBytes, + "isManifest", isManifest); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String path; + + private Long sizeBytes; + + private Boolean isManifest; + + private Builder() { + // force use of static builder() method + } + + + /** + * Normalized relative path in the skill bundle. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + + /** + * File size in bytes. + */ + public Builder sizeBytes(long sizeBytes) { + Utils.checkNotNull(sizeBytes, "sizeBytes"); + this.sizeBytes = sizeBytes; + return this; + } + + + /** + * Whether this file is the skill manifest. + */ + public Builder isManifest(boolean isManifest) { + Utils.checkNotNull(isManifest, "isManifest"); + this.isManifest = isManifest; + return this; + } + + public PlatformSkillValidationFile build() { + + return new PlatformSkillValidationFile( + path, sizeBytes, isManifest); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationMetadata.java new file mode 100644 index 00000000..47fafe3b --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationMetadata.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8a21225a4276 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillValidationMetadata { + /** + * Skill name parsed from SKILL.md frontmatter. + */ + @JsonProperty("display_name") + private String displayName; + + /** + * Skill description parsed from SKILL.md frontmatter. + */ + @JsonProperty("description") + private String description; + + @JsonCreator + public PlatformSkillValidationMetadata( + @JsonProperty("display_name") String displayName, + @JsonProperty("description") String description) { + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(description, "description"); + this.displayName = displayName; + this.description = description; + } + + /** + * Skill name parsed from SKILL.md frontmatter. + */ + @JsonIgnore + public String displayName() { + return displayName; + } + + /** + * Skill description parsed from SKILL.md frontmatter. + */ + @JsonIgnore + public String description() { + return description; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Skill name parsed from SKILL.md frontmatter. + */ + public PlatformSkillValidationMetadata withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * Skill description parsed from SKILL.md frontmatter. + */ + public PlatformSkillValidationMetadata withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillValidationMetadata other = (PlatformSkillValidationMetadata) o; + return + Utils.enhancedDeepEquals(this.displayName, other.displayName) && + Utils.enhancedDeepEquals(this.description, other.description); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + displayName, description); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillValidationMetadata.class, + "displayName", displayName, + "description", description); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String displayName; + + private String description; + + private Builder() { + // force use of static builder() method + } + + + /** + * Skill name parsed from SKILL.md frontmatter. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + + /** + * Skill description parsed from SKILL.md frontmatter. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + public PlatformSkillValidationMetadata build() { + + return new PlatformSkillValidationMetadata( + displayName, description); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequest.java new file mode 100644 index 00000000..200069e3 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 05218a29e837 + */ +package com.glean.api_client.glean_api_client.models.components; + +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 PlatformSkillValidationRequest { + /** + * SKILL.md, .zip, or .skill bundle to validate. + */ + @SpeakeasyMetadata("multipartForm:file,name=file") + private PlatformSkillValidationRequestFile file; + + @JsonCreator + public PlatformSkillValidationRequest( + PlatformSkillValidationRequestFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + } + + /** + * SKILL.md, .zip, or .skill bundle to validate. + */ + @JsonIgnore + public PlatformSkillValidationRequestFile file() { + return file; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * SKILL.md, .zip, or .skill bundle to validate. + */ + public PlatformSkillValidationRequest withFile(PlatformSkillValidationRequestFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillValidationRequest other = (PlatformSkillValidationRequest) o; + return + Utils.enhancedDeepEquals(this.file, other.file); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + file); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillValidationRequest.class, + "file", file); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkillValidationRequestFile file; + + private Builder() { + // force use of static builder() method + } + + + /** + * SKILL.md, .zip, or .skill bundle to validate. + */ + public Builder file(PlatformSkillValidationRequestFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public PlatformSkillValidationRequest build() { + + return new PlatformSkillValidationRequest( + file); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequestFile.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequestFile.java new file mode 100644 index 00000000..8f091310 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationRequestFile.java @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: cccf15ffd7ee + */ +package com.glean.api_client.glean_api_client.models.components; + +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 PlatformSkillValidationRequestFile { + + @SpeakeasyMetadata("multipartForm:name=fileName") + private String fileName; + + + @SpeakeasyMetadata("multipartForm:content") + private byte[] content; + + @JsonCreator + public PlatformSkillValidationRequestFile( + String fileName, + byte[] content) { + Utils.checkNotNull(fileName, "fileName"); + Utils.checkNotNull(content, "content"); + this.fileName = fileName; + this.content = content; + } + + @JsonIgnore + public String fileName() { + return fileName; + } + + @JsonIgnore + public byte[] content() { + return content; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlatformSkillValidationRequestFile withFileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + public PlatformSkillValidationRequestFile withContent(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillValidationRequestFile other = (PlatformSkillValidationRequestFile) o; + return + Utils.enhancedDeepEquals(this.fileName, other.fileName) && + Utils.enhancedDeepEquals(this.content, other.content); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + fileName, content); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillValidationRequestFile.class, + "fileName", fileName, + "content", content); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String fileName; + + private byte[] content; + + private Builder() { + // force use of static builder() method + } + + + public Builder fileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + + public Builder content(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public PlatformSkillValidationRequestFile build() { + + return new PlatformSkillValidationRequestFile( + fileName, content); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java new file mode 100644 index 00000000..6ca7a5d5 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e6f17469edd8 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; + + +public class PlatformSkillValidationResponse { + + @JsonProperty("metadata") + private PlatformSkillValidationMetadata metadata; + + /** + * Normalized files in the bundle after stripping an optional single root folder. + */ + @JsonProperty("files") + private List files; + + /** + * Non-blocking validation warnings. + */ + @JsonProperty("warnings") + private List warnings; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillValidationResponse( + @JsonProperty("metadata") PlatformSkillValidationMetadata metadata, + @JsonProperty("files") List files, + @JsonProperty("warnings") List warnings, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(files, "files"); + Utils.checkNotNull(warnings, "warnings"); + Utils.checkNotNull(requestId, "requestId"); + this.metadata = metadata; + this.files = files; + this.warnings = warnings; + this.requestId = requestId; + } + + @JsonIgnore + public PlatformSkillValidationMetadata metadata() { + return metadata; + } + + /** + * Normalized files in the bundle after stripping an optional single root folder. + */ + @JsonIgnore + public List files() { + return files; + } + + /** + * Non-blocking validation warnings. + */ + @JsonIgnore + public List warnings() { + return warnings; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlatformSkillValidationResponse withMetadata(PlatformSkillValidationMetadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * Normalized files in the bundle after stripping an optional single root folder. + */ + public PlatformSkillValidationResponse withFiles(List files) { + Utils.checkNotNull(files, "files"); + this.files = files; + return this; + } + + /** + * Non-blocking validation warnings. + */ + public PlatformSkillValidationResponse withWarnings(List warnings) { + Utils.checkNotNull(warnings, "warnings"); + this.warnings = warnings; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillValidationResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillValidationResponse other = (PlatformSkillValidationResponse) o; + return + Utils.enhancedDeepEquals(this.metadata, other.metadata) && + Utils.enhancedDeepEquals(this.files, other.files) && + Utils.enhancedDeepEquals(this.warnings, other.warnings) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + metadata, files, warnings, + requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillValidationResponse.class, + "metadata", metadata, + "files", files, + "warnings", warnings, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkillValidationMetadata metadata; + + private List files; + + private List warnings; + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + public Builder metadata(PlatformSkillValidationMetadata metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + + /** + * Normalized files in the bundle after stripping an optional single root folder. + */ + public Builder files(List files) { + Utils.checkNotNull(files, "files"); + this.files = files; + return this; + } + + + /** + * Non-blocking validation warnings. + */ + public Builder warnings(List warnings) { + Utils.checkNotNull(warnings, "warnings"); + this.warnings = warnings; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillValidationResponse build() { + + return new PlatformSkillValidationResponse( + metadata, files, warnings, + requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java new file mode 100644 index 00000000..32e7d04b --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillValidationWarning.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c77caa9172f6 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillValidationWarning { + /** + * Stable warning code. + */ + @JsonProperty("code") + private String code; + + /** + * Human-readable warning message. + */ + @JsonProperty("message") + private String message; + + @JsonCreator + public PlatformSkillValidationWarning( + @JsonProperty("code") String code, + @JsonProperty("message") String message) { + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(message, "message"); + this.code = code; + this.message = message; + } + + /** + * Stable warning code. + */ + @JsonIgnore + public String code() { + return code; + } + + /** + * Human-readable warning message. + */ + @JsonIgnore + public String message() { + return message; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Stable warning code. + */ + public PlatformSkillValidationWarning withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + /** + * Human-readable warning message. + */ + public PlatformSkillValidationWarning withMessage(String 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; + } + PlatformSkillValidationWarning other = (PlatformSkillValidationWarning) o; + return + Utils.enhancedDeepEquals(this.code, other.code) && + Utils.enhancedDeepEquals(this.message, other.message); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + code, message); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillValidationWarning.class, + "code", code, + "message", message); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String code; + + private String message; + + private Builder() { + // force use of static builder() method + } + + + /** + * Stable warning code. + */ + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + + /** + * Human-readable warning message. + */ + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public PlatformSkillValidationWarning build() { + + return new PlatformSkillValidationWarning( + code, message); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersion.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersion.java new file mode 100644 index 00000000..abd2dc9a --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersion.java @@ -0,0 +1,410 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 75d21c0e97e9 + */ +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.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.Optional; + + +public class PlatformSkillVersion { + /** + * Glean skill ID. + */ + @JsonProperty("skill_id") + private String skillId; + + /** + * Major version number. + */ + @JsonProperty("version") + private long version; + + /** + * Minor version number. + */ + @JsonProperty("minor_version") + private long minorVersion; + + /** + * Whether this is the latest version of the skill. + */ + @JsonProperty("is_latest") + private boolean isLatest; + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + @JsonProperty("created_by") + private PlatformPersonReference createdBy; + + /** + * Time this version was created. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * Time this version was last updated. + */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_provenance") + private Optional sourceProvenance; + + @JsonCreator + public PlatformSkillVersion( + @JsonProperty("skill_id") String skillId, + @JsonProperty("version") long version, + @JsonProperty("minor_version") long minorVersion, + @JsonProperty("is_latest") boolean isLatest, + @JsonProperty("created_by") PlatformPersonReference createdBy, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("updated_at") OffsetDateTime updatedAt, + @JsonProperty("source_provenance") Optional sourceProvenance) { + Utils.checkNotNull(skillId, "skillId"); + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(minorVersion, "minorVersion"); + Utils.checkNotNull(isLatest, "isLatest"); + Utils.checkNotNull(createdBy, "createdBy"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.skillId = skillId; + this.version = version; + this.minorVersion = minorVersion; + this.isLatest = isLatest; + this.createdBy = createdBy; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.sourceProvenance = sourceProvenance; + } + + public PlatformSkillVersion( + String skillId, + long version, + long minorVersion, + boolean isLatest, + PlatformPersonReference createdBy, + OffsetDateTime createdAt, + OffsetDateTime updatedAt) { + this(skillId, version, minorVersion, + isLatest, createdBy, createdAt, + updatedAt, Optional.empty()); + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + /** + * Major version number. + */ + @JsonIgnore + public long version() { + return version; + } + + /** + * Minor version number. + */ + @JsonIgnore + public long minorVersion() { + return minorVersion; + } + + /** + * Whether this is the latest version of the skill. + */ + @JsonIgnore + public boolean isLatest() { + return isLatest; + } + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + @JsonIgnore + public PlatformPersonReference createdBy() { + return createdBy; + } + + /** + * Time this version was created. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * Time this version was last updated. + */ + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional sourceProvenance() { + return (Optional) sourceProvenance; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillVersion withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + /** + * Major version number. + */ + public PlatformSkillVersion withVersion(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * Minor version number. + */ + public PlatformSkillVersion withMinorVersion(long minorVersion) { + Utils.checkNotNull(minorVersion, "minorVersion"); + this.minorVersion = minorVersion; + return this; + } + + /** + * Whether this is the latest version of the skill. + */ + public PlatformSkillVersion withIsLatest(boolean isLatest) { + Utils.checkNotNull(isLatest, "isLatest"); + this.isLatest = isLatest; + return this; + } + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + public PlatformSkillVersion withCreatedBy(PlatformPersonReference createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + /** + * Time this version was created. + */ + public PlatformSkillVersion withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Time this version was last updated. + */ + public PlatformSkillVersion withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public PlatformSkillVersion withSourceProvenance(PlatformSkillSourceProvenance sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = Optional.ofNullable(sourceProvenance); + return this; + } + + + public PlatformSkillVersion withSourceProvenance(Optional sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = sourceProvenance; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillVersion other = (PlatformSkillVersion) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId) && + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.minorVersion, other.minorVersion) && + Utils.enhancedDeepEquals(this.isLatest, other.isLatest) && + Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.sourceProvenance, other.sourceProvenance); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId, version, minorVersion, + isLatest, createdBy, createdAt, + updatedAt, sourceProvenance); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillVersion.class, + "skillId", skillId, + "version", version, + "minorVersion", minorVersion, + "isLatest", isLatest, + "createdBy", createdBy, + "createdAt", createdAt, + "updatedAt", updatedAt, + "sourceProvenance", sourceProvenance); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Long version; + + private Long minorVersion; + + private Boolean isLatest; + + private PlatformPersonReference createdBy; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + private Optional sourceProvenance = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + /** + * Major version number. + */ + public Builder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * Minor version number. + */ + public Builder minorVersion(long minorVersion) { + Utils.checkNotNull(minorVersion, "minorVersion"); + this.minorVersion = minorVersion; + return this; + } + + + /** + * Whether this is the latest version of the skill. + */ + public Builder isLatest(boolean isLatest) { + Utils.checkNotNull(isLatest, "isLatest"); + this.isLatest = isLatest; + return this; + } + + + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + public Builder createdBy(PlatformPersonReference createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + + /** + * Time this version was created. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * Time this version was last updated. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + public Builder sourceProvenance(PlatformSkillSourceProvenance sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = Optional.ofNullable(sourceProvenance); + return this; + } + + public Builder sourceProvenance(Optional sourceProvenance) { + Utils.checkNotNull(sourceProvenance, "sourceProvenance"); + this.sourceProvenance = sourceProvenance; + return this; + } + + public PlatformSkillVersion build() { + + return new PlatformSkillVersion( + skillId, version, minorVersion, + isLatest, createdBy, createdAt, + updatedAt, sourceProvenance); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequest.java new file mode 100644 index 00000000..6faa3454 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 79f6ea0ae982 + */ +package com.glean.api_client.glean_api_client.models.components; + +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 PlatformSkillVersionCreateRequest { + /** + * SKILL.md, .zip, or .skill bundle to store as a new version. + */ + @SpeakeasyMetadata("multipartForm:file,name=file") + private PlatformSkillVersionCreateRequestFile file; + + @JsonCreator + public PlatformSkillVersionCreateRequest( + PlatformSkillVersionCreateRequestFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + } + + /** + * SKILL.md, .zip, or .skill bundle to store as a new version. + */ + @JsonIgnore + public PlatformSkillVersionCreateRequestFile file() { + return file; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * SKILL.md, .zip, or .skill bundle to store as a new version. + */ + public PlatformSkillVersionCreateRequest withFile(PlatformSkillVersionCreateRequestFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillVersionCreateRequest other = (PlatformSkillVersionCreateRequest) o; + return + Utils.enhancedDeepEquals(this.file, other.file); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + file); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillVersionCreateRequest.class, + "file", file); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkillVersionCreateRequestFile file; + + private Builder() { + // force use of static builder() method + } + + + /** + * SKILL.md, .zip, or .skill bundle to store as a new version. + */ + public Builder file(PlatformSkillVersionCreateRequestFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public PlatformSkillVersionCreateRequest build() { + + return new PlatformSkillVersionCreateRequest( + file); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequestFile.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequestFile.java new file mode 100644 index 00000000..30286eb2 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateRequestFile.java @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3faa3ee4aa50 + */ +package com.glean.api_client.glean_api_client.models.components; + +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 PlatformSkillVersionCreateRequestFile { + + @SpeakeasyMetadata("multipartForm:name=fileName") + private String fileName; + + + @SpeakeasyMetadata("multipartForm:content") + private byte[] content; + + @JsonCreator + public PlatformSkillVersionCreateRequestFile( + String fileName, + byte[] content) { + Utils.checkNotNull(fileName, "fileName"); + Utils.checkNotNull(content, "content"); + this.fileName = fileName; + this.content = content; + } + + @JsonIgnore + public String fileName() { + return fileName; + } + + @JsonIgnore + public byte[] content() { + return content; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlatformSkillVersionCreateRequestFile withFileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + public PlatformSkillVersionCreateRequestFile withContent(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillVersionCreateRequestFile other = (PlatformSkillVersionCreateRequestFile) o; + return + Utils.enhancedDeepEquals(this.fileName, other.fileName) && + Utils.enhancedDeepEquals(this.content, other.content); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + fileName, content); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillVersionCreateRequestFile.class, + "fileName", fileName, + "content", content); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String fileName; + + private byte[] content; + + private Builder() { + // force use of static builder() method + } + + + public Builder fileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + + public Builder content(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public PlatformSkillVersionCreateRequestFile build() { + + return new PlatformSkillVersionCreateRequestFile( + fileName, content); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateResponse.java new file mode 100644 index 00000000..95b938aa --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionCreateResponse.java @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4de73b25c284 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillVersionCreateResponse { + + @JsonProperty("version") + private PlatformSkillVersion version; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillVersionCreateResponse( + @JsonProperty("version") PlatformSkillVersion version, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(requestId, "requestId"); + this.version = version; + this.requestId = requestId; + } + + @JsonIgnore + public PlatformSkillVersion version() { + return version; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlatformSkillVersionCreateResponse withVersion(PlatformSkillVersion version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillVersionCreateResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillVersionCreateResponse other = (PlatformSkillVersionCreateResponse) o; + return + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + version, requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillVersionCreateResponse.class, + "version", version, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkillVersion version; + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + public Builder version(PlatformSkillVersion version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillVersionCreateResponse build() { + + return new PlatformSkillVersionCreateResponse( + version, requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionGetResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionGetResponse.java new file mode 100644 index 00000000..1e01cab6 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionGetResponse.java @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fdb7937e248e + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillVersionGetResponse { + + @JsonProperty("version") + private PlatformSkillVersion version; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillVersionGetResponse( + @JsonProperty("version") PlatformSkillVersion version, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(version, "version"); + Utils.checkNotNull(requestId, "requestId"); + this.version = version; + this.requestId = requestId; + } + + @JsonIgnore + public PlatformSkillVersion version() { + return version; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + public PlatformSkillVersionGetResponse withVersion(PlatformSkillVersion version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillVersionGetResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillVersionGetResponse other = (PlatformSkillVersionGetResponse) o; + return + Utils.enhancedDeepEquals(this.version, other.version) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + version, requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillVersionGetResponse.class, + "version", version, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PlatformSkillVersion version; + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + public Builder version(PlatformSkillVersion version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillVersionGetResponse build() { + + return new PlatformSkillVersionGetResponse( + version, requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionsListResponse.java new file mode 100644 index 00000000..54ae3c21 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillVersionsListResponse.java @@ -0,0 +1,257 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dc1aeabade78 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class PlatformSkillVersionsListResponse { + /** + * Versions available for the skill. + */ + @JsonProperty("versions") + private List versions; + + /** + * Whether additional results are available. + */ + @JsonProperty("has_more") + private boolean hasMore; + + /** + * Cursor for the next page, or null when no more results are available. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("next_cursor") + private Optional nextCursor; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillVersionsListResponse( + @JsonProperty("versions") List versions, + @JsonProperty("has_more") boolean hasMore, + @JsonProperty("next_cursor") Optional nextCursor, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(versions, "versions"); + Utils.checkNotNull(hasMore, "hasMore"); + Utils.checkNotNull(nextCursor, "nextCursor"); + Utils.checkNotNull(requestId, "requestId"); + this.versions = versions; + this.hasMore = hasMore; + this.nextCursor = nextCursor; + this.requestId = requestId; + } + + public PlatformSkillVersionsListResponse( + List versions, + boolean hasMore, + String requestId) { + this(versions, hasMore, Optional.empty(), + requestId); + } + + /** + * Versions available for the skill. + */ + @JsonIgnore + public List versions() { + return versions; + } + + /** + * Whether additional results are available. + */ + @JsonIgnore + public boolean hasMore() { + return hasMore; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + @JsonIgnore + public Optional nextCursor() { + return nextCursor; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Versions available for the skill. + */ + public PlatformSkillVersionsListResponse withVersions(List versions) { + Utils.checkNotNull(versions, "versions"); + this.versions = versions; + return this; + } + + /** + * Whether additional results are available. + */ + public PlatformSkillVersionsListResponse withHasMore(boolean hasMore) { + Utils.checkNotNull(hasMore, "hasMore"); + this.hasMore = hasMore; + return this; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + public PlatformSkillVersionsListResponse withNextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = Optional.ofNullable(nextCursor); + return this; + } + + + /** + * Cursor for the next page, or null when no more results are available. + */ + public PlatformSkillVersionsListResponse withNextCursor(Optional nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillVersionsListResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillVersionsListResponse other = (PlatformSkillVersionsListResponse) o; + return + Utils.enhancedDeepEquals(this.versions, other.versions) && + Utils.enhancedDeepEquals(this.hasMore, other.hasMore) && + Utils.enhancedDeepEquals(this.nextCursor, other.nextCursor) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + versions, hasMore, nextCursor, + requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillVersionsListResponse.class, + "versions", versions, + "hasMore", hasMore, + "nextCursor", nextCursor, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List versions; + + private Boolean hasMore; + + private Optional nextCursor = Optional.empty(); + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Versions available for the skill. + */ + public Builder versions(List versions) { + Utils.checkNotNull(versions, "versions"); + this.versions = versions; + return this; + } + + + /** + * Whether additional results are available. + */ + public Builder hasMore(boolean hasMore) { + Utils.checkNotNull(hasMore, "hasMore"); + this.hasMore = hasMore; + return this; + } + + + /** + * Cursor for the next page, or null when no more results are available. + */ + public Builder nextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = Optional.ofNullable(nextCursor); + return this; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + public Builder nextCursor(Optional nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillVersionsListResponse build() { + + return new PlatformSkillVersionsListResponse( + versions, hasMore, nextCursor, + requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java new file mode 100644 index 00000000..174834b7 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PlatformSkillsListResponse.java @@ -0,0 +1,257 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 33ab82accff8 + */ +package com.glean.api_client.glean_api_client.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class PlatformSkillsListResponse { + /** + * Skills available to the user. + */ + @JsonProperty("skills") + private List skills; + + /** + * Whether additional results are available. + */ + @JsonProperty("has_more") + private boolean hasMore; + + /** + * Cursor for the next page, or null when no more results are available. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("next_cursor") + private Optional nextCursor; + + /** + * Platform-generated request ID for support correlation. + */ + @JsonProperty("request_id") + private String requestId; + + @JsonCreator + public PlatformSkillsListResponse( + @JsonProperty("skills") List skills, + @JsonProperty("has_more") boolean hasMore, + @JsonProperty("next_cursor") Optional nextCursor, + @JsonProperty("request_id") String requestId) { + Utils.checkNotNull(skills, "skills"); + Utils.checkNotNull(hasMore, "hasMore"); + Utils.checkNotNull(nextCursor, "nextCursor"); + Utils.checkNotNull(requestId, "requestId"); + this.skills = skills; + this.hasMore = hasMore; + this.nextCursor = nextCursor; + this.requestId = requestId; + } + + public PlatformSkillsListResponse( + List skills, + boolean hasMore, + String requestId) { + this(skills, hasMore, Optional.empty(), + requestId); + } + + /** + * Skills available to the user. + */ + @JsonIgnore + public List skills() { + return skills; + } + + /** + * Whether additional results are available. + */ + @JsonIgnore + public boolean hasMore() { + return hasMore; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + @JsonIgnore + public Optional nextCursor() { + return nextCursor; + } + + /** + * Platform-generated request ID for support correlation. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Skills available to the user. + */ + public PlatformSkillsListResponse withSkills(List skills) { + Utils.checkNotNull(skills, "skills"); + this.skills = skills; + return this; + } + + /** + * Whether additional results are available. + */ + public PlatformSkillsListResponse withHasMore(boolean hasMore) { + Utils.checkNotNull(hasMore, "hasMore"); + this.hasMore = hasMore; + return this; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + public PlatformSkillsListResponse withNextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = Optional.ofNullable(nextCursor); + return this; + } + + + /** + * Cursor for the next page, or null when no more results are available. + */ + public PlatformSkillsListResponse withNextCursor(Optional nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + /** + * Platform-generated request ID for support correlation. + */ + public PlatformSkillsListResponse withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListResponse other = (PlatformSkillsListResponse) o; + return + Utils.enhancedDeepEquals(this.skills, other.skills) && + Utils.enhancedDeepEquals(this.hasMore, other.hasMore) && + Utils.enhancedDeepEquals(this.nextCursor, other.nextCursor) && + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skills, hasMore, nextCursor, + requestId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListResponse.class, + "skills", skills, + "hasMore", hasMore, + "nextCursor", nextCursor, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List skills; + + private Boolean hasMore; + + private Optional nextCursor = Optional.empty(); + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Skills available to the user. + */ + public Builder skills(List skills) { + Utils.checkNotNull(skills, "skills"); + this.skills = skills; + return this; + } + + + /** + * Whether additional results are available. + */ + public Builder hasMore(boolean hasMore) { + Utils.checkNotNull(hasMore, "hasMore"); + this.hasMore = hasMore; + return this; + } + + + /** + * Cursor for the next page, or null when no more results are available. + */ + public Builder nextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = Optional.ofNullable(nextCursor); + return this; + } + + /** + * Cursor for the next page, or null when no more results are available. + */ + public Builder nextCursor(Optional nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + + /** + * Platform-generated request ID for support correlation. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PlatformSkillsListResponse build() { + + return new PlatformSkillsListResponse( + skills, hasMore, nextCursor, + requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java index 5a26eff7..edf1002d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java @@ -112,6 +112,20 @@ public class ToolMetadata { @JsonProperty("writeActionType") private Optional writeActionType; + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("actionTypeSource") + private Optional actionTypeSource; + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -165,6 +179,7 @@ public ToolMetadata( @JsonProperty("createdAt") Optional createdAt, @JsonProperty("lastUpdatedAt") Optional lastUpdatedAt, @JsonProperty("writeActionType") Optional writeActionType, + @JsonProperty("actionTypeSource") Optional actionTypeSource, @JsonProperty("authType") Optional authType, @JsonProperty("auth") Optional auth, @JsonProperty("permissions") Optional permissions, @@ -183,6 +198,7 @@ public ToolMetadata( Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(lastUpdatedAt, "lastUpdatedAt"); Utils.checkNotNull(writeActionType, "writeActionType"); + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); Utils.checkNotNull(authType, "authType"); Utils.checkNotNull(auth, "auth"); Utils.checkNotNull(permissions, "permissions"); @@ -201,6 +217,7 @@ public ToolMetadata( this.createdAt = createdAt; this.lastUpdatedAt = lastUpdatedAt; this.writeActionType = writeActionType; + this.actionTypeSource = actionTypeSource; this.authType = authType; this.auth = auth; this.permissions = permissions; @@ -218,7 +235,8 @@ public ToolMetadata( Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -329,6 +347,22 @@ public Optional writeActionType() { return (Optional) writeActionType; } + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional actionTypeSource() { + return (Optional) actionTypeSource; + } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -585,6 +619,39 @@ public ToolMetadata withWriteActionType(Optional writ return this; } + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public ToolMetadata withActionTypeSource(ActionTypeSource actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = Optional.ofNullable(actionTypeSource); + return this; + } + + + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public ToolMetadata withActionTypeSource(Optional actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = actionTypeSource; + return this; + } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -707,6 +774,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && Utils.enhancedDeepEquals(this.lastUpdatedAt, other.lastUpdatedAt) && Utils.enhancedDeepEquals(this.writeActionType, other.writeActionType) && + Utils.enhancedDeepEquals(this.actionTypeSource, other.actionTypeSource) && Utils.enhancedDeepEquals(this.authType, other.authType) && Utils.enhancedDeepEquals(this.auth, other.auth) && Utils.enhancedDeepEquals(this.permissions, other.permissions) && @@ -721,8 +789,9 @@ public int hashCode() { toolId, displayDescription, logoUrl, objectName, knowledgeType, createdBy, lastUpdatedBy, createdAt, lastUpdatedAt, - writeActionType, authType, auth, - permissions, usageInstructions, isSetupFinished); + writeActionType, actionTypeSource, authType, + auth, permissions, usageInstructions, + isSetupFinished); } @Override @@ -741,6 +810,7 @@ public String toString() { "createdAt", createdAt, "lastUpdatedAt", lastUpdatedAt, "writeActionType", writeActionType, + "actionTypeSource", actionTypeSource, "authType", authType, "auth", auth, "permissions", permissions, @@ -777,6 +847,8 @@ public final static class Builder { private Optional writeActionType = Optional.empty(); + private Optional actionTypeSource = Optional.empty(); + private Optional authType = Optional.empty(); private Optional auth = Optional.empty(); @@ -1002,6 +1074,39 @@ public Builder writeActionType(Optional writeActionTy } + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public Builder actionTypeSource(ActionTypeSource actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = Optional.ofNullable(actionTypeSource); + return this; + } + + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + public Builder actionTypeSource(Optional actionTypeSource) { + Utils.checkNotNull(actionTypeSource, "actionTypeSource"); + this.actionTypeSource = actionTypeSource; + return this; + } + + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth @@ -1107,8 +1212,9 @@ public ToolMetadata build() { toolId, displayDescription, logoUrl, objectName, knowledgeType, createdBy, lastUpdatedBy, createdAt, lastUpdatedAt, - writeActionType, authType, auth, - permissions, usageInstructions, isSetupFinished); + writeActionType, actionTypeSource, authType, + auth, permissions, usageInstructions, + isSetupFinished); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java index b88e34c8..1f957f8a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java @@ -18,11 +18,11 @@ public class UploadChatFilesRequest { * Raw files to be uploaded for chat in binary format. */ @SpeakeasyMetadata("multipartForm:file,name=files") - private List files; + private List files; @JsonCreator public UploadChatFilesRequest( - List files) { + List files) { Utils.checkNotNull(files, "files"); this.files = files; } @@ -31,7 +31,7 @@ public UploadChatFilesRequest( * Raw files to be uploaded for chat in binary format. */ @JsonIgnore - public List files() { + public List files() { return files; } @@ -43,7 +43,7 @@ public static Builder builder() { /** * Raw files to be uploaded for chat in binary format. */ - public UploadChatFilesRequest withFiles(List files) { + public UploadChatFilesRequest withFiles(List files) { Utils.checkNotNull(files, "files"); this.files = files; return this; @@ -77,7 +77,7 @@ public String toString() { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private List files; + private List files; private Builder() { // force use of static builder() method @@ -87,7 +87,7 @@ private Builder() { /** * Raw files to be uploaded for chat in binary format. */ - public Builder files(List files) { + public Builder files(List files) { Utils.checkNotNull(files, "files"); this.files = files; return this; diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/File.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequestFile.java similarity index 83% rename from src/main/java/com/glean/api_client/glean_api_client/models/components/File.java rename to src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequestFile.java index aaa9293f..c566f168 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/File.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequestFile.java @@ -1,6 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: d3cadec42992 + * @generated-id: 5ff194530553 */ package com.glean.api_client.glean_api_client.models.components; @@ -12,7 +12,7 @@ import java.lang.String; -public class File { +public class UploadChatFilesRequestFile { @SpeakeasyMetadata("multipartForm:name=fileName") private String fileName; @@ -22,7 +22,7 @@ public class File { private byte[] content; @JsonCreator - public File( + public UploadChatFilesRequestFile( String fileName, byte[] content) { Utils.checkNotNull(fileName, "fileName"); @@ -46,13 +46,13 @@ public static Builder builder() { } - public File withFileName(String fileName) { + public UploadChatFilesRequestFile withFileName(String fileName) { Utils.checkNotNull(fileName, "fileName"); this.fileName = fileName; return this; } - public File withContent(byte[] content) { + public UploadChatFilesRequestFile withContent(byte[] content) { Utils.checkNotNull(content, "content"); this.content = content; return this; @@ -66,7 +66,7 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - File other = (File) o; + UploadChatFilesRequestFile other = (UploadChatFilesRequestFile) o; return Utils.enhancedDeepEquals(this.fileName, other.fileName) && Utils.enhancedDeepEquals(this.content, other.content); @@ -80,7 +80,7 @@ public int hashCode() { @Override public String toString() { - return Utils.toString(File.class, + return Utils.toString(UploadChatFilesRequestFile.class, "fileName", fileName, "content", content); } @@ -110,9 +110,9 @@ public Builder content(byte[] content) { return this; } - public File build() { + public UploadChatFilesRequestFile build() { - return new File( + return new UploadChatFilesRequestFile( fileName, content); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java index f6b7f60b..774d0e88 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java @@ -98,6 +98,14 @@ public class Workflow { @JsonProperty("showOrganizationAsAuthor") private Optional showOrganizationAsAuthor; + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("webhookUrl") + private Optional webhookUrl; + @JsonCreator public Workflow( @JsonProperty("name") Optional name, @@ -111,7 +119,8 @@ public Workflow( @JsonProperty("permissions") Optional permissions, @JsonProperty("id") Optional id, @JsonProperty("verified") Optional verified, - @JsonProperty("showOrganizationAsAuthor") Optional showOrganizationAsAuthor) { + @JsonProperty("showOrganizationAsAuthor") Optional showOrganizationAsAuthor, + @JsonProperty("webhookUrl") Optional webhookUrl) { Utils.checkNotNull(name, "name"); Utils.checkNotNull(author, "author"); Utils.checkNotNull(createTimestamp, "createTimestamp"); @@ -124,6 +133,7 @@ public Workflow( Utils.checkNotNull(id, "id"); Utils.checkNotNull(verified, "verified"); Utils.checkNotNull(showOrganizationAsAuthor, "showOrganizationAsAuthor"); + Utils.checkNotNull(webhookUrl, "webhookUrl"); this.name = name; this.author = author; this.createTimestamp = createTimestamp; @@ -136,13 +146,15 @@ public Workflow( this.id = id; this.verified = verified; this.showOrganizationAsAuthor = showOrganizationAsAuthor; + this.webhookUrl = webhookUrl; } public Workflow() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -236,6 +248,15 @@ public Optional showOrganizationAsAuthor() { return showOrganizationAsAuthor; } + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + @JsonIgnore + public Optional webhookUrl() { + return webhookUrl; + } + public static Builder builder() { return new Builder(); } @@ -451,6 +472,27 @@ public Workflow withShowOrganizationAsAuthor(Optional showOrganizationA return this; } + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Workflow withWebhookUrl(String webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = Optional.ofNullable(webhookUrl); + return this; + } + + + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Workflow withWebhookUrl(Optional webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = webhookUrl; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -472,7 +514,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.permissions, other.permissions) && Utils.enhancedDeepEquals(this.id, other.id) && Utils.enhancedDeepEquals(this.verified, other.verified) && - Utils.enhancedDeepEquals(this.showOrganizationAsAuthor, other.showOrganizationAsAuthor); + Utils.enhancedDeepEquals(this.showOrganizationAsAuthor, other.showOrganizationAsAuthor) && + Utils.enhancedDeepEquals(this.webhookUrl, other.webhookUrl); } @Override @@ -481,7 +524,8 @@ public int hashCode() { name, author, createTimestamp, lastUpdateTimestamp, lastDraftSavedAt, lastDraftSavedBy, lastDraftGitAuthorId, lastUpdatedBy, permissions, - id, verified, showOrganizationAsAuthor); + id, verified, showOrganizationAsAuthor, + webhookUrl); } @Override @@ -498,7 +542,8 @@ public String toString() { "permissions", permissions, "id", id, "verified", verified, - "showOrganizationAsAuthor", showOrganizationAsAuthor); + "showOrganizationAsAuthor", showOrganizationAsAuthor, + "webhookUrl", webhookUrl); } @SuppressWarnings("UnusedReturnValue") @@ -528,6 +573,8 @@ public final static class Builder { private Optional showOrganizationAsAuthor = Optional.empty(); + private Optional webhookUrl = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -742,13 +789,35 @@ public Builder showOrganizationAsAuthor(Optional showOrganizationAsAuth return this; } + + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Builder webhookUrl(String webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = Optional.ofNullable(webhookUrl); + return this; + } + + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL + * (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types. + */ + public Builder webhookUrl(Optional webhookUrl) { + Utils.checkNotNull(webhookUrl, "webhookUrl"); + this.webhookUrl = webhookUrl; + return this; + } + public Workflow build() { return new Workflow( name, author, createTimestamp, lastUpdateTimestamp, lastDraftSavedAt, lastDraftSavedBy, lastDraftGitAuthorId, lastUpdatedBy, permissions, - id, verified, showOrganizationAsAuthor); + id, verified, showOrganizationAsAuthor, + webhookUrl); } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateRequestBuilder.java new file mode 100644 index 00000000..a3585d11 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9624f91e76de + */ +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.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreate; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; + +public class PlatformSkillsCreateRequestBuilder { + + private PlatformSkillCreateRequest request; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsCreateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsCreateRequestBuilder request(PlatformSkillCreateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public PlatformSkillsCreateResponse call() { + + RequestOperation operation + = new PlatformSkillsCreate.Sync(sdkConfiguration, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateResponse.java new file mode 100644 index 00000000..28a716ef --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 05d53155ee6c + */ +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.PlatformSkillCreateResponse; +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 PlatformSkillsCreateResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillCreateResponse; + + @JsonCreator + public PlatformSkillsCreateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillCreateResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillCreateResponse = platformSkillCreateResponse; + } + + public PlatformSkillsCreateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillCreateResponse() { + return (Optional) platformSkillCreateResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsCreateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsCreateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsCreateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsCreateResponse withPlatformSkillCreateResponse(PlatformSkillCreateResponse platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = Optional.ofNullable(platformSkillCreateResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsCreateResponse withPlatformSkillCreateResponse(Optional platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = platformSkillCreateResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsCreateResponse other = (PlatformSkillsCreateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillCreateResponse, other.platformSkillCreateResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillCreateResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsCreateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillCreateResponse", platformSkillCreateResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillCreateResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillCreateResponse(PlatformSkillCreateResponse platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = Optional.ofNullable(platformSkillCreateResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillCreateResponse(Optional platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = platformSkillCreateResponse; + return this; + } + + public PlatformSkillsCreateResponse build() { + + return new PlatformSkillsCreateResponse( + contentType, statusCode, rawResponse, + platformSkillCreateResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequest.java new file mode 100644 index 00000000..8d5b4d0e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequest.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 92093678ab78 + */ +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.PlatformSkillVersionCreateRequest; +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 PlatformSkillsCreateVersionRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + + @SpeakeasyMetadata("request:mediaType=multipart/form-data") + private PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest; + + @JsonCreator + public PlatformSkillsCreateVersionRequest( + String skillId, + PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + Utils.checkNotNull(skillId, "skillId"); + Utils.checkNotNull(platformSkillVersionCreateRequest, "platformSkillVersionCreateRequest"); + this.skillId = skillId; + this.platformSkillVersionCreateRequest = platformSkillVersionCreateRequest; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + @JsonIgnore + public PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest() { + return platformSkillVersionCreateRequest; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsCreateVersionRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsCreateVersionRequest withPlatformSkillVersionCreateRequest(PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + Utils.checkNotNull(platformSkillVersionCreateRequest, "platformSkillVersionCreateRequest"); + this.platformSkillVersionCreateRequest = platformSkillVersionCreateRequest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsCreateVersionRequest other = (PlatformSkillsCreateVersionRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId) && + Utils.enhancedDeepEquals(this.platformSkillVersionCreateRequest, other.platformSkillVersionCreateRequest); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId, platformSkillVersionCreateRequest); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsCreateVersionRequest.class, + "skillId", skillId, + "platformSkillVersionCreateRequest", platformSkillVersionCreateRequest); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + public Builder platformSkillVersionCreateRequest(PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + Utils.checkNotNull(platformSkillVersionCreateRequest, "platformSkillVersionCreateRequest"); + this.platformSkillVersionCreateRequest = platformSkillVersionCreateRequest; + return this; + } + + public PlatformSkillsCreateVersionRequest build() { + + return new PlatformSkillsCreateVersionRequest( + skillId, platformSkillVersionCreateRequest); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequestBuilder.java new file mode 100644 index 00000000..cfcb60c3 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f9466a2082f6 + */ +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.PlatformSkillVersionCreateRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreateVersion; +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 PlatformSkillsCreateVersionRequestBuilder { + + private String skillId; + private PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsCreateVersionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsCreateVersionRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsCreateVersionRequestBuilder platformSkillVersionCreateRequest(PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + Utils.checkNotNull(platformSkillVersionCreateRequest, "platformSkillVersionCreateRequest"); + this.platformSkillVersionCreateRequest = platformSkillVersionCreateRequest; + return this; + } + + + private PlatformSkillsCreateVersionRequest buildRequest() { + + PlatformSkillsCreateVersionRequest request = new PlatformSkillsCreateVersionRequest(skillId, + platformSkillVersionCreateRequest); + + return request; + } + + public PlatformSkillsCreateVersionResponse call() { + + RequestOperation operation + = new PlatformSkillsCreateVersion.Sync(sdkConfiguration, _headers); + PlatformSkillsCreateVersionRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionResponse.java new file mode 100644 index 00000000..4adf7888 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsCreateVersionResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c74b0789e08d + */ +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.PlatformSkillVersionCreateResponse; +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 PlatformSkillsCreateVersionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillVersionCreateResponse; + + @JsonCreator + public PlatformSkillsCreateVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillVersionCreateResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillVersionCreateResponse = platformSkillVersionCreateResponse; + } + + public PlatformSkillsCreateVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillVersionCreateResponse() { + return (Optional) platformSkillVersionCreateResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsCreateVersionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsCreateVersionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsCreateVersionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsCreateVersionResponse withPlatformSkillVersionCreateResponse(PlatformSkillVersionCreateResponse platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = Optional.ofNullable(platformSkillVersionCreateResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsCreateVersionResponse withPlatformSkillVersionCreateResponse(Optional platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = platformSkillVersionCreateResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsCreateVersionResponse other = (PlatformSkillsCreateVersionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillVersionCreateResponse, other.platformSkillVersionCreateResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillVersionCreateResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsCreateVersionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillVersionCreateResponse", platformSkillVersionCreateResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillVersionCreateResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillVersionCreateResponse(PlatformSkillVersionCreateResponse platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = Optional.ofNullable(platformSkillVersionCreateResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillVersionCreateResponse(Optional platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = platformSkillVersionCreateResponse; + return this; + } + + public PlatformSkillsCreateVersionResponse build() { + + return new PlatformSkillsCreateVersionResponse( + contentType, statusCode, rawResponse, + platformSkillVersionCreateResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequest.java new file mode 100644 index 00000000..7fb9543c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8af72a80fe73 + */ +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 PlatformSkillsGetContentRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + @JsonCreator + public PlatformSkillsGetContentRequest( + String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsGetContentRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetContentRequest other = (PlatformSkillsGetContentRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetContentRequest.class, + "skillId", skillId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetContentRequest build() { + + return new PlatformSkillsGetContentRequest( + skillId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequestBuilder.java new file mode 100644 index 00000000..08eb6878 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentRequestBuilder.java @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: eea5eaed71ec + */ +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.PlatformSkillsGetContent; +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 PlatformSkillsGetContentRequestBuilder { + + private String skillId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetContentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetContentRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + private PlatformSkillsGetContentRequest buildRequest() { + + PlatformSkillsGetContentRequest request = new PlatformSkillsGetContentRequest(skillId); + + return request; + } + + public PlatformSkillsGetContentResponse call() { + + RequestOperation operation + = new PlatformSkillsGetContent.Sync(sdkConfiguration, _headers); + PlatformSkillsGetContentRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentResponse.java new file mode 100644 index 00000000..a0a9eb32 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetContentResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d454386b9ea2 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class PlatformSkillsGetContentResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional responseStream; + + + private Map> headers; + + @JsonCreator + public PlatformSkillsGetContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + this.headers = headers; + } + + public PlatformSkillsGetContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetContentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetContentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetContentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetContentResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetContentResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public PlatformSkillsGetContentResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetContentResponse other = (PlatformSkillsGetContentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetContentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = Optional.empty(); + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * Successful response. + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public PlatformSkillsGetContentResponse build() { + + return new PlatformSkillsGetContentResponse( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java new file mode 100644 index 00000000..e95a3f18 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequest.java @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b1a1021e45fa + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillsGetRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + @JsonCreator + public PlatformSkillsGetRequest( + String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsGetRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetRequest other = (PlatformSkillsGetRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetRequest.class, + "skillId", skillId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetRequest build() { + + return new PlatformSkillsGetRequest( + skillId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java new file mode 100644 index 00000000..7c12088c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetRequestBuilder.java @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: acf97a47458e + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; + +public class PlatformSkillsGetRequestBuilder { + + private String skillId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + private PlatformSkillsGetRequest buildRequest() { + + PlatformSkillsGetRequest request = new PlatformSkillsGetRequest(skillId); + + return request; + } + + public PlatformSkillsGetResponse call() { + + RequestOperation operation + = new PlatformSkillsGet.Sync(sdkConfiguration, _headers); + PlatformSkillsGetRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java new file mode 100644 index 00000000..85f533a8 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 10e964f47660 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillGetResponse; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsGetResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillGetResponse; + + @JsonCreator + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillGetResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillGetResponse = platformSkillGetResponse; + } + + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillGetResponse() { + return (Optional) platformSkillGetResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetResponse other = (PlatformSkillsGetResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillGetResponse, other.platformSkillGetResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillGetResponse", platformSkillGetResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillGetResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + public PlatformSkillsGetResponse build() { + + return new PlatformSkillsGetResponse( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequest.java new file mode 100644 index 00000000..f34cf380 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequest.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 52538c2814ff + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillsGetVersionContentRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + /** + * Major version number. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=version") + private long version; + + @JsonCreator + public PlatformSkillsGetVersionContentRequest( + String skillId, + long version) { + Utils.checkNotNull(skillId, "skillId"); + Utils.checkNotNull(version, "version"); + this.skillId = skillId; + this.version = version; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + /** + * Major version number. + */ + @JsonIgnore + public long version() { + return version; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsGetVersionContentRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + /** + * Major version number. + */ + public PlatformSkillsGetVersionContentRequest withVersion(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetVersionContentRequest other = (PlatformSkillsGetVersionContentRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId) && + Utils.enhancedDeepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId, version); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetVersionContentRequest.class, + "skillId", skillId, + "version", version); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Long version; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + /** + * Major version number. + */ + public Builder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public PlatformSkillsGetVersionContentRequest build() { + + return new PlatformSkillsGetVersionContentRequest( + skillId, version); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequestBuilder.java new file mode 100644 index 00000000..18e5f516 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1dda340266d7 + */ +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.PlatformSkillsGetVersionContent; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; + +public class PlatformSkillsGetVersionContentRequestBuilder { + + private String skillId; + private Long version; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetVersionContentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetVersionContentRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetVersionContentRequestBuilder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + private PlatformSkillsGetVersionContentRequest buildRequest() { + + PlatformSkillsGetVersionContentRequest request = new PlatformSkillsGetVersionContentRequest(skillId, + version); + + return request; + } + + public PlatformSkillsGetVersionContentResponse call() { + + RequestOperation operation + = new PlatformSkillsGetVersionContent.Sync(sdkConfiguration, _headers); + PlatformSkillsGetVersionContentRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentResponse.java new file mode 100644 index 00000000..f5ca3391 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionContentResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7dbfabe02f31 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class PlatformSkillsGetVersionContentResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional responseStream; + + + private Map> headers; + + @JsonCreator + public PlatformSkillsGetVersionContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + this.headers = headers; + } + + public PlatformSkillsGetVersionContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetVersionContentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetVersionContentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetVersionContentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetVersionContentResponse withResponseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetVersionContentResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public PlatformSkillsGetVersionContentResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetVersionContentResponse other = (PlatformSkillsGetVersionContentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetVersionContentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = Optional.empty(); + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder responseStream(InputStream responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * Successful response. + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public PlatformSkillsGetVersionContentResponse build() { + + return new PlatformSkillsGetVersionContentResponse( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequest.java new file mode 100644 index 00000000..2ce8c181 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequest.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 404caec96d06 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class PlatformSkillsGetVersionRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + /** + * Major version number. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=version") + private long version; + + @JsonCreator + public PlatformSkillsGetVersionRequest( + String skillId, + long version) { + Utils.checkNotNull(skillId, "skillId"); + Utils.checkNotNull(version, "version"); + this.skillId = skillId; + this.version = version; + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + /** + * Major version number. + */ + @JsonIgnore + public long version() { + return version; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsGetVersionRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + /** + * Major version number. + */ + public PlatformSkillsGetVersionRequest withVersion(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetVersionRequest other = (PlatformSkillsGetVersionRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId) && + Utils.enhancedDeepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId, version); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetVersionRequest.class, + "skillId", skillId, + "version", version); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Long version; + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + /** + * Major version number. + */ + public Builder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public PlatformSkillsGetVersionRequest build() { + + return new PlatformSkillsGetVersionRequest( + skillId, version); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequestBuilder.java new file mode 100644 index 00000000..fd22892e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c27a1e5e8176 + */ +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.PlatformSkillsGetVersion; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; + +public class PlatformSkillsGetVersionRequestBuilder { + + private String skillId; + private Long version; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetVersionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetVersionRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetVersionRequestBuilder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + private PlatformSkillsGetVersionRequest buildRequest() { + + PlatformSkillsGetVersionRequest request = new PlatformSkillsGetVersionRequest(skillId, + version); + + return request; + } + + public PlatformSkillsGetVersionResponse call() { + + RequestOperation operation + = new PlatformSkillsGetVersion.Sync(sdkConfiguration, _headers); + PlatformSkillsGetVersionRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionResponse.java new file mode 100644 index 00000000..1b1085db --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsGetVersionResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4356a29f4193 + */ +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.PlatformSkillVersionGetResponse; +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 PlatformSkillsGetVersionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillVersionGetResponse; + + @JsonCreator + public PlatformSkillsGetVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillVersionGetResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillVersionGetResponse = platformSkillVersionGetResponse; + } + + public PlatformSkillsGetVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillVersionGetResponse() { + return (Optional) platformSkillVersionGetResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetVersionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetVersionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetVersionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetVersionResponse withPlatformSkillVersionGetResponse(PlatformSkillVersionGetResponse platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = Optional.ofNullable(platformSkillVersionGetResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetVersionResponse withPlatformSkillVersionGetResponse(Optional platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = platformSkillVersionGetResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetVersionResponse other = (PlatformSkillsGetVersionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillVersionGetResponse, other.platformSkillVersionGetResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillVersionGetResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetVersionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillVersionGetResponse", platformSkillVersionGetResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillVersionGetResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillVersionGetResponse(PlatformSkillVersionGetResponse platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = Optional.ofNullable(platformSkillVersionGetResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillVersionGetResponse(Optional platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = platformSkillVersionGetResponse; + return this; + } + + public PlatformSkillsGetVersionResponse build() { + + return new PlatformSkillsGetVersionResponse( + contentType, statusCode, rawResponse, + platformSkillVersionGetResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java new file mode 100644 index 00000000..ad230300 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequest.java @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0c784c11f038 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class PlatformSkillsListRequest { + /** + * Maximum number of skills to return. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=page_size") + private Optional pageSize; + + /** + * Opaque pagination cursor from a previous response. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=cursor") + private Optional cursor; + + @JsonCreator + public PlatformSkillsListRequest( + Optional pageSize, + Optional cursor) { + Utils.checkNotNull(pageSize, "pageSize"); + Utils.checkNotNull(cursor, "cursor"); + this.pageSize = pageSize; + this.cursor = cursor; + } + + public PlatformSkillsListRequest() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Maximum number of skills to return. + */ + @JsonIgnore + public Optional pageSize() { + return pageSize; + } + + /** + * Opaque pagination cursor from a previous response. + */ + @JsonIgnore + public Optional cursor() { + return cursor; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Maximum number of skills to return. + */ + public PlatformSkillsListRequest withPageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + + /** + * Maximum number of skills to return. + */ + public PlatformSkillsListRequest withPageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + /** + * Opaque pagination cursor from a previous response. + */ + public PlatformSkillsListRequest withCursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.ofNullable(cursor); + return this; + } + + + /** + * Opaque pagination cursor from a previous response. + */ + public PlatformSkillsListRequest withCursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListRequest other = (PlatformSkillsListRequest) o; + return + Utils.enhancedDeepEquals(this.pageSize, other.pageSize) && + Utils.enhancedDeepEquals(this.cursor, other.cursor); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + pageSize, cursor); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListRequest.class, + "pageSize", pageSize, + "cursor", cursor); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional pageSize = Optional.empty(); + + private Optional cursor = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Maximum number of skills to return. + */ + public Builder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + /** + * Maximum number of skills to return. + */ + public Builder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + + /** + * Opaque pagination cursor from a previous response. + */ + public Builder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.ofNullable(cursor); + return this; + } + + /** + * Opaque pagination cursor from a previous response. + */ + public Builder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + public PlatformSkillsListRequest build() { + + return new PlatformSkillsListRequest( + pageSize, cursor); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java new file mode 100644 index 00000000..b242ac17 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListRequestBuilder.java @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c4faa9ffd8e1 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + +public class PlatformSkillsListRequestBuilder { + + private Optional pageSize = Optional.empty(); + private Optional cursor = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsListRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsListRequestBuilder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.of(pageSize); + return this; + } + + public PlatformSkillsListRequestBuilder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + public PlatformSkillsListRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.of(cursor); + return this; + } + + public PlatformSkillsListRequestBuilder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + private PlatformSkillsListRequest buildRequest() { + + PlatformSkillsListRequest request = new PlatformSkillsListRequest(pageSize, + cursor); + + return request; + } + + public PlatformSkillsListResponse call() { + + RequestOperation operation + = new PlatformSkillsList.Sync(sdkConfiguration, _headers); + PlatformSkillsListRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java new file mode 100644 index 00000000..4194c210 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 61140aa877b7 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsListResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillsListResponse; + + @JsonCreator + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillsListResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillsListResponse = platformSkillsListResponse; + } + + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillsListResponse() { + return (Optional) platformSkillsListResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsListResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsListResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsListResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListResponse other = (PlatformSkillsListResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillsListResponse, other.platformSkillsListResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillsListResponse", platformSkillsListResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillsListResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + public PlatformSkillsListResponse build() { + + return new PlatformSkillsListResponse( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequest.java new file mode 100644 index 00000000..2f88e2e4 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequest.java @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 72e123b416a3 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class PlatformSkillsListVersionsRequest { + /** + * Glean skill ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=skill_id") + private String skillId; + + /** + * Maximum number of versions to return. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=page_size") + private Optional pageSize; + + /** + * Opaque pagination cursor from a previous response. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=cursor") + private Optional cursor; + + @JsonCreator + public PlatformSkillsListVersionsRequest( + String skillId, + Optional pageSize, + Optional cursor) { + Utils.checkNotNull(skillId, "skillId"); + Utils.checkNotNull(pageSize, "pageSize"); + Utils.checkNotNull(cursor, "cursor"); + this.skillId = skillId; + this.pageSize = pageSize; + this.cursor = cursor; + } + + public PlatformSkillsListVersionsRequest( + String skillId) { + this(skillId, Optional.empty(), Optional.empty()); + } + + /** + * Glean skill ID. + */ + @JsonIgnore + public String skillId() { + return skillId; + } + + /** + * Maximum number of versions to return. + */ + @JsonIgnore + public Optional pageSize() { + return pageSize; + } + + /** + * Opaque pagination cursor from a previous response. + */ + @JsonIgnore + public Optional cursor() { + return cursor; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Glean skill ID. + */ + public PlatformSkillsListVersionsRequest withSkillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + /** + * Maximum number of versions to return. + */ + public PlatformSkillsListVersionsRequest withPageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + + /** + * Maximum number of versions to return. + */ + public PlatformSkillsListVersionsRequest withPageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + /** + * Opaque pagination cursor from a previous response. + */ + public PlatformSkillsListVersionsRequest withCursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.ofNullable(cursor); + return this; + } + + + /** + * Opaque pagination cursor from a previous response. + */ + public PlatformSkillsListVersionsRequest withCursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListVersionsRequest other = (PlatformSkillsListVersionsRequest) o; + return + Utils.enhancedDeepEquals(this.skillId, other.skillId) && + Utils.enhancedDeepEquals(this.pageSize, other.pageSize) && + Utils.enhancedDeepEquals(this.cursor, other.cursor); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + skillId, pageSize, cursor); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListVersionsRequest.class, + "skillId", skillId, + "pageSize", pageSize, + "cursor", cursor); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String skillId; + + private Optional pageSize = Optional.empty(); + + private Optional cursor = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Glean skill ID. + */ + public Builder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + /** + * Maximum number of versions to return. + */ + public Builder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + /** + * Maximum number of versions to return. + */ + public Builder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + + /** + * Opaque pagination cursor from a previous response. + */ + public Builder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.ofNullable(cursor); + return this; + } + + /** + * Opaque pagination cursor from a previous response. + */ + public Builder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + public PlatformSkillsListVersionsRequest build() { + + return new PlatformSkillsListVersionsRequest( + skillId, pageSize, cursor); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequestBuilder.java new file mode 100644 index 00000000..0a99f06e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsRequestBuilder.java @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1f603f0201fa + */ +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.PlatformSkillsListVersions; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; + +public class PlatformSkillsListVersionsRequestBuilder { + + private String skillId; + private Optional pageSize = Optional.empty(); + private Optional cursor = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsListVersionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsListVersionsRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsListVersionsRequestBuilder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.of(pageSize); + return this; + } + + public PlatformSkillsListVersionsRequestBuilder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + public PlatformSkillsListVersionsRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.of(cursor); + return this; + } + + public PlatformSkillsListVersionsRequestBuilder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + private PlatformSkillsListVersionsRequest buildRequest() { + + PlatformSkillsListVersionsRequest request = new PlatformSkillsListVersionsRequest(skillId, + pageSize, + cursor); + + return request; + } + + public PlatformSkillsListVersionsResponse call() { + + RequestOperation operation + = new PlatformSkillsListVersions.Sync(sdkConfiguration, _headers); + PlatformSkillsListVersionsRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsResponse.java new file mode 100644 index 00000000..b3732fd4 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsListVersionsResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b3dd6f59bb8e + */ +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.PlatformSkillVersionsListResponse; +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 PlatformSkillsListVersionsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillVersionsListResponse; + + @JsonCreator + public PlatformSkillsListVersionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillVersionsListResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillVersionsListResponse = platformSkillVersionsListResponse; + } + + public PlatformSkillsListVersionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillVersionsListResponse() { + return (Optional) platformSkillVersionsListResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsListVersionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsListVersionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsListVersionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsListVersionsResponse withPlatformSkillVersionsListResponse(PlatformSkillVersionsListResponse platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = Optional.ofNullable(platformSkillVersionsListResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsListVersionsResponse withPlatformSkillVersionsListResponse(Optional platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = platformSkillVersionsListResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListVersionsResponse other = (PlatformSkillsListVersionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillVersionsListResponse, other.platformSkillVersionsListResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillVersionsListResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListVersionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillVersionsListResponse", platformSkillVersionsListResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillVersionsListResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillVersionsListResponse(PlatformSkillVersionsListResponse platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = Optional.ofNullable(platformSkillVersionsListResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillVersionsListResponse(Optional platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = platformSkillVersionsListResponse; + return this; + } + + public PlatformSkillsListVersionsResponse build() { + + return new PlatformSkillsListVersionsResponse( + contentType, statusCode, rawResponse, + platformSkillVersionsListResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateRequestBuilder.java new file mode 100644 index 00000000..3de5bcd5 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateRequestBuilder.java @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: bdf1d71df643 + */ +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.PlatformSkillValidationRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsValidate; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; + +public class PlatformSkillsValidateRequestBuilder { + + private PlatformSkillValidationRequest request; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsValidateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsValidateRequestBuilder request(PlatformSkillValidationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public PlatformSkillsValidateResponse call() { + + RequestOperation operation + = new PlatformSkillsValidate.Sync(sdkConfiguration, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateResponse.java new file mode 100644 index 00000000..be61ab20 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PlatformSkillsValidateResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f09b3bdf6822 + */ +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.PlatformSkillValidationResponse; +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 PlatformSkillsValidateResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillValidationResponse; + + @JsonCreator + public PlatformSkillsValidateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillValidationResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillValidationResponse = platformSkillValidationResponse; + } + + public PlatformSkillsValidateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillValidationResponse() { + return (Optional) platformSkillValidationResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsValidateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsValidateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsValidateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsValidateResponse withPlatformSkillValidationResponse(PlatformSkillValidationResponse platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = Optional.ofNullable(platformSkillValidationResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsValidateResponse withPlatformSkillValidationResponse(Optional platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = platformSkillValidationResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsValidateResponse other = (PlatformSkillsValidateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillValidationResponse, other.platformSkillValidationResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillValidationResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsValidateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillValidationResponse", platformSkillValidationResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillValidationResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillValidationResponse(PlatformSkillValidationResponse platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = Optional.ofNullable(platformSkillValidationResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillValidationResponse(Optional platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = platformSkillValidationResponse; + return this; + } + + public PlatformSkillsValidateResponse build() { + + return new PlatformSkillsValidateResponse( + contentType, statusCode, rawResponse, + platformSkillValidationResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java new file mode 100644 index 00000000..9fa2ad63 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.java @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d6f9533fb152 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.SpeakeasyMetadata; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest { + /** + * Datasource instance that should process the submission + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=datasourceInstance") + private String datasourceInstance; + + /** + * Submission type registered for the datasource + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=type") + private String type; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private Map requestBody; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest( + String datasourceInstance, + String type, + Map requestBody) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + Utils.checkNotNull(type, "type"); + requestBody = Utils.emptyMapIfNull(requestBody); + Utils.checkNotNull(requestBody, "requestBody"); + this.datasourceInstance = datasourceInstance; + this.type = type; + this.requestBody = requestBody; + } + + /** + * Datasource instance that should process the submission + */ + @JsonIgnore + public String datasourceInstance() { + return datasourceInstance; + } + + /** + * Submission type registered for the datasource + */ + @JsonIgnore + public String type() { + return type; + } + + @JsonIgnore + public Map requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Datasource instance that should process the submission + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest withDatasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + /** + * Submission type registered for the datasource + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest withRequestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest) o; + return + Utils.enhancedDeepEquals(this.datasourceInstance, other.datasourceInstance) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + datasourceInstance, type, requestBody); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.class, + "datasourceInstance", datasourceInstance, + "type", type, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String datasourceInstance; + + private String type; + + private Map requestBody; + + private Builder() { + // force use of static builder() method + } + + + /** + * Datasource instance that should process the submission + */ + public Builder datasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + + /** + * Submission type registered for the datasource + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder requestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest( + datasourceInstance, type, requestBody); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java new file mode 100644 index 00000000..6ba0274c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ff1570f7277a + */ +package com.glean.api_client.glean_api_client.models.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Object; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder { + + private String datasourceInstance; + private String type; + private Map requestBody = new HashMap<>(); + private Optional serverURL = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder datasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder requestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + + private PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest buildRequest() { + + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest(datasourceInstance, + type, + requestBody); + + return request; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse call() { + + RequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Sync(sdkConfiguration, serverURL, _headers); + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java new file mode 100644 index 00000000..6c497c53 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 54e49721adf9 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.Response; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Accepted + */ + private Optional object; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Accepted + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Accepted + */ + public Builder object(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Accepted + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java new file mode 100644 index 00000000..31449692 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.java @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d33d42046743 + */ +package com.glean.api_client.glean_api_client.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Override; +import java.lang.String; + +/** + * PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody + * + *

Accepted + */ +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody { + + @JsonProperty("requestId") + private String requestId; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody( + @JsonProperty("requestId") String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + } + + @JsonIgnore + public String requestId() { + return requestId; + } + + public static Builder builder() { + return new Builder(); + } + + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody) o; + return + Utils.enhancedDeepEquals(this.requestId, other.requestId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + requestId); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody.class, + "requestId", requestId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String requestId; + + private Builder() { + // force use of static builder() method + } + + + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody( + requestId); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateRequestBuilder.java new file mode 100644 index 00000000..c1a970c8 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 351f9a6b351c + */ +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.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreate; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsCreateRequestBuilder { + + private PlatformSkillCreateRequest request; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsCreateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsCreateRequestBuilder request(PlatformSkillCreateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsCreate.Async(sdkConfiguration, _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateResponse.java new file mode 100644 index 00000000..cae76a72 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 42b466e752d4 + */ +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.PlatformSkillCreateResponse; +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 PlatformSkillsCreateResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillCreateResponse; + + @JsonCreator + public PlatformSkillsCreateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillCreateResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillCreateResponse = platformSkillCreateResponse; + } + + public PlatformSkillsCreateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillCreateResponse() { + return (Optional) platformSkillCreateResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsCreateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsCreateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsCreateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsCreateResponse withPlatformSkillCreateResponse(PlatformSkillCreateResponse platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = Optional.ofNullable(platformSkillCreateResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsCreateResponse withPlatformSkillCreateResponse(Optional platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = platformSkillCreateResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsCreateResponse other = (PlatformSkillsCreateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillCreateResponse, other.platformSkillCreateResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillCreateResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsCreateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillCreateResponse", platformSkillCreateResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillCreateResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillCreateResponse(PlatformSkillCreateResponse platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = Optional.ofNullable(platformSkillCreateResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillCreateResponse(Optional platformSkillCreateResponse) { + Utils.checkNotNull(platformSkillCreateResponse, "platformSkillCreateResponse"); + this.platformSkillCreateResponse = platformSkillCreateResponse; + return this; + } + + public PlatformSkillsCreateResponse build() { + + return new PlatformSkillsCreateResponse( + contentType, statusCode, rawResponse, + platformSkillCreateResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateVersionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateVersionRequestBuilder.java new file mode 100644 index 00000000..befd6c66 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateVersionRequestBuilder.java @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: adf5029b6174 + */ +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.PlatformSkillVersionCreateRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsCreateVersion; +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 PlatformSkillsCreateVersionRequestBuilder { + + private String skillId; + private PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsCreateVersionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsCreateVersionRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsCreateVersionRequestBuilder platformSkillVersionCreateRequest(PlatformSkillVersionCreateRequest platformSkillVersionCreateRequest) { + Utils.checkNotNull(platformSkillVersionCreateRequest, "platformSkillVersionCreateRequest"); + this.platformSkillVersionCreateRequest = platformSkillVersionCreateRequest; + return this; + } + + + private PlatformSkillsCreateVersionRequest buildRequest() { + + PlatformSkillsCreateVersionRequest request = new PlatformSkillsCreateVersionRequest(skillId, + platformSkillVersionCreateRequest); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsCreateVersion.Async(sdkConfiguration, _headers); + PlatformSkillsCreateVersionRequest 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/PlatformSkillsCreateVersionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateVersionResponse.java new file mode 100644 index 00000000..cb961fe1 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsCreateVersionResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8022fde5faa5 + */ +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.PlatformSkillVersionCreateResponse; +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 PlatformSkillsCreateVersionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillVersionCreateResponse; + + @JsonCreator + public PlatformSkillsCreateVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillVersionCreateResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillVersionCreateResponse = platformSkillVersionCreateResponse; + } + + public PlatformSkillsCreateVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillVersionCreateResponse() { + return (Optional) platformSkillVersionCreateResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsCreateVersionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsCreateVersionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsCreateVersionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsCreateVersionResponse withPlatformSkillVersionCreateResponse(PlatformSkillVersionCreateResponse platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = Optional.ofNullable(platformSkillVersionCreateResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsCreateVersionResponse withPlatformSkillVersionCreateResponse(Optional platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = platformSkillVersionCreateResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsCreateVersionResponse other = (PlatformSkillsCreateVersionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillVersionCreateResponse, other.platformSkillVersionCreateResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillVersionCreateResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsCreateVersionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillVersionCreateResponse", platformSkillVersionCreateResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillVersionCreateResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillVersionCreateResponse(PlatformSkillVersionCreateResponse platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = Optional.ofNullable(platformSkillVersionCreateResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillVersionCreateResponse(Optional platformSkillVersionCreateResponse) { + Utils.checkNotNull(platformSkillVersionCreateResponse, "platformSkillVersionCreateResponse"); + this.platformSkillVersionCreateResponse = platformSkillVersionCreateResponse; + return this; + } + + public PlatformSkillsCreateVersionResponse build() { + + return new PlatformSkillsCreateVersionResponse( + contentType, statusCode, rawResponse, + platformSkillVersionCreateResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetContentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetContentRequestBuilder.java new file mode 100644 index 00000000..36bdaae7 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetContentRequestBuilder.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9d05c5589c3b + */ +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.PlatformSkillsGetContentRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetContent; +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 PlatformSkillsGetContentRequestBuilder { + + private String skillId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetContentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetContentRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + private PlatformSkillsGetContentRequest buildRequest() { + + PlatformSkillsGetContentRequest request = new PlatformSkillsGetContentRequest(skillId); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsGetContent.Async(sdkConfiguration, _headers); + PlatformSkillsGetContentRequest 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/PlatformSkillsGetContentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetContentResponse.java new file mode 100644 index 00000000..7f211ce5 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetContentResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3973d5645c9c + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class PlatformSkillsGetContentResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional responseStream; + + + private Map> headers; + + @JsonCreator + public PlatformSkillsGetContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + this.headers = headers; + } + + public PlatformSkillsGetContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetContentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetContentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetContentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetContentResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetContentResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public PlatformSkillsGetContentResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetContentResponse other = (PlatformSkillsGetContentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetContentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = Optional.empty(); + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * Successful response. + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public PlatformSkillsGetContentResponse build() { + + return new PlatformSkillsGetContentResponse( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java new file mode 100644 index 00000000..af6066c6 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetRequestBuilder.java @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9f29a43ef0e1 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGet; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsGetRequestBuilder { + + private String skillId; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + + private PlatformSkillsGetRequest buildRequest() { + + PlatformSkillsGetRequest request = new PlatformSkillsGetRequest(skillId); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsGet.Async(sdkConfiguration, _headers); + PlatformSkillsGetRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java new file mode 100644 index 00000000..bcb83e3e --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d9bcb05e5190 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillGetResponse; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsGetResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillGetResponse; + + @JsonCreator + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillGetResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillGetResponse = platformSkillGetResponse; + } + + public PlatformSkillsGetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillGetResponse() { + return (Optional) platformSkillGetResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetResponse withPlatformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetResponse other = (PlatformSkillsGetResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillGetResponse, other.platformSkillGetResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillGetResponse", platformSkillGetResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillGetResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(PlatformSkillGetResponse platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = Optional.ofNullable(platformSkillGetResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillGetResponse(Optional platformSkillGetResponse) { + Utils.checkNotNull(platformSkillGetResponse, "platformSkillGetResponse"); + this.platformSkillGetResponse = platformSkillGetResponse; + return this; + } + + public PlatformSkillsGetResponse build() { + + return new PlatformSkillsGetResponse( + contentType, statusCode, rawResponse, + platformSkillGetResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionContentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionContentRequestBuilder.java new file mode 100644 index 00000000..3e6570ea --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionContentRequestBuilder.java @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2e969bde432d + */ +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.PlatformSkillsGetVersionContentRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersionContent; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsGetVersionContentRequestBuilder { + + private String skillId; + private Long version; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetVersionContentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetVersionContentRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetVersionContentRequestBuilder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + private PlatformSkillsGetVersionContentRequest buildRequest() { + + PlatformSkillsGetVersionContentRequest request = new PlatformSkillsGetVersionContentRequest(skillId, + version); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsGetVersionContent.Async(sdkConfiguration, _headers); + PlatformSkillsGetVersionContentRequest 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/PlatformSkillsGetVersionContentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionContentResponse.java new file mode 100644 index 00000000..81725a1c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionContentResponse.java @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9b3aab9dd24b + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class PlatformSkillsGetVersionContentResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional responseStream; + + + private Map> headers; + + @JsonCreator + public PlatformSkillsGetVersionContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional responseStream, + Map> headers) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(responseStream, "responseStream"); + headers = Utils.emptyMapIfNull(headers); + Utils.checkNotNull(headers, "headers"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.responseStream = responseStream; + this.headers = headers; + } + + public PlatformSkillsGetVersionContentResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Map> headers) { + this(contentType, statusCode, rawResponse, + Optional.empty(), headers); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional responseStream() { + return (Optional) responseStream; + } + + @JsonIgnore + public Map> headers() { + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetVersionContentResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetVersionContentResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetVersionContentResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetVersionContentResponse withResponseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetVersionContentResponse withResponseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + public PlatformSkillsGetVersionContentResponse withHeaders(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetVersionContentResponse other = (PlatformSkillsGetVersionContentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.responseStream, other.responseStream) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetVersionContentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "responseStream", responseStream, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional responseStream = Optional.empty(); + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder responseStream(Blob responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = Optional.ofNullable(responseStream); + return this; + } + + /** + * Successful response. + */ + public Builder responseStream(Optional responseStream) { + Utils.checkNotNull(responseStream, "responseStream"); + this.responseStream = responseStream; + return this; + } + + + public Builder headers(Map> headers) { + Utils.checkNotNull(headers, "headers"); + this.headers = headers; + return this; + } + + public PlatformSkillsGetVersionContentResponse build() { + + return new PlatformSkillsGetVersionContentResponse( + contentType, statusCode, rawResponse, + responseStream, headers); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionRequestBuilder.java new file mode 100644 index 00000000..ca38790c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionRequestBuilder.java @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a27addf4041a + */ +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.PlatformSkillsGetVersionRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsGetVersion; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsGetVersionRequestBuilder { + + private String skillId; + private Long version; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsGetVersionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsGetVersionRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsGetVersionRequestBuilder version(long version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + + private PlatformSkillsGetVersionRequest buildRequest() { + + PlatformSkillsGetVersionRequest request = new PlatformSkillsGetVersionRequest(skillId, + version); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsGetVersion.Async(sdkConfiguration, _headers); + PlatformSkillsGetVersionRequest 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/PlatformSkillsGetVersionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionResponse.java new file mode 100644 index 00000000..a75ff42a --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsGetVersionResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: db98b3a89eb8 + */ +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.PlatformSkillVersionGetResponse; +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 PlatformSkillsGetVersionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillVersionGetResponse; + + @JsonCreator + public PlatformSkillsGetVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillVersionGetResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillVersionGetResponse = platformSkillVersionGetResponse; + } + + public PlatformSkillsGetVersionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillVersionGetResponse() { + return (Optional) platformSkillVersionGetResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsGetVersionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsGetVersionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsGetVersionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsGetVersionResponse withPlatformSkillVersionGetResponse(PlatformSkillVersionGetResponse platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = Optional.ofNullable(platformSkillVersionGetResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsGetVersionResponse withPlatformSkillVersionGetResponse(Optional platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = platformSkillVersionGetResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsGetVersionResponse other = (PlatformSkillsGetVersionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillVersionGetResponse, other.platformSkillVersionGetResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillVersionGetResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsGetVersionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillVersionGetResponse", platformSkillVersionGetResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillVersionGetResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillVersionGetResponse(PlatformSkillVersionGetResponse platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = Optional.ofNullable(platformSkillVersionGetResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillVersionGetResponse(Optional platformSkillVersionGetResponse) { + Utils.checkNotNull(platformSkillVersionGetResponse, "platformSkillVersionGetResponse"); + this.platformSkillVersionGetResponse = platformSkillVersionGetResponse; + return this; + } + + public PlatformSkillsGetVersionResponse build() { + + return new PlatformSkillsGetVersionResponse( + contentType, statusCode, rawResponse, + platformSkillVersionGetResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java new file mode 100644 index 00000000..bac42515 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListRequestBuilder.java @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7f6d7d6b2033 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsList; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsListRequestBuilder { + + private Optional pageSize = Optional.empty(); + private Optional cursor = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsListRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsListRequestBuilder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.of(pageSize); + return this; + } + + public PlatformSkillsListRequestBuilder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + public PlatformSkillsListRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.of(cursor); + return this; + } + + public PlatformSkillsListRequestBuilder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + private PlatformSkillsListRequest buildRequest() { + + PlatformSkillsListRequest request = new PlatformSkillsListRequest(pageSize, + cursor); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsList.Async(sdkConfiguration, _headers); + PlatformSkillsListRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java new file mode 100644 index 00000000..f2aa06a9 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7213f13e0653 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PlatformSkillsListResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillsListResponse; + + @JsonCreator + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillsListResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillsListResponse = platformSkillsListResponse; + } + + public PlatformSkillsListResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillsListResponse() { + return (Optional) platformSkillsListResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsListResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsListResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsListResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsListResponse withPlatformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListResponse other = (PlatformSkillsListResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillsListResponse, other.platformSkillsListResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillsListResponse", platformSkillsListResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillsListResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(com.glean.api_client.glean_api_client.models.components.PlatformSkillsListResponse platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = Optional.ofNullable(platformSkillsListResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillsListResponse(Optional platformSkillsListResponse) { + Utils.checkNotNull(platformSkillsListResponse, "platformSkillsListResponse"); + this.platformSkillsListResponse = platformSkillsListResponse; + return this; + } + + public PlatformSkillsListResponse build() { + + return new PlatformSkillsListResponse( + contentType, statusCode, rawResponse, + platformSkillsListResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListVersionsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListVersionsRequestBuilder.java new file mode 100644 index 00000000..a3cef301 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListVersionsRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 866b4816b40c + */ +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.PlatformSkillsListVersionsRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsListVersions; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsListVersionsRequestBuilder { + + private String skillId; + private Optional pageSize = Optional.empty(); + private Optional cursor = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsListVersionsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsListVersionsRequestBuilder skillId(String skillId) { + Utils.checkNotNull(skillId, "skillId"); + this.skillId = skillId; + return this; + } + + public PlatformSkillsListVersionsRequestBuilder pageSize(long pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = Optional.of(pageSize); + return this; + } + + public PlatformSkillsListVersionsRequestBuilder pageSize(Optional pageSize) { + Utils.checkNotNull(pageSize, "pageSize"); + this.pageSize = pageSize; + return this; + } + + public PlatformSkillsListVersionsRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = Optional.of(cursor); + return this; + } + + public PlatformSkillsListVersionsRequestBuilder cursor(Optional cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + private PlatformSkillsListVersionsRequest buildRequest() { + + PlatformSkillsListVersionsRequest request = new PlatformSkillsListVersionsRequest(skillId, + pageSize, + cursor); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsListVersions.Async(sdkConfiguration, _headers); + PlatformSkillsListVersionsRequest 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/PlatformSkillsListVersionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListVersionsResponse.java new file mode 100644 index 00000000..8a5b1a02 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsListVersionsResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0423c13be505 + */ +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.PlatformSkillVersionsListResponse; +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 PlatformSkillsListVersionsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillVersionsListResponse; + + @JsonCreator + public PlatformSkillsListVersionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillVersionsListResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillVersionsListResponse = platformSkillVersionsListResponse; + } + + public PlatformSkillsListVersionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillVersionsListResponse() { + return (Optional) platformSkillVersionsListResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsListVersionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsListVersionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsListVersionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsListVersionsResponse withPlatformSkillVersionsListResponse(PlatformSkillVersionsListResponse platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = Optional.ofNullable(platformSkillVersionsListResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsListVersionsResponse withPlatformSkillVersionsListResponse(Optional platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = platformSkillVersionsListResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsListVersionsResponse other = (PlatformSkillsListVersionsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillVersionsListResponse, other.platformSkillVersionsListResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillVersionsListResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsListVersionsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillVersionsListResponse", platformSkillVersionsListResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillVersionsListResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillVersionsListResponse(PlatformSkillVersionsListResponse platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = Optional.ofNullable(platformSkillVersionsListResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillVersionsListResponse(Optional platformSkillVersionsListResponse) { + Utils.checkNotNull(platformSkillVersionsListResponse, "platformSkillVersionsListResponse"); + this.platformSkillVersionsListResponse = platformSkillVersionsListResponse; + return this; + } + + public PlatformSkillsListVersionsResponse build() { + + return new PlatformSkillsListVersionsResponse( + contentType, statusCode, rawResponse, + platformSkillVersionsListResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateRequestBuilder.java new file mode 100644 index 00000000..208b76f5 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0a579af8802d + */ +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.PlatformSkillValidationRequest; +import com.glean.api_client.glean_api_client.operations.PlatformSkillsValidate; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.util.concurrent.CompletableFuture; + +public class PlatformSkillsValidateRequestBuilder { + + private PlatformSkillValidationRequest request; + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PlatformSkillsValidateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PlatformSkillsValidateRequestBuilder request(PlatformSkillValidationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PlatformSkillsValidate.Async(sdkConfiguration, _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateResponse.java new file mode 100644 index 00000000..e87bf45c --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PlatformSkillsValidateResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: eeb57d48c7a4 + */ +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.PlatformSkillValidationResponse; +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 PlatformSkillsValidateResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Successful response. + */ + private Optional platformSkillValidationResponse; + + @JsonCreator + public PlatformSkillsValidateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional platformSkillValidationResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.platformSkillValidationResponse = platformSkillValidationResponse; + } + + public PlatformSkillsValidateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Successful response. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional platformSkillValidationResponse() { + return (Optional) platformSkillValidationResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PlatformSkillsValidateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PlatformSkillsValidateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PlatformSkillsValidateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful response. + */ + public PlatformSkillsValidateResponse withPlatformSkillValidationResponse(PlatformSkillValidationResponse platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = Optional.ofNullable(platformSkillValidationResponse); + return this; + } + + + /** + * Successful response. + */ + public PlatformSkillsValidateResponse withPlatformSkillValidationResponse(Optional platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = platformSkillValidationResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformSkillsValidateResponse other = (PlatformSkillsValidateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.platformSkillValidationResponse, other.platformSkillValidationResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + platformSkillValidationResponse); + } + + @Override + public String toString() { + return Utils.toString(PlatformSkillsValidateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "platformSkillValidationResponse", platformSkillValidationResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional platformSkillValidationResponse = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Successful response. + */ + public Builder platformSkillValidationResponse(PlatformSkillValidationResponse platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = Optional.ofNullable(platformSkillValidationResponse); + return this; + } + + /** + * Successful response. + */ + public Builder platformSkillValidationResponse(Optional platformSkillValidationResponse) { + Utils.checkNotNull(platformSkillValidationResponse, "platformSkillValidationResponse"); + this.platformSkillValidationResponse = platformSkillValidationResponse; + return this; + } + + public PlatformSkillsValidateResponse build() { + + return new PlatformSkillsValidateResponse( + contentType, statusCode, rawResponse, + platformSkillValidationResponse); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java new file mode 100644 index 00000000..8fc40901 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder.java @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e06a9268bf11 + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; +import com.glean.api_client.glean_api_client.operations.PostRestApiIndexSubmissionsDatasourceInstanceType; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Object; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder { + + private String datasourceInstance; + private String type; + private Map requestBody = new HashMap<>(); + private Optional serverURL = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder datasourceInstance(String datasourceInstance) { + Utils.checkNotNull(datasourceInstance, "datasourceInstance"); + this.datasourceInstance = datasourceInstance; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder requestBody(Map requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(String serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = Optional.of(serverURL); + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeRequestBuilder serverURL(Optional serverURL) { + Utils.checkNotNull(serverURL, "serverURL"); + this.serverURL = serverURL; + return this; + } + + + private PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest buildRequest() { + + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = new PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest(datasourceInstance, + type, + requestBody); + + return request; + } + + public CompletableFuture call() { + + AsyncRequestOperation operation + = new PostRestApiIndexSubmissionsDatasourceInstanceType.Async(sdkConfiguration, serverURL, _headers); + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java new file mode 100644 index 00000000..d4d7b81b --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/async/PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c9f17492a7bd + */ +package com.glean.api_client.glean_api_client.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody; +import com.glean.api_client.glean_api_client.utils.AsyncResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Accepted + */ + private Optional object; + + @JsonCreator + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Accepted + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * Accepted + */ + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse other = (PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Accepted + */ + public Builder object(PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * Accepted + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse build() { + + return new PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreate.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreate.java new file mode 100644 index 00000000..784adafe --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreate.java @@ -0,0 +1,292 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e8e20e07b55d + */ +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.PlatformSkillCreateRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillCreateResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateResponse; +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 PlatformSkillsCreate { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-create", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-create", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-create", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/api/skills"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "", + "multipart", + 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(PlatformSkillCreateRequest request) throws Exception { + HttpRequest req = buildRequest(request, 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(PlatformSkillCreateRequest 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 PlatformSkillsCreateResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsCreateResponse.Builder resBuilder = + PlatformSkillsCreateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsCreateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillCreateResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "413", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillCreateRequest request) throws Exception { + HttpRequest req = buildRequest(request, 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(PlatformSkillCreateRequest 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.PlatformSkillsCreateResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillCreateResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "413", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreateVersion.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreateVersion.java new file mode 100644 index 00000000..bf85fe30 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsCreateVersion.java @@ -0,0 +1,294 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9fe4b8b292df + */ +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.PlatformSkillVersionCreateResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsCreateVersionResponse; +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 PlatformSkillsCreateVersion { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-create-version", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-create-version", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-create-version", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}/versions", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "platformSkillVersionCreateRequest", + "multipart", + 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(PlatformSkillsCreateVersionRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsCreateVersionRequest.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(PlatformSkillsCreateVersionRequest 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 PlatformSkillsCreateVersionResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsCreateVersionResponse.Builder resBuilder = + PlatformSkillsCreateVersionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsCreateVersionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillVersionCreateResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "409", "413", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsCreateVersionRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsCreateVersionRequest.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(PlatformSkillsCreateVersionRequest 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.PlatformSkillsCreateVersionResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateVersionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsCreateVersionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillVersionCreateResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "409", "413", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java new file mode 100644 index 00000000..612b0dfc --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGet.java @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 35379a4f4ed2 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillGetResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PlatformSkillsGet { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(PlatformSkillsGetRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(PlatformSkillsGetRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public PlatformSkillsGetResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsGetResponse.Builder resBuilder = + PlatformSkillsGetResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsGetResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillGetResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsGetRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(PlatformSkillsGetRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillGetResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetContent.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetContent.java new file mode 100644 index 00000000..bcba9f6d --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetContent.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 62b110965e4f + */ +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.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetContentResponse; +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 PlatformSkillsGetContent { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-content", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-content", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-content", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}/content", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/octet-stream") + .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(PlatformSkillsGetContentRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetContentRequest.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(PlatformSkillsGetContentRequest 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 PlatformSkillsGetContentResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsGetContentResponse.Builder resBuilder = + PlatformSkillsGetContentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + PlatformSkillsGetContentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return res; + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsGetContentRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetContentRequest.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(PlatformSkillsGetContentRequest 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.PlatformSkillsGetContentResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetContentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetContentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersion.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersion.java new file mode 100644 index 00000000..2e3f2f76 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersion.java @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a4875fce2f5c + */ +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.PlatformSkillVersionGetResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionResponse; +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 PlatformSkillsGetVersion { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-version", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-version", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-version", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}/versions/{version}", + 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(PlatformSkillsGetVersionRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetVersionRequest.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(PlatformSkillsGetVersionRequest 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 PlatformSkillsGetVersionResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsGetVersionResponse.Builder resBuilder = + PlatformSkillsGetVersionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsGetVersionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillVersionGetResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsGetVersionRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetVersionRequest.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(PlatformSkillsGetVersionRequest 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.PlatformSkillsGetVersionResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillVersionGetResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersionContent.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersionContent.java new file mode 100644 index 00000000..f0f79dc4 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsGetVersionContent.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e7f17e3d678d + */ +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.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsGetVersionContentResponse; +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 PlatformSkillsGetVersionContent { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-version-content", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-version-content", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-get-version-content", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}/versions/{version}/content", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/octet-stream") + .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(PlatformSkillsGetVersionContentRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetVersionContentRequest.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(PlatformSkillsGetVersionContentRequest 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 PlatformSkillsGetVersionContentResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsGetVersionContentResponse.Builder resBuilder = + PlatformSkillsGetVersionContentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + PlatformSkillsGetVersionContentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return res; + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsGetVersionContentRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsGetVersionContentRequest.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(PlatformSkillsGetVersionContentRequest 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.PlatformSkillsGetVersionContentResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionContentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + if (Utils.statusCodeMatches(response.statusCode(), "200") && Utils.contentTypeMatches(contentType, "application/octet-stream")) { + resBuilder.responseStream(response.body()); + } + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsGetVersionContentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/octet-stream")) { + return CompletableFuture.completedFuture(res); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java new file mode 100644 index 00000000..1bb80ab1 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsList.java @@ -0,0 +1,279 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f9f1d5a5462f + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListResponse; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PlatformSkillsList { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/api/skills"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(PlatformSkillsListRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsListRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(PlatformSkillsListRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public PlatformSkillsListResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsListResponse.Builder resBuilder = + PlatformSkillsListResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsListResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillsListResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsListRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsListRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(PlatformSkillsListRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillsListResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsListVersions.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsListVersions.java new file mode 100644 index 00000000..a21321ef --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsListVersions.java @@ -0,0 +1,282 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4fa60c778985 + */ +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.PlatformSkillVersionsListResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsRequest; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsListVersionsResponse; +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 PlatformSkillsListVersions { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list-versions", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list-versions", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-list-versions", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/api/skills/{skill_id}/versions", + 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))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private HttpRequest onBuildRequest(PlatformSkillsListVersionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsListVersionsRequest.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(PlatformSkillsListVersionsRequest 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 PlatformSkillsListVersionsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsListVersionsResponse.Builder resBuilder = + PlatformSkillsListVersionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsListVersionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillVersionsListResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillsListVersionsRequest request) throws Exception { + HttpRequest req = buildRequest(request, PlatformSkillsListVersionsRequest.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(PlatformSkillsListVersionsRequest 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.PlatformSkillsListVersionsResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListVersionsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsListVersionsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillVersionsListResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsValidate.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsValidate.java new file mode 100644 index 00000000..dc998319 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PlatformSkillsValidate.java @@ -0,0 +1,292 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3ecfc797f173 + */ +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.PlatformSkillValidationRequest; +import com.glean.api_client.glean_api_client.models.components.PlatformSkillValidationResponse; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; +import com.glean.api_client.glean_api_client.models.operations.PlatformSkillsValidateResponse; +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 PlatformSkillsValidate { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base(SDKConfiguration sdkConfiguration, Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-validate", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-validate", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "platform-skills-validate", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/api/skills/validation"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "", + "multipart", + 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(PlatformSkillValidationRequest request) throws Exception { + HttpRequest req = buildRequest(request, 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(PlatformSkillValidationRequest 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 PlatformSkillsValidateResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PlatformSkillsValidateResponse.Builder resBuilder = + PlatformSkillsValidateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PlatformSkillsValidateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPlatformSkillValidationResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "413", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + throw PlatformProblemDetailException.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async(SDKConfiguration sdkConfiguration, Headers _headers) { + super(sdkConfiguration, _headers); + } + + private CompletableFuture onBuildRequest(PlatformSkillValidationRequest request) throws Exception { + HttpRequest req = buildRequest(request, 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(PlatformSkillValidationRequest 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.PlatformSkillsValidateResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsValidateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PlatformSkillsValidateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPlatformSkillValidationResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "408", "413", "429")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500", "503")) { + if (Utils.contentTypeMatches(contentType, "application/problem+json")) { + return PlatformProblemDetailException.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java b/src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java new file mode 100644 index 00000000..839ba941 --- /dev/null +++ b/src/main/java/com/glean/api_client/glean_api_client/operations/PostRestApiIndexSubmissionsDatasourceInstanceType.java @@ -0,0 +1,315 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 59cfdb0a7588 + */ +package com.glean.api_client.glean_api_client.operations; + +import static com.glean.api_client.glean_api_client.operations.Operations.RequestOperation; +import static com.glean.api_client.glean_api_client.utils.Exceptions.unchecked; +import static com.glean.api_client.glean_api_client.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.glean.api_client.glean_api_client.SDKConfiguration; +import com.glean.api_client.glean_api_client.SecuritySource; +import com.glean.api_client.glean_api_client.models.errors.APIException; +import com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponseBody; +import com.glean.api_client.glean_api_client.utils.Blob; +import com.glean.api_client.glean_api_client.utils.HTTPClient; +import com.glean.api_client.glean_api_client.utils.HTTPRequest; +import com.glean.api_client.glean_api_client.utils.Headers; +import com.glean.api_client.glean_api_client.utils.Hook.AfterErrorContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.AfterSuccessContextImpl; +import com.glean.api_client.glean_api_client.utils.Hook.BeforeRequestContextImpl; +import com.glean.api_client.glean_api_client.utils.SerializedBody; +import com.glean.api_client.glean_api_client.utils.Utils.JsonShape; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; + + +public class PostRestApiIndexSubmissionsDatasourceInstanceType { + + /** + * POST_REST_API_INDEX_SUBMISSIONS_DATASOURCE_INSTANCE_TYPE_SERVERS contains the list of server urls available to the SDK. + */ + public static final String[] POST_REST_API_INDEX_SUBMISSIONS_DATASOURCE_INSTANCE_TYPE_SERVERS = { + "https://{instance}-be.glean.com", + }; + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final HTTPClient client; + final Headers _headers; + + public Base( + SDKConfiguration sdkConfiguration, Optional serverURL, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = serverURL + .filter(u -> !u.isBlank()) + .orElse(Utils.templateUrl( + POST_REST_API_INDEX_SUBMISSIONS_DATASOURCE_INSTANCE_TYPE_SERVERS[0], + Map.of("instance", "instance-name"))); + this.securitySource = this.sdkConfiguration.securitySource(); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/rest/api/index/submissions/{datasourceInstance}/{type}", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional serverURL, + Headers _headers) { + super( + sdkConfiguration, serverURL, + _headers); + } + + private HttpRequest onBuildRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) throws Exception { + HttpRequest req = buildRequest(request, PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) { + HttpRequest r = unchecked(() -> onBuildRequest(request)).get(); + HttpResponse httpRes; + try { + httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + httpRes = onError(httpRes, null); + } else { + httpRes = onSuccess(httpRes); + } + } catch (Exception e) { + httpRes = unchecked(() -> onError(null, e)).get(); + } + + return httpRes; + } + + + @Override + public PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.Builder resBuilder = + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "202")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withObject(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorInfoResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorInfoResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405", "413", "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "503", "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + + public Async( + SDKConfiguration sdkConfiguration, Optional serverURL, + Headers _headers) { + super( + sdkConfiguration, serverURL, + _headers); + } + + private CompletableFuture onBuildRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) throws Exception { + HttpRequest req = buildRequest(request, PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest request) { + return unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "4XX", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity()) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse.Builder resBuilder = + com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.glean.api_client.glean_api_client.models.operations.async.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "202")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withObject); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorInfoResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorInfoResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405", "413", "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "503", "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +}