From 0a8c181a9dbd047daeb975b4a63e07c4c0f9c387 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 13 Aug 2026 08:16:32 +0000 Subject: [PATCH 1/2] ## Java SDK Changes: * `gr4vy.roles.list()`: **Added** --- .speakeasy/gen.lock | 133 ++++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README.md | 8 +- RELEASES.md | 12 +- docs/models/components/CollectionRole.md | 11 + docs/models/components/PermissionSet.md | 8 +- docs/models/components/Role.md | 10 +- docs/models/operations/ListRolesRequest.md | 9 + docs/models/operations/ListRolesResponse.md | 11 + docs/sdks/roles/README.md | 71 +++ gradle.properties | 2 +- src/main/java/com/gr4vy/sdk/AsyncGr4vy.java | 7 + src/main/java/com/gr4vy/sdk/AsyncRoles.java | 90 ++++ src/main/java/com/gr4vy/sdk/Gr4vy.java | 9 + src/main/java/com/gr4vy/sdk/Roles.java | 87 ++++ .../java/com/gr4vy/sdk/SDKConfiguration.java | 2 +- .../sdk/models/components/CollectionRole.java | 304 +++++++++++ .../sdk/models/components/PermissionSet.java | 19 +- .../com/gr4vy/sdk/models/components/Role.java | 59 ++- .../models/operations/ListRolesRequest.java | 196 +++++++ .../operations/ListRolesRequestBuilder.java | 152 ++++++ .../models/operations/ListRolesResponse.java | 253 +++++++++ .../async/ListRolesRequestBuilder.java | 154 ++++++ .../operations/async/ListRolesResponse.java | 253 +++++++++ .../com/gr4vy/sdk/operations/ListRoles.java | 490 ++++++++++++++++++ 26 files changed, 2310 insertions(+), 52 deletions(-) create mode 100644 docs/models/components/CollectionRole.md create mode 100644 docs/models/operations/ListRolesRequest.md create mode 100644 docs/models/operations/ListRolesResponse.md create mode 100644 docs/sdks/roles/README.md create mode 100644 src/main/java/com/gr4vy/sdk/AsyncRoles.java create mode 100644 src/main/java/com/gr4vy/sdk/Roles.java create mode 100644 src/main/java/com/gr4vy/sdk/models/components/CollectionRole.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequest.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequestBuilder.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/ListRolesResponse.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesRequestBuilder.java create mode 100644 src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesResponse.java create mode 100644 src/main/java/com/gr4vy/sdk/operations/ListRoles.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 3ba12287..9510d576 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 5bbaa3a9-baa0-471b-ba6a-13fd88e8c119 management: - docChecksum: dbaa0489b3b4bde953b19689e82fd18b + docChecksum: 713828160f10d0871f5d3f7d2eca6167 docVersion: 1.0.0 speakeasyVersion: 1.793.1 generationVersion: 2.928.0 - releaseVersion: 2.18.11 - configChecksum: 0861c5904a1ace384a8240b004180779 + releaseVersion: 2.18.12 + configChecksum: 82818c0b20643af6dc7d956d16b8c6fd repoURL: https://github.com/gr4vy/gr4vy-java.git installationURL: https://github.com/gr4vy/gr4vy-java published: true persistentEdits: - generation_id: 00297c5f-d733-4452-b93f-409cb0b9e755 - pristine_commit_hash: 14cd197bd4a31dd15da917a0f5ceac132f522547 - pristine_tree_hash: b86ac921200bcb36432994e3c78bf6dd8b68cd59 + generation_id: e37285f5-61a6-4bf8-9a7d-7efa356f7e1d + pristine_commit_hash: 7718c3667112fcdc8612037d3cdd32fcd81b866a + pristine_tree_hash: ec58bada1c340f0f1dba0417fae7d93112c07850 features: java: additionalDependencies: 0.1.0 @@ -365,6 +365,10 @@ trackedFiles: id: 961506387ac0 last_write_checksum: sha1:d510083acb6da21f5b2febe718f25c5ffb6f3ab0 pristine_git_object: 86e5223ce621925897e56dee2fe790d0c114526d + docs/models/components/CollectionRole.md: + id: b218f78a9ab0 + last_write_checksum: sha1:c686083ea9add0940a184c2136fe44dda1aebec9 + pristine_git_object: dce9d108c66bc3c7e4bc6af0c94a0a4f3c7c556e docs/models/components/Context.md: id: 6761e007a5d6 last_write_checksum: sha1:2a7e2b6a96bac2850000967c389510584b0060d4 @@ -1155,8 +1159,8 @@ trackedFiles: pristine_git_object: 2bb2b4be7308e47da6858459fa6acbc8ea09ee3b docs/models/components/PermissionSet.md: id: 45eaf260c588 - last_write_checksum: sha1:51f52b8cc4452ecc8706528db85d1cdfa53dc923 - pristine_git_object: d02fd14a8df21e34240a76e80fcb86458fc1ea25 + last_write_checksum: sha1:02bb8d03a3dae678c61a8c09249551b1865f4ef8 + pristine_git_object: 972192643571a6deb9d4ec7dc53c0153e0821c3c docs/models/components/PlaidPaymentMethodCreate.md: id: 618a7982ce28 last_write_checksum: sha1:44b01d45af2cba881f8691b92554ab34939d216b @@ -1303,8 +1307,8 @@ trackedFiles: pristine_git_object: 0dbaa54ee769aa6f881d61790feac72525c1c056 docs/models/components/Role.md: id: c89eff3746a7 - last_write_checksum: sha1:49fb2c832e73b4b4e3500760cd9f34f0ebc2bb91 - pristine_git_object: 86e6950004cc29883ff59a0465c8aea6ac9faf67 + last_write_checksum: sha1:b1dfcaf13af2b5684989cadfd9c5e835187b123a + pristine_git_object: 544d5bbb7f26dd0d2328dffe98dc4b0021eb4b69 docs/models/components/RoleAssigneeType.md: id: a60a972f1950 last_write_checksum: sha1:6204964f2b6619352e476a3a10b8975a1ab763d9 @@ -2449,6 +2453,14 @@ trackedFiles: id: 5a96a588a01d last_write_checksum: sha1:a820a9985e8bc8784387ec33a8eb0317e885f002 pristine_git_object: 192a3b88d50e0e622849209d0499dc6c0dd25862 + docs/models/operations/ListRolesRequest.md: + id: 5489a6321a74 + last_write_checksum: sha1:a16307a5014b48b9ed934644b109c1203f984079 + pristine_git_object: fa109b5d0dff0fac8cb41d541a9c01d7d2060591 + docs/models/operations/ListRolesResponse.md: + id: 4bfb26ced53c + last_write_checksum: sha1:2a0b46148fca741c7f5e4b2d2d39f19606d10e1e + pristine_git_object: dee390c2f54de416ef427b5ff7f5577305f79121 docs/models/operations/ListThreeDsConfigurationsRequest.md: id: 3102e3f86d88 last_write_checksum: sha1:0784886a6db0c79f095dc81d2d59d476761e7842 @@ -2809,6 +2821,10 @@ trackedFiles: id: 66bfd66f1efc last_write_checksum: sha1:08dd090e862bce71800b511117ae1aeb3cc8b825 pristine_git_object: f4b776ba64a2ca0c98c9371441760564e87ac308 + docs/sdks/roles/README.md: + id: 69204c99730f + last_write_checksum: sha1:42f825e0cf3d2fb4d9e8d2db0eec8f371370361f + pristine_git_object: 58112d28e8cb620b663f1351cebb65d75b6773df docs/sdks/sessions/README.md: id: 57ad62844f79 last_write_checksum: sha1:94aa7af2baedff6a88d3ffc9685f20b3765de573 @@ -2843,8 +2859,8 @@ trackedFiles: pristine_git_object: 15c4e4642f204ccb312d8814155b69e153b4e19b gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:503ce77d91e0d6f6571781caef1077a1023d469f - pristine_git_object: fa2471cc3c2de10c73c6914f84c19832c95fa415 + last_write_checksum: sha1:10150f39a62721640a9581f299c82427b431ec80 + pristine_git_object: 43b6a196a4a0132eccfdcdc262e22683bedd4357 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -2967,8 +2983,8 @@ trackedFiles: pristine_git_object: 2f972a95013ec886405d5e0fe24d094a777a900a src/main/java/com/gr4vy/sdk/AsyncGr4vy.java: id: ae8f21a7dc22 - last_write_checksum: sha1:c5cf3f07d6e68afd6eb7d8b94085a5aedd0800e3 - pristine_git_object: 59bfd5b6111715b25f0a7cdb5d806a361b2aaeba + last_write_checksum: sha1:c0433312d4b1fe2475ecc69a3cb1da017084e792 + pristine_git_object: 653d7d2ff49d2cb89ac96707cff617c2512c873d src/main/java/com/gr4vy/sdk/AsyncIssuances.java: id: a96421af2de6 last_write_checksum: sha1:a7a5fb948e6553c536da516ee17393f4ac643b31 @@ -3029,6 +3045,10 @@ trackedFiles: id: ef263f1ded93 last_write_checksum: sha1:abe05c4874b88a336097e4ffc00707677e4292cc pristine_git_object: ff7657209e7000baefd97b162e076615b760168d + src/main/java/com/gr4vy/sdk/AsyncRoles.java: + id: 0327992e7449 + last_write_checksum: sha1:5ddda4c7888082337108a21447b371edd6085512 + pristine_git_object: 86d3990f948bdb76e23f93dfeb3e69a2a14a713c src/main/java/com/gr4vy/sdk/AsyncSessions.java: id: 3e73b1280712 last_write_checksum: sha1:9d95ac000c7c3810f2e0de35b927d8fa222151fd @@ -3115,8 +3135,8 @@ trackedFiles: pristine_git_object: 6d092960ef6219ada2edfcd3139f7e10a136f568 src/main/java/com/gr4vy/sdk/Gr4vy.java: id: 239506d7cead - last_write_checksum: sha1:2f29ae77ade0777daf380025889f80ead0fd379f - pristine_git_object: 8f82bd1dd6c87920d81fcd8b0cd3b11cb5a50209 + last_write_checksum: sha1:054c931080825264211f89e1c71eeee7d29c6ab8 + pristine_git_object: bf7c357feaa0e5981af94e6e829ce97d6ab688d4 src/main/java/com/gr4vy/sdk/Issuances.java: id: c89e3901912e last_write_checksum: sha1:619621eb1d6333cea8c3fa9ef5c6005df34cdfa1 @@ -3177,10 +3197,14 @@ trackedFiles: id: afffb8e2ecc1 last_write_checksum: sha1:45ae97959e81d52177904ce0dec1398f4ca1555a pristine_git_object: 502a7312d3dc82c102dbaf7ed5e952d0c793e26f + src/main/java/com/gr4vy/sdk/Roles.java: + id: cb357d59890c + last_write_checksum: sha1:4746ea11c46bf6bc04975a607ca8544ad04440d2 + pristine_git_object: b50475cc7f6041d63c4569256e4ff1850b20d30b src/main/java/com/gr4vy/sdk/SDKConfiguration.java: id: 73a7edeaca45 - last_write_checksum: sha1:15018d1ea0c82238d8897b930a6a917414a18ce2 - pristine_git_object: 7246a2b96996792e9359a6229cc71f50f3aee5bb + last_write_checksum: sha1:99b2a6ab5f8bd8be6b6f35dbd3618665516d900b + pristine_git_object: 75909a7996ffbd07de3feb523ae0bae2b7236865 src/main/java/com/gr4vy/sdk/SecuritySource.java: id: 1b6add6b9b50 last_write_checksum: sha1:2f365cc823c6243188e83f4df618c9737fcee8bd @@ -3529,6 +3553,10 @@ trackedFiles: id: aabfbf6df1b6 last_write_checksum: sha1:d5a0ade4b13a7bc0c1e9fcbec687e6a44aa90a2c pristine_git_object: 77e4ae9527c085718609d9a9e97446da0b7e05c2 + src/main/java/com/gr4vy/sdk/models/components/CollectionRole.java: + id: 39d8c6d8c878 + last_write_checksum: sha1:0649c558ab9df1c7903055a5ffa53b6a76851f3b + pristine_git_object: 4137e86eab40e7fbdeab25a720a908198468ab21 src/main/java/com/gr4vy/sdk/models/components/Context.java: id: 12922a32ce3e last_write_checksum: sha1:c1b4564bb736459f4ac4a5d3e910e525cd2111b4 @@ -4319,8 +4347,8 @@ trackedFiles: pristine_git_object: fafba1a4eaa216ed954808891ca52cffe4969f39 src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java: id: f4a641157167 - last_write_checksum: sha1:c552c871eb568b6aad45dc73449fd0d112d8ae30 - pristine_git_object: 415f8908464a319039b1b1edccc85fb50096fe6b + last_write_checksum: sha1:70f8427dba65d2507177445f9a3fc082e12ffd56 + pristine_git_object: 67442075f16f490bdd4c302c8a3d9f45fe18fedc src/main/java/com/gr4vy/sdk/models/components/PlaidPaymentMethodCreate.java: id: 278082fd49e5 last_write_checksum: sha1:25c90fbad2fd25645c0bcf38fadf272f4aa1ac68 @@ -4467,8 +4495,8 @@ trackedFiles: pristine_git_object: dcdb5eef507452a02f0dbf471b4b631df1870ce8 src/main/java/com/gr4vy/sdk/models/components/Role.java: id: f98d16d11004 - last_write_checksum: sha1:a0b3dda27fb092cacc8593f187e70996a0f1b432 - pristine_git_object: f5e86cedd549901236a1168e40af5e3cba0d12a5 + last_write_checksum: sha1:d188e6dd612d339e3a8cc5dc2e9063348e07ce3e + pristine_git_object: 02fb2685fefa17ae6ad585fa44c3dc54d9309451 src/main/java/com/gr4vy/sdk/models/components/RoleAssigneeType.java: id: 3d37c488cca5 last_write_checksum: sha1:79631d66b89cfddb140e22a25cca5e957cbc4b9f @@ -5261,6 +5289,10 @@ trackedFiles: id: c2f6ba6be3a2 last_write_checksum: sha1:6b2c70e3bbc2b8b20868f9252d6ea003f3752767 pristine_git_object: db4e6b087afc700be42a390864eb8696fb8a52bc + src/main/java/com/gr4vy/sdk/models/operations//async/ListRolesRequestBuilder.java: + id: a12a2acac50e + last_write_checksum: sha1:3caeacc7ffb458fe59e4c696c1ecc7d821e87c7b + pristine_git_object: 98ec48da722dd7e6dba03d6a70655c1c21be12b6 src/main/java/com/gr4vy/sdk/models/operations//async/ListThreeDsConfigurationsRequestBuilder.java: id: 9c1a5e61aa3c last_write_checksum: sha1:e1f6ac7ab2c4ddfc2a14d649a0c38ea93031fda3 @@ -6481,6 +6513,18 @@ trackedFiles: id: 0be548d1550d last_write_checksum: sha1:b9869a84bea111dfa944341d2f9206a2ad702dec pristine_git_object: 627aa2722f4e09d6a16b2f15e3e61f614edcb026 + src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequest.java: + id: ac1de1e71162 + last_write_checksum: sha1:c645f1e7b84adc9b77555c441118bb5adf8ccb92 + pristine_git_object: 089b3c51387342804f8c67ef29d63d6b27e3270e + src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequestBuilder.java: + id: 541a3b173008 + last_write_checksum: sha1:71446fb09af7354d0abe9d4e1e084f6927b408e4 + pristine_git_object: a04a929486b4ce161509c75bc507ae908419a59e + src/main/java/com/gr4vy/sdk/models/operations/ListRolesResponse.java: + id: 3c5ac020e3e5 + last_write_checksum: sha1:a195bbf0743c687118b6ec553de797e761369414 + pristine_git_object: bb8d217c88dc936326aada0c5a41c1d126d240cb src/main/java/com/gr4vy/sdk/models/operations/ListThreeDsConfigurationsRequest.java: id: f817602a7f75 last_write_checksum: sha1:e2654b13a2d305af0cc15797ac166b4816f9d1de @@ -7185,6 +7229,10 @@ trackedFiles: id: 54d96bb1c1db last_write_checksum: sha1:8611fc86928a0cda5fd7b54a00454bcaad5c339c pristine_git_object: 46b2a8edacb91e21e9b23d44b5106eacab246301 + src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesResponse.java: + id: dab33a62bd7a + last_write_checksum: sha1:76d9e0225c876ae657f79b1749338fc849a1a9cf + pristine_git_object: 9f6484372135d569c0c64d23c219f93509414360 src/main/java/com/gr4vy/sdk/models/operations/async/ListThreeDsConfigurationsResponse.java: id: 134cc0a46ad8 last_write_checksum: sha1:b3a9fb3e0e3209f9d2e46e153f89a6b4e87f9442 @@ -7661,6 +7709,10 @@ trackedFiles: id: 20f116bc6064 last_write_checksum: sha1:b5cf4e4cda5289012de4402cf9c70be07b635d3d pristine_git_object: 43e5dfd19cb3a96bc5d1addcec3900db3c45713b + src/main/java/com/gr4vy/sdk/operations/ListRoles.java: + id: 031e998d9a9c + last_write_checksum: sha1:12ed5bef3bc8447e0513c1cac3ea92dc15014fcd + pristine_git_object: 0327860516341cf92ae56ee43e1892e41dbf52a7 src/main/java/com/gr4vy/sdk/operations/ListThreeDsConfigurations.java: id: 6d1b60ce377b last_write_checksum: sha1:9ce2ef441d1ab095e882924c2109d5a747f2e64b @@ -12348,14 +12400,43 @@ examples: application/json: {"type": "error", "code": "bad_gateway", "status": 502, "message": "Request could not be processed"} "504": application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"} + list_roles: + speakeasy-default-list-roles: + parameters: + query: + limit: 20 + responses: + "200": + application/json: {"items": [], "limit": 20} + "400": + application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} + "401": + application/json: {"type": "error", "code": "unauthorized", "status": 401, "message": "No valid API authentication found"} + "403": + application/json: {"type": "error", "code": "forbidden", "status": 403, "message": "Request failed validation"} + "404": + application/json: {"type": "error", "code": "not_found", "status": 404, "message": "The resource could not be found"} + "405": + application/json: {"type": "error", "code": "method_not_allowed", "status": 405, "message": "Method Not Allowed"} + "409": + application/json: {"type": "error", "code": "duplicate_record", "status": 409, "message": "Request failed validation"} + "422": + application/json: {} + "425": + application/json: {"type": "error", "code": "too_early", "status": 425, "message": "Request failed validation"} + "429": + application/json: {"type": "error", "code": "too_many_requests", "status": 429, "message": "Request failed validation"} + "500": + application/json: {"type": "error", "code": "server_error", "status": 500, "message": "Request could not be processed"} + "502": + application/json: {"type": "error", "code": "bad_gateway", "status": 502, "message": "Request could not be processed"} + "504": + application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"} examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Java SDK Changes: - * `gr4vy.apiKeyPairs.list()`: `response.items[].roles[]` **Changed** - * `gr4vy.apiKeyPairs.create()`: `response.roles[]` **Changed** - * `gr4vy.apiKeyPairs.get()`: `response.roles[]` **Changed** - * `gr4vy.apiKeyPairs.update()`: `response.roles[]` **Changed** + * `gr4vy.roles.list()`: **Added** generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 3b29198c..5176a448 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 2.18.11 + version: 2.18.12 additionalDependencies: - testImplementation:org.junit.jupiter:junit-jupiter:5.10.0 - implementation:com.auth0:java-jwt:4.5.0 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9e30466d..97f9018a 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -9,8 +9,8 @@ sources: - 1.0.0 openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:4f9f0a5145d98294e2c2b4baf43a15464732af96fbfdd715a0955225d579df4a - sourceBlobDigest: sha256:7f0939e842af2fabf212b9d06ccacc83d810ec9e74ba02c633d49cc4b137b55b + sourceRevisionDigest: sha256:27a882812a59e55f52edabae29f5c3bb3507103824317017f1d8366d4d389f77 + sourceBlobDigest: sha256:6ddeed09dd8775106ad62e032807f23245400996361737802e75f9444b0f3318 tags: - latest - 1.0.0 @@ -25,10 +25,10 @@ targets: java: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:4f9f0a5145d98294e2c2b4baf43a15464732af96fbfdd715a0955225d579df4a - sourceBlobDigest: sha256:7f0939e842af2fabf212b9d06ccacc83d810ec9e74ba02c633d49cc4b137b55b + sourceRevisionDigest: sha256:27a882812a59e55f52edabae29f5c3bb3507103824317017f1d8366d4d389f77 + sourceBlobDigest: sha256:6ddeed09dd8775106ad62e032807f23245400996361737802e75f9444b0f3318 codeSamplesNamespace: openapi-java-code-samples - codeSamplesRevisionDigest: sha256:ba08a9c7bee9f31dc3cb7ee5f1a8baa01d9b2b5f4aea444e969aaadd46ae0725 + codeSamplesRevisionDigest: sha256:4f2cb23e47f221023c921beabd18fca3c46f1e02219f566c64992b3e6c56a8bc workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 68955349..68af102c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.gr4vy:sdk:2.18.11' +implementation 'com.gr4vy:sdk:2.18.12' ``` Maven: @@ -67,7 +67,7 @@ Maven: com.gr4vy sdk - 2.18.11 + 2.18.12 ``` @@ -517,6 +517,10 @@ Async support is available for: * [url](docs/sdks/executions/README.md#url) - Create URL for executed report * [get](docs/sdks/executions/README.md#get) - Get executed report +### [Roles](docs/sdks/roles/README.md) + +* [list](docs/sdks/roles/README.md#list) - List all roles + ### [ThreeDsScenarios](docs/sdks/threedsscenarios/README.md) * [create](docs/sdks/threedsscenarios/README.md#create) - Create a 3DS scenario diff --git a/RELEASES.md b/RELEASES.md index f4479a0d..2eabf626 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2138,4 +2138,14 @@ Based on: ### Generated - [java v2.18.11] . ### Releases -- [Maven Central v2.18.11] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.18.11 - . \ No newline at end of file +- [Maven Central v2.18.11] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.18.11 - . + +## 2026-08-13 08:14:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.793.1 (2.928.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v2.18.12] . +### Releases +- [Maven Central v2.18.12] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.18.12 - . \ No newline at end of file diff --git a/docs/models/components/CollectionRole.md b/docs/models/components/CollectionRole.md new file mode 100644 index 00000000..dce9d108 --- /dev/null +++ b/docs/models/components/CollectionRole.md @@ -0,0 +1,11 @@ +# CollectionRole + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `items` | List\<[Role](../../models/components/Role.md)> | :heavy_check_mark: | A list of items returned for this request. | | +| `limit` | *Optional\* | :heavy_minus_sign: | The number of items for this page. | 20 | +| `nextCursor` | *JsonNullable\* | :heavy_minus_sign: | The cursor pointing at the next page of items. | ZXhhbXBsZTE | +| `previousCursor` | *JsonNullable\* | :heavy_minus_sign: | The cursor pointing at the previous page of items. | Xkjss7asS | \ No newline at end of file diff --git a/docs/models/components/PermissionSet.md b/docs/models/components/PermissionSet.md index d02fd14a..97219264 100644 --- a/docs/models/components/PermissionSet.md +++ b/docs/models/components/PermissionSet.md @@ -1,8 +1,10 @@ # PermissionSet +The permissions granted by a role. + ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `allow` | List\<*String*> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `allow` | List\<*String*> | :heavy_check_mark: | The scopes granted by this role. | [
"transactions.read",
"reports.read"
] | \ No newline at end of file diff --git a/docs/models/components/Role.md b/docs/models/components/Role.md index 86e69500..544d5bbb 100644 --- a/docs/models/components/Role.md +++ b/docs/models/components/Role.md @@ -5,12 +5,12 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | *Optional\* | :heavy_minus_sign: | N/A | | -| `id` | *String* | :heavy_check_mark: | N/A | | -| `name` | *String* | :heavy_check_mark: | N/A | | +| `type` | *Optional\* | :heavy_minus_sign: | Always `role`. | role | +| `id` | *String* | :heavy_check_mark: | The unique ID for the role. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `name` | *String* | :heavy_check_mark: | The human-readable name of the role. | Administrator | | `slug` | *String* | :heavy_check_mark: | The unique, human-readable identifier for the role. | administrator | -| `description` | *String* | :heavy_check_mark: | N/A | | -| `permissions` | [PermissionSet](../../models/components/PermissionSet.md) | :heavy_check_mark: | N/A | | +| `description` | *String* | :heavy_check_mark: | A description of the access this role grants. | Full read and write access. | +| `permissions` | [PermissionSet](../../models/components/PermissionSet.md) | :heavy_check_mark: | The permissions granted by a role. | | | `assignableTo` | List\<[RoleAssigneeType](../../models/components/RoleAssigneeType.md)> | :heavy_check_mark: | The types of resource this role can be assigned to. | | | `appliesTo` | List\<*String*> | :heavy_check_mark: | The slugs of the roles this role is an add-on of. Empty when this role is not an add-on. | | | `isStandaloneAssignable` | *boolean* | :heavy_check_mark: | Whether this role can be assigned on its own, without being combined with another role. | | \ No newline at end of file diff --git a/docs/models/operations/ListRolesRequest.md b/docs/models/operations/ListRolesRequest.md new file mode 100644 index 00000000..fa109b5d --- /dev/null +++ b/docs/models/operations/ListRolesRequest.md @@ -0,0 +1,9 @@ +# ListRolesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | +| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are returned. | 20 | \ No newline at end of file diff --git a/docs/models/operations/ListRolesResponse.md b/docs/models/operations/ListRolesResponse.md new file mode 100644 index 00000000..dee390c2 --- /dev/null +++ b/docs/models/operations/ListRolesResponse.md @@ -0,0 +1,11 @@ +# ListRolesResponse + + +## 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 | +| `collectionRole` | [Optional\](../../models/components/CollectionRole.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/sdks/roles/README.md b/docs/sdks/roles/README.md new file mode 100644 index 00000000..58112d28 --- /dev/null +++ b/docs/sdks/roles/README.md @@ -0,0 +1,71 @@ +# Roles + +## Overview + +### Available Operations + +* [list](#list) - List all roles + +## list + +List all roles available in the instance. + +### Example Usage + + +```java +package hello.world; + +import com.gr4vy.sdk.Gr4vy; +import com.gr4vy.sdk.models.errors.*; +import com.gr4vy.sdk.models.operations.ListRolesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Gr4vy sdk = Gr4vy.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + + sdk.roles().list() + .limit(20L) + .callAsStream() + .forEach((ListRolesResponse item) -> { + // handle page + }); + + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `cursor` | *JsonNullable\* | :heavy_minus_sign: | A pointer to the page of results to return. | ZXhhbXBsZTE | +| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of items that are returned. | 20 | + +### Response + +**[ListRolesResponse](../../models/operations/ListRolesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/Error400 | 400 | application/json | +| models/errors/Error401 | 401 | application/json | +| models/errors/Error403 | 403 | application/json | +| models/errors/Error404 | 404 | application/json | +| models/errors/Error405 | 405 | application/json | +| models/errors/Error409 | 409 | application/json | +| models/errors/HTTPValidationError | 422 | application/json | +| models/errors/Error425 | 425 | application/json | +| models/errors/Error429 | 429 | application/json | +| models/errors/Error500 | 500 | application/json | +| models/errors/Error502 | 502 | application/json | +| models/errors/Error504 | 504 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index fa2471cc..43b6a196 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.gr4vy artifactId=sdk -version=2.18.11 +version=2.18.12 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java b/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java index 59bfd5b6..653d7d2f 100644 --- a/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java +++ b/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java @@ -43,6 +43,8 @@ public class AsyncGr4vy { private final AsyncCheckoutSessions checkoutSessions; + private final AsyncRoles roles; + private final AsyncMerchantAccounts merchantAccounts; private final AsyncThreeDsScenarios threeDsScenarios; @@ -115,6 +117,10 @@ public AsyncCheckoutSessions checkoutSessions() { return checkoutSessions; } + public AsyncRoles roles() { + return roles; + } + public AsyncMerchantAccounts merchantAccounts() { return merchantAccounts; } @@ -153,6 +159,7 @@ public AsyncPaymentLinks paymentLinks() { this.reports = new AsyncReports(syncSDK.reports(), sdkConfiguration); this.reportExecutions = new AsyncReportExecutions(syncSDK.reportExecutions(), sdkConfiguration); this.checkoutSessions = new AsyncCheckoutSessions(syncSDK.checkoutSessions(), sdkConfiguration); + this.roles = new AsyncRoles(syncSDK.roles(), sdkConfiguration); this.merchantAccounts = new AsyncMerchantAccounts(syncSDK.merchantAccounts(), sdkConfiguration); this.threeDsScenarios = new AsyncThreeDsScenarios(syncSDK.threeDsScenarios(), sdkConfiguration); this.payouts = new AsyncPayouts(syncSDK.payouts(), sdkConfiguration); diff --git a/src/main/java/com/gr4vy/sdk/AsyncRoles.java b/src/main/java/com/gr4vy/sdk/AsyncRoles.java new file mode 100644 index 00000000..86d3990f --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/AsyncRoles.java @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk; + +import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; + +import com.gr4vy.sdk.models.operations.ListRolesRequest; +import com.gr4vy.sdk.models.operations.async.ListRolesRequestBuilder; +import com.gr4vy.sdk.models.operations.async.ListRolesResponse; +import com.gr4vy.sdk.operations.ListRoles; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.Options; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AsyncRoles { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final Roles syncSDK; + + AsyncRoles(Roles syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public Roles sync() { + return syncSDK; + } + + + /** + * List all roles + * + *

List all roles available in the instance. + * + * @return The async call builder + */ + public ListRolesRequestBuilder list() { + return new ListRolesRequestBuilder(sdkConfiguration); + } + + /** + * List all roles + * + *

List all roles available in the instance. + * + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listDirect() { + return list(JsonNullable.undefined(), Optional.empty(), Optional.empty()); + } + + /** + * List all roles + * + *

List all roles available in the instance. + * + * @param cursor A pointer to the page of results to return. + * @param limit The maximum number of items that are returned. + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture list( + JsonNullable cursor, Optional limit, + Optional options) { + ListRolesRequest request = + ListRolesRequest + .builder() + .cursor(cursor) + .limit(limit) + .build(); + AsyncRequestOperation operation + = new ListRoles.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/com/gr4vy/sdk/Gr4vy.java b/src/main/java/com/gr4vy/sdk/Gr4vy.java index 8f82bd1d..bf7c357f 100644 --- a/src/main/java/com/gr4vy/sdk/Gr4vy.java +++ b/src/main/java/com/gr4vy/sdk/Gr4vy.java @@ -100,6 +100,9 @@ public String server() { private final CheckoutSessions checkoutSessions; + private final Roles roles; + + private final MerchantAccounts merchantAccounts; @@ -192,6 +195,11 @@ public CheckoutSessions checkoutSessions() { } + public Roles roles() { + return roles; + } + + public MerchantAccounts merchantAccounts() { return merchantAccounts; } @@ -397,6 +405,7 @@ private Gr4vy(SDKConfiguration sdkConfiguration) { this.reports = new Reports(sdkConfiguration); this.reportExecutions = new ReportExecutions(sdkConfiguration); this.checkoutSessions = new CheckoutSessions(sdkConfiguration); + this.roles = new Roles(sdkConfiguration); this.merchantAccounts = new MerchantAccounts(sdkConfiguration); this.threeDsScenarios = new ThreeDsScenarios(sdkConfiguration); this.payouts = new Payouts(sdkConfiguration); diff --git a/src/main/java/com/gr4vy/sdk/Roles.java b/src/main/java/com/gr4vy/sdk/Roles.java new file mode 100644 index 00000000..b50475cc --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/Roles.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk; + +import static com.gr4vy.sdk.operations.Operations.RequestOperation; + +import com.gr4vy.sdk.models.operations.ListRolesRequest; +import com.gr4vy.sdk.models.operations.ListRolesRequestBuilder; +import com.gr4vy.sdk.models.operations.ListRolesResponse; +import com.gr4vy.sdk.operations.ListRoles; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.Options; +import java.lang.Long; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class Roles { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncRoles asyncSDK; + + Roles(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncRoles(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncRoles async() { + return asyncSDK; + } + + /** + * List all roles + * + *

List all roles available in the instance. + * + * @return The call builder + */ + public ListRolesRequestBuilder list() { + return new ListRolesRequestBuilder(sdkConfiguration); + } + + /** + * List all roles + * + *

List all roles available in the instance. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ListRolesResponse listDirect() { + return list(JsonNullable.undefined(), Optional.empty(), Optional.empty()); + } + + /** + * List all roles + * + *

List all roles available in the instance. + * + * @param cursor A pointer to the page of results to return. + * @param limit The maximum number of items that are returned. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ListRolesResponse list( + JsonNullable cursor, Optional limit, + Optional options) { + ListRolesRequest request = + ListRolesRequest + .builder() + .cursor(cursor) + .limit(limit) + .build(); + RequestOperation operation + = new ListRoles.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java index 7246a2b9..75909a79 100644 --- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java @@ -22,7 +22,7 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "1.0.0"; - public static final String SDK_VERSION = "2.18.11"; + public static final String SDK_VERSION = "2.18.12"; public static final String GEN_VERSION = "2.928.0"; private static final String BASE_PACKAGE = "com.gr4vy.sdk"; public static final String USER_AGENT = diff --git a/src/main/java/com/gr4vy/sdk/models/components/CollectionRole.java b/src/main/java/com/gr4vy/sdk/models/components/CollectionRole.java new file mode 100644 index 00000000..4137e86e --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/components/CollectionRole.java @@ -0,0 +1,304 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.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.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CollectionRole { + /** + * A list of items returned for this request. + */ + @JsonProperty("items") + private List items; + + /** + * The number of items for this page. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("limit") + private Optional limit; + + /** + * The cursor pointing at the next page of items. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("next_cursor") + private JsonNullable nextCursor; + + /** + * The cursor pointing at the previous page of items. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("previous_cursor") + private JsonNullable previousCursor; + + @JsonCreator + public CollectionRole( + @JsonProperty("items") List items, + @JsonProperty("limit") Optional limit, + @JsonProperty("next_cursor") JsonNullable nextCursor, + @JsonProperty("previous_cursor") JsonNullable previousCursor) { + Utils.checkNotNull(items, "items"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(nextCursor, "nextCursor"); + Utils.checkNotNull(previousCursor, "previousCursor"); + this.items = items; + this.limit = limit; + this.nextCursor = nextCursor; + this.previousCursor = previousCursor; + } + + public CollectionRole( + List items) { + this(items, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); + } + + /** + * A list of items returned for this request. + */ + @JsonIgnore + public List items() { + return items; + } + + /** + * The number of items for this page. + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + /** + * The cursor pointing at the next page of items. + */ + @JsonIgnore + public JsonNullable nextCursor() { + return nextCursor; + } + + /** + * The cursor pointing at the previous page of items. + */ + @JsonIgnore + public JsonNullable previousCursor() { + return previousCursor; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A list of items returned for this request. + */ + public CollectionRole withItems(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + /** + * The number of items for this page. + */ + public CollectionRole withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * The number of items for this page. + */ + public CollectionRole withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * The cursor pointing at the next page of items. + */ + public CollectionRole withNextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = JsonNullable.of(nextCursor); + return this; + } + + /** + * The cursor pointing at the next page of items. + */ + public CollectionRole withNextCursor(JsonNullable nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + /** + * The cursor pointing at the previous page of items. + */ + public CollectionRole withPreviousCursor(String previousCursor) { + Utils.checkNotNull(previousCursor, "previousCursor"); + this.previousCursor = JsonNullable.of(previousCursor); + return this; + } + + /** + * The cursor pointing at the previous page of items. + */ + public CollectionRole withPreviousCursor(JsonNullable previousCursor) { + Utils.checkNotNull(previousCursor, "previousCursor"); + this.previousCursor = previousCursor; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionRole other = (CollectionRole) o; + return + Utils.enhancedDeepEquals(this.items, other.items) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.nextCursor, other.nextCursor) && + Utils.enhancedDeepEquals(this.previousCursor, other.previousCursor); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + items, limit, nextCursor, + previousCursor); + } + + @Override + public String toString() { + return Utils.toString(CollectionRole.class, + "items", items, + "limit", limit, + "nextCursor", nextCursor, + "previousCursor", previousCursor); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List items; + + private Optional limit; + + private JsonNullable nextCursor = JsonNullable.undefined(); + + private JsonNullable previousCursor = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A list of items returned for this request. + */ + public Builder items(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + + /** + * The number of items for this page. + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The number of items for this page. + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + + /** + * The cursor pointing at the next page of items. + */ + public Builder nextCursor(String nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = JsonNullable.of(nextCursor); + return this; + } + + /** + * The cursor pointing at the next page of items. + */ + public Builder nextCursor(JsonNullable nextCursor) { + Utils.checkNotNull(nextCursor, "nextCursor"); + this.nextCursor = nextCursor; + return this; + } + + + /** + * The cursor pointing at the previous page of items. + */ + public Builder previousCursor(String previousCursor) { + Utils.checkNotNull(previousCursor, "previousCursor"); + this.previousCursor = JsonNullable.of(previousCursor); + return this; + } + + /** + * The cursor pointing at the previous page of items. + */ + public Builder previousCursor(JsonNullable previousCursor) { + Utils.checkNotNull(previousCursor, "previousCursor"); + this.previousCursor = previousCursor; + return this; + } + + public CollectionRole build() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + return new CollectionRole( + items, limit, nextCursor, + previousCursor); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "20", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java b/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java index 415f8908..67442075 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java +++ b/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java @@ -11,9 +11,15 @@ import java.lang.String; import java.util.List; - +/** + * PermissionSet + * + *

The permissions granted by a role. + */ public class PermissionSet { - + /** + * The scopes granted by this role. + */ @JsonProperty("allow") private List allow; @@ -24,6 +30,9 @@ public PermissionSet( this.allow = allow; } + /** + * The scopes granted by this role. + */ @JsonIgnore public List allow() { return allow; @@ -34,6 +43,9 @@ public static Builder builder() { } + /** + * The scopes granted by this role. + */ public PermissionSet withAllow(List allow) { Utils.checkNotNull(allow, "allow"); this.allow = allow; @@ -75,6 +87,9 @@ private Builder() { } + /** + * The scopes granted by this role. + */ public Builder allow(List allow) { Utils.checkNotNull(allow, "allow"); this.allow = allow; diff --git a/src/main/java/com/gr4vy/sdk/models/components/Role.java b/src/main/java/com/gr4vy/sdk/models/components/Role.java index f5e86ced..02fb2685 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/Role.java +++ b/src/main/java/com/gr4vy/sdk/models/components/Role.java @@ -19,16 +19,22 @@ public class Role { - + /** + * Always `role`. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") private Optional type; - + /** + * The unique ID for the role. + */ @JsonProperty("id") private String id; - + /** + * The human-readable name of the role. + */ @JsonProperty("name") private String name; @@ -38,11 +44,15 @@ public class Role { @JsonProperty("slug") private String slug; - + /** + * A description of the access this role grants. + */ @JsonProperty("description") private String description; - + /** + * The permissions granted by a role. + */ @JsonProperty("permissions") private PermissionSet permissions; @@ -93,16 +103,25 @@ public Role( this.isStandaloneAssignable = isStandaloneAssignable; } + /** + * Always `role`. + */ @JsonIgnore public Optional type() { return type; } + /** + * The unique ID for the role. + */ @JsonIgnore public String id() { return id; } + /** + * The human-readable name of the role. + */ @JsonIgnore public String name() { return name; @@ -116,11 +135,17 @@ public String slug() { return slug; } + /** + * A description of the access this role grants. + */ @JsonIgnore public String description() { return description; } + /** + * The permissions granted by a role. + */ @JsonIgnore public PermissionSet permissions() { return permissions; @@ -155,12 +180,18 @@ public static Builder builder() { } + /** + * The unique ID for the role. + */ public Role withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + /** + * The human-readable name of the role. + */ public Role withName(String name) { Utils.checkNotNull(name, "name"); this.name = name; @@ -176,12 +207,18 @@ public Role withSlug(String slug) { return this; } + /** + * A description of the access this role grants. + */ public Role withDescription(String description) { Utils.checkNotNull(description, "description"); this.description = description; return this; } + /** + * The permissions granted by a role. + */ public Role withPermissions(PermissionSet permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -282,6 +319,9 @@ private Builder() { } + /** + * The unique ID for the role. + */ public Builder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; @@ -289,6 +329,9 @@ public Builder id(String id) { } + /** + * The human-readable name of the role. + */ public Builder name(String name) { Utils.checkNotNull(name, "name"); this.name = name; @@ -306,6 +349,9 @@ public Builder slug(String slug) { } + /** + * A description of the access this role grants. + */ public Builder description(String description) { Utils.checkNotNull(description, "description"); this.description = description; @@ -313,6 +359,9 @@ public Builder description(String description) { } + /** + * The permissions granted by a role. + */ public Builder permissions(PermissionSet permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequest.java new file mode 100644 index 00000000..089b3c51 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequest.java @@ -0,0 +1,196 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.utils.LazySingletonValue; +import com.gr4vy.sdk.utils.SpeakeasyMetadata; +import com.gr4vy.sdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class ListRolesRequest { + /** + * A pointer to the page of results to return. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=cursor") + private JsonNullable cursor; + + /** + * The maximum number of items that are returned. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + @JsonCreator + public ListRolesRequest( + JsonNullable cursor, + Optional limit) { + Utils.checkNotNull(cursor, "cursor"); + Utils.checkNotNull(limit, "limit"); + this.cursor = cursor; + this.limit = limit; + } + + public ListRolesRequest() { + this(JsonNullable.undefined(), Optional.empty()); + } + + /** + * A pointer to the page of results to return. + */ + @JsonIgnore + public JsonNullable cursor() { + return cursor; + } + + /** + * The maximum number of items that are returned. + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A pointer to the page of results to return. + */ + public ListRolesRequest withCursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * A pointer to the page of results to return. + */ + public ListRolesRequest withCursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + /** + * The maximum number of items that are returned. + */ + public ListRolesRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * The maximum number of items that are returned. + */ + public ListRolesRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListRolesRequest other = (ListRolesRequest) o; + return + Utils.enhancedDeepEquals(this.cursor, other.cursor) && + Utils.enhancedDeepEquals(this.limit, other.limit); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + cursor, limit); + } + + @Override + public String toString() { + return Utils.toString(ListRolesRequest.class, + "cursor", cursor, + "limit", limit); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable cursor = JsonNullable.undefined(); + + private Optional limit; + + private Builder() { + // force use of static builder() method + } + + + /** + * A pointer to the page of results to return. + */ + public Builder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * A pointer to the page of results to return. + */ + public Builder cursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + /** + * The maximum number of items that are returned. + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * The maximum number of items that are returned. + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public ListRolesRequest build() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + return new ListRolesRequest( + cursor, limit); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "20", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequestBuilder.java new file mode 100644 index 00000000..a04a9294 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListRolesRequestBuilder.java @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import static com.gr4vy.sdk.operations.Operations.RequestOperation; +import static com.gr4vy.sdk.utils.Exceptions.unchecked; +import static com.gr4vy.sdk.utils.Utils.transform; +import static com.gr4vy.sdk.utils.Utils.toStream; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.SDKConfiguration; +import com.gr4vy.sdk.operations.ListRoles; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.LazySingletonValue; +import com.gr4vy.sdk.utils.Options; +import com.gr4vy.sdk.utils.RetryConfig; +import com.gr4vy.sdk.utils.Utils; +import com.gr4vy.sdk.utils.pagination.CursorTracker; +import com.gr4vy.sdk.utils.pagination.Paginator; +import java.io.InputStream; +import java.lang.Iterable; +import java.lang.Long; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Iterator; +import java.util.Optional; +import java.util.stream.Stream; +import org.openapitools.jackson.nullable.JsonNullable; + +public class ListRolesRequestBuilder { + + private JsonNullable cursor = JsonNullable.undefined(); + private Optional limit = Utils.readDefaultOrConstValue( + "limit", + "20", + new TypeReference>() {}); + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public ListRolesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListRolesRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + public ListRolesRequestBuilder cursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + public ListRolesRequestBuilder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.of(limit); + return this; + } + + public ListRolesRequestBuilder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public ListRolesRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public ListRolesRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private ListRolesRequest buildRequest() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + ListRolesRequest request = new ListRolesRequest(cursor, + limit); + + return request; + } + + public ListRolesResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new ListRoles.Sync(sdkConfiguration, options, _headers); + ListRolesRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Returns an iterable that performs next page calls till no more pages + * are returned. + * + *

The returned iterable can be used in a for-each loop: + *


+    * for (ListRolesResponse page : builder.callAsIterable()) {
+    *     // Process each page
+    * }
+    * 
+ * + * @return An iterable that can be used to iterate through all pages + */ + public Iterable callAsIterable() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new ListRoles.Sync(sdkConfiguration, options, _headers); + ListRolesRequest request = buildRequest(); + Iterator> iterator = new Paginator<>( + request, + new CursorTracker<>("$.next_cursor", String.class), + (req, pos) -> { + var modifiedReq = pos == null ? req : req.withCursor(pos); + return unchecked(() -> operation.doRequest(modifiedReq)).get(); + }); + + return () -> transform(iterator, operation::handleResponse); + } + + /** + * Returns a stream that performs next page calls till no more pages + * are returned. + **/ + public Stream callAsStream() { + return toStream(callAsIterable()); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "20", + new TypeReference>() {}); +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListRolesResponse.java b/src/main/java/com/gr4vy/sdk/models/operations/ListRolesResponse.java new file mode 100644 index 00000000..bb8d217c --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/ListRolesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.gr4vy.sdk.models.components.CollectionRole; +import com.gr4vy.sdk.utils.Response; +import com.gr4vy.sdk.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 ListRolesResponse 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 collectionRole; + + @JsonCreator + public ListRolesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional collectionRole) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(collectionRole, "collectionRole"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.collectionRole = collectionRole; + } + + public ListRolesResponse( + 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 collectionRole() { + return (Optional) collectionRole; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListRolesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListRolesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListRolesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful Response + */ + public ListRolesResponse withCollectionRole(CollectionRole collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = Optional.ofNullable(collectionRole); + return this; + } + + + /** + * Successful Response + */ + public ListRolesResponse withCollectionRole(Optional collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = collectionRole; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListRolesResponse other = (ListRolesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.collectionRole, other.collectionRole); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + collectionRole); + } + + @Override + public String toString() { + return Utils.toString(ListRolesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "collectionRole", collectionRole); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional collectionRole = 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 collectionRole(CollectionRole collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = Optional.ofNullable(collectionRole); + return this; + } + + /** + * Successful Response + */ + public Builder collectionRole(Optional collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = collectionRole; + return this; + } + + public ListRolesResponse build() { + + return new ListRolesResponse( + contentType, statusCode, rawResponse, + collectionRole); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesRequestBuilder.java new file mode 100644 index 00000000..98ec48da --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesRequestBuilder.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations.async; + +import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; +import static com.gr4vy.sdk.utils.reactive.ReactiveUtils.mapAsync; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.SDKConfiguration; +import com.gr4vy.sdk.models.operations.ListRolesRequest; +import com.gr4vy.sdk.operations.ListRoles; +import com.gr4vy.sdk.utils.Blob; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.LazySingletonValue; +import com.gr4vy.sdk.utils.Options; +import com.gr4vy.sdk.utils.RetryConfig; +import com.gr4vy.sdk.utils.Utils; +import com.gr4vy.sdk.utils.pagination.AsyncPaginator; +import com.gr4vy.sdk.utils.pagination.CursorTracker; +import java.lang.Long; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Flow; +import org.openapitools.jackson.nullable.JsonNullable; +import org.reactivestreams.FlowAdapters; +import org.reactivestreams.Publisher; + +public class ListRolesRequestBuilder { + + private JsonNullable cursor = JsonNullable.undefined(); + private Optional limit = Utils.readDefaultOrConstValue( + "limit", + "20", + new TypeReference>() {}); + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public ListRolesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListRolesRequestBuilder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + public ListRolesRequestBuilder cursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + public ListRolesRequestBuilder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.of(limit); + return this; + } + + public ListRolesRequestBuilder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public ListRolesRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public ListRolesRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private ListRolesRequest buildRequest() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + ListRolesRequest request = new ListRolesRequest(cursor, + limit); + + return request; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new ListRoles.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + ListRolesRequest request = buildRequest(); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** + * Returns a Publisher that performs next page calls till no more pages + * are returned. + * + *

The returned publisher can be used with reactive frameworks: + *


+     * Publisher<ListRolesResponse> publisher = builder.callAsPublisher();
+     * publisher.subscribe(new Subscriber<ListRolesResponse>() {
+     *     // Handle onNext, onError, onComplete
+     * });
+     * 
+ * + * @return A Publisher that emits pages asynchronously + */ + public Publisher callAsPublisher() { + ListRolesRequest request = this.buildRequest(); + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new ListRoles.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + Flow.Publisher> asyncPaginator = new AsyncPaginator<>( + request, + new CursorTracker<>("$.next_cursor", String.class), + (req, pos) -> { + var modifiedReq = pos == null ? req : req.withCursor(pos); + return operation.doRequest(modifiedReq); + }); + + Flow.Publisher flowPublisher = mapAsync(asyncPaginator, operation::handleResponse); + + // Convert Flow.Publisher to Reactive Streams Publisher at the last stage + return FlowAdapters.toPublisher(flowPublisher); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "20", + new TypeReference>() {}); +} diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesResponse.java b/src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesResponse.java new file mode 100644 index 00000000..9f648437 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/models/operations/async/ListRolesResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.models.operations.async; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.gr4vy.sdk.models.components.CollectionRole; +import com.gr4vy.sdk.utils.AsyncResponse; +import com.gr4vy.sdk.utils.Blob; +import com.gr4vy.sdk.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 ListRolesResponse 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 collectionRole; + + @JsonCreator + public ListRolesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional collectionRole) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(collectionRole, "collectionRole"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.collectionRole = collectionRole; + } + + public ListRolesResponse( + 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 collectionRole() { + return (Optional) collectionRole; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListRolesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListRolesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListRolesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Successful Response + */ + public ListRolesResponse withCollectionRole(CollectionRole collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = Optional.ofNullable(collectionRole); + return this; + } + + + /** + * Successful Response + */ + public ListRolesResponse withCollectionRole(Optional collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = collectionRole; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListRolesResponse other = (ListRolesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.collectionRole, other.collectionRole); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + collectionRole); + } + + @Override + public String toString() { + return Utils.toString(ListRolesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "collectionRole", collectionRole); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional collectionRole = 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 collectionRole(CollectionRole collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = Optional.ofNullable(collectionRole); + return this; + } + + /** + * Successful Response + */ + public Builder collectionRole(Optional collectionRole) { + Utils.checkNotNull(collectionRole, "collectionRole"); + this.collectionRole = collectionRole; + return this; + } + + public ListRolesResponse build() { + + return new ListRolesResponse( + contentType, statusCode, rawResponse, + collectionRole); + } + + } +} diff --git a/src/main/java/com/gr4vy/sdk/operations/ListRoles.java b/src/main/java/com/gr4vy/sdk/operations/ListRoles.java new file mode 100644 index 00000000..03278605 --- /dev/null +++ b/src/main/java/com/gr4vy/sdk/operations/ListRoles.java @@ -0,0 +1,490 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.gr4vy.sdk.operations; + +import static com.gr4vy.sdk.operations.Operations.RequestOperation; +import static com.gr4vy.sdk.utils.Exceptions.unchecked; +import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.gr4vy.sdk.SDKConfiguration; +import com.gr4vy.sdk.SecuritySource; +import com.gr4vy.sdk.models.components.CollectionRole; +import com.gr4vy.sdk.models.errors.APIException; +import com.gr4vy.sdk.models.errors.Error400; +import com.gr4vy.sdk.models.errors.Error401; +import com.gr4vy.sdk.models.errors.Error403; +import com.gr4vy.sdk.models.errors.Error404; +import com.gr4vy.sdk.models.errors.Error405; +import com.gr4vy.sdk.models.errors.Error409; +import com.gr4vy.sdk.models.errors.Error425; +import com.gr4vy.sdk.models.errors.Error429; +import com.gr4vy.sdk.models.errors.Error500; +import com.gr4vy.sdk.models.errors.Error502; +import com.gr4vy.sdk.models.errors.Error504; +import com.gr4vy.sdk.models.errors.HTTPValidationError; +import com.gr4vy.sdk.models.operations.ListRolesRequest; +import com.gr4vy.sdk.models.operations.ListRolesResponse; +import com.gr4vy.sdk.utils.AsyncRetries; +import com.gr4vy.sdk.utils.BackoffStrategy; +import com.gr4vy.sdk.utils.Blob; +import com.gr4vy.sdk.utils.HTTPClient; +import com.gr4vy.sdk.utils.HTTPRequest; +import com.gr4vy.sdk.utils.Headers; +import com.gr4vy.sdk.utils.Hook.AfterErrorContextImpl; +import com.gr4vy.sdk.utils.Hook.AfterSuccessContextImpl; +import com.gr4vy.sdk.utils.Hook.BeforeRequestContextImpl; +import com.gr4vy.sdk.utils.NonRetryableException; +import com.gr4vy.sdk.utils.Options; +import com.gr4vy.sdk.utils.Retries; +import com.gr4vy.sdk.utils.RetryConfig; +import com.gr4vy.sdk.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.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class ListRoles { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = Utils.templateUrl( + this.sdkConfiguration.serverUrl(), this.sdkConfiguration.getServerVariableDefaults()); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("5XX"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(200, TimeUnit.MILLISECONDS) + .maxInterval(200, TimeUnit.MILLISECONDS) + .baseFactor((double) (1)) + .maxElapsedTime(1000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "list_roles", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "list_roles", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "list_roles", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/roles"); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(ListRolesRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListRolesRequest.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(ListRolesRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public ListRolesResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListRolesResponse.Builder resBuilder = + ListRolesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListRolesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withCollectionRole(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error400.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error401.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "403")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error403.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error404.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error405.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error409.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw HTTPValidationError.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "425")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error425.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error429.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 Error500.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "502")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error502.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "504")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw Error504.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 { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(ListRolesRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListRolesRequest.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(ListRolesRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.gr4vy.sdk.models.operations.async.ListRolesResponse.Builder resBuilder = + com.gr4vy.sdk.models.operations.async.ListRolesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.gr4vy.sdk.models.operations.async.ListRolesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withCollectionRole); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error400.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error401.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "403")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error403.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error404.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "405")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error405.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error409.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return HTTPValidationError.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "425")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error425.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error429.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 Error500.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "502")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error502.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "504")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Error504.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} From b4eb443cc8c5965ff65704386236e7dbf83a9650 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 08:16:53 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow