diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f83b91aa..f9101e5e 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,27 +1,27 @@ lockVersion: 2.0.0 id: 1d22a5a4-8bac-42e3-b164-121fcacf66c9 management: - docChecksum: 981b09fde7b2fe79effa56242ae443b7 + docChecksum: 84509b5bda29b596b859ce8cf71e54ce docVersion: "2025-11-10" - speakeasyVersion: 1.761.9 - generationVersion: 2.881.4 - releaseVersion: 4.1.5 - configChecksum: 8bc4434ccbac1ba85c00b5f9d501f8b3 + speakeasyVersion: 1.776.0 + generationVersion: 2.900.1 + releaseVersion: 4.1.6 + configChecksum: 01406de97492ddaf5290f9e62b24d5e1 repoURL: https://github.com/clerk/clerk-sdk-java.git installationURL: https://github.com/clerk/clerk-sdk-java published: true persistentEdits: - generation_id: d7d41f25-8718-4437-b425-89b9e2580854 - pristine_commit_hash: cfdd3a1032024a386753c80e4a4bf38d46c8fc60 - pristine_tree_hash: 50c3fc1e1891864bc5fb8f740826272b55646331 + generation_id: 61273a09-6f14-4c39-b024-6c300844802f + pristine_commit_hash: 473dc76c8554b3ea7b1ff7f2a45622b564120f45 + pristine_tree_hash: 62f32e5671b870dcc9cf5e61dc752660846dc39a features: java: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.3 - core: 3.55.23 + core: 3.55.27 deprecations: 2.81.2 - examples: 2.81.8 + examples: 2.81.9 flattening: 2.81.1 globalSecurity: 2.83.4 globalSecurityCallbacks: 0.1.0 @@ -33,7 +33,7 @@ features: openEnums: 0.2.0 retries: 0.1.2 sdkHooks: 1.2.0 - unions: 0.3.5 + unions: 0.3.6 uploadStreams: 0.1.0 trackedFiles: .gitattributes: @@ -46,8 +46,8 @@ trackedFiles: pristine_git_object: c65a59abd80434416e18fa5b07cf3dd862084707 build.gradle: id: f07866736216 - last_write_checksum: sha1:6fcd8e510f56e828274d796962af921331ee2496 - pristine_git_object: 633c7cd07ae35b55fee4eec19adf873a000b1c0c + last_write_checksum: sha1:bee48c56b269a6263de35b65e4f174c02a8173bb + pristine_git_object: 935a9133a2007076cd1cdb995baf4836e31d4a5e docs/models/components/Action.md: id: 45f4a6205564 last_write_checksum: sha1:1977fb29d97627637e448369882559ba5a35cfba @@ -80,6 +80,10 @@ trackedFiles: id: 68a270cf68d3 last_write_checksum: sha1:201ab8beaf9e62a6d2e17ce756a0ec236ee6b660 pristine_git_object: ec2cc16c3c85ab98f629be3e28d5236c1b477d64 + docs/models/components/AffiliationVerification.md: + id: 8b33a80c316e + last_write_checksum: sha1:5a4e018dfcdedbb851a20ccf7f9cf368cef9b1cd + pristine_git_object: 995e61ff54b8c3d55fbc4b1a494b4a235372ba6a docs/models/components/AgentTask.md: id: 6a030784464e last_write_checksum: sha1:0afd25766e607746f4b8b138a3686253e45fbea8 @@ -120,6 +124,10 @@ trackedFiles: id: 755c7c68aa9f last_write_checksum: sha1:a5dc58c88b416189570e8c9f0dede5d478148548 pristine_git_object: 1a681031cc6d71f23ae93174eab951bfa44e34bb + docs/models/components/BillingPaymentAttemptDiscounts.md: + id: d81956871688 + last_write_checksum: sha1:fa9eafa2dded5d4f6e6c7858106180c28c571bd2 + pristine_git_object: 9100febb6d16658a5d3283ec7b85b41cebbdaad0 docs/models/components/BillingPaymentAttemptObject.md: id: 4465dea1dfd5 last_write_checksum: sha1:18126211fdddad36fa7e830b790d0a74d4f215c1 @@ -138,12 +146,16 @@ trackedFiles: pristine_git_object: d65d53b9b4a545c92bd6ff3dd216242ef4cf1269 docs/models/components/BillingPaymentAttemptTotals.md: id: 1227166e63a2 - last_write_checksum: sha1:f138fb34e5e8669654df4550992a7612db93368f - pristine_git_object: 2960aaac4683ce8473bda7ca2d31245364bf8777 + last_write_checksum: sha1:9eecd27caca78cc02bce6620bc19794d1812bee2 + pristine_git_object: 4403221e97ca97433b206941c2f699a116b2b0a2 + docs/models/components/BillingPaymentAttemptTotalsProration.md: + id: be9af5574891 + last_write_checksum: sha1:46e3ab6c30cb9e1893dd9f3f5e7ac806b8802e90 + pristine_git_object: 2bcb0056763d6851670b941ac4c3db7822a22db6 docs/models/components/BillingPriceResponse.md: id: 50322a7d8778 - last_write_checksum: sha1:645eee171c7c4a6fc179d56061e48189583ce474 - pristine_git_object: 8d35b358a7c5000467839d45fa3d17039615479f + last_write_checksum: sha1:42b92fbf4f92306eca9809ad7f538afacd3bb3da + pristine_git_object: c775eb46414f776c42c473f38bd9e4386ec34c64 docs/models/components/BillingPriceResponseAnnualMonthlyFee.md: id: 5f7fcc0793d5 last_write_checksum: sha1:dd0f5f764798c6c76c6eab7bbf2678f05ad68e5b @@ -266,12 +278,12 @@ trackedFiles: pristine_git_object: 2c0492c720a4ba52f0cd2de5d1dfcfead1c9b18f docs/models/components/CommercePerUnitTotal.md: id: 327390e5a5b2 - last_write_checksum: sha1:a18406ee44734e15ae5440486ef9906d074618f6 - pristine_git_object: ea913764c030bf2a937bfc24fe2772dc8016cb2d + last_write_checksum: sha1:ffa14fbd900dac4850e2d3df78d81c96996bdf92 + pristine_git_object: 728a45aefa47d7b497c4b47278d29e38b602aeb2 docs/models/components/CommercePerUnitTotalTier.md: id: dfd499f2e617 - last_write_checksum: sha1:61e0a3586d51e73a24d5691eb72698b130e6d005 - pristine_git_object: 1cbe629055f1a924327fab84a13832b0779cf9c4 + last_write_checksum: sha1:cce574be27bada945c35c93bf4b23c819128f442 + pristine_git_object: cc883ca746c521d825b8db3f508ac6e294f2789a docs/models/components/CommercePlan.md: id: a48295712140 last_write_checksum: sha1:8fcd3cb604477af0e1feaed1082f6bb3001b2685 @@ -314,8 +326,8 @@ trackedFiles: pristine_git_object: ef6be87bcc549b50047e8fb1a0ded604befeaebf docs/models/components/CommerceSubscriptionItemAmount.md: id: b67f1afb00de - last_write_checksum: sha1:06ff21d1b5b593f74d70e68dce148f4882608f5d - pristine_git_object: 468a8f0aa516a96cd66cbf5534b2a64d04f5dbbe + last_write_checksum: sha1:829d17d6adcbffe8a294a02b9eb70d42f8be8635 + pristine_git_object: c4fd99fc62e479df60ec92cfd36980fdd32d8478 docs/models/components/CommerceSubscriptionItemAnnualFee.md: id: 20fad8db1ccf last_write_checksum: sha1:ad1c92ead1796885bdf9b53caf4b2aff65ed3592 @@ -328,10 +340,30 @@ trackedFiles: id: 698fad355b2e last_write_checksum: sha1:53f150573e29af3bbd9c5422f0665e5f4adc1906 pristine_git_object: 2a72dd5c8a20f3f94235004c784432ec193dd6bf + docs/models/components/CommerceSubscriptionItemDiscounts.md: + id: 916690b97f32 + last_write_checksum: sha1:df98e2978766b5ed7e9ef391b2853ed98f02e468 + pristine_git_object: 2f7d1c8f0b3e33eb2364d673c2b1280b76afa525 docs/models/components/CommerceSubscriptionItemFee.md: id: 1db967a9496f last_write_checksum: sha1:1d68c652ed04f599642e43d379554b6d79e99362 pristine_git_object: 5f4bbb68fcbb6cd8a5504f826f26cb137cf40eb8 + docs/models/components/CommerceSubscriptionItemNextPaymentCredits.md: + id: 8a513f58b463 + last_write_checksum: sha1:0da8a4950d49ed5c5fbc51ace38cdecda32e99c8 + pristine_git_object: 9894df0b74aa3e81b3de45efa001b506b0e1bdc5 + docs/models/components/CommerceSubscriptionItemNextPaymentPayer.md: + id: 23048de669c0 + last_write_checksum: sha1:0b0a9f325bd153b2e265e3a45bd8c92064c962ed + pristine_git_object: 76ef2ecefdf99cc598399721eb4ffe31fa7328d0 + docs/models/components/CommerceSubscriptionItemNextPaymentProration.md: + id: cde4ca71147f + last_write_checksum: sha1:eb8915dede0e4fb0eb120887d5535062b77b2acb + pristine_git_object: b573b8e3e299ffe85663cdf9818c8bd0c70d91fe + docs/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.md: + id: 2dc60304cf2b + last_write_checksum: sha1:6c18878fdcab660e1f73dc9788b2de77762f4942 + pristine_git_object: 847052beeb344089a2ff2c5f6d2676d748d98a53 docs/models/components/CommerceSubscriptionItemObject.md: id: 2dcab99d023f last_write_checksum: sha1:64b0710ccd049bd1ccf80bdb3c4be945700f889e @@ -352,14 +384,46 @@ trackedFiles: id: 8b7adff5f482 last_write_checksum: sha1:049c03714628d5a23532dd94ff5a537862656d09 pristine_git_object: f9cf0ab44c7e06731613168f603950def47608be + docs/models/components/CommerceSubscriptionItemTotals.md: + id: 2bc80e722063 + last_write_checksum: sha1:c32e83b36d46d04a65853b7450ce5101790c8768 + pristine_git_object: 5422bc5785991bded1a8bc3e8bde7d8233b26e96 docs/models/components/CommerceSubscriptionItemTotalsPayer.md: id: 1a0eb9ec0984 last_write_checksum: sha1:52ac2b1b6342744070e5047b505d5f885153f4b3 pristine_git_object: 8f4626cb07d6ff1d2c175045d0ed42ba92b5c7f7 + docs/models/components/CommerceSubscriptionItemTotalsProration.md: + id: 2b639ee8b851 + last_write_checksum: sha1:2c0e8bebb1fb26291957ec3b19889b59c95d3ed5 + pristine_git_object: 487ae1f4a8a27ebcc4942a48be291c09be04fe93 docs/models/components/CommerceSubscriptionNextPayment.md: id: b1a4acb11434 - last_write_checksum: sha1:1ece85e8d216af6ced2a6cdd70ed4c9a5dac05f4 - pristine_git_object: 3f0d5f25304cb997e3b52eebe682cfb1e9cb9251 + last_write_checksum: sha1:6c9f1d2d6bbcdddfb1ad982aee46dd2b943015e1 + pristine_git_object: f1ce0c22439745b47a0ff94fdf31a093da55a7e4 + docs/models/components/CommerceSubscriptionNextPaymentCredits.md: + id: 20578a14d2d0 + last_write_checksum: sha1:03ad289897409736cf718b712015e96498310ead + pristine_git_object: 1457556968140cad1f63976ed4809679a7fef172 + docs/models/components/CommerceSubscriptionNextPaymentDiscounts.md: + id: 619642e2b59d + last_write_checksum: sha1:6fa1b72fe398f01b662b3674229a7657a48fc1eb + pristine_git_object: 2f9001797c2118d9bd2911bbb8c8739d6c69ad42 + docs/models/components/CommerceSubscriptionNextPaymentPayer.md: + id: 02fc322ef245 + last_write_checksum: sha1:5c86e5c78336316090c3c51bf4df5caab06f3b2f + pristine_git_object: 9916104c94347d0181d936a4289f181d25d5594e + docs/models/components/CommerceSubscriptionNextPaymentProration.md: + id: ba7fca79b91d + last_write_checksum: sha1:968c99771499e5c2afb74b7b74474133215013c8 + pristine_git_object: 439d262bd3a88e68b7918648b65eca3e7d32ce58 + docs/models/components/CommerceSubscriptionNextPaymentTotals.md: + id: 733b333ff87a + last_write_checksum: sha1:39fe89637ebf875f947b29b55de1dfbac497fca7 + pristine_git_object: dad851c1e5acd3d3e70918527600cc0abd8f638d + docs/models/components/CommerceSubscriptionNextPaymentTotalsProration.md: + id: 838d7b416f53 + last_write_checksum: sha1:c56ce2f116931f3d67dade315aa1bc30686267f3 + pristine_git_object: d340a7c0f32d21507080557d4bcf5fad5881fd45 docs/models/components/CommerceSubscriptionObject.md: id: 6a6cad399e09 last_write_checksum: sha1:03f396074211f62858223b2f3aecc4e5ee3b5c53 @@ -368,6 +432,10 @@ trackedFiles: id: d6e5c93526a9 last_write_checksum: sha1:66b68fccd028e002947450ba339724189db62e21 pristine_git_object: 64b8c8b79e8d44b27be7af5d68d2445711a773d4 + docs/models/components/ConnectionType.md: + id: 43560d09a427 + last_write_checksum: sha1:11f3ac1532e62bc4c804466ae5e7a0acc3468ae3 + pristine_git_object: fa3e0a28cbfe743c40b0028a4ad2d43872f0536b docs/models/components/Cookies.md: id: fc4e680316cb last_write_checksum: sha1:08ec3f5da350ed9aefb056fa464d77ec14f8de72 @@ -378,8 +446,12 @@ trackedFiles: pristine_git_object: 480543fcb9c5e18d4a4f6cf97c3a7058cae1d0ef docs/models/components/CreateBillingPriceRequest.md: id: b0a52e1238e7 - last_write_checksum: sha1:9fdcf5434e36e2f905c0bbaf99f306aadc59cf83 - pristine_git_object: d2e497da926d1c3293b2041192085352eae0e688 + last_write_checksum: sha1:d120e96aaca343ff280561e09fde6b4c3fe50d0e + pristine_git_object: b00896c7ab90fb4a7d965a8600bea4bef34b11f0 + docs/models/components/CreateBillingPriceRequestSupportedBillingPeriods.md: + id: ba9a750ca684 + last_write_checksum: sha1:9ce8e9b3b401e2243c427fe075062d26f6f6da8f + pristine_git_object: e5cc1fc8c6438bc4070a8b242ed7f2afde247e89 docs/models/components/CreatorRole.md: id: 87205b1846c3 last_write_checksum: sha1:c661ec02b8f2c6e5f5f0a5e85a3fbc0d8c0e63a0 @@ -394,8 +466,8 @@ trackedFiles: pristine_git_object: c4515e4e2e8fafc4a9248e5f6b99700ae6088c01 docs/models/components/CustomAttributes.md: id: 4f2fbd9f4faa - last_write_checksum: sha1:413f36175436f58d79edc48f089f002f16314300 - pristine_git_object: 97686af7d8740081b101208c755a9eb539f0a659 + last_write_checksum: sha1:f6c1bb4d28c0a2d9ae1183a40a1e483fa8234f8f + pristine_git_object: 952a97f134cbf9c088c3aa7d479941600ca6cae5 docs/models/components/DefaultRole.md: id: be3c00337ff3 last_write_checksum: sha1:cf3f81b8040b3b0760aece31426d1fb678b2779b @@ -404,6 +476,10 @@ trackedFiles: id: fb565a752242 last_write_checksum: sha1:3514752aac09e9334bc2d3605ac9d7d1bca92778 pristine_git_object: e599c09561bebe2f347cd7d077b38076d82a02c8 + docs/models/components/Discounts.md: + id: 4374e7fb7e0d + last_write_checksum: sha1:20ed38c7928828295aad599e191dc8777e1b94da + pristine_git_object: ed035ff66cf5851cefa36847082d359f43375063 docs/models/components/Domain.md: id: 066bd2720e91 last_write_checksum: sha1:81ac8b6a33c0d0b9517a87f9add111241e77ef37 @@ -476,6 +552,22 @@ trackedFiles: id: f409e82a9932 last_write_checksum: sha1:f95183898fcaa1f1726c66889abfceb033b68eff pristine_git_object: a3f39215dfa25eb34a3a8de92824db2c8f48a861 + docs/models/components/EnterpriseConnectionTestRun.md: + id: 0ed8395614a8 + last_write_checksum: sha1:b82fda57a3fc81ae38708b0f5cefa776a94a12f5 + pristine_git_object: 4954f32dd69a4b5efff6f82f59777b959e94866a + docs/models/components/EnterpriseConnectionTestRunResponse.md: + id: 7819150f2d65 + last_write_checksum: sha1:8145f9f70c6c8f8b2c46b3579b58b05cc431aeea + pristine_git_object: 58eb0b2671fac1eef91e65db98ee617e596f2d7a + docs/models/components/EnterpriseConnectionTestRunStatus.md: + id: 569119a899f3 + last_write_checksum: sha1:25d9bc893952b770f1f9964bad5bfa3194367133 + pristine_git_object: d4c76ddf7878ab2a55a717b92598c84d616be396 + docs/models/components/EnterpriseConnectionTestRuns.md: + id: ed277ec12743 + last_write_checksum: sha1:b88e2496c0c7941cbef46d73540a90938a17b2b7 + pristine_git_object: 27c4b327a99db81986a5ee481077e2ca3861d556 docs/models/components/EnterpriseConnections.md: id: 94aca8bbadd1 last_write_checksum: sha1:3223ef17da1855ebf66f2561ccecdcf1833d9376 @@ -552,6 +644,14 @@ trackedFiles: id: f86f8a3b26be last_write_checksum: sha1:ed26965915d3b0387b7ef70cd404e192718327df pristine_git_object: c0940739ec5ab3ca0b794369de43170c34245e67 + docs/models/components/InstanceCommunication.md: + id: ae2fcd0b0421 + last_write_checksum: sha1:90887cc51da342698824535ac2aafccbc26107dd + pristine_git_object: cba4bb031888445562608683bcc4229d380148d1 + docs/models/components/InstanceCommunicationObject.md: + id: 9a7dab693847 + last_write_checksum: sha1:5f7611d6960dc8f4684ad5d2c103dccd83b03ff3 + pristine_git_object: feae6d066310a81c40da827fe28402f6e20ced86 docs/models/components/InstanceObject.md: id: de94cef74ac2 last_write_checksum: sha1:59c220d9ce7e60e7ce2d27dc816c7f60d90d3f81 @@ -624,6 +724,10 @@ trackedFiles: id: d9512dfe3805 last_write_checksum: sha1:f5cd8f8400d64825c0cec4a64cd69c3a347615e8 pristine_git_object: 1e76d2d610444f47cfc26a5403f5dd2c63f5af46 + docs/models/components/Logs.md: + id: 1137e410fc02 + last_write_checksum: sha1:0f658469973b3b0917b6689b185e04deda1554eb + pristine_git_object: 50d3aa4a7003b1abb9e93dde21f4704a573edf04 docs/models/components/Machine.md: id: 352c70329721 last_write_checksum: sha1:2ca525c26e7148c598d83f2b4a5e15c1f0ce4b82 @@ -694,12 +798,12 @@ trackedFiles: pristine_git_object: 44967dcf22e8db5e770d39862de814e862ec4f9a docs/models/components/NextInvoice.md: id: b4ae679a9b6c - last_write_checksum: sha1:f89f0c55add96a3d8be78f53982a0f64590132e7 - pristine_git_object: 44ce4e22264ae8d20d65182152433c2c8c8c5954 + last_write_checksum: sha1:778c4fa295c0ef0eded4d6a45f14fec41aa02cd9 + pristine_git_object: 1afdbee4f022241d78c488fdbd0e1d8a5e572486 docs/models/components/NextPayment.md: id: 1e2fd926524a - last_write_checksum: sha1:10604c8174883cd86962749de6dc32504a74b00f - pristine_git_object: beeef7ec32daaf2be87ced694ef54d1681a78f7f + last_write_checksum: sha1:dc34357c263121a840cfabf296cc5b3c7602cdb9 + pristine_git_object: e643e64ccf905068ed17760122a5392e0c19de70 docs/models/components/Nonce.md: id: b7a27fd2a287 last_write_checksum: sha1:54a17efb3698067b2d79711f233ea4abd7a4e595 @@ -742,12 +846,12 @@ trackedFiles: pristine_git_object: 18b9259a79ff4dcb5769a42e007299b7b692221f docs/models/components/Oauth.md: id: ebc9c63488e5 - last_write_checksum: sha1:e122a0a593d07d66d14c42e94e26b02c192ead7c - pristine_git_object: fc9a4f20ead259d9bdfd2571c700d73922c6adaa + last_write_checksum: sha1:08279aa4314b1034c76147352fbce22ad878cd99 + pristine_git_object: 327df6fd962cf937dadc5e546eec4a73552c1860 docs/models/components/OauthConfig.md: id: 7f06dd2c127c - last_write_checksum: sha1:271151e99d6e73d47efb02a63f61f6434ff32157 - pristine_git_object: cd78c4bd22d8450d3962e912dd3f4f1d7af4d81f + last_write_checksum: sha1:8e68a5780387bc70466c0690ac648da08ed70689 + pristine_git_object: 32114f8b98e339ad7b01ddb3fa1b00c2d882c186 docs/models/components/Object.md: id: 664819da5a69 last_write_checksum: sha1:a0e5f161012608cc440979fcb370ddf62032e6af @@ -762,20 +866,16 @@ trackedFiles: pristine_git_object: 4e16d47277e85cfdf46b918457a3aa61acfca42e docs/models/components/OrganizationDomain.md: id: e6e39f422211 - last_write_checksum: sha1:30972b1f19db509ef8a88719e5094e981ee6b08f - pristine_git_object: 89305d4c0a6ce209293e1748cdf8e2c9393e48db + last_write_checksum: sha1:977233e9c2f7ebfa30f7db21476f13684c3bcbc8 + pristine_git_object: f3ba1ca70aaebb9295f2d0e4ecd22ba358faf66c docs/models/components/OrganizationDomainObject.md: id: f1c36eb333ec last_write_checksum: sha1:620e96991065a6148084ac35a990c0daeab69033 pristine_git_object: 49727395f7b290ee3ed3bebe3c6c5614b5ba6953 - docs/models/components/OrganizationDomainStatus.md: - id: 48ca81c0a68a - last_write_checksum: sha1:3cb1400e24b3c11a10b8522cd4eed78fefc5e317 - pristine_git_object: f1a882bba1450d636749dded7ec9a52151ed8977 docs/models/components/OrganizationDomainVerification.md: id: bf6e9219cf37 - last_write_checksum: sha1:a2b9d101e9498e7805a614188fea01f15f0f9264 - pristine_git_object: 3bb37b75bd9848277fbbb8b122ef9433b48b59e9 + last_write_checksum: sha1:31c787a23697701b791b4544e6150c2d123182fc + pristine_git_object: e59d1d282330f75f8bddd12941d32d9b763398b0 docs/models/components/OrganizationDomains.md: id: 7022ec89ad3a last_write_checksum: sha1:42b60baff92fbc78de98c0d19d929495a4b013aa @@ -862,8 +962,12 @@ trackedFiles: pristine_git_object: c8108bd909f0756f54bff3fee4a3e1b5feb5ff66 docs/models/components/Otp.md: id: 3ff6443429e8 - last_write_checksum: sha1:0d139258a9e1e51eaac02846b5a41a5ad7237fa6 - pristine_git_object: 7c23e1469daacc9669ede91cd3ad2a69a001f413 + last_write_checksum: sha1:571f1be8ad082d05a609d8e6179226e2b4f6531e + pristine_git_object: c88c96164eebcc4dcf752a6af905e2a67cba03ee + docs/models/components/OwnershipVerification.md: + id: c1a1cf96df3d + last_write_checksum: sha1:57f90b32f3beda1ab38416c39ce17522b7e18943 + pristine_git_object: bef63c85e165ab8b9d5f925f817e03e843b5cdf0 docs/models/components/PaginatedBillingPaymentAttemptResponse.md: id: 199b764757ee last_write_checksum: sha1:848c5ed4abdc3d814fc984c6744c73c18f996cfa @@ -884,6 +988,10 @@ trackedFiles: id: bc444ca9e6ba last_write_checksum: sha1:24701d5a8192f691cc710a793843a434e337a98a pristine_git_object: 1ba06217cf7af62c06422fbbff06ffeb30b86d43 + docs/models/components/ParsedUserInfo.md: + id: 35e3a83ee640 + last_write_checksum: sha1:7cee90ddb806e2f58012674c7886f5c3fa8fce30 + pristine_git_object: 67c17f1f2110ea9613f6c4257199394d18715469 docs/models/components/Passkey.md: id: aa7fb6111745 last_write_checksum: sha1:6d5e1b0a0ae6f9d22374b118b2c8e866bffbbf9e @@ -1082,8 +1190,16 @@ trackedFiles: pristine_git_object: e7255db1f7784cb6f843bd508360a0608079fb99 docs/models/components/Saml.md: id: b76d2a069b63 - last_write_checksum: sha1:acc3f36f57ce42582f3cf9be8f597cf34fe19b46 - pristine_git_object: 2723315a655c1942a2e2d3351c246bcc3473b987 + last_write_checksum: sha1:7967b6bd931507e9b4e8d5052013e28deee80252 + pristine_git_object: 0b1a091b76d4e18dec28d4f419998aa74d896d28 + docs/models/components/SchemasCommercePerUnitTotal.md: + id: 802aab43b562 + last_write_checksum: sha1:111679d351d32d98af5ed0cdf21cc3f0999e29cf + pristine_git_object: aeedba3f4a744b0feb6efb039406e0fd8dfb54cb + docs/models/components/SchemasCommercePerUnitTotalTier.md: + id: 057c7ccfc26c + last_write_checksum: sha1:c42683d4fbe92dbc14beb3487a52cefc0303b7ed + pristine_git_object: d22814a8d2a5a2dec7d84ce2e9ad35780283c418 docs/models/components/SchemasCommercePlan.md: id: bbcb2e134990 last_write_checksum: sha1:2e2b9969405082451fb74f21869893f866c68fd5 @@ -1124,26 +1240,66 @@ trackedFiles: id: 1679727584d0 last_write_checksum: sha1:669dec7ea71ddc701090101491f7bfcbfeafbd98 pristine_git_object: 636d3916c3e372c8ff7ae62baa6b5599ce328047 + docs/models/components/SchemasCommerceSubscriptionItemCredits.md: + id: 73e51a37a8c5 + last_write_checksum: sha1:ef09f6a307bf7161394a3146562a7446f806ea44 + pristine_git_object: 6dbebdd59db454ac3e21a3926ab29fdfd8202987 + docs/models/components/SchemasCommerceSubscriptionItemDiscounts.md: + id: f844ea212382 + last_write_checksum: sha1:c91b49fc00d93535a514a6e132f32d04c1b5e820 + pristine_git_object: 4274f4e1af831cc1d5334bd985c369670919caa3 docs/models/components/SchemasCommerceSubscriptionItemFee.md: id: 966bddbf6948 last_write_checksum: sha1:bc9276482847f1bd8ad7eff5a6e3a3ef74a851ba pristine_git_object: 1361b4b8a87cfae82f88acde05545315e498a4fb docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md: id: 046171435d7c - last_write_checksum: sha1:f6b8d95c0929395f1d88eea8d9811da47e14a603 - pristine_git_object: 85c7c6c54112d7f7c7f98d05b768e3fa0e3d4c9f + last_write_checksum: sha1:78901897d878dd6bb058ef789b0aa5143c8c8b74 + pristine_git_object: b92414eac7f9e221a2bf0a06e814cd503bba5877 + docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.md: + id: 1fd92d3a6a83 + last_write_checksum: sha1:248afc2ccb6befe87f6047d131e211ac015e1075 + pristine_git_object: 445e67be74e377851caa29755b697e47a9fa1d39 docs/models/components/SchemasCommerceSubscriptionItemNextPayment.md: id: d8792a4dfacc - last_write_checksum: sha1:c942c3315c804bcf98fcb4d25450910faf2ce814 - pristine_git_object: f435de476ab27dc41b272c638c88868275abb3cf + last_write_checksum: sha1:4a363d8439b5bff28f0f82143a06865f7abcd662 + pristine_git_object: b7227b48543ce2bd98727f087b42db22a9fd26f3 docs/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md: id: 0189ba3a1197 - last_write_checksum: sha1:b523f7f9c071547e1fa058671b00f18a68b37488 - pristine_git_object: f6cbc926bc407d354164aa6307bee6ee0261e5e6 + last_write_checksum: sha1:69d1ddbce33fb9787efe163076a1a4156babad49 + pristine_git_object: 4689ffdcbbb5d006086203984e3d2645763b3864 + docs/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.md: + id: c2ac4f80cd45 + last_write_checksum: sha1:a5d79183e1218f1ffbb5812de1dc8882531f7ef3 + pristine_git_object: 7e5b0876f04e7b20872bd7d1b490617095e9f26d + docs/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.md: + id: 8b119459ff47 + last_write_checksum: sha1:fdfe2facf81ad608644da9603e4cb83fff59ebaf + pristine_git_object: 399b4cdb25ea576ea022768f16b4c25e11d60270 + docs/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.md: + id: 74241a4b5cf6 + last_write_checksum: sha1:44037c8018fe10c942461f390d0f1479bc1f0636 + pristine_git_object: 4f58f15362c49fa36ec1905dd9147d9ef026de03 + docs/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.md: + id: 8dff54bf6c16 + last_write_checksum: sha1:e49ee216c03bf998880f94f15364d1230876ff6b + pristine_git_object: e974a5a6f9bcb22fe823386cd153652f8ba912dc + docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.md: + id: bce0140a2507 + last_write_checksum: sha1:6ee63b0f26c12cc6c072918499de9a9bf09de537 + pristine_git_object: cf0b09df95239054aed99409e644e265a17bba0b + docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.md: + id: 14495b4b5ae1 + last_write_checksum: sha1:671a86b0cae78f0a5b9a003ff1c57af0a2c94d6b + pristine_git_object: d788c0b7aa7162657fc5f98297a17a5f39550182 docs/models/components/SchemasCommerceSubscriptionItemObject.md: id: 1df8f0b71a44 last_write_checksum: sha1:30eab9fc0f0a79ef72773946ed79eb8002bc7a3c pristine_git_object: bb419cb0b55898a93057e3f660bf204215d66e39 + docs/models/components/SchemasCommerceSubscriptionItemPayer.md: + id: 2f7bb9ecc3d7 + last_write_checksum: sha1:97e6a27cb6744154ffa3950ac5e884eefe3c220b + pristine_git_object: 1fbc09130f3be4cbd1264fb9ab6753b88449cf34 docs/models/components/SchemasCommerceSubscriptionItemPayerObject.md: id: c7c1aed23c16 last_write_checksum: sha1:3f22c3e61b3446a8e1cab9dfca0dd6390ca81e4f @@ -1168,10 +1324,18 @@ trackedFiles: id: 72f48521e52d last_write_checksum: sha1:ae04643ac2b48fd366c0ca86f1534b2dbd66e17a pristine_git_object: 5226c0910b4462edaf2b5969a9950b4891beb9ff + docs/models/components/SchemasCommerceSubscriptionItemProration.md: + id: 6e1c0ee0366a + last_write_checksum: sha1:d034078eee3b4e3db9adb6a41d261cecf14f04a7 + pristine_git_object: 3f100e413dfe8ce554420d862838368cfa409031 docs/models/components/SchemasCommerceSubscriptionItemStatus.md: id: 54fec716b374 last_write_checksum: sha1:22f569eef82a282ff512d080401369c8fb23a155 pristine_git_object: 3769ff5d4af3702c8f53d966f647271883d1f997 + docs/models/components/SchemasCommerceSubscriptionItemTotals.md: + id: 575154eb4de7 + last_write_checksum: sha1:d2e150a0a98cc38f98c4d5ec15c8ba422439b282 + pristine_git_object: cd8b588f28a264fb506368006224f488140ad344 docs/models/components/SchemasFeatureResponse.md: id: febdae5288f3 last_write_checksum: sha1:85bca4481b794a30c6e6bbed4ff39c9ad584e24e @@ -1180,10 +1344,14 @@ trackedFiles: id: 2eea7e58babc last_write_checksum: sha1:d217a0f4ff4d23fc8c26f1b14c464278feeaf9ce pristine_git_object: aa0095ba3ce275489bd563c6802a922cee70717d + docs/models/components/Scim.md: + id: 15d999cacc52 + last_write_checksum: sha1:6a0a6366f85e04f554d553575766c849043f65a2 + pristine_git_object: 13c4087101ffe926f65ac6626a8bf739c8e4be48 docs/models/components/Seats.md: id: ca6ade4bd7ea - last_write_checksum: sha1:f08a6969c936bdefa126d124c73aa245f01470f2 - pristine_git_object: d828213427f269e4556bbbdb71fca75d5dea76b9 + last_write_checksum: sha1:51ad9dea69a72d73ae76dbb383956947f0b6d818 + pristine_git_object: c2c05c2d67dfa61a2ee9a9c120ec37b951330ef4 docs/models/components/Security.md: id: 3878f0f84029 last_write_checksum: sha1:10ed49e1ccadf80fc08408c46bd326e0df89c317 @@ -1256,6 +1424,10 @@ trackedFiles: id: 2186e638f502 last_write_checksum: sha1:6ad81758359f5b568827f57917a3f61ff200850f pristine_git_object: 7ebd516e6f5ed915d6d2623ce0e2a101b12e2232 + docs/models/components/SupportedBillingPeriods.md: + id: 263429c7a90c + last_write_checksum: sha1:670b2ccb681fd325d5a9c2ba9c8fc5fd54172b58 + pristine_git_object: 889e424de1fe3c5bade4079128ec5f79561084ba docs/models/components/SvixURL.md: id: 79f25a72defe last_write_checksum: sha1:dff167f8d25ad9d950cf9ec1450b71e652f61212 @@ -1298,8 +1470,8 @@ trackedFiles: pristine_git_object: 2b447b070f03ffd99a036bd27379313b7c4f367e docs/models/components/Totals.md: id: d837cc2544f0 - last_write_checksum: sha1:d6da16827505ec67e7320acd3c1d5dd2c1ab7c70 - pristine_git_object: d7acc60e819b87a1684214c936537f29058810b0 + last_write_checksum: sha1:6a1a533f02f4f4ddcac18d4a47291c75d3636c93 + pristine_git_object: 75f051f1ca7020e76659aad1fa524948b7c7eda4 docs/models/components/Two.md: id: d40a2aa6dcb3 last_write_checksum: sha1:863a212b94d91eae5e4b983d9ef404fc427df4ce @@ -1310,8 +1482,8 @@ trackedFiles: pristine_git_object: 5005e4a5864ce390660dd60e17fbc12f456e9f4b docs/models/components/User.md: id: 8f2722ab45f3 - last_write_checksum: sha1:f82920445c3fbde50fcd85395321ef3ca81e9dd7 - pristine_git_object: bb0b5f3323d2411a90af1069e0216c31c5049fc0 + last_write_checksum: sha1:bb506ff030d95d4b6b4cf1103f130b38485c4fae + pristine_git_object: c4d1972d7954b5686ea6a89b6de1aaf09f17863d docs/models/components/UserObject.md: id: 9d7bc67de5a8 last_write_checksum: sha1:93d67bda70a564f58c319ddbc99a5443182d2207 @@ -1406,8 +1578,8 @@ trackedFiles: pristine_git_object: 80f173c74e0f44bf8d881ea2f61339e37ea38d92 docs/models/components/VerificationOTP.md: id: 9c83e24604f7 - last_write_checksum: sha1:d57da52d2567f87f89e743ff8ce05ee3925a4701 - pristine_git_object: 37e24a466e0832637a66df92f5f211312379fbb5 + last_write_checksum: sha1:bea08a7d6578af1adfd746dc7334b173b5b7d4a8 + pristine_git_object: 5e04e7acb07446c7030f5cff3260ca01ba474333 docs/models/components/VerificationOauth.md: id: 7dc07b4fbc78 last_write_checksum: sha1:4ae229b92e6290275cbc841eee92ac62c2df681a @@ -1436,6 +1608,10 @@ trackedFiles: id: 31ca6bcac7a5 last_write_checksum: sha1:e5f76827e970d129b9222149e46f1e6e4fb6fd4a pristine_git_object: b31df68da67900a3915c2ff3e7f67c45b0ab77f1 + docs/models/components/VerificationOauthVerificationOauth.md: + id: 069338c19108 + last_write_checksum: sha1:e41f0de0a0823fd0542e69da5e16b79d3b1ab4cb + pristine_git_object: 1b34156eac4e6cf3317f0e91c6e36bc3fc7af7ab docs/models/components/VerificationOauthVerificationObject.md: id: 5b8298d111ca last_write_checksum: sha1:95cbbe465209baea743a3fd2299687b4f20f07cb @@ -1476,6 +1652,10 @@ trackedFiles: id: ebc20354181b last_write_checksum: sha1:2692514f388c3fbfef03b01d4a61c7957267572e pristine_git_object: eda0220efbd22014f6440cbb114b8fb788540179 + docs/models/components/VerificationResponse.md: + id: 5fefc4056967 + last_write_checksum: sha1:156f01ca9edcb51b88606b50d355d64c82b27651 + pristine_git_object: f8a8b3a022148b4f3c363cb83f8aa14ffd0be7a5 docs/models/components/VerificationSAML.md: id: 3d10aff21815 last_write_checksum: sha1:26c11dc6e32b44d2f4b5ec049ccef8665bd573dc @@ -1484,6 +1664,10 @@ trackedFiles: id: 6d95cbf81329 last_write_checksum: sha1:3866d31ba87da18cb6b372070cb94b74938a5c32 pristine_git_object: 514bca5faa13b670ca863f131f3e7bb67b07dff2 + docs/models/components/VerificationSAMLVerificationEmailAddressSAML.md: + id: 1af16c83b2ea + last_write_checksum: sha1:0998a5c43ed4aeddf6828ae64ffbd4b55e74aad7 + pristine_git_object: 182e78f1075776d445fa704b5a3d494b131b0be6 docs/models/components/VerificationSAMLVerificationSAML.md: id: 7c195a4afb7d last_write_checksum: sha1:82362fb20477e6f62819e7bb929533f9f94fbd51 @@ -1500,6 +1684,10 @@ trackedFiles: id: 3d5b7d833268 last_write_checksum: sha1:6f37cc00a09d3140f2b7552e878d527104404594 pristine_git_object: d93cf4bede2dd1c20d4e5632d23256a194c16e61 + docs/models/components/VerificationSCIM.md: + id: 498757ff9c2f + last_write_checksum: sha1:924e47d4dfbf9ed84860e581acab2fd9ed20320c + pristine_git_object: 34fdcd3c084c24b6f24d3e6bd0c301e468410690 docs/models/components/VerificationSamlErrorClerkError.md: id: e8169c58fe2b last_write_checksum: sha1:839ecfb8d23c2a71008dfd34a066b1526150a937 @@ -1540,6 +1728,18 @@ trackedFiles: id: 4e76fa399b61 last_write_checksum: sha1:bf369683b444a9d6c06f12ddd483bf9a49132c8a pristine_git_object: b07d3849b2db89628ddcfbe87482c93b627a1a9c + docs/models/components/VerificationScimVerificationObject.md: + id: 5414c428184c + last_write_checksum: sha1:77fde213ff2e7d99c1bf46f6f258d915258cd3ab + pristine_git_object: 1c27f9cc602c9109b6a0c864fd4b226dcf8868b7 + docs/models/components/VerificationScimVerificationStatus.md: + id: d851fe867f98 + last_write_checksum: sha1:9cc5797393e343a70a099ed0b6f308f9c6c90988 + pristine_git_object: 6238e6bbe2c44973c9127ef16771f186a55156fe + docs/models/components/VerificationScimVerificationStrategy.md: + id: 8f64aa08a474 + last_write_checksum: sha1:faa9dbb4bbbb7156400e541d93459aad6d807eed + pristine_git_object: f415805d54692ab5af31fa909b8c8acc209ebaf0 docs/models/components/VerificationStatus.md: id: 117e470ae72c last_write_checksum: sha1:0af6fd1a0c30033128c56e4cea7e8bcd59788118 @@ -1652,18 +1852,50 @@ trackedFiles: id: acaea502d84f last_write_checksum: sha1:9f95a73885ba5de25abdc73538d09d6a6ca12882 pristine_git_object: 76fd97129c20ce2d45ed011db77b8c6e79bcfdf4 + docs/models/errors/CreateAPIKeyAPIKeysErrors.md: + id: e9dcc82ff4ba + last_write_checksum: sha1:6e2213fafd5a4002d0e560e90266e0260e2b9f40 + pristine_git_object: 5d0a401ec4775553e8677517ad5714dff51166d7 docs/models/errors/CreateAPIKeyAPIKeysResponseBody.md: id: 47845697275e - last_write_checksum: sha1:5bfc58790b3963df8f08a05852f0914c5e453c83 - pristine_git_object: 98fd6241e4dfb77e44a6454db623c87506c95bfb + last_write_checksum: sha1:67665c91b89cdd738892d3587df39b9bc22e8945 + pristine_git_object: 4037235e08d38b54852c10b53b42cc33c5753877 + docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.md: + id: 060f752cd714 + last_write_checksum: sha1:c1a1ebaba99abbbecbcc01282cdd98087debfa53 + pristine_git_object: af10d400985af5ab6ab171c6234de553c26f287f + docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.md: + id: 1faf4b717cbf + last_write_checksum: sha1:6fae445cbacf0d65cd707ad7f37e5664f0b83ef0 + pristine_git_object: c514cb6513d1280b082bd7ec68f0bf7c81e83065 + docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md: + id: 12d1f8418ab0 + last_write_checksum: sha1:9399d45a4a9985b06b561cd3dc1446ef5b057eed + pristine_git_object: 06aaccbb054b9b61ebb80fb01ce833f1e5cf517b + docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md: + id: 3985d5d2f65b + last_write_checksum: sha1:ee85394f06ec9bd7f274ebf8ae9fecf51d17971c + pristine_git_object: c9c72b86c71c5ad6c9bfd6fb6a5db84f68c10173 + docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md: + id: 91b37ec148be + last_write_checksum: sha1:3964c2c8d062903cc5aaf3c0e68b995527f02dce + pristine_git_object: 74ec887f357e9cebfed31968c4e4ca2d7141bf77 + docs/models/errors/CreateAdminPortalLinkTokenErrors.md: + id: 463c7874374c + last_write_checksum: sha1:41431dc8f35acc8d2a265e7ccaabd234d2c2bb20 + pristine_git_object: 9da29234589af5470738a7517610363e642b9d98 + docs/models/errors/CreateAdminPortalLinkTokenResponseBody.md: + id: 3bf7d4fbbebd + last_write_checksum: sha1:ad5790f50371126dc8de8f3930c17a75db54e3d2 + pristine_git_object: 8f6d6895ea29f59b056dc8af3494a0040e18b205 docs/models/errors/CreateApiKeyErrors.md: id: da21286f0191 - last_write_checksum: sha1:bfd11bc5ac07c8d5a6aaa6caae0a6d99e0be7421 - pristine_git_object: d7fa15a4b0aa076084b9387aa2170c251934bf3c + last_write_checksum: sha1:dc332239254d3cc45c28c0b9bfdadd810e4deee1 + pristine_git_object: 7974cd6f0c01bccc525b2be89a2faddfade8e82e docs/models/errors/CreateApiKeyResponseBody.md: id: 2028b4865786 - last_write_checksum: sha1:0eb0ec4d4dd073687386f3b7c2504420d23c0d3e - pristine_git_object: 895a1756f76a5833a4c4a2f0cad3f52fab95db08 + last_write_checksum: sha1:295888ec1a04dc3d6ba6494a0df44d8fd0958b93 + pristine_git_object: 5b79478c8a67fe6482eda9d30f13af96bbef5fba docs/models/errors/CreateM2MTokenErrors.md: id: 72d1be50a81e last_write_checksum: sha1:248b3de050ab3a641f32fb6d081de26c0dda1c10 @@ -1784,6 +2016,38 @@ trackedFiles: id: 515b6324e4ba last_write_checksum: sha1:a528651919968014b686b8e98bcd7189f3ec9f33 pristine_git_object: b32576bff1793bd22e9358096b4eb7c68dd37319 + docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.md: + id: 00a878eda0d0 + last_write_checksum: sha1:69d1853e70fa1015c1c898e842d3851cdc81f83a + pristine_git_object: 74862e59f39cb406d78465f19881519d889b2265 + docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.md: + id: dfc904f5f113 + last_write_checksum: sha1:1696d6cd8d6ef7ad99ea867ef9f688410eed6356 + pristine_git_object: a8887399acefcdeb640f22a614349533edf78410 + docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.md: + id: 318983a6b858 + last_write_checksum: sha1:bd9dfddb292e2ea54e5f559854c4f08a314705f3 + pristine_git_object: 172a194ed6499fcd9a8e51952ba617cc953ff34d + docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md: + id: e8731b0b5ff6 + last_write_checksum: sha1:d7f574bdf3a14a319fd344b63db4a93cd10f2e09 + pristine_git_object: 83d450314dada7ffb07f9f04bf2ad23ca5e12b4a + docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md: + id: 0185c4950e89 + last_write_checksum: sha1:1eb6feaa4dcc9e9004a31b37b28be9a46a082bf0 + pristine_git_object: a319925a9d5223a1bf55c8abd3bd6938ebe6f049 + docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md: + id: 9931d03a47ca + last_write_checksum: sha1:d48daf2fa81ed4547c0d4c1e81a54f9e6549fd2c + pristine_git_object: eb01a17c8f7d107a2aad12af5d8f71df04573bd7 + docs/models/errors/RevokeAdminPortalLinkTokenErrors.md: + id: 4be2c369c0fb + last_write_checksum: sha1:5e7f0b9c7c6241d2e6228902ba5fb0da3a767e6b + pristine_git_object: a4ac982c43cd3998fe67743ce6f16b2cae87bd3f + docs/models/errors/RevokeAdminPortalLinkTokenResponseBody.md: + id: 48f00f77db0d + last_write_checksum: sha1:50ef99bcc65caadebf34e082aa1155187ffe4d4f + pristine_git_object: 6264fbd0e7802c63cff8e74c93fcc198f6412b47 docs/models/errors/RevokeApiKeyErrors.md: id: ba4a85b0dc75 last_write_checksum: sha1:21ea326ee053c2ab2cb06812820b14a4c9bf70e1 @@ -1920,6 +2184,30 @@ trackedFiles: id: 46aeef7a84cd last_write_checksum: sha1:3d31f0e71b554d171f2a8000f06721a46b4042f6 pristine_git_object: 54f9e6ea37fdfdb4b6f4a2a410e4a5b0f710c7ab + docs/models/operations/AttemptEmailAddressVerificationRequest.md: + id: 504ba6cc6b8e + last_write_checksum: sha1:8d3eedde4d354c56cf381a4c1051aa646456936f + pristine_git_object: 2274a5f5af5346cfea711acf5990e38eebdb6348 + docs/models/operations/AttemptEmailAddressVerificationRequestBody.md: + id: abb3f9310162 + last_write_checksum: sha1:9f63d055c0c45baf9f9b9615fed7246077b08f4f + pristine_git_object: 34c998ada4fbc2b1633040fbbbcdfc4b223bdb8d + docs/models/operations/AttemptEmailAddressVerificationResponse.md: + id: 5224f0fcf0ca + last_write_checksum: sha1:fd0ed5ec19c7a3836718f2ffe05034bdb403bb21 + pristine_git_object: 9acf981ab11100fbb91258731d5f092446289eee + docs/models/operations/AttemptPhoneNumberVerificationRequest.md: + id: fb64f1abadc4 + last_write_checksum: sha1:386102e3d8e2804a9475cecb0dd31af65d499928 + pristine_git_object: 3ee8c7625edcd06321847417a881a6daca193716 + docs/models/operations/AttemptPhoneNumberVerificationRequestBody.md: + id: 2d775db68b83 + last_write_checksum: sha1:0597fa7538b50fa9aa0f5101d6ad0a9fedfe5b22 + pristine_git_object: 30a5a686adfdf909ba101ed7a80e6484ddffe749 + docs/models/operations/AttemptPhoneNumberVerificationResponse.md: + id: 60b178cb6a9d + last_write_checksum: sha1:8bfc2ea4224e06e1b9b851d3a487b6f1b9aaca36 + pristine_git_object: 6d5c7dcda1d40ecd6bc380258c1eaed62c08f775 docs/models/operations/AttributeMapping.md: id: 1faf07b50842 last_write_checksum: sha1:01f1c95f2c16c1925bd38d23d409dc120e3019ef @@ -1964,6 +2252,22 @@ trackedFiles: id: 918834ee21bc last_write_checksum: sha1:cbc15609d43ee847928b371c8c649ea1a60f708c pristine_git_object: 3dec2af2298914e43130c9f2005c04b6f9b4553a + docs/models/operations/CreateAdminPortalLinkTokenObject.md: + id: 30999d45d12c + last_write_checksum: sha1:afc4ed5f14b2260229379edd3d5d38b8ba57956b + pristine_git_object: 46d03bd77a02887342dd812f29d3743c6f1b25e3 + docs/models/operations/CreateAdminPortalLinkTokenRequestBody.md: + id: 7bae1c556c90 + last_write_checksum: sha1:32913b4565812d89df60277aca9fb84483da7878 + pristine_git_object: d20c4b38aefffa43ade3a6aaa05dafa1d01af440 + docs/models/operations/CreateAdminPortalLinkTokenResponse.md: + id: b4ee18edfc02 + last_write_checksum: sha1:0a25a80b1ce1238244ef05ce0f95bc9925d98033 + pristine_git_object: 5cb3ed2ed9c4ff123c7070cd798368d17966fad5 + docs/models/operations/CreateAdminPortalLinkTokenResponseBody.md: + id: 6b61517d5369 + last_write_checksum: sha1:929b78189ca3454a16cb1d8ebc4e5b39bfeaf5c9 + pristine_git_object: 0b66fdcc1af5a3bb4e8f4753478621608d1ea3c3 docs/models/operations/CreateAgentTaskRequestBody.md: id: 3ae259e8c02a last_write_checksum: sha1:7de1d2ac109b17ceb2fab534fb726991a049249a @@ -2052,6 +2356,14 @@ trackedFiles: id: 609802a433ab last_write_checksum: sha1:6b89af2bd3226a45a06ac0a9a62d9e31804ca5f8 pristine_git_object: 323fdda6361b5d37dc37d33b641b8546bbd38de5 + docs/models/operations/CreateEnterpriseConnectionTestRunRequest.md: + id: 3314479a8114 + last_write_checksum: sha1:4718321b0283aefcf7c91b5a4dfa0e5525679fd1 + pristine_git_object: e0ae3a6645428b391cddf5cb6415c27385f44b6a + docs/models/operations/CreateEnterpriseConnectionTestRunResponse.md: + id: 7fed2e51abeb + last_write_checksum: sha1:1a247223fdba4ec3ee59f7aea3ce36aa7dbece1c + pristine_git_object: 16eab25abebc2e071aa45bda261280e42e1b8b29 docs/models/operations/CreateInvitationRequestBody.md: id: 73746d9c3012 last_write_checksum: sha1:526dd2b8e2a35c69ad40c213245215120ec1c5ae @@ -2074,8 +2386,8 @@ trackedFiles: pristine_git_object: da244a637d90dcff5ea40a9c9c2671f51a708ee2 docs/models/operations/CreateM2MTokenRequestBody.md: id: 82ade54eb5f4 - last_write_checksum: sha1:a10a2429fbb2449a831c5938577cabda9c500dbb - pristine_git_object: 6e23fa3b4a865ebc012d0d3ef2bd6538b529fb0e + last_write_checksum: sha1:35db0ed276a533f846e3469d98ba58ecd5e4ac19 + pristine_git_object: 24ebb4ada29d4f17cb367e3c78d49fafd1a52f30 docs/models/operations/CreateM2MTokenResponse.md: id: f7dee6974a30 last_write_checksum: sha1:1b7e9477e85d4b0295129946cc70070551871de6 @@ -2286,8 +2598,8 @@ trackedFiles: pristine_git_object: b85c6b1723028ebd34a114db9501f12283ef4dee docs/models/operations/CreateUserRequestBody.md: id: 14bc27a15514 - last_write_checksum: sha1:7ef4bd0340a1c781f447fc60710c12694b7316fd - pristine_git_object: 11c152f861184d551aa091660a00d4c8c1d64497 + last_write_checksum: sha1:82fba2a444f1207c1335111b22b40180735aac1f + pristine_git_object: 510848b31d6887910e7c9fa024d710d5b23b0fbf docs/models/operations/CreateUserResponse.md: id: 9a1334676890 last_write_checksum: sha1:acc50fbc15a5616e45081f8211838e9172771b00 @@ -2302,8 +2614,8 @@ trackedFiles: pristine_git_object: 3fd94d800f0e0fe47f461131c12956ef49f93521 docs/models/operations/CustomAttributes.md: id: 2742487e6598 - last_write_checksum: sha1:053781f3e5b1605ad2b6071792ecc9ac830569b7 - pristine_git_object: 1647af12c72323f7f03f5aa20016cc2aa782d0b5 + last_write_checksum: sha1:ebb69f7beed15c95f1bbd2e6dd41403f84ec9c2a + pristine_git_object: ce4645c7f4cb0df652f5de6344a96ca94ac2b2f3 docs/models/operations/Data.md: id: 82001e70e687 last_write_checksum: sha1:569fd0ca633cb64de691d37036ad33983fb63ee4 @@ -2540,6 +2852,10 @@ trackedFiles: id: 096caf5fc809 last_write_checksum: sha1:ed0f87ae4fa94fde39b31af1b5342ec5d457f393 pristine_git_object: 11b25cd60cb862437888b720d08d6375ba642f0e + docs/models/operations/EmailAddressIdentificationStatus.md: + id: 3d7cb9b971ef + last_write_checksum: sha1:acf9f905b88ec0a56159cee2e75eab136db773b8 + pristine_git_object: 5ae6e1044ead8a801b4c5d36046c922e74980fbf docs/models/operations/EnrollmentMode.md: id: 57cf9d7511dd last_write_checksum: sha1:88837c2ddfd18ee213e979073b2f74bf5455ffde @@ -2692,10 +3008,18 @@ trackedFiles: id: 354731c6ff37 last_write_checksum: sha1:90d15f4055f599c0cf780f3315aad5e74753bbf5 pristine_git_object: 73f8a1dc10346a1e57dd64a29be62cd77ba7e298 + docs/models/operations/GetInstanceCommunicationResponse.md: + id: 45568e7a6ebe + last_write_checksum: sha1:2e3d9ba2de56cf4efbdc06dc72dff1a64b6cda68 + pristine_git_object: cf24a70f241459588614b10608ae96f55e477b74 docs/models/operations/GetInstanceOAuthApplicationSettingsResponse.md: id: d08c68a33a00 last_write_checksum: sha1:abdf4103f001669ed24686fd8c2d352c4b2c3845 pristine_git_object: 4e66d3477623a8039ff3a9839e9e32398e49f0f6 + docs/models/operations/GetInstanceOrganizationSettingsResponse.md: + id: c986bd876b82 + last_write_checksum: sha1:0a94bd19f1813b430570293e7afe6991811bf6dd + pristine_git_object: 4ed1697165aebb83537868d39af9b7ee53c7b587 docs/models/operations/GetInstanceProtectResponse.md: id: 73d8863519ad last_write_checksum: sha1:7e4e8d4dbe91ef8106b1e44410003d5bf7e55ee7 @@ -2932,6 +3256,10 @@ trackedFiles: id: 3a1e2921fc87 last_write_checksum: sha1:486ee36f742e37380433b63762a9338c68b536cb pristine_git_object: 83291c8d060d403f839f418290830e2ccabece62 + docs/models/operations/IdentificationStatus.md: + id: 428fb727b92f + last_write_checksum: sha1:1e0a7effc59605c14d33debd0c1ce19f86b6b70e + pristine_git_object: f5f441b84353a2a1eaf80b768c9897bc5d66d0ff docs/models/operations/IncludeInvalid.md: id: c4d6abe83366 last_write_checksum: sha1:530aa361b7510564e223a5c4e00a763de01ec448 @@ -2980,6 +3308,18 @@ trackedFiles: id: e2ae796f73d9 last_write_checksum: sha1:9424a2796f37ef2b7562f96675807c86c8b41272 pristine_git_object: 9ae5a9eefc4fb63eabe98cb3795ca8ad14f3d6ab + docs/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.md: + id: 7ccd4ea9bb75 + last_write_checksum: sha1:0f22776ca90b6d9dca3e5c0ea66df445764b4b92 + pristine_git_object: 533ad05d7d9099f209a84502b981ec60a48212d5 + docs/models/operations/ListEnterpriseConnectionTestRunsRequest.md: + id: 41403086a4a9 + last_write_checksum: sha1:ccb12ba9367984af15fc30b07bbb856808f41045 + pristine_git_object: 108fa72648b627c8e39d5152efe5596f815e253d + docs/models/operations/ListEnterpriseConnectionTestRunsResponse.md: + id: a2ee944df12e + last_write_checksum: sha1:82ab77291f6fb18f6b8c23d1cfeee412f80f707e + pristine_git_object: 93fb5a658fdcb4db96d5bcbbe6852eb8a4585a1d docs/models/operations/ListEnterpriseConnectionsRequest.md: id: 4f745f12d39d last_write_checksum: sha1:5d0704edbb398c38da35b25a5b3d7698c47d29b9 @@ -3184,6 +3524,30 @@ trackedFiles: id: 3cb1d774e7d7 last_write_checksum: sha1:752fc9946e9a73d94b1883c4d3e385c504d2e4c6 pristine_git_object: 0d598b497f7f438935fc3d0bed94833c9a73f8dd + docs/models/operations/PhoneNumberIdentificationStatus.md: + id: 03e6775fb8fe + last_write_checksum: sha1:b95d8205e39c386575911cf9d9321afae9651006 + pristine_git_object: 2fb43cebd90825f694dd588e370c2e9854d052c3 + docs/models/operations/PreferredSignInStrategyWhenPasswordRequired.md: + id: 1b5c03104674 + last_write_checksum: sha1:ab5aa047fc92aa33cfe306b7c887d0d53d175cd5 + pristine_git_object: d89c3d29b9fef686b76f1a851815c077382d0410 + docs/models/operations/PrepareEmailAddressVerificationRequest.md: + id: a84da887214f + last_write_checksum: sha1:8adda60b940f4840a7e59a05bcad3bf48f10a94c + pristine_git_object: 1c7f05b02609c743589ee111e832c02f8f00cb2e + docs/models/operations/PrepareEmailAddressVerificationResponse.md: + id: 0e323872ed10 + last_write_checksum: sha1:ef6b417111e1fd7fee7248fa9eb4a347608d4d87 + pristine_git_object: 7744de227312a57ec28d695f92bb20603dcd000a + docs/models/operations/PreparePhoneNumberVerificationRequest.md: + id: 1eef6eb3b997 + last_write_checksum: sha1:06c6387bfb18a8d9d78dac6667119c4a6c6b4fd4 + pristine_git_object: 8accf4c55cc2c076b95c96ee440a5f479cf2c0ff + docs/models/operations/PreparePhoneNumberVerificationResponse.md: + id: 57937cdc4e83 + last_write_checksum: sha1:9b83405e6c9e48efb0b8426a3552c6271e50c8d6 + pristine_git_object: 1fd888eb96ef79bc5a0990cf6f9039db6616a7c3 docs/models/operations/PreviewTemplateRequest.md: id: 964db88fcc91 last_write_checksum: sha1:1b88e3ecff12e34221069ce36703fa1a71e906c3 @@ -3264,6 +3628,46 @@ trackedFiles: id: 1fa68a8b21ec last_write_checksum: sha1:57a93824c2afe526ffdd01fbdee9bd75d1cd0f6a pristine_git_object: e60c3e279f6c3715bd69b1db1c9de6901bf2a2c2 + docs/models/operations/ReplaceUserEmailAddressRequest.md: + id: d88a2a1baf5c + last_write_checksum: sha1:2b62447bc19be94b481e5dde6ce7d0d55b6a40e0 + pristine_git_object: 473336fb7426a0afdeb65a8679e6d3dd210b029e + docs/models/operations/ReplaceUserEmailAddressRequestBody.md: + id: b1dbf45f207c + last_write_checksum: sha1:461dea03ac3f2a35176f63764807ad5bf8954491 + pristine_git_object: 4ccc622b6bb397079ea9e71872b3929203d0b382 + docs/models/operations/ReplaceUserEmailAddressResponse.md: + id: 352ca78309e3 + last_write_checksum: sha1:15dfba40d664d3a4447ab740c7b19d3449126228 + pristine_git_object: 581a89bf06e9a7fe33373fddbdfe53b822970618 + docs/models/operations/ReplaceUserMetadataRequest.md: + id: dd0c42e2e181 + last_write_checksum: sha1:d3f9dd87608d176b54bc273a08532ea92dce340f + pristine_git_object: 47667cf1fb888761d978de60e2d0598b3db9a176 + docs/models/operations/ReplaceUserMetadataRequestBody.md: + id: 176ace9c4436 + last_write_checksum: sha1:3e95aa3bb53869fa4921597df063835ed2be50b0 + pristine_git_object: eb3f612e53a6aabbc22cfba9848a0d4001d45416 + docs/models/operations/ReplaceUserMetadataResponse.md: + id: 0d88b24ed692 + last_write_checksum: sha1:249c96855b59812c24e9a37412241086bd388d03 + pristine_git_object: 8619653e216c5f47a02acff0d1347a0e993a00e6 + docs/models/operations/ReplaceUserPhoneNumberIdentificationStatus.md: + id: 0c8eb069c863 + last_write_checksum: sha1:b4509ba17d6ede474f269a8f322d0c81d7f2156c + pristine_git_object: 2987eb412470daf41b4b81fd6ba018b17e166872 + docs/models/operations/ReplaceUserPhoneNumberRequest.md: + id: 471e7f5a08db + last_write_checksum: sha1:7ac02d701c441b12e5911c6a16be4184371e8142 + pristine_git_object: 5eb8076be341ee9f399b2c1cecd07f14e616acda + docs/models/operations/ReplaceUserPhoneNumberRequestBody.md: + id: ca615536a82a + last_write_checksum: sha1:191072f4161c3e956a639e255bdaf1dea075ccdb + pristine_git_object: 15cd938af26234de60dd7cf4bfe845a542c423c1 + docs/models/operations/ReplaceUserPhoneNumberResponse.md: + id: 38180622ec0c + last_write_checksum: sha1:f8ab294ce4d5a953300f3198e4d05e73f4fbe7af + pristine_git_object: 35af84779b7ce5fded3404fe82b5496304dcff3e docs/models/operations/RequestBody.md: id: 0abdab2e0c0e last_write_checksum: sha1:941b5e6d56668d0c7e52b825a6e590d9b35fdd25 @@ -3308,6 +3712,26 @@ trackedFiles: id: 28048618165c last_write_checksum: sha1:fa90558d05da7936a46a895cbf72a1440703b3e6 pristine_git_object: 660b2e29b46966ef1ebda2870a688fb6964a9133 + docs/models/operations/RevokeAdminPortalLinkTokenObject.md: + id: d2a9ad08620a + last_write_checksum: sha1:b7265f28c61954cb53991140b7e86b2a3a615d76 + pristine_git_object: e76212f19f85a19fff861c9e702e5be594e2f5fd + docs/models/operations/RevokeAdminPortalLinkTokenRequest.md: + id: 7ea1e8c8852a + last_write_checksum: sha1:bd6612c131ae418584d10231bde7a367b6f0c785 + pristine_git_object: 360ab916d50e56611b47db6055df6d454e176c67 + docs/models/operations/RevokeAdminPortalLinkTokenRequestBody.md: + id: c8786f533d73 + last_write_checksum: sha1:9d2b8c47371d39e45287685b9c08646577412940 + pristine_git_object: 820213ab5f45f75188ac6133e3d9e09d41ff6c71 + docs/models/operations/RevokeAdminPortalLinkTokenResponse.md: + id: 8584395da30b + last_write_checksum: sha1:67790b788441cb104c226d6809ddf8ee06e8c9ad + pristine_git_object: 7a728968495f0b42cf505b643490da5e3f75f7e8 + docs/models/operations/RevokeAdminPortalLinkTokenResponseBody.md: + id: c75c1fbdd541 + last_write_checksum: sha1:4406dbf326270738a91e15cf96250d916cc87476 + pristine_git_object: 76a42ab820b29bca95a9c29f01d6b2fdf6837bc9 docs/models/operations/RevokeAgentTaskRequest.md: id: a49ba5444fdb last_write_checksum: sha1:cd797a1873b391ba35d553b966988baf69f3a7a6 @@ -3554,8 +3978,8 @@ trackedFiles: pristine_git_object: 7434ab0ed63b765342bdd615581b5007ab8ae283 docs/models/operations/UpdateEnterpriseConnectionCustomAttributes.md: id: 68a3d7f3f5f8 - last_write_checksum: sha1:82c5df482c49f2a0ab318be0207e81ff825d7444 - pristine_git_object: 35489d9681a52ebb2a3c04663df2b37167bca7eb + last_write_checksum: sha1:da65ab95d2945337be8d9cc767f32998afae14f8 + pristine_git_object: 7b187e2d98c1d0796994a4f13b9504bb23583470 docs/models/operations/UpdateEnterpriseConnectionOidc.md: id: 0bd4e80b07b2 last_write_checksum: sha1:72359b4fef17e3e86fff9a10b8a6e826c982d4cb @@ -3584,6 +4008,14 @@ trackedFiles: id: 2bb9ec3dcb7a last_write_checksum: sha1:b666068a5bfa2d6d8ee53fbd4dad1f77d414811c pristine_git_object: 1f0408e74e2b700ce7ccc4d96d7a290228d35ad8 + docs/models/operations/UpdateInstanceCommunicationRequestBody.md: + id: 9a3c13d30e15 + last_write_checksum: sha1:56efdf96b3a8909f38214f66d7cd2fa99a23533a + pristine_git_object: 0582b6a5a87c673cf7f92f52d09dbca90f71a19a + docs/models/operations/UpdateInstanceCommunicationResponse.md: + id: 6e39fa47709e + last_write_checksum: sha1:8129b120f5841ffc3959ebf9bbef3bc3b9c8221e + pristine_git_object: fa9b397c10affd9ac6dedee0b17b00342ef22d26 docs/models/operations/UpdateInstanceOAuthApplicationSettingsRequestBody.md: id: bec8dec22ddd last_write_checksum: sha1:b11311c2b5b09d1ccb590317c5eec00ac9e4ec2b @@ -3610,8 +4042,8 @@ trackedFiles: pristine_git_object: e2d354a0c72ce64219012e7d255545ae6d04a88f docs/models/operations/UpdateInstanceRequestBody.md: id: a89563fe1486 - last_write_checksum: sha1:79e6bef1413fffc0c2fb3375a30e554c0cbb5a1f - pristine_git_object: 8115ee3c867ef4c847397ca95374ca523cc54cd1 + last_write_checksum: sha1:4abdd5b56791b4995ad9d4de836defb13819f85b + pristine_git_object: 974233c9f6aea7170ab1b614a6fe18bd0d99b6d5 docs/models/operations/UpdateInstanceResponse.md: id: 10a110c8fbf3 last_write_checksum: sha1:b691349be5edb4e13d6b844e77867218a185f11f @@ -3980,6 +4412,14 @@ trackedFiles: id: c09d68789a84 last_write_checksum: sha1:273fbbced4f7d9c9e331ea3ed9e2baf60f9f4e1f pristine_git_object: f250e3ace9c43c5e1a78662e0cc48da075f12f24 + docs/models/operations/VerifyOrganizationDomainOwnershipRequest.md: + id: 0f71b87878a2 + last_write_checksum: sha1:ae8c560a72be5234152d784a9911f65574b6ba3d + pristine_git_object: 11208d5dd5b6e7a25bb50ce574da2fbd274be8d2 + docs/models/operations/VerifyOrganizationDomainOwnershipResponse.md: + id: b1c1b71cd91a + last_write_checksum: sha1:5f1e007c4c891388ac52771912f4990a2d70bc5f + pristine_git_object: 64674a10210b9e2fd04f2c18f28535c9c92b2c0f docs/models/operations/VerifyPasswordRequest.md: id: 576d5d7a2c16 last_write_checksum: sha1:35bf04e7fccba954e52b9c1c13c1d53be4b7516d @@ -4016,6 +4456,10 @@ trackedFiles: id: d484142effde last_write_checksum: sha1:e726bee6213da46861601df6d8da93738d727040 pristine_git_object: c2c833665e6b0decda85493578507e25314f906c + docs/sdks/adminportallinktokens/README.md: + id: 006cf1d47b1e + last_write_checksum: sha1:9ba517fde7fd4ac260703a1a9d986876b00dd639 + pristine_git_object: 12ae8285e15fc982b14e2133e1a4e6d0233f0227 docs/sdks/agenttasks/README.md: id: 809f9d21a2ba last_write_checksum: sha1:43baa08fdac04eebaab0ba87e3c97b2daa85d943 @@ -4050,8 +4494,8 @@ trackedFiles: pristine_git_object: afae3fa37ede54db928cebc6365e9f24615a3f82 docs/sdks/emailaddresses/README.md: id: f5fd208070d3 - last_write_checksum: sha1:5735ddf822ef91b4cbb00cb32c8a432eef0ed6f7 - pristine_git_object: f57b29361559549fbf67204cf97b8111a3789349 + last_write_checksum: sha1:50af00758f9921779eec76fa2d5efd5c41948b12 + pristine_git_object: 70007a3f53415463fb7953f7885aa8043a7b7a1b docs/sdks/emailandsmstemplates/README.md: id: f97f5a6195f4 last_write_checksum: sha1:8017a821d1f7ad3f1d61c786ab0702aa4740e326 @@ -4062,12 +4506,12 @@ trackedFiles: pristine_git_object: a895c1617aab48ad91e5c706bacdc23e870311c5 docs/sdks/enterpriseconnections/README.md: id: 05389ef24544 - last_write_checksum: sha1:f473d288becbb96a999750afb04481a4218a33d8 - pristine_git_object: ce0dc21f6dc1cd2d2046331f00c96b03939af36b + last_write_checksum: sha1:ea18bb2f3d97a148ae93531c2e971832cbe12962 + pristine_git_object: 03b942a87cb839adce495c61da7501b38442eb90 docs/sdks/instancesettings/README.md: id: 8c1dfa91ef03 - last_write_checksum: sha1:afd2be9c36f160f2681b310b04a475b27f58bd6d - pristine_git_object: 2b268e1865556cbb4c4973a3511d18337eb32f1a + last_write_checksum: sha1:9627331567f7d103d3f09cca26696e70016d2f2b + pristine_git_object: da999afb8a0c6b3addf6597944d3b429f83c5522 docs/sdks/invitations/README.md: id: 4f20950f4cbf last_write_checksum: sha1:fba58eef75adc1a41957f4290bd37bcef586ba91 @@ -4082,8 +4526,8 @@ trackedFiles: pristine_git_object: 23afb43164414f326c0a2b17e73bf54a1b1eab63 docs/sdks/m2m/README.md: id: f747d3bd08a1 - last_write_checksum: sha1:c7f7888dc58447d4bec29742ac89ff651571f430 - pristine_git_object: 07f3232ed39c953e96bba846c4a4120dcc176f1b + last_write_checksum: sha1:c0612b513ca9493af2f95f871b79782221e4d5b9 + pristine_git_object: 079d20d94b1bb5d84d34728a1a0b670e54214db6 docs/sdks/machines/README.md: id: ab83178bf481 last_write_checksum: sha1:b1d911692c27a907f65f0a7ba1adf3272d39d953 @@ -4102,8 +4546,8 @@ trackedFiles: pristine_git_object: 70b35fdb5fdd914daa4c2e81208a53ef3bd79f0d docs/sdks/organizationdomains/README.md: id: a256821053b6 - last_write_checksum: sha1:6e46ac3a0dbdc912d9c1fc4d2e9eb7c290ccec13 - pristine_git_object: a8607ba06d26da4fba56360391edf3299408526c + last_write_checksum: sha1:ce4445dc731f2bffcb3e05119b02c9253f9aaba6 + pristine_git_object: 4bc63e3f98b4b62c7771d3c393aa576314148e5f docs/sdks/organizationinvitations/README.md: id: 289d4104fbb9 last_write_checksum: sha1:c100e8e5af1c660057524709707eefbc04a47291 @@ -4126,8 +4570,8 @@ trackedFiles: pristine_git_object: 6b3ff9f9cb0b08633798c640aa9aac0cc27ff0af docs/sdks/phonenumbers/README.md: id: bfed92f30c8c - last_write_checksum: sha1:b1662a86407f85312e7abb6b120119ce6f1e8cb5 - pristine_git_object: 71c18bd4b6214358a2bfd95ae16f01c05ae93be6 + last_write_checksum: sha1:7ce8c496d3ceee484150986f6c61152cdbe9e2d7 + pristine_git_object: 88b6ea9e6f64abc2374974918a7113f5fd844770 docs/sdks/proxychecks/README.md: id: b7b7c7dd6d7b last_write_checksum: sha1:2d9dc8f9cbfa45249fc7cbd0fa729a6520eb4e29 @@ -4142,8 +4586,8 @@ trackedFiles: pristine_git_object: d90c91d1e42a23714aaf02547abb847140213fcd docs/sdks/samlconnections/README.md: id: c10bb4446e9b - last_write_checksum: sha1:d029e85f4405e619d3fd1928b9fe9e258c468c37 - pristine_git_object: ceda4f5c108751e4f214e893a9b0ecb1b1154b68 + last_write_checksum: sha1:99ec17cadfdcbf3094ba745a0bbc9642d8e144dc + pristine_git_object: 906b17e8f133dae3f515076698621ecd19445194 docs/sdks/sessions/README.md: id: 57ad62844f79 last_write_checksum: sha1:2f49edccab12e69d351ada28016c854c007cdb2e @@ -4166,8 +4610,8 @@ trackedFiles: pristine_git_object: 9ee3bca6022fca25977862c6abda580f3def47c1 docs/sdks/users/README.md: id: 5d80027045fe - last_write_checksum: sha1:344c2ebe8c9ff7e1858c4fb56a97cc6ec2cf9996 - pristine_git_object: 1e83e41126c9e21f30bb1b26be3cd9d79117b7e3 + last_write_checksum: sha1:16a545e5ce8de05c37c67ef238ba78ed3910ff44 + pristine_git_object: 37b83ed4d9024cfb4c46b0e3e1c9337eb7d39741 docs/sdks/waitlistentries/README.md: id: a4b511c18a9a last_write_checksum: sha1:eeef8b5b3c90024d3d0b5df790786dac86e9988c @@ -4178,8 +4622,8 @@ trackedFiles: pristine_git_object: 45f47ee13644598aaf91efff776b5e331d062373 gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:8fe0db64c9e5d1ac6521bde2a28e972df708d222 - pristine_git_object: cd8513aa7a42796f98c4cd9cc532a2f16dbefdf3 + last_write_checksum: sha1:6f0d453a038093b4c6704539880b4717adc87bfa + pristine_git_object: f600b02a31ba8ca3f5b90d0e1fbafeaf18ddff8f gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -4202,36 +4646,8 @@ trackedFiles: pristine_git_object: aef7fc2fed232deae5e7f630fa975b9360902eed settings.gradle: id: 05efc8b16577 - last_write_checksum: sha1:a78e11e5f6a7937134dd783ad431d72e4d78d0c5 - pristine_git_object: 809eeaf78a0f6052baf2d590c3340113960e8aa5 - spring/backend-api-spring-boot-autoconfigure/build.gradle: - id: 3efc2681f821 - last_write_checksum: sha1:e2b525d201a3b1411001f0c931e10f76ed7707e0 - pristine_git_object: 6a8215324459aeb0b92fbd9b98ea2a9f7ee8638c - spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfig.java: - id: 9a4e5f25ad52 - last_write_checksum: sha1:16a7ac0ef007fb97fd476216445aecce6a595396 - pristine_git_object: b1fc432d2a0556f067ca599824392adce618e66d - spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfigProperties.java: - id: d6422b6531ee - last_write_checksum: sha1:eb7d7891e1773c5c1afbe76bcbd663f9944565ca - pristine_git_object: 2a1417da76663658ae2af24905874006ec6a04d1 - spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/ConditionalOnPropertyPrefix.java: - id: fe178dec538b - last_write_checksum: sha1:4dfbef325d09ef6f02a93003b210db46d62d0abb - pristine_git_object: df787ac1c92278be06fcaed04e6c4768a4a46e22 - spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/OnPropertyPrefixCondition.java: - id: d74439804638 - last_write_checksum: sha1:017cc231c788449987b7722d8ad817d73a257eca - pristine_git_object: bd2c3d5ea91f0dc47f57ef416b5c8bb3ce180730 - ? spring/backend-api-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports - : id: dc41bd0c2307 - last_write_checksum: sha1:e8d85449ca8d9507d7e2946fd08ad42328a723a4 - pristine_git_object: 3ee380eda9cfb96744e7250f2065b04f2f6800f0 - spring/backend-api-spring-boot-starter/build.gradle: - id: d2ec13a7b3e5 - last_write_checksum: sha1:59545dbc5273a2b8db3847a667444437f1467f8d - pristine_git_object: 49c27807e928cc4a0688d2f5fe735e36045dfa58 + last_write_checksum: sha1:5c08a57b29aba98078d7a1fbe062622e3676f33e + pristine_git_object: c735ecabe8ec99fb047bce0067e6435d89eeb230 src/main/java/com/clerk/backend_api/APIKeys.java: id: 30dd18a025d7 last_write_checksum: sha1:d66cf2145170ef7e91dcf20b710f33e472167a6b @@ -4240,6 +4656,10 @@ trackedFiles: id: db35dee11e91 last_write_checksum: sha1:0e203ab271152be50633f79e39ff52cd9dbcbced pristine_git_object: 30bc6988f1bcdf83c98d379632afd7aa1e7ecab9 + src/main/java/com/clerk/backend_api/AdminPortalLinkTokens.java: + id: ff3d2190be97 + last_write_checksum: sha1:353f361c73fb11e4197e0cc078e11e73ab4cf605 + pristine_git_object: 295d47df60f931375eda930c962a05577c50cc5e src/main/java/com/clerk/backend_api/AgentTasks.java: id: 5dbfcc30d353 last_write_checksum: sha1:36c1ccba6f59905d789412313401f26f4b93e6ba @@ -4262,8 +4682,8 @@ trackedFiles: pristine_git_object: 5bf02163324a409051fe6b8395ab523a4bd34c67 src/main/java/com/clerk/backend_api/Clerk.java: id: f98667576bff - last_write_checksum: sha1:18aa73fd6a6d7847dd6fbd2d2b89aa1d5b12ebf7 - pristine_git_object: 25eb6ff9f9ce545058ffbddd6e1063250b9a056e + last_write_checksum: sha1:203193f96f39c4c215f7917e5201419f1dac2ed6 + pristine_git_object: 773c40aaf2497dc4387ef67cf47a9b9933ed8620 src/main/java/com/clerk/backend_api/Clients.java: id: 2b86a17ff763 last_write_checksum: sha1:2c7b3fff8cd457b51317ca1197ced5003f028465 @@ -4274,8 +4694,8 @@ trackedFiles: pristine_git_object: 88147167b275430ad91039cf855a088f6c290f34 src/main/java/com/clerk/backend_api/EmailAddresses.java: id: bfe4e0517e19 - last_write_checksum: sha1:f403aa4023fff7d45eb46211cdc98de1690476bb - pristine_git_object: 1d63564e6e2f041a5731287bf095bd217f65a384 + last_write_checksum: sha1:92322b84d9dd9c3c515ac7e261b667246e331f0c + pristine_git_object: 631cdd4f03cc4ed68cfce49837ad8227c4b2133a src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java: id: c69179b3cb66 last_write_checksum: sha1:bf5a0d616f06004d7293151fe51987fa00ccb6f0 @@ -4286,12 +4706,12 @@ trackedFiles: pristine_git_object: ef38e125e83f5605a17cf653ab298af6b63a37f2 src/main/java/com/clerk/backend_api/EnterpriseConnections.java: id: 61662603c832 - last_write_checksum: sha1:786b6d5c7ee5c78899629e1bc3a8d4f151d859ca - pristine_git_object: 8854cd6a08b96ce9eff13dd6256e5c9dea97643f + last_write_checksum: sha1:aa97b0d701ad4b2413648fa64e0d6cfa14717797 + pristine_git_object: b798ae757ba2d04e3c2aca37b7351d3d29f1a161 src/main/java/com/clerk/backend_api/InstanceSettings.java: id: e2ec95c97f57 - last_write_checksum: sha1:89063a167b2f020a47999988c45c1c2bae9784bc - pristine_git_object: bac846fc1104e5c4d0425a67816158116675a4a6 + last_write_checksum: sha1:1bcd17fd7d91322f554c0d6039c6fa077040cd94 + pristine_git_object: 87efcf77f06979095087e025802a92e14597b3ec src/main/java/com/clerk/backend_api/Invitations.java: id: 7c74b8fd223e last_write_checksum: sha1:5bad7ab87d69d49cfae8760e040d32770f2df3cb @@ -4326,8 +4746,8 @@ trackedFiles: pristine_git_object: dd70f88558ffc5a8cac42255d088aec24a33c9be src/main/java/com/clerk/backend_api/OrganizationDomains.java: id: ec98099a9e10 - last_write_checksum: sha1:ebe0741ca30060788a961b859c115dd4d7913435 - pristine_git_object: 275fa3525e96528d00bd73088957ded8e8b655a6 + last_write_checksum: sha1:30cee25117f29d1450c1580fdfe11dd232a61c8b + pristine_git_object: a792850fe86e72c853461508a658e3f3c999cd5b src/main/java/com/clerk/backend_api/OrganizationInvitations.java: id: f09a90078a08 last_write_checksum: sha1:82572fbb66fe2f401bda54f69229f21119f09594 @@ -4350,8 +4770,8 @@ trackedFiles: pristine_git_object: 57fb13aa58cae55319b53841ab57982cd0de2319 src/main/java/com/clerk/backend_api/PhoneNumbers.java: id: a9bababa47f8 - last_write_checksum: sha1:f9310f88d2b257da54328f5f3c4b0fff0af9ddfb - pristine_git_object: 9cc7554d523fa466e1d878ca99c70cce9a4826ff + last_write_checksum: sha1:62b03a539a4075df8df29d6cf4365cffcba09bea + pristine_git_object: bf9e09beb04bd503bebe7e0f980133c7e4b262c7 src/main/java/com/clerk/backend_api/ProxyChecks.java: id: b3073c31ab8f last_write_checksum: sha1:1ae509f5cc48dbc3cda44f92f28b250688691c1e @@ -4366,8 +4786,8 @@ trackedFiles: pristine_git_object: 40597c8205e6e12003fcdad6e1d4f084c674effd src/main/java/com/clerk/backend_api/SDKConfiguration.java: id: 02084533ec5b - last_write_checksum: sha1:821683143fccaa3ec3457de59f4387a304798f95 - pristine_git_object: 03adfd4b92b8f2fbd2a51ffe476152a137d65951 + last_write_checksum: sha1:47321e925bc296ecefea75f3f40239c76210ef4b + pristine_git_object: 1ec8db49536e5fc9ecf175930d0c43f02b3a382a src/main/java/com/clerk/backend_api/SamlConnections.java: id: 4bbf4e5d0a3c last_write_checksum: sha1:2e48c2a616261bcc34ae98b7f96b9eacfa8cdee6 @@ -4398,8 +4818,8 @@ trackedFiles: pristine_git_object: 2d6d35e80ad878256a7a1a71c241668889c0e0e6 src/main/java/com/clerk/backend_api/Users.java: id: 25ce71c73baa - last_write_checksum: sha1:3888af23c94396e164b654fa588ca24ad498126d - pristine_git_object: fc33fe62999f618136ddd1ad410b622621eff542 + last_write_checksum: sha1:f3d6a8a20da3c9cf7b425cc1b7f17babe202d057 + pristine_git_object: 68a645151965928218bd0de50e0bed524d42afb3 src/main/java/com/clerk/backend_api/WaitlistEntries.java: id: 5008ff59b95b last_write_checksum: sha1:47fa5ea495bc9740ea46051ec71a584b5c6a64fe @@ -4440,6 +4860,10 @@ trackedFiles: id: e63fa8c458ba last_write_checksum: sha1:a93f559c6a16916aa4dfde702a8c06c94d4bcfbd pristine_git_object: 0e5567f940d31d019c278b68246e10c833aba533 + src/main/java/com/clerk/backend_api/models/components/AffiliationVerification.java: + id: 25da70d44b88 + last_write_checksum: sha1:ba348ee28f029a43e64a60ea950e62c4b66db52e + pristine_git_object: 60e7da13f857a2baa85aca6c2bd37852d53921c4 src/main/java/com/clerk/backend_api/models/components/AgentTask.java: id: 3046b0cdd422 last_write_checksum: sha1:642fce75a7e0956d9c0c01ca5f9349659a20429c @@ -4480,6 +4904,10 @@ trackedFiles: id: 3d9185f09292 last_write_checksum: sha1:04d515bc64008a2e37ba22e0883901766c65adfb pristine_git_object: d3a176b102250928241a76cc384f339c38b4a51d + src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptDiscounts.java: + id: a4b51715d073 + last_write_checksum: sha1:7d44000d8d4643479c89b323df1bfa18a054d8e0 + pristine_git_object: 595b75366e6a54e435b9027e519e9e3319ed2ecc src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptObject.java: id: 8cbc749bf9ca last_write_checksum: sha1:a4c3b9ea80dcd0b3a49c2747e9b2c2cf9360c72e @@ -4498,12 +4926,16 @@ trackedFiles: pristine_git_object: babc2558940ec7891afef0e591cc9358ba3f7c15 src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotals.java: id: a46d490f2a94 - last_write_checksum: sha1:112ad97521aeda880fa568423b12d71f5440bcd5 - pristine_git_object: 97735074dd7cd46becfbdcebb1d5d4b04dcbe07c + last_write_checksum: sha1:5e35746b17a051e89876d186b3b73d064e33733e + pristine_git_object: 9e3129aef3ab099195f9f3eff753d815279824f7 + src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotalsProration.java: + id: 4f0675cbb0ae + last_write_checksum: sha1:c9bf8f28779741ce6d7741c2bb0bccfae5afeca3 + pristine_git_object: 8b1cf355c0adb5eb496247aad075af9dfefd6b4d src/main/java/com/clerk/backend_api/models/components/BillingPriceResponse.java: id: 5c1b68fcdcfb - last_write_checksum: sha1:66dc7412182247ff1c79d1d914bbe876cdaf5476 - pristine_git_object: c3fbeda43cf11b4536dfb1734110d412ce9c6b25 + last_write_checksum: sha1:e90d5d5f41f58649e442e76b619a94ffe77459a4 + pristine_git_object: da4ad935af266e14e329b0abe1e464b0bfd7c82d src/main/java/com/clerk/backend_api/models/components/BillingPriceResponseAnnualMonthlyFee.java: id: ecffe64b8065 last_write_checksum: sha1:7249d74007e7995f78cd23e38a98bf353bab03dc @@ -4626,12 +5058,12 @@ trackedFiles: pristine_git_object: 988b18ddb0bdddb52aaed8e2fbc3c2713573cb27 src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotal.java: id: 6515df030843 - last_write_checksum: sha1:cb66654e6ea84c1f3254aae28f240eb592f697fe - pristine_git_object: cc262dd00eb1e4ff41cd895267dd269431f8c02c + last_write_checksum: sha1:2465aef0460dcc64e360b7ecb84f53863a3a8a63 + pristine_git_object: 0e84d03ea6e2306200f16cc6a9dead5620f0fcdc src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotalTier.java: id: bb62fa3a4fdd - last_write_checksum: sha1:62f22f0d5e6e0211f3aeef7cacf71f038a56fc7b - pristine_git_object: 395860f8c2b646b037cbf2225d5b11f83457058d + last_write_checksum: sha1:25308857925f6689b5cfe37c67e10620ee02a038 + pristine_git_object: d409b81152298571287ae94c4faa0e892235881c src/main/java/com/clerk/backend_api/models/components/CommercePlan.java: id: 6e833bc1df44 last_write_checksum: sha1:e7d66f7ca0b0e4c1dddec73546851002ab0a98b7 @@ -4674,8 +5106,8 @@ trackedFiles: pristine_git_object: c7cbb23d243ce000c98918512f0d56cb01b52c4e src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemAmount.java: id: f07650771472 - last_write_checksum: sha1:ebaca832b994b0cf824988363ec73147c1582d2d - pristine_git_object: d0060d815d18002c5a0ba607e1e868510fecc7cc + last_write_checksum: sha1:f5481748d0fa1b038eeebd77ab13749de2b116e5 + pristine_git_object: d05fa28409766112ac286d731d767f3fffcfef9b src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemAnnualFee.java: id: 64975fe50333 last_write_checksum: sha1:ec1821b124306bea2cf78e96ece48ed9c87d1f3a @@ -4688,10 +5120,30 @@ trackedFiles: id: b3898d32f7b8 last_write_checksum: sha1:0aae427f9a5939fcef2d2e5a2baf9076d8e94bc3 pristine_git_object: 4528e9a35fc85ad1813f5b3ccace5b87d003a360 + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemDiscounts.java: + id: 094af1eb196f + last_write_checksum: sha1:cc2cb6334aa3b5b68882bfd38774180417f11497 + pristine_git_object: c82079f6fd67572de5989297a2de0a6a19088d79 src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemFee.java: id: 7b5b273f8bc6 last_write_checksum: sha1:113858be140173c4739df44dcc480c0b79419d9a pristine_git_object: 88716ded44803fa0bad085389a7345b04d021b88 + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentCredits.java: + id: bbcb7ff86ab0 + last_write_checksum: sha1:36eebf608dc2337f38c241db57552955147e354a + pristine_git_object: f2c2fab9aefd59d323afce679d4c7bc46bb7a3dc + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentPayer.java: + id: 40f2973770d8 + last_write_checksum: sha1:03e66de40148f77719816fc4229265290c986246 + pristine_git_object: 966c3c2b9c43d27f779fb7a5ec156d0f76e472bc + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentProration.java: + id: 10fddc3f7178 + last_write_checksum: sha1:441d0583b6ca17439e77d36a86518a40376057d7 + pristine_git_object: 0ce3e52e00847fd5df8e7cd5ad89bb5af23fa52a + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.java: + id: 4a4c184391d7 + last_write_checksum: sha1:bd9bc67e25d585f12d410eeb4a36fa0808e55434 + pristine_git_object: 48338eee80d520b916a6a6b996f7ce7d1c056fa9 src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemObject.java: id: 0aed2c870dc7 last_write_checksum: sha1:17416e36de7adf34c7e92d403266534565e599c1 @@ -4712,14 +5164,46 @@ trackedFiles: id: 4f59bda61b25 last_write_checksum: sha1:496f3572c48c283945f59ce26f0eb7bd3794564e pristine_git_object: 8cf128bdb6a3030c45bb79dfaf32ec25d01ea08e + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotals.java: + id: 2eb72b984450 + last_write_checksum: sha1:21e81832f6109c72827b7e8c79eabc6da5e1f1ac + pristine_git_object: d2539ab72e2222bad97f78e01785ca9e6c129112 src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotalsPayer.java: id: b4e831ba51a6 last_write_checksum: sha1:12b76b982c240f1a12191934b16403052546431d pristine_git_object: 55a8ed649d5d732ed81ef4740ad6c480c651dfb3 + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotalsProration.java: + id: 0cda0d639742 + last_write_checksum: sha1:4442c7ed0a6b2c5a8af8dad891811f03040ca628 + pristine_git_object: 69dbdc0083dc85eb566642c5b20837c1828bd0dd src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPayment.java: id: "267411602068" - last_write_checksum: sha1:cbf864e791f3777b59769a63d335ca1ed6dde2a6 - pristine_git_object: bd80406acb4a7ac2c0af090d3776c012322625d9 + last_write_checksum: sha1:c94cdce3b115833935ea02c077f5cb5fc28031ee + pristine_git_object: 799cfa8e6cb02b3e4e81ca8a77b348be6abede95 + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentCredits.java: + id: d37241d3e942 + last_write_checksum: sha1:6cd7cffd9b3a50c4bd7b56be75efe0ebeff50941 + pristine_git_object: d16b741a95b6ac1c2cbfe15ca01b1d4959052aaf + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentDiscounts.java: + id: d4df737b63ce + last_write_checksum: sha1:fbaf896c8252e4c4d850d8ffe602537496c4ebdd + pristine_git_object: 9c9e2d395e4d07155d456a637daf802d631e0847 + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentPayer.java: + id: 6d7b991e956f + last_write_checksum: sha1:74b2d71142213f045345c599cc9f038256ee8f22 + pristine_git_object: a3e827e99b8a77d478b9591623d5d8875f5fe96f + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentProration.java: + id: a4d61954c97c + last_write_checksum: sha1:b60c6cc37d3d288b79c7ac71218785ad483064d4 + pristine_git_object: 6e7d2c94db63773c1ab74027f11aa764d135412e + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotals.java: + id: 6a7861c4558d + last_write_checksum: sha1:c5e1a6dc6018af052b681493fc0a786283a404c7 + pristine_git_object: 67c58898380dc8357c529cf320187dd52cd4379c + src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotalsProration.java: + id: d9c0d404e531 + last_write_checksum: sha1:713170a51a65857ea9b3fbd09e107bc0db8fa55d + pristine_git_object: 9560e6a5cb9db8af452b515d67b28a7bd524f9bd src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionObject.java: id: 5622445b1495 last_write_checksum: sha1:97cb6f2f00211417481b723fa1769030cc53a6e7 @@ -4728,6 +5212,10 @@ trackedFiles: id: 9df9fff0a6c0 last_write_checksum: sha1:91d74e668582dd5bb53f8ca5b149ce2d207dfa9c pristine_git_object: 303938efcd9591d12f0516323c46b19660192819 + src/main/java/com/clerk/backend_api/models/components/ConnectionType.java: + id: 9b83bacaa98c + last_write_checksum: sha1:04a7dcfc3a82e4cdf51ecc81f1a40931367db0ba + pristine_git_object: e1a4cd3aa9df18891010d3162e6dcf66ff190e1e src/main/java/com/clerk/backend_api/models/components/Cookies.java: id: 760ded68e23a last_write_checksum: sha1:a58818ee077db92b940e6bb7ca18a56232648dbd @@ -4738,8 +5226,12 @@ trackedFiles: pristine_git_object: 12bca16938f64515020dca8a7336e9e71b44fb31 src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequest.java: id: "566330433822" - last_write_checksum: sha1:9f3db43c3667803a860c9ce54df518016dd4240d - pristine_git_object: c8c8b73a7eb4378e77232fb6bdd508210cab0274 + last_write_checksum: sha1:f3b56754adbe0df4f4a979b7dbf1e72a3e5aef3b + pristine_git_object: f98fea664e323bd45052313184fb3f221a052d6c + src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequestSupportedBillingPeriods.java: + id: 17538187e754 + last_write_checksum: sha1:9a8b9bac8051b60558fd1868220333ad181a3589 + pristine_git_object: 81fd3a832b4be3c0cb54fc447e6a071f5aaf7bb5 src/main/java/com/clerk/backend_api/models/components/CreatorRole.java: id: 6e1376b7f0b4 last_write_checksum: sha1:caf1b71ba3951e4a78413ca2853b1567652db0d9 @@ -4754,8 +5246,8 @@ trackedFiles: pristine_git_object: 58fdd673ddc95275747c26df934f93e965697dc5 src/main/java/com/clerk/backend_api/models/components/CustomAttributes.java: id: a3a8d83c1104 - last_write_checksum: sha1:f627d54fc9e080ed360ea9b5f4c768b9be9426b3 - pristine_git_object: 963ef1d0320f57603070bca06f36719236bb53e2 + last_write_checksum: sha1:c03872e79b1e1fc6b875f920fb895997cfb8a0ab + pristine_git_object: 8664e8cdc365f88939e92961e577d119eaaf29d1 src/main/java/com/clerk/backend_api/models/components/DefaultRole.java: id: 0adec04077c6 last_write_checksum: sha1:86295e9fbbbbd4619d639f3d3083c41cbee68ce4 @@ -4764,6 +5256,10 @@ trackedFiles: id: e63632c18733 last_write_checksum: sha1:19a5c978b43f83fa423f8e093c4c8d74637980f6 pristine_git_object: 747889d36b70f2d653a5da1a35beb023b3935be3 + src/main/java/com/clerk/backend_api/models/components/Discounts.java: + id: 2c514b54dc59 + last_write_checksum: sha1:e8fd8aa70f7d50e795f44ab0408c139498cc870b + pristine_git_object: 1d26d4956790d7a78ed2878b31a1719aa2d7384b src/main/java/com/clerk/backend_api/models/components/Domain.java: id: 3d9f103e7a07 last_write_checksum: sha1:d726126a65bb70e7864e028c81d7aa5418aae383 @@ -4840,6 +5336,22 @@ trackedFiles: id: 0a6f86d0cd4d last_write_checksum: sha1:1d689447c9eb3332fd6c832fd3607b55301ae691 pristine_git_object: 48758faa066b71bd9fde20eefc04747bbf63a93b + src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRun.java: + id: e4600cadec23 + last_write_checksum: sha1:aa1c8441b6cd6c705bbcb8c9f27e2d972352cf34 + pristine_git_object: 0581a5662d8363cf54e9e2c7a5f4ff7e51825f54 + src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunResponse.java: + id: 7171bc90b527 + last_write_checksum: sha1:3fea884f8792d960efb7e25fd68733fe1175258a + pristine_git_object: 45f1da21b670ed1483508de40b3a73df7e26d112 + src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunStatus.java: + id: 29fcc78fcc37 + last_write_checksum: sha1:2c46f4686b02613ee8d00aca2ff1c14f6728829b + pristine_git_object: 2afc8ff9d6a877376d84879b29ce299893911369 + src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRuns.java: + id: a4df64c49ee1 + last_write_checksum: sha1:c4e620f8246a1969bc5dd78a5055f900813713e0 + pristine_git_object: 7f65a2f08909e67a6fb373c0f6e3e6e373876d95 src/main/java/com/clerk/backend_api/models/components/EnterpriseConnections.java: id: 117b30e2b0a5 last_write_checksum: sha1:9cc3d8e22b540932852870acdeefb7e6d405b369 @@ -4878,8 +5390,8 @@ trackedFiles: pristine_git_object: a80619953057e030dfe02d307d78cf7b3fd272e6 src/main/java/com/clerk/backend_api/models/components/ExternalAccountWithVerificationVerificationTypeIdResolver.java: id: 0821d24c0774 - last_write_checksum: sha1:2b3584dac5a0e37772369aee83e0b0ca601e638d - pristine_git_object: 295d23b33ba13ea7887365435c61bc089daf4546 + last_write_checksum: sha1:e35fbd592b6c4c7819c718347ae7ae834247da74 + pristine_git_object: a69885db561f87eaf2b11752c96ebc4b82eb0a96 src/main/java/com/clerk/backend_api/models/components/FeatureResponse.java: id: e41961b4d49c last_write_checksum: sha1:2b8489c3c0cf114b756b36f5c795791bcab2831f @@ -4920,6 +5432,14 @@ trackedFiles: id: e4cae529c4e4 last_write_checksum: sha1:b1e4a42fdafb68e07365bd4370836c31514e541c pristine_git_object: 56d7ea42be0666211c2fbff215d330a10297ce6a + src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java: + id: bbf15f4ec646 + last_write_checksum: sha1:3780f73f12dde38e936e41dcaf45ce6dd1c7c177 + pristine_git_object: 83252beaa63acf1cb2ef2f8291ef776a89e558d3 + src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java: + id: 50a1abf445b9 + last_write_checksum: sha1:70d5468ce08caa61d3d5df6f2d0015d5fa380c7b + pristine_git_object: 641bf41fe756b76becea275487216fcc2a76616a src/main/java/com/clerk/backend_api/models/components/InstanceObject.java: id: 4415b78ee245 last_write_checksum: sha1:5e3de7ea37fde1fa59740c5b328dc36c7fb06769 @@ -4992,6 +5512,10 @@ trackedFiles: id: fcfda9810ba8 last_write_checksum: sha1:81aed52543ad72516a2a70435ba32745833e6f1e pristine_git_object: 8eb145f14c57c27ae0dfd1fa9b577d83177534a7 + src/main/java/com/clerk/backend_api/models/components/Logs.java: + id: b8f2eafcbd0d + last_write_checksum: sha1:ac01dd2e73daf9d9f7cef59b476cc41cb6369e81 + pristine_git_object: d6488ddd6f0242b6b5f2edb59d3b53bfcd0845ec src/main/java/com/clerk/backend_api/models/components/Machine.java: id: 219373f2c53b last_write_checksum: sha1:70b5304790a3dd4b7aeb529985322eef99de6a80 @@ -5062,12 +5586,12 @@ trackedFiles: pristine_git_object: 71135fad536e85b8aa8aa5a46f7cdd33be06b0a9 src/main/java/com/clerk/backend_api/models/components/NextInvoice.java: id: 7031aa3307dd - last_write_checksum: sha1:b6ba130d85c8ecc0946c651f7b06654ee2da01a6 - pristine_git_object: cc5aac0bae23459fa2500a7e3a1343725ac6a360 + last_write_checksum: sha1:9fbd25b44b40b008b00dd7e0aa22dd3fe7ff95d4 + pristine_git_object: 9789270b531d720d7d6b91454b53b5f8a8acbbec src/main/java/com/clerk/backend_api/models/components/NextPayment.java: id: 6c1b81a1079c - last_write_checksum: sha1:721d4d01887d42ce6dc5ab36589239ee5224bee2 - pristine_git_object: 0c456e32edf7e05255cff0f2b515abd06d8e725b + last_write_checksum: sha1:a1f6c3b32ba28527af5548ddd221602086bb6491 + pristine_git_object: c0a950126c69badee0996f53d83229a74f3a58f4 src/main/java/com/clerk/backend_api/models/components/Nonce.java: id: 1ac391880ae9 last_write_checksum: sha1:4f53ea995ae28181bfd0627ca09bec94ff760e61 @@ -5110,12 +5634,12 @@ trackedFiles: pristine_git_object: f25f0c27418fba9ec9c63d62075c8380659045aa src/main/java/com/clerk/backend_api/models/components/Oauth.java: id: a96cce614d99 - last_write_checksum: sha1:3b3d7c6abf924a0f7b572e45c99ca73215b29064 - pristine_git_object: 53da109f4db230e5d3d9daef8a6a700985f0de1c + last_write_checksum: sha1:5e8bf58a81b059ace384d43d2308b8c25184fe4f + pristine_git_object: d36eab451832c32bc390f00bebbab2b7ad5a0872 src/main/java/com/clerk/backend_api/models/components/OauthConfig.java: id: 9caf84269364 - last_write_checksum: sha1:c044a8dcd54e94cb493b603434b1a09aa615f95c - pristine_git_object: dd8711fec3e472b331658832551dafe3610a54d7 + last_write_checksum: sha1:bfac57ec70016339ab85b8d948090225820363b3 + pristine_git_object: 6d4f09ffaa2fc63d4730e56fb0883d22e48eefbe src/main/java/com/clerk/backend_api/models/components/Object.java: id: 2b57f2909baa last_write_checksum: sha1:030ea1239c0b660db08963a118606b3e96ffe96b @@ -5130,20 +5654,16 @@ trackedFiles: pristine_git_object: 02978ea5a5e1c647e6ed999d6658d8451d41e2d0 src/main/java/com/clerk/backend_api/models/components/OrganizationDomain.java: id: 367543ec850e - last_write_checksum: sha1:64f301e081217480dbaed064943c1ae2f056737c - pristine_git_object: be09e40b888c5f786a4882b1f39a82689b275804 + last_write_checksum: sha1:86cb48496ca151ff11567010656ced29e25ee037 + pristine_git_object: ad4e4b59d01b59b26153a08042e4b45b0ec6dcc9 src/main/java/com/clerk/backend_api/models/components/OrganizationDomainObject.java: id: e6789db0adc9 last_write_checksum: sha1:0aad2e6a8a5b414b2c28b4c1f34380677a38aaab pristine_git_object: e0370ccf292a75a1c158daf57f1f68440821e959 - src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java: - id: bdcf913dd306 - last_write_checksum: sha1:5628b19ed561e6e4e39e3d569571e5aa4a16b651 - pristine_git_object: 44fe88ea63167e0328a17e1d365e52fe8d98ecfe src/main/java/com/clerk/backend_api/models/components/OrganizationDomainVerification.java: id: 8b65aa7b85de - last_write_checksum: sha1:0e52c11e7c43756067a85642decffc0442f22125 - pristine_git_object: 62d064c10be68500530851afa468601620fbe4bc + last_write_checksum: sha1:7a3fbace64aa58862439ffc377e929b751351f27 + pristine_git_object: adcef428fc60924032b2c7fad3536050c947847e src/main/java/com/clerk/backend_api/models/components/OrganizationDomains.java: id: 6251837cfc79 last_write_checksum: sha1:bb97b70f737216344719d0955e32ff5d176d9b06 @@ -5230,8 +5750,12 @@ trackedFiles: pristine_git_object: a1af57fe434d52d82d6c1aaccb8e511606917ab2 src/main/java/com/clerk/backend_api/models/components/Otp.java: id: 2a74b4f4e80f - last_write_checksum: sha1:11d7d4134c283fb0c91eb1510ac99d78b9b55d41 - pristine_git_object: 7b990bf258f1f614549756247e599adb8b145b88 + last_write_checksum: sha1:ca0741dcdf971f0c1dc7992d6588fbec739ac7a4 + pristine_git_object: 8d6e9e00ca7a2d12c68d8c6d6f0d17e87ab2cb5b + src/main/java/com/clerk/backend_api/models/components/OwnershipVerification.java: + id: 9cfe90c87a6b + last_write_checksum: sha1:06e21541bfc879a526797c824aff1e70aa318b22 + pristine_git_object: 9c3bda4b8fbca46b8a7611c692de991e309cb7cd src/main/java/com/clerk/backend_api/models/components/PaginatedBillingPaymentAttemptResponse.java: id: 15a8c9c2913d last_write_checksum: sha1:01ab63270452634764f6717b263f9ceb1e8c071d @@ -5252,6 +5776,10 @@ trackedFiles: id: ef3ea538e13a last_write_checksum: sha1:8a045449279acf1128505a41550aaf6c9f9e0202 pristine_git_object: 7369c4785da2fb48b653bfb6f65db505298fa8c6 + src/main/java/com/clerk/backend_api/models/components/ParsedUserInfo.java: + id: 4ed755e6c6c8 + last_write_checksum: sha1:aa390ae9b06448611e29f7340580161985e41780 + pristine_git_object: 62d2dcaabb65bdab7fa697aafabfe551b4eb9312 src/main/java/com/clerk/backend_api/models/components/Passkey.java: id: a364780b284e last_write_checksum: sha1:c9954875d5271d6abc01189c2f2be2127e482e1c @@ -5462,8 +5990,16 @@ trackedFiles: pristine_git_object: eedb7412ca285e9cc78f042c43219b6dc900d649 src/main/java/com/clerk/backend_api/models/components/Saml.java: id: 47564546a8f5 - last_write_checksum: sha1:a7f081e2439a7f2df9ee1bbe5c8143d629d3a79f - pristine_git_object: 5fa160166521ea4776950194ff6f399e4706b1ac + last_write_checksum: sha1:699784c9e31206f2ee92cae0fed32e0348e758bf + pristine_git_object: f75b35326a853c27b07e80bb49c240b9de10f94e + src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotal.java: + id: 716e515bc5c5 + last_write_checksum: sha1:838f4e1c2f69b0993d2c5f0aaec9686aa8788563 + pristine_git_object: 1de3553898ac4241a8050f33514e572b2f2475e7 + src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotalTier.java: + id: 4957ebab14a7 + last_write_checksum: sha1:03f5c754488c539c16d9297ded17cff6d888f9f1 + pristine_git_object: d706dcc96b6e6446eacfe9cc0426e498e134d7ef src/main/java/com/clerk/backend_api/models/components/SchemasCommercePlan.java: id: 0cc05a9fb2d4 last_write_checksum: sha1:0d8b69fb2ec6d29e51296caaa8d9907b0cc17202 @@ -5504,26 +6040,66 @@ trackedFiles: id: 5bb07592e559 last_write_checksum: sha1:43762089f3a789a3e772488153e74e0b3b2bf871 pristine_git_object: 6455b82d8a67d5de2f0983cba2b642845880452d + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemCredits.java: + id: f1ead136a9f6 + last_write_checksum: sha1:de6a5c1dd62eca118b4cb252744432343c64d3c7 + pristine_git_object: 068ae38b94d58a2e6c6644ae960100dbb88d3c3b + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemDiscounts.java: + id: 352c0157533a + last_write_checksum: sha1:fd5916bf41a85399780477a7b99701623feb6dd3 + pristine_git_object: 78da3cfd9bf00683e98b516a7dafa26b13e92914 src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemFee.java: id: 43028752584b last_write_checksum: sha1:8fb73cffc30c9337dc59676519618f6db7e6dfc2 pristine_git_object: fb3c20fd13816025b103061562f4a46d6dabff7e src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.java: id: ceb0632495b6 - last_write_checksum: sha1:df99a30e993ab101f6311296064afece680fd926 - pristine_git_object: 2582e6494d3cc8c6fe4c0a52b97a46ae354391b6 + last_write_checksum: sha1:cb0e2e7df2082a2c77779d02024098d4764b9551 + pristine_git_object: e856a532b9c02bfbaeddcc0be4ae4addb994b032 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.java: + id: c20316005f1e + last_write_checksum: sha1:81253c07a76c4132a7f959c441a5211ccd21a5af + pristine_git_object: be16e369ec9adfb3ed15fe3e900411a71d27ae89 src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPayment.java: id: 01dddd94c55a - last_write_checksum: sha1:af4d94be39a598755cd75d22f757e53bd5db5201 - pristine_git_object: e172641bb637fac42cce0bf900e49692c30c63ed + last_write_checksum: sha1:6c54d64512f4aa98210e3d9ca46af2e1fb42df69 + pristine_git_object: e203189d5b1292b4b3f770fe400e01543a210595 src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.java: id: c14ca560f270 - last_write_checksum: sha1:e8cd2e417db2162c6ce78627ed5b323aa8a30ec9 - pristine_git_object: cece0711071d766249a66d54f60203f2ae81d1dd + last_write_checksum: sha1:44096a7b9d6aec882e0aac13c7b5ad1d7dd203fa + pristine_git_object: 88c2cb4965d5e69df582ca6ad2946bcb1ac50435 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.java: + id: 98ecf096f6ec + last_write_checksum: sha1:e7fcfaee5bf7d51c8ce1adcfc4bf74d7b854457a + pristine_git_object: e548d4af6a71fb35e075aaa236004c06e88c0a5d + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.java: + id: c09b64d27d43 + last_write_checksum: sha1:0489e498376284ae70e2bbe1fc007c7fa67d7e99 + pristine_git_object: 0f6c3f2056dad6af8d36db946913f1b33fa7fe2d + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.java: + id: c150724cc70a + last_write_checksum: sha1:e8dce4213c07c0c4f0c61fe41b0ff2613cb62b1e + pristine_git_object: a89876764999d33ed2c4830c5062a95561d2f6c0 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.java: + id: 035df956f74d + last_write_checksum: sha1:27166f45294533a6b099fbf4a68ad08e979fe98d + pristine_git_object: 9336045dd1122528aba37caa98d2b13673e8b655 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.java: + id: bba1a5bf88d6 + last_write_checksum: sha1:f61f4df4ba8e9e69ca02e56f7aae5912ad7132ee + pristine_git_object: 07b44a7a0b647f125485e530440add3e8c6e5fbc + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.java: + id: "207991478293" + last_write_checksum: sha1:cc247f78e675ccc911becffa2fcd6876324cef4c + pristine_git_object: 6bf07131eb2aea3ae96ab0399ea29cf8b0ed53fc src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemObject.java: id: d0f047b5d449 last_write_checksum: sha1:6816a1969fea6af2843c96b0dbc1064b542d981b pristine_git_object: a7f3f67e91cb96c04bed7e17a175796374a99544 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemPayer.java: + id: 74bc06bd3879 + last_write_checksum: sha1:5061d3c31c0f46a3ef513182901b728fa3e8f7bf + pristine_git_object: 166c01ae1ff3e06de93db97cd918efa8f3e971ec src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemPayerObject.java: id: 9c991a6faea4 last_write_checksum: sha1:2424c2ad9c8039be5126d3a4e5dd642334f1aafc @@ -5548,10 +6124,18 @@ trackedFiles: id: 05137c926d24 last_write_checksum: sha1:b0ee2d4db82f864b97f4dc351b6642c61adc5c9f pristine_git_object: 0036ba7e3d765bb0fd0097bcb140cfea6951e575 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemProration.java: + id: 61870a406fff + last_write_checksum: sha1:d2188d8e57c558ac7f714c2f878906cd8e4e4314 + pristine_git_object: 6cf59f66d59a7eeabe1b4fda7566bbb0c3138007 src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemStatus.java: id: bbee3fbb8905 last_write_checksum: sha1:dd0f9041e1a813f88f9684868ce95044904342d1 pristine_git_object: 21103ceeee8f994421eabbd02b1adfce1a66aa33 + src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemTotals.java: + id: df3cd66addec + last_write_checksum: sha1:4633d939a0c9eaf8aa2f71139742cef0414ca9e9 + pristine_git_object: 85b4664389e4224d06320ba60dbb72acce649092 src/main/java/com/clerk/backend_api/models/components/SchemasFeatureResponse.java: id: 599152e6cbc3 last_write_checksum: sha1:d01a9e0be7250572fae63529a67eb1a37e29d997 @@ -5560,10 +6144,14 @@ trackedFiles: id: bb857764be22 last_write_checksum: sha1:3f1f7b767a9917139b7a692f4b934053cf327442 pristine_git_object: 0a20ffc71a06ff214b49df5adcce99c405f76aba + src/main/java/com/clerk/backend_api/models/components/Scim.java: + id: 602a309b40a5 + last_write_checksum: sha1:dadc2ed92b51d6bc03450db9fc34556c59575aaf + pristine_git_object: 33344e519e7f3d4db7aa1dc2505bcfc0c057c07f src/main/java/com/clerk/backend_api/models/components/Seats.java: id: a2587836532d - last_write_checksum: sha1:8737cf122af5efe4cec8bd0d5cfaa8701bbff391 - pristine_git_object: 340c82c7c8bad791820abb8739bcb65e153d5b57 + last_write_checksum: sha1:705ccb5a6e6f5f5f9c5271096a437708bde260af + pristine_git_object: 990e1c6af7eb9d1c0dc6a237bd27dec0c5230715 src/main/java/com/clerk/backend_api/models/components/Security.java: id: f5c22fa96300 last_write_checksum: sha1:cccd86e428763a6d05632a797fedc1952ae7945b @@ -5636,6 +6224,10 @@ trackedFiles: id: 56679182117a last_write_checksum: sha1:899dd5ada88a2705e40793852eebe32440d21807 pristine_git_object: e7b6df07bec287bf557ade85bee1b74cfdbcd406 + src/main/java/com/clerk/backend_api/models/components/SupportedBillingPeriods.java: + id: 2c434a197c46 + last_write_checksum: sha1:7743685f1de173ad958f305a75d838cc11581bb3 + pristine_git_object: 34b3a2ed7d936b92057d97b003832bfcab35bbc1 src/main/java/com/clerk/backend_api/models/components/SvixURL.java: id: ddd0ebb34b74 last_write_checksum: sha1:b66c65262c371b1d8ffaaf78248211b4fb2247f3 @@ -5678,8 +6270,8 @@ trackedFiles: pristine_git_object: c33ae3370efcb945a884cf6356b2f5e260106245 src/main/java/com/clerk/backend_api/models/components/Totals.java: id: 8b62f4637066 - last_write_checksum: sha1:cae697371c9fe8a000b33d695fbd0cc6a91adc73 - pristine_git_object: 957f613732c554a0404942ac7f84451af213ea56 + last_write_checksum: sha1:fee537efae9bd20d8668d4617ae774d87d50a5e9 + pristine_git_object: 52776546a64b17122aad9bf044424434cac10c32 src/main/java/com/clerk/backend_api/models/components/Two.java: id: c2c940050402 last_write_checksum: sha1:6dcd2c3985e4afc49be8b3b339b639a6bb5b6b91 @@ -5718,8 +6310,8 @@ trackedFiles: pristine_git_object: 8d6abfb9306f4b8f50140816f566e9994c0f8fd0 src/main/java/com/clerk/backend_api/models/components/User.java: id: e0ba80043def - last_write_checksum: sha1:70cb46a44f31b547bfbcd84e881da71e2d2c3fd8 - pristine_git_object: 1c915fdb7248ca97638ff796c89e1b0cbd75d37a + last_write_checksum: sha1:17ba0d0df46f795b4422335a916aacb61a1bef0a + pristine_git_object: e9466480a3c00607d2ae1c7a8436bb5d98762587 src/main/java/com/clerk/backend_api/models/components/UserObject.java: id: 5efb9fe49895 last_write_checksum: sha1:3817019cf8043dcfae4bc45dc5a9d18da776a69a @@ -5814,8 +6406,8 @@ trackedFiles: pristine_git_object: 6f0be5206f4470734fc50bf8125853b5dc5650cf src/main/java/com/clerk/backend_api/models/components/VerificationOTP.java: id: 1b81b53574d5 - last_write_checksum: sha1:3d7c37209a5edca877fda29915c7f5f763706be8 - pristine_git_object: 5c9979474942c38b4e3263c8ac5e4cdc6081e5e1 + last_write_checksum: sha1:0ddfe47770cde3ef2a3378d7f1ac527cbb494299 + pristine_git_object: bce52e3a5f66d65ced3b54176c4a15209da3fa53 src/main/java/com/clerk/backend_api/models/components/VerificationOauth.java: id: 97c6f1168b10 last_write_checksum: sha1:7c4ba0ceead3558b9203c6775abcb934cd44bb8c @@ -5844,6 +6436,10 @@ trackedFiles: id: 9091b7d2d0e3 last_write_checksum: sha1:8f06cc14573cbb4ad42c347d5862d1473c72367f pristine_git_object: 9e117e3f624f237ddc28be62403fa6509c0c81b5 + src/main/java/com/clerk/backend_api/models/components/VerificationOauthVerificationOauth.java: + id: b9927e757d34 + last_write_checksum: sha1:8a42250da8d6cd7b2928826f38bbecfbe0423085 + pristine_git_object: 9afb7ab20cbbc4465568fe27c5716665c09444f8 src/main/java/com/clerk/backend_api/models/components/VerificationOauthVerificationObject.java: id: 6dbf6e0c9c25 last_write_checksum: sha1:eab7d839166d25e2ed974eb8c93218f4939a8350 @@ -5884,6 +6480,10 @@ trackedFiles: id: 4f39fd3b477f last_write_checksum: sha1:baa54759e938c46a545c1255cea3f95627f28b67 pristine_git_object: 7db64bac07713edbcb5f06f39cdfb9b4d1a4eab0 + src/main/java/com/clerk/backend_api/models/components/VerificationResponse.java: + id: d9e22608723b + last_write_checksum: sha1:e5969b7a5b6ba0022a6c95e3cd771901802b6d4d + pristine_git_object: 3ef95f462ce92e658a35c6b810172f7aa4e7740b src/main/java/com/clerk/backend_api/models/components/VerificationSAML.java: id: 490303e36010 last_write_checksum: sha1:a74f3bbb62aaf818542d1bf819a60b7e522318bd @@ -5892,6 +6492,10 @@ trackedFiles: id: 2ce7f73cbe37 last_write_checksum: sha1:cc46d2863d750ac7c44970eecbe2fbd985a316d5 pristine_git_object: c56001626462da922925938813ef913c4a8a9e5c + src/main/java/com/clerk/backend_api/models/components/VerificationSAMLVerificationEmailAddressSAML.java: + id: 32532625dbb9 + last_write_checksum: sha1:1a985cd61d5c2b9dce10011844ea7382b64e6470 + pristine_git_object: 9191b756ec8ee12c0e625fd997e86d59e874199f src/main/java/com/clerk/backend_api/models/components/VerificationSAMLVerificationSAML.java: id: 6cd2f85d18e1 last_write_checksum: sha1:d84e79fc8299aba881719433681922d0eec10867 @@ -5908,6 +6512,10 @@ trackedFiles: id: 76b655412b1a last_write_checksum: sha1:09a72d69231850448924c11f97759b3ffc2ec653 pristine_git_object: 2626563a97c44fe43087ed53db4069932baffcd9 + src/main/java/com/clerk/backend_api/models/components/VerificationSCIM.java: + id: a668a3a3e8fb + last_write_checksum: sha1:4edf5a4f8515a1dbb121fa979ba5fe2821c14d18 + pristine_git_object: 8e5f07cd7c5ce8f263a0a4e39db2a523887a53ef src/main/java/com/clerk/backend_api/models/components/VerificationSamlErrorClerkError.java: id: 895f787d2923 last_write_checksum: sha1:4bf510284b2d71fe5b5743e1797a9770760e21d6 @@ -5948,6 +6556,18 @@ trackedFiles: id: 2d49dcfa9b89 last_write_checksum: sha1:0d72828f415f9b592154b10fc5cb1bbebc10c349 pristine_git_object: ab528f44b93e7b63dfd1a4380edd114ff1f3c5b5 + src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationObject.java: + id: 59f52110669c + last_write_checksum: sha1:fbf0bcb87936b56de5b857ad83a961a164a07074 + pristine_git_object: 6c0e15615b557893efa9c0135c64a1a5cb91394e + src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStatus.java: + id: 2624c5fcfe56 + last_write_checksum: sha1:3bd801a5c21d7d374223c57019c14fb6a6e5d387 + pristine_git_object: c3c2e2253b6af180e619a474f7c83bb2befa5664 + src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStrategy.java: + id: c0018721e46c + last_write_checksum: sha1:2ba928f188b9d6538bda4d12842586b230d590b2 + pristine_git_object: 600c5c9004d173c98baaf400e794eb700aa7ac18 src/main/java/com/clerk/backend_api/models/components/VerificationStatus.java: id: 92575a49be66 last_write_checksum: sha1:89225b4077db00a3aeb2980718062d0040e1a5c7 @@ -6002,8 +6622,8 @@ trackedFiles: pristine_git_object: 5c178d958fb40dab09d81a31ce2725b2621c71aa src/main/java/com/clerk/backend_api/models/components/VerificationTypeIdResolver.java: id: 67fbd3bb9682 - last_write_checksum: sha1:c966f5e7c69fd6a517e1fe05412649c0125237a4 - pristine_git_object: 23e8e1db67b26295af58a9175198f34d1c968844 + last_write_checksum: sha1:f0a6d32d190a0c94385fb914b6d564fdeccdb093 + pristine_git_object: 2da04104cf5afad97b0058f1d7ee3483c8826dd4 src/main/java/com/clerk/backend_api/models/components/VerificationWeb3VerificationObject.java: id: c7680a6d4d2d last_write_checksum: sha1:f17ceb259945e6aa72256826d050062022b8b734 @@ -6080,18 +6700,50 @@ trackedFiles: id: 2def47eec248 last_write_checksum: sha1:d07ecc5d63e55898c7058772011cc226c6527985 pristine_git_object: 89eeb7f55c77785f0cd4e2811c99400b2b0cd355 + src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysErrors.java: + id: 80e3e5525201 + last_write_checksum: sha1:8e3f5b2cf40032c7d2e881c585f563669890cf6a + pristine_git_object: 9c7cde6d370faa78a53522a61e8122f46f477fa8 src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysResponseBody.java: id: f180c562970c - last_write_checksum: sha1:60cbaad6ca0d00dbc37f502b599671ccdc5e68fe - pristine_git_object: c09d01e68cce24f79e2ea84cde52c4b12a96448c + last_write_checksum: sha1:27983e8e039077ba35577fd94de38df867ed5e07 + pristine_git_object: 2c1a461c38a040e1ebbe8634d1448e30abdad890 + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.java: + id: bcbfba4d2d37 + last_write_checksum: sha1:45253ed80c6c3370e9d9ae75f19031ae1f220b27 + pristine_git_object: fb1915fb20f29baf4307e067e332c265c41a4d9e + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.java: + id: e20f25bed369 + last_write_checksum: sha1:4c0ea6a595cb1e6a63cdcce7f18ec642c21641c3 + pristine_git_object: 346575b52d8bb72024faff44b0b9503b7efb3455 + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java: + id: 64dcf29a67d9 + last_write_checksum: sha1:713c3580d366b3c92f3e94dd7cba4f6654a14213 + pristine_git_object: 54b88a8a5872dc385f3638245c039096eb63ddb6 + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java: + id: 013a9065aeba + last_write_checksum: sha1:bba6e6cd8fa5cc4cd48302ba462c4c06b693426d + pristine_git_object: c5099fc0e33944bfc44d614b3cefdb79b84917c8 + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java: + id: 6276ffdf3d44 + last_write_checksum: sha1:530475b1c99b36497d843a25e02f552ea3e48412 + pristine_git_object: 7944375eb7b568f246a38d6ff9be849ed9fb2fe4 + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenErrors.java: + id: 59fe74cca880 + last_write_checksum: sha1:8d750e5f0c657527e16c96ea33073ce32c7260db + pristine_git_object: 0549cd2a0fa042e028a613d11aff3b98128f7d7f + src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenResponseBody.java: + id: 4aac4e35ae9f + last_write_checksum: sha1:528d5fbaced701661c6948c74f88af6e96f78844 + pristine_git_object: 8e0151adf7f596c9412c91a05d5149da472cc36e src/main/java/com/clerk/backend_api/models/errors/CreateApiKeyErrors.java: id: 7c05c4650c60 last_write_checksum: sha1:48f0f923ae91761c95a803725a871987d7a93756 pristine_git_object: 942f19796471da9f0d3f7c5ee1e594a67138fa21 src/main/java/com/clerk/backend_api/models/errors/CreateApiKeyResponseBody.java: id: f4a7a4cfb16b - last_write_checksum: sha1:ff523213adaccc37a0fd9d2828a6448f70bf633d - pristine_git_object: 6ed7af0d2fb91cae25af030d7262be9c0168397c + last_write_checksum: sha1:23262f5cabddf127e8130c487e81f0e74af51981 + pristine_git_object: 91d79288bd9d790de497576b4dbd82b0b5b1a2ce src/main/java/com/clerk/backend_api/models/errors/CreateM2MTokenErrors.java: id: b6498fd179cd last_write_checksum: sha1:b19488bdf67b7b3365fe023312614cfb12088c4c @@ -6212,6 +6864,38 @@ trackedFiles: id: e9b81a85b86e last_write_checksum: sha1:64cea2295c0cebe159fa077af6e0d071234942ff pristine_git_object: f4b89b1007b072971ea59ad3243a477e40cd9753 + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.java: + id: 82f3e0b2d769 + last_write_checksum: sha1:39adc10e0a73932891ae1d398a41c8ae3b3aca88 + pristine_git_object: 5153a90264061eedddbb7c677aace3b41df4b2c2 + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.java: + id: 3608dcbcf80c + last_write_checksum: sha1:9078a28deecdd37db57c3200d2045c6d05e5ceff + pristine_git_object: 15ec73cd5d473546004a5d752c9ddd7570d78c52 + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.java: + id: 61aad6031a0f + last_write_checksum: sha1:624a9410e301f3fc86a88c3a19355ec554ab3b49 + pristine_git_object: 39f529fabd617b00bba715e40f7345510dbbb4c8 + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java: + id: b75fd2a9a8fa + last_write_checksum: sha1:d20249f2f38121a76f6e20626225f7199c3e7753 + pristine_git_object: 1435bb47c999c448cf247fd3893228bf829c5b06 + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java: + id: 75c19850fba0 + last_write_checksum: sha1:9605f3bf191f9909e215a131bb3fa67952157171 + pristine_git_object: 714b10c27de0e66b3c6458bd9b96eead634ee7ad + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java: + id: f8b22166436a + last_write_checksum: sha1:33351d6edd595a8f570f6c2d66fd8d2ad9f6a11b + pristine_git_object: 5e2fc217af0944b529e147e8addbbd934ca1771c + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenErrors.java: + id: 028623ec931e + last_write_checksum: sha1:5987d499bd64acf7fb89e684953ccbd893b8bde3 + pristine_git_object: 98e541a04b27e918f731ab7300078643c9d73f0e + src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenResponseBody.java: + id: 1b6281b41f49 + last_write_checksum: sha1:362429eea6fa431ecf4b9d17a4622486a4534378 + pristine_git_object: 13328be2e8dd44730ae59f2be799ae5841f8e6ae src/main/java/com/clerk/backend_api/models/errors/RevokeApiKeyErrors.java: id: 0a0533e0eb6d last_write_checksum: sha1:8c4e84402fc04159a3284c56ad0ba60dbdcd0e9d @@ -6372,6 +7056,38 @@ trackedFiles: id: 83eb0c4c2be8 last_write_checksum: sha1:5591118704c7b405031d812f8b76ec89b40cec99 pristine_git_object: e9f56f3d1ad6aec4831fe41d82b02948f9da5bf9 + src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequest.java: + id: 00f8c3de1db2 + last_write_checksum: sha1:93b8ef55b4ca91205e7c9aa2a83272067c664ec1 + pristine_git_object: cf50d07fa3ae5b313d2d2df9ae176bf15ad73683 + src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBody.java: + id: c5d814578bd6 + last_write_checksum: sha1:8b833ce656c2ca197f32110836f4a692e401220b + pristine_git_object: 4e0914c8bc62b318f3a3d9c29d8be02782ae5a1a + src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBuilder.java: + id: cea4e24638db + last_write_checksum: sha1:587dfb757fc578bda7c8047f58549e3adbd207f0 + pristine_git_object: fba6da6cbcbbc72f8279e3f1117c2e4db5385f8d + src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationResponse.java: + id: 32ac97379259 + last_write_checksum: sha1:58aa189554ce0f2ba3ba000257902dbde5c1e7bc + pristine_git_object: 8c751d76425df79879ad9a413a92f74f97f6d989 + src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequest.java: + id: 03b81f499f00 + last_write_checksum: sha1:e638a9ca6439d18e5dbd1dbe6ea48609837195a5 + pristine_git_object: 74600e7ce00feff99e1bd1c8506efa0a6b629411 + src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBody.java: + id: 56fa05b8254d + last_write_checksum: sha1:ce9a2865175259a5755099d717b8ef268afeeb15 + pristine_git_object: adfcf2190800da0883cf589c3cfc24347410a01c + src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBuilder.java: + id: d200f27831ed + last_write_checksum: sha1:694a742de8dc4bb5d302828e4346d8eafe04d485 + pristine_git_object: 8648089326af671dd85cc05b678fbf0f28c10e9d + src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationResponse.java: + id: 71495c053504 + last_write_checksum: sha1:933ca5d2d8af20a18b64205a402a141d028512e3 + pristine_git_object: 683d16a79bffd73c1f82c33e83f0ad7863ec54d3 src/main/java/com/clerk/backend_api/models/operations/AttributeMapping.java: id: 156e1fde304f last_write_checksum: sha1:764359e5895547c95fec83e80cd84baa828daf0e @@ -6432,6 +7148,26 @@ trackedFiles: id: 7a930688c34e last_write_checksum: sha1:ff787f5531e81ae8d97def586e8efe403aecf084 pristine_git_object: 2f1e65f1de0fdb21875ee4e094f2f2a31e569d4a + src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenObject.java: + id: bd8be0c59051 + last_write_checksum: sha1:dcb5ed1e193170beb822e1230020a366e8b74dd7 + pristine_git_object: f9f72011c93187daeb9faea5b232257b1d97807f + src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBody.java: + id: fa843f9818fc + last_write_checksum: sha1:2227fa33f5bbda8a4c337a23c198e4a1b3534f1c + pristine_git_object: 38a2d21c15fcefdc8b0e0c44dc20ac04868ed59d + src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBuilder.java: + id: 101982b6ee8e + last_write_checksum: sha1:20a391bb5edf355697f230d0185b8271915ed2f1 + pristine_git_object: 4aaf6b5582be0b102e4ac1096b28f2fabe277976 + src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponse.java: + id: ab31aedad34c + last_write_checksum: sha1:bedb5be42ec2cf334820c9192e86297a9fe0b173 + pristine_git_object: a31de45c542e5f60b9e0c8361386b4f1e5b2c2d3 + src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponseBody.java: + id: da371a7aff09 + last_write_checksum: sha1:9db9d67c03473d207ea2b1a624d39599a1079e1e + pristine_git_object: 837dca3e184a6a77755e4458074007ebc3b4ee64 src/main/java/com/clerk/backend_api/models/operations/CreateAgentTaskRequestBody.java: id: 31919974652c last_write_checksum: sha1:8296bae18fd4c288617e25a0ea3015b6f1cd8d33 @@ -6560,6 +7296,18 @@ trackedFiles: id: 34004632a651 last_write_checksum: sha1:fcb9d994f0f275a76b3eb2687fd695eb19d6aaf5 pristine_git_object: c3bc5bfcbb4d91dbd52563520f65e4029b8213e6 + src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequest.java: + id: 624797c5cd50 + last_write_checksum: sha1:54990ca1df5604fbf90a8c2401f49ba97bea4672 + pristine_git_object: 8eafd1420687aaff21bed94e4da2b80642215ddc + src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequestBuilder.java: + id: bb1ee672eaa7 + last_write_checksum: sha1:fd054dfddc71065acd6d31c06f39b40ce8fc89e5 + pristine_git_object: 492855f9ccbf8298d1de1a227273fae0e3ca658d + src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunResponse.java: + id: 6a8fc91d470a + last_write_checksum: sha1:707fbcfb667d93b494626daa926f04a7eb0a00b2 + pristine_git_object: 52e2f06a80c5bd23484a4bbebc7b863b9762a26f src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBody.java: id: c422975f32d4 last_write_checksum: sha1:7e998321754ba80a12e77079dc48aae2948a7fef @@ -6590,8 +7338,8 @@ trackedFiles: pristine_git_object: d2d0da40f6e8655a6a823f2c51679f077030999f src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java: id: 72027b5018dc - last_write_checksum: sha1:e59cfad317d519d48bd1b1a3d07286ff6df98499 - pristine_git_object: 52b43cab26bed4c81183b5b46da02ca4b8db469f + last_write_checksum: sha1:c1f443d32e089f4a05a7a280c85d1f7c991923f5 + pristine_git_object: 1297084e1c3c61ac6fd0996f0ef84b47150e5ec2 src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBuilder.java: id: 9230de2eb228 last_write_checksum: sha1:8de6f8f6bb3a9834919414fd207b107d2b320dcd @@ -6886,8 +7634,8 @@ trackedFiles: pristine_git_object: e1a3738268fe8bbe10b0519a89a297b0b2cd08ac src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java: id: 07a02872c1bb - last_write_checksum: sha1:42184ef4b1e963d2b9af8071c93bb2c00e4c8280 - pristine_git_object: aecfff8fd811d1e438c27d9148233966a36fb0f2 + last_write_checksum: sha1:8c7a1cc0f4958ef7626237591ee38061d1de7423 + pristine_git_object: b6b8a597d60c7c1ebdd1cf91fdaad946d9e4748d src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBuilder.java: id: 9c766f1fdce5 last_write_checksum: sha1:8714278a5d32ce001be670fb1fa8d8fd6d5da6a7 @@ -6910,8 +7658,8 @@ trackedFiles: pristine_git_object: c1c25091a5a33cfaa91a549a02032b71da17f4c0 src/main/java/com/clerk/backend_api/models/operations/CustomAttributes.java: id: cdcd625ec9c6 - last_write_checksum: sha1:ab31b22dcb03324f6a2afb2bd59dfcc427d2dc00 - pristine_git_object: 020ef0b751e0154337a7d3f249dd8dd949577e97 + last_write_checksum: sha1:f8c82e4513508920e729abdc3873db26ea9e522f + pristine_git_object: 016b2b7f2609c7d34a132877f7929d954a024726 src/main/java/com/clerk/backend_api/models/operations/Data.java: id: 37bb0c0b9a29 last_write_checksum: sha1:d593bd38d263957ad899a8f6fa7d180963ba6bf4 @@ -7256,6 +8004,10 @@ trackedFiles: id: d8d39cba474b last_write_checksum: sha1:03f2a86eb664699e635792f42ef1c473b051467c pristine_git_object: 793f6376fc7c69e058fa7d184bdeaa05244b45d8 + src/main/java/com/clerk/backend_api/models/operations/EmailAddressIdentificationStatus.java: + id: 794ad9a542f7 + last_write_checksum: sha1:b286119489205dbe9f1f7d9294b7de6b60da4f83 + pristine_git_object: 888d2936e4be3e6bdf5ee61a67204ee6bb59c6e2 src/main/java/com/clerk/backend_api/models/operations/EnrollmentMode.java: id: df0169409318 last_write_checksum: sha1:21ed4ebefa6d84ac1d50d9a5ced3e2aa8cf924ae @@ -7468,6 +8220,14 @@ trackedFiles: id: 5540bb9f76dc last_write_checksum: sha1:4cebc54b528772a997bf91ace52fdb4e7c09e707 pristine_git_object: d2087d350fa785c63d05c8cd49534686373553e1 + src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java: + id: 24fa4f53db87 + last_write_checksum: sha1:3219967e3177da65422c0225d3659845622232d3 + pristine_git_object: 722c157ef0018ddc30f82863dbd912c04f0cca75 + src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java: + id: 2e538645c0af + last_write_checksum: sha1:1bd3957d99f313a8a9ba9152cbafa6ecee5b1620 + pristine_git_object: ed750777fcb94c5b7a025063c5ca54a0c3a44df7 src/main/java/com/clerk/backend_api/models/operations/GetInstanceOAuthApplicationSettingsRequestBuilder.java: id: 02d07b6d2923 last_write_checksum: sha1:cb92d8baca6072c1a2361cc2db397205b18611c6 @@ -7476,6 +8236,14 @@ trackedFiles: id: 17a0aa1bb1bb last_write_checksum: sha1:4b5ab513e92f860ed2ebcbe0e9fbdd26847328cf pristine_git_object: 3f32477adf9669a8536b9b2b7dc4dc9a62b2e22b + src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java: + id: 3ca323ed9c5a + last_write_checksum: sha1:8cf6dba7a15ce7a6e0bba5e4680f1fd25a3acdab + pristine_git_object: 7a7eb50ffac7cc9125b1d5efdbf1e0bdc8470fce + src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java: + id: 76af919b5c33 + last_write_checksum: sha1:45a19ba72d2ba7a9e876c45e1ef15a6c55feca54 + pristine_git_object: 23dd2fade7d0a8e885bee543ed176b08e93f3bbf src/main/java/com/clerk/backend_api/models/operations/GetInstanceProtectRequestBuilder.java: id: 86ff433995f5 last_write_checksum: sha1:546802a8506286526cb22dbaa081ef45841acac0 @@ -7832,6 +8600,10 @@ trackedFiles: id: b7a20b05bb7a last_write_checksum: sha1:b09df2c6197af3582645d0bdac9e6361ba64d3d3 pristine_git_object: 9be8e29a4ef75feed7e57d7d5193ac03833fe091 + src/main/java/com/clerk/backend_api/models/operations/IdentificationStatus.java: + id: c219651f34ad + last_write_checksum: sha1:7e9a37e72574f0b5cad7b4bb7ab77667702be3fc + pristine_git_object: 02caea4e529cfe61b3f2e015afda8282ad51cac0 src/main/java/com/clerk/backend_api/models/operations/IncludeInvalid.java: id: 7c75a6d68f21 last_write_checksum: sha1:61e4ed03f2bf9d1cfbeffe974f389be787560e1e @@ -7904,6 +8676,22 @@ trackedFiles: id: e84cec5431cc last_write_checksum: sha1:14a145d1ec67b7b1f33ee20eccc82761164e100c pristine_git_object: 563bb976e7a837a4af5c2a7b3c0df2a8fa417333 + src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.java: + id: e85aae742c20 + last_write_checksum: sha1:3a5ac9cbdefe3185ce7173503f19516e959b0ed4 + pristine_git_object: 7c0018f2c8bc79ba38633d402b0400fc87478ed6 + src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequest.java: + id: ba4f83e4c465 + last_write_checksum: sha1:6233973cf3cf49464bb17c41089f5e1c3a6cd478 + pristine_git_object: ab5b7cd73bfaf932cb1de431bf4a8025787a3a23 + src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequestBuilder.java: + id: 4d31ee2169d1 + last_write_checksum: sha1:1710af84cca4feea564f9264c2c125391b3102c4 + pristine_git_object: 6b42bb394f1fe6033135d3c9c5ad7f8ca0cd381b + src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsResponse.java: + id: 948a9e1ddab6 + last_write_checksum: sha1:31dcc61b66b5e147623d562e0ccc6cad3e7964eb + pristine_git_object: 66bb5208018d2cea22c016260b6c9ab841ae5f2a src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionsRequest.java: id: c00e2d81f582 last_write_checksum: sha1:f15f5a449981c7365f84183dfc207961a84e4e8e @@ -8184,6 +8972,38 @@ trackedFiles: id: 84d1953877e6 last_write_checksum: sha1:d6c55c4b04059cf07e5fb8f872007242bd23c4f4 pristine_git_object: 9298efb3103cb24695463e972cd070b360c681d4 + src/main/java/com/clerk/backend_api/models/operations/PhoneNumberIdentificationStatus.java: + id: b3a9a4878dfd + last_write_checksum: sha1:778db1fd949714528fdb11db7e1f82f1ddbd9f4a + pristine_git_object: f8095d6e190fdc41ca1e8affe0637c4d8b42fa32 + src/main/java/com/clerk/backend_api/models/operations/PreferredSignInStrategyWhenPasswordRequired.java: + id: 65e2126ae551 + last_write_checksum: sha1:68a0f43e1b59b6b1acbb69a16d4ceed6e1869a80 + pristine_git_object: d615fc588ba22991be167a6948e3907bd6ec2d4b + src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequest.java: + id: 0c78655bd1cb + last_write_checksum: sha1:bab2932fad0535556e091c7d24b00e1f5a3f579b + pristine_git_object: b120cb7c00fd7488cbbda0aa34aa8068d76d9228 + src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequestBuilder.java: + id: 1432f58907b2 + last_write_checksum: sha1:00729d307958b1275ab603ef5ef4f3530192317f + pristine_git_object: 186cfd3e8154e2e118f25d0a9d1fa53c60174c75 + src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationResponse.java: + id: fde2b1396315 + last_write_checksum: sha1:8d8deb6e72411fdc57421d7f40b8745665281d8d + pristine_git_object: b200417d3fe73ab612f21f949f6dd18a43c777ff + src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequest.java: + id: f33fea6c7788 + last_write_checksum: sha1:b82074d7928dd29ca76add13f6bd5661a454ab80 + pristine_git_object: 8003bfb1951c8b8e6e34e0da11ee84665c7b10bc + src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequestBuilder.java: + id: 8edd93ef4309 + last_write_checksum: sha1:4d1a1dfd12887ac5282ef0d509f1bfd632c2baa0 + pristine_git_object: 611e989ff8c546e3147b1f4fe06f50815cd42971 + src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationResponse.java: + id: 8f34c4a39f97 + last_write_checksum: sha1:a5ccd74d94e78f50a4f71fd0e7a3537a208ee8ad + pristine_git_object: c80a8dd968565dafb1735af2fc908540724e5270 src/main/java/com/clerk/backend_api/models/operations/PreviewTemplateRequest.java: id: ffbbc0074f39 last_write_checksum: sha1:9b6530670323ac26dd201a0bf83972c2543110c4 @@ -8288,6 +9108,58 @@ trackedFiles: id: 00e2d44a953c last_write_checksum: sha1:1f5722be4ddbfb0f16ce2234833907089cdcd946 pristine_git_object: 06a62763a0677de94e07e97b8ede99191e04653e + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequest.java: + id: d15ff37beb42 + last_write_checksum: sha1:f3fa3b4dcd927d3a9c31dec45b6f17901e667953 + pristine_git_object: be32a0b0a3eb068092c80092a66389b969d6a7aa + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBody.java: + id: b3049fca258d + last_write_checksum: sha1:53bc2356da4e856e384da0c70d017020033d06c7 + pristine_git_object: b05895e5432072e3e6b143fc0f55e02cb4e8ffbb + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBuilder.java: + id: e04782c20015 + last_write_checksum: sha1:550f2bd18e4d88dca8c77dbc9dba31ea0900f3f6 + pristine_git_object: ac7353695116aae73c406314018f9e5c89c2e0da + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressResponse.java: + id: 03640c8b5431 + last_write_checksum: sha1:84831d74cd781668b8119bc3e0c3d3405251727b + pristine_git_object: d53b1528929f30116986bdd636531aee3cf0cc60 + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequest.java: + id: db89fbc5a850 + last_write_checksum: sha1:79b61261010944af9187c7df9ee53ad10c4aa27a + pristine_git_object: 539f9a808d79091c57db834a5ad67862ce389cfb + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBody.java: + id: 95e9786259b9 + last_write_checksum: sha1:d89fa27b262c2ab5ec7dd7346c1b7fcd0737ae5d + pristine_git_object: 9e248d6344f63305ee7a2daa38a1a3407c41b46a + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBuilder.java: + id: 5997512d519a + last_write_checksum: sha1:34a726ec42a52bf613dd18692ce1b1a5eb147fe7 + pristine_git_object: a41f3da09ddb9a32435af359dcadd762e0b0ab3f + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataResponse.java: + id: 2861d1fef9b9 + last_write_checksum: sha1:3a8adfc0f66bf84cead870207f701590bd7245d7 + pristine_git_object: 00653d00cb1129b37bb2127c6a06a35f0043749e + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberIdentificationStatus.java: + id: 2916703e30fd + last_write_checksum: sha1:fa4b0a845a62e41076c1d8578c319a4e4f3760e7 + pristine_git_object: 7499affb769058b61d235ecf3e7ccd47777d1bc5 + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequest.java: + id: d19dff7160fc + last_write_checksum: sha1:4c5bb24b9e6fa881fae6495a0e6c89f7777715dc + pristine_git_object: 3cd11d32af664b709683e21e33fee06645017d27 + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBody.java: + id: a0f243f623b3 + last_write_checksum: sha1:8ec9484d26324f5626e83b1b380c1d30fb4d41db + pristine_git_object: 545de420773b11799411a4d9e544dd5dd38bbea1 + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBuilder.java: + id: a5a892086072 + last_write_checksum: sha1:1cae1141211367515723d3c6e7032663ca328fa1 + pristine_git_object: 2fea257beac69d90a95699cd7858f145da28f01a + src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberResponse.java: + id: 20e57689b319 + last_write_checksum: sha1:764775001c1b739dc9dfc6b0e4076cb3194c3cec + pristine_git_object: 3e94c11aa9156753786c2697f7be3854ea632db1 src/main/java/com/clerk/backend_api/models/operations/RequestBody.java: id: 2adf42204b92 last_write_checksum: sha1:d0dfc7c72f3bf5c1b6d37a698539ec01e034fefd @@ -8340,6 +9212,30 @@ trackedFiles: id: 8144df2c290c last_write_checksum: sha1:5ab1882e9b1a9dec6d83d15548188d06e53b3c4f pristine_git_object: 5ebad76e038164f65dda280c9ee6e6ab8df3f2d4 + src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenObject.java: + id: 604d0a4fc3c0 + last_write_checksum: sha1:30754fd20a823100d9c837fc2b1cccd9648fc0bc + pristine_git_object: 6ee7d6a95ca4e69f50491b1051d7c3f8a7f45d07 + src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequest.java: + id: 62c525ec1e30 + last_write_checksum: sha1:70368cb22b32ea6b8b08e22978d665ba6b811244 + pristine_git_object: 8e7cd32180370f7e2c18fc57cb1d56c8ec5059a2 + src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBody.java: + id: 7b40d52db573 + last_write_checksum: sha1:701d40b96e618c538c1f85f602c83fc0f9f6de6b + pristine_git_object: 9aca1abafbc2cac77d9789ae9b2d2dccbe7c64e6 + src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBuilder.java: + id: 637fb199c734 + last_write_checksum: sha1:35a991557e73d2328b4af3c3cda48146e1da12f1 + pristine_git_object: fb53c4d71d6cf3a6afd9443e96a22b7932d17784 + src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponse.java: + id: 49fa13a1e83f + last_write_checksum: sha1:7f8839c9bd082f6361c269a6214b195a8be99dab + pristine_git_object: 1de2fdcb1a544137b6503b9a98e31fd0ba55d324 + src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponseBody.java: + id: 9a6fd18e5ffe + last_write_checksum: sha1:f795dbb8ce6d74e9e8173a3ea6c0d139ccc4717a + pristine_git_object: 00c0e6f1b7f86890b2984de66909a71605b43cf6 src/main/java/com/clerk/backend_api/models/operations/RevokeAgentTaskRequest.java: id: 36e26e9212f1 last_write_checksum: sha1:eb1f8a12481c0c7e96ae5467e3fce472b44cf315 @@ -8658,8 +9554,8 @@ trackedFiles: pristine_git_object: 3262b9db2e81a8b1b82241287fb00eab86e09000 src/main/java/com/clerk/backend_api/models/operations/UpdateEnterpriseConnectionCustomAttributes.java: id: a57a0c26c677 - last_write_checksum: sha1:225d3e4d9e49f872fce7db7e47fa347b6414760e - pristine_git_object: e88cbbc8d3aa655c065ff667c37904aa621eaaa5 + last_write_checksum: sha1:0dcf0566c8afade82238b0c87b4e78a76de706f0 + pristine_git_object: 1bc751389dee15d04ca5179e02d003fdbcf36cb7 src/main/java/com/clerk/backend_api/models/operations/UpdateEnterpriseConnectionOidc.java: id: c738172f95b0 last_write_checksum: sha1:2ae22bee8d1d5b3add9162b12b464e6db96633b8 @@ -8696,6 +9592,18 @@ trackedFiles: id: b86706e7439d last_write_checksum: sha1:85a6e68bb42d6fb90f7ce090b47eb10dee4b10e1 pristine_git_object: cd40f47d7fcd2f6440cb42b5798ea68250ca1a79 + src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java: + id: 419d2db13832 + last_write_checksum: sha1:2b2256fc83b5ea960973377bdcbc8db53e492923 + pristine_git_object: 0bb61e83966beb9024b9de6df37e80363e80eb98 + src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java: + id: 051d25dd8802 + last_write_checksum: sha1:1ce859a4e08fcbc2dc9ad047b75f17306c7c97dd + pristine_git_object: 7eb1aea561e6a1e0a043bb77969a9cb18dd25599 + src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java: + id: d47ecbfae156 + last_write_checksum: sha1:8caa6541deaccbace1c71e7453d5b61de670fa29 + pristine_git_object: 5d0295d0a563908c4e8b18305b986ca6e15db446 src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceOAuthApplicationSettingsRequestBody.java: id: 0c961826415a last_write_checksum: sha1:6ac105dc58ad681e31df044f22f2256773e969e0 @@ -8734,8 +9642,8 @@ trackedFiles: pristine_git_object: a0ac157a20093a7e15c5ab6d703212b684b8e439 src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBody.java: id: b8389ceff7e0 - last_write_checksum: sha1:aedf131bc5fd33fe0ef667f0585fbdcda2dbcca8 - pristine_git_object: 742c1915bbcccbd0bb1499e5ae2bd4f986cd52b0 + last_write_checksum: sha1:abbffc1ec1e1f806697317a9cf278d8aa2acee86 + pristine_git_object: 39db73eaf686a764d4f024ddef09af0dd5b570a5 src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBuilder.java: id: f2d804e20d9d last_write_checksum: sha1:4096e0fb8853ba57f5992c05fc4a8c1cbe2c68dd @@ -9232,6 +10140,18 @@ trackedFiles: id: 8a427c846ff6 last_write_checksum: sha1:88fb9df980efe154d803d161b8a1f1fc51a5cff1 pristine_git_object: 58d51a391f9a06d69f7b8eb5539dc7a7f1ae83db + src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequest.java: + id: c82d192d5b15 + last_write_checksum: sha1:3d9ae94e4a24298bc36bd7ae0a075bff828262b6 + pristine_git_object: 1a2803c60036726fed05c31e60d2be90c70aa733 + src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequestBuilder.java: + id: a911d5e37deb + last_write_checksum: sha1:1eec6be999f432179f2474bd2325b0c85b3122f0 + pristine_git_object: f7b3659a2820b225f1288bc0e1c607371b466722 + src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipResponse.java: + id: 0107763ed215 + last_write_checksum: sha1:8ad1156ad5b18c3530895a2597a2c28df1eecf28 + pristine_git_object: 94ea27e0865f55876a43442fd45c7f89c111acc6 src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequest.java: id: 27aa43b25d39 last_write_checksum: sha1:bec2b463cb145e033d49254e96159a536f0d1bb1 @@ -9292,6 +10212,14 @@ trackedFiles: id: 7e01640b237b last_write_checksum: sha1:a2c3ff06215f1fb9e6168c5fee2f93a298ef3f43 pristine_git_object: ecd782947953cfd65c6c042abbcecb919f2edb3e + src/main/java/com/clerk/backend_api/operations/AttemptEmailAddressVerification.java: + id: c6b706544d3c + last_write_checksum: sha1:7223eaa59b75d3c3b9d10ef0d76c722dd186e12e + pristine_git_object: be438e72c4e9e84350e5a4eb498711c2259c966e + src/main/java/com/clerk/backend_api/operations/AttemptPhoneNumberVerification.java: + id: 251557c60a8d + last_write_checksum: sha1:963a6e0def93c96b4ad0defe22a0505ddc4ac1fa + pristine_git_object: de3b86f66f9f4c2b2060b4142683b86cae9cc9b2 src/main/java/com/clerk/backend_api/operations/BanUser.java: id: d59d447fdda7 last_write_checksum: sha1:68e1c0c65e6ec979d4b6ad0e45837d4088e3ae65 @@ -9308,6 +10236,10 @@ trackedFiles: id: ecb2ce8aa664 last_write_checksum: sha1:c071c72bd80dd2c49abefa49e428c23322a94253 pristine_git_object: dba8801b5c217b7859cfd687c2b721a91a0eeee3 + src/main/java/com/clerk/backend_api/operations/CreateAdminPortalLinkToken.java: + id: b66321a7f23a + last_write_checksum: sha1:f05ca881f3f23e2ab3d93d8ccba4bedc46964d24 + pristine_git_object: 4733747fac16cb4e55f4c74ef19f2645278e1de9 src/main/java/com/clerk/backend_api/operations/CreateAgentTask.java: id: 5eb5cd21d0bd last_write_checksum: sha1:3f10133fa43915f1354bd5e7e6873d46568c2adb @@ -9346,8 +10278,12 @@ trackedFiles: pristine_git_object: 7f206a96afe1e2f69b607bc31261eb67ba382c53 src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java: id: 96674eb8e62f - last_write_checksum: sha1:d6410320cbcf9e87946d045bd0d8cf14eb271195 - pristine_git_object: 4a0164ae721c8328bbb0c1a54c0c81b4a8e2e108 + last_write_checksum: sha1:1ea95a8fffefefdc0b861ba314d228cd1c26f1e5 + pristine_git_object: 1d4a4d674b26e92b44c8db55514838d98b68dfb3 + src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnectionTestRun.java: + id: 42fed4795a17 + last_write_checksum: sha1:7e14a190843baf12ac0498d00957fe85806757b1 + pristine_git_object: 69a6b26f141c4555a895b73b451c0c812f3dde43 src/main/java/com/clerk/backend_api/operations/CreateInvitation.java: id: 97cebe0fa244 last_write_checksum: sha1:f6b8b24a6a5a4d3359233a17bf5f746c19df7af4 @@ -9414,8 +10350,8 @@ trackedFiles: pristine_git_object: d0dae146fe756fccc5854b6f721b1971bd006733 src/main/java/com/clerk/backend_api/operations/CreateSAMLConnection.java: id: 4edb673c888a - last_write_checksum: sha1:d57414596c3f68ad91d4fea4f6a8bca54fb3d0db - pristine_git_object: 623754d4771727a92391a52ebfe4f501975be1eb + last_write_checksum: sha1:beb5c82a48a32e3d5c5b1b9deb2352dc65c6276a + pristine_git_object: 1bab7eee553ad914096c00a83eeb7751d385cb1f src/main/java/com/clerk/backend_api/operations/CreateSession.java: id: f4ad9d6266da last_write_checksum: sha1:8009aa44276bc0ffa5919e5665f1140d9c8e214d @@ -9442,8 +10378,8 @@ trackedFiles: pristine_git_object: 8bbb1fcce9d1eaf4906deecebff2628c34d7e759 src/main/java/com/clerk/backend_api/operations/CreateUser.java: id: bb0a7f364389 - last_write_checksum: sha1:a523cc98c8bf6e281547ebb4088640c8291c6ef6 - pristine_git_object: 619705c08e4340ed4e7e482c2f11a9c9c6541af6 + last_write_checksum: sha1:613e89dd33f9864661453d8117778c978b9da66d + pristine_git_object: 10813bce69b0be894c5696a0b9946f7e06788f3f src/main/java/com/clerk/backend_api/operations/CreateWaitlistEntry.java: id: 820c08e8b4dd last_write_checksum: sha1:5afc3ed061c4f4b495d0a16b4361a5aa6ef22131 @@ -9620,10 +10556,18 @@ trackedFiles: id: 268bbfa35c61 last_write_checksum: sha1:badb3be64ab2cfa24760a0ffde48d23ff41c1d67 pristine_git_object: c5caf082e39c0f4a5e5d1e1024111e32bafb69b4 + src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java: + id: 0ee1fc8f066f + last_write_checksum: sha1:5fbd10600df5a2608c26d494ce2fb7f54d604228 + pristine_git_object: 73ff298caf4692b51513a3694ac7acae4ed626f7 src/main/java/com/clerk/backend_api/operations/GetInstanceOAuthApplicationSettings.java: id: 9190c4acc5c3 last_write_checksum: sha1:c0023280ca5badd5bbf59b8606a45a658bfa9497 pristine_git_object: bf55edb8221e6175179d8d763b92da81079aecc8 + src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java: + id: f4b03b69a068 + last_write_checksum: sha1:52fad02cdb31d7cdeb8939133ee3a802c227e0f4 + pristine_git_object: 1732b684a236f5bf09791277cff513de49fce6be src/main/java/com/clerk/backend_api/operations/GetInstanceProtect.java: id: d45882257374 last_write_checksum: sha1:804459057dfec17fe8fc270b592c8d27aae88c6e @@ -9764,6 +10708,10 @@ trackedFiles: id: 2da2727dcc84 last_write_checksum: sha1:3807bd5d9b25393e039f695d73164478a26a704d pristine_git_object: f4444178c96065e6cb1b0385b295372b957caf47 + src/main/java/com/clerk/backend_api/operations/ListEnterpriseConnectionTestRuns.java: + id: 414e46cb53ac + last_write_checksum: sha1:da05791cddb95f74c2c3d27ab05e3f09980b42e2 + pristine_git_object: 207eb80a6503cf3d4f3e3c31f283e72187628082 src/main/java/com/clerk/backend_api/operations/ListEnterpriseConnections.java: id: 16d7a5a3b7e5 last_write_checksum: sha1:520dd90bc58622c23cf1eaa8695932cc9cbe822b @@ -9844,6 +10792,14 @@ trackedFiles: id: 81cd57deb9a8 last_write_checksum: sha1:2f6861b589af29a93080a0fea05ec9b00154e5e9 pristine_git_object: 4790056b4255b1d89cd0214a50907252474de06a + src/main/java/com/clerk/backend_api/operations/PrepareEmailAddressVerification.java: + id: 9cf7bc8d6e95 + last_write_checksum: sha1:2f2802324da0e22b192d846bd2e243bdfa95d099 + pristine_git_object: a36cd65a01089b382e3d56135ec882456d76e1a0 + src/main/java/com/clerk/backend_api/operations/PreparePhoneNumberVerification.java: + id: 42dd89452a1d + last_write_checksum: sha1:52714d075e4784a5bd33a28f0f5203c084e726cd + pristine_git_object: 52a23061bd49fa87fe46d0409439c6b02fde3d14 src/main/java/com/clerk/backend_api/operations/PreviewTemplate.java: id: 43b6fc5ed5e4 last_write_checksum: sha1:e01f5d80c3ee0bc60e175b26dbd4bd7d57a1eeb4 @@ -9868,6 +10824,18 @@ trackedFiles: id: 4685d3d93913 last_write_checksum: sha1:577250c9adace1d94a74d33c78833bf18e06f762 pristine_git_object: a83ee7da1eae47c4dba174f374e402f65308101a + src/main/java/com/clerk/backend_api/operations/ReplaceUserEmailAddress.java: + id: 21f44ab1e3c7 + last_write_checksum: sha1:4eded30429b55626ac5da0aca8aad3a02b957d0b + pristine_git_object: 5527b4a8e8bafbb1545c0be7bbe73d143f18f15b + src/main/java/com/clerk/backend_api/operations/ReplaceUserMetadata.java: + id: 17fbc46549e9 + last_write_checksum: sha1:f87878fbbcb12d1c0fc41d78069f825f95d2fab2 + pristine_git_object: 4e4d93a8c42924a738035e2d102278209b58c1fc + src/main/java/com/clerk/backend_api/operations/ReplaceUserPhoneNumber.java: + id: 8058f2cce2ab + last_write_checksum: sha1:8c0bb5f8912eb771d802cd5195b732f738723e87 + pristine_git_object: 9c29c6fe840e3d0dd0ca604898438465278d9b17 src/main/java/com/clerk/backend_api/operations/RevertTemplate.java: id: 816c5bec29f4 last_write_checksum: sha1:734c25fed87279ade8a5780555f150fcddb0972b @@ -9876,6 +10844,10 @@ trackedFiles: id: 20a479e443a0 last_write_checksum: sha1:5158da58b65dd81b1be54542a39ed209e46b61b8 pristine_git_object: 8ef9a68485ea64e3379251ebc2c580198f349a9d + src/main/java/com/clerk/backend_api/operations/RevokeAdminPortalLinkToken.java: + id: 807c2b891aa7 + last_write_checksum: sha1:329285726a3f016a20289bacbb0cda950714597d + pristine_git_object: 289eff45849abb0994be979debc6dcb85cb055ff src/main/java/com/clerk/backend_api/operations/RevokeAgentTask.java: id: 927afe36cb32 last_write_checksum: sha1:a68b3ad2bd0f20540745e72af39489e61361dca7 @@ -9960,14 +10932,18 @@ trackedFiles: id: 7165c53d0764 last_write_checksum: sha1:73b1b61a6d3dc08b4796774854356361348352c6 pristine_git_object: ff1c052fb944885bf49556cc5b97d3ffe4e61ed4 + src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java: + id: 67ab4c5891b7 + last_write_checksum: sha1:8600ea95f056c7b6dcd6eaef0d29f645b28ee10b + pristine_git_object: 4f46ef223994a974cd87f3a30ca6acc85f751ee7 src/main/java/com/clerk/backend_api/operations/UpdateInstanceOAuthApplicationSettings.java: id: 41c2e61e756c last_write_checksum: sha1:01c7ff228aae32350b5c3353ba81ff03aa4fa77a pristine_git_object: 1490c29148560d26a888ff936abc79f8d24e5ff2 src/main/java/com/clerk/backend_api/operations/UpdateInstanceOrganizationSettings.java: id: 1d3ab9fe7420 - last_write_checksum: sha1:f478e712199c02463321b1fda64c2f5c27c8f092 - pristine_git_object: b67ac7ac53701a2a77346c6c9a28f1526e393c6e + last_write_checksum: sha1:4d5bf2f142ec1b9b6ef423c7ae8e8926bc7552bd + pristine_git_object: d98fff1f7a2605eb194e9e1261b132f1c414b253 src/main/java/com/clerk/backend_api/operations/UpdateInstanceProtect.java: id: 4c6d52eae993 last_write_checksum: sha1:130f13d4afce065297db3da41b62542f5bf7a454 @@ -10026,8 +11002,8 @@ trackedFiles: pristine_git_object: be187aa2c2db202fd2e99b77394522b63f43e0bb src/main/java/com/clerk/backend_api/operations/UpdateSAMLConnection.java: id: 1f0aa6f8f36e - last_write_checksum: sha1:974d101693f306dbdd1e35359b80520e748af6fb - pristine_git_object: 6995f8d85765bd54e022ca9f65a1210592cc5043 + last_write_checksum: sha1:40e231380667d3e63066366197ef202b218a703f + pristine_git_object: 136c4d630c5b7049e513fca02390ad4341cf5017 src/main/java/com/clerk/backend_api/operations/UpdateSignUp.java: id: 991f1428a4c4 last_write_checksum: sha1:fd272bd8284f5159e5e868b188495ebb9f62fae3 @@ -10096,6 +11072,10 @@ trackedFiles: id: 6b49cd7fa9e5 last_write_checksum: sha1:baa4305177ed82b60296ba9f2cafd6b91ad2bb06 pristine_git_object: 19926a5c6f9766fe657cd41914509aae238f83f8 + src/main/java/com/clerk/backend_api/operations/VerifyOrganizationDomainOwnership.java: + id: 4cd70f1f26e8 + last_write_checksum: sha1:9591843e80101b5bee7b90fccbc5a63803b50675 + pristine_git_object: 557f3ff03035bcf2f0e7176b3b6dab7375ea0ead src/main/java/com/clerk/backend_api/operations/VerifyPassword.java: id: eb51dbfa6f7e last_write_checksum: sha1:30ba18fa314df4335cb333896a69540c515fb5fd @@ -10222,8 +11202,8 @@ trackedFiles: pristine_git_object: b85e5f5a1f57d84286b7ab6fa53739a13acabc43 src/main/java/com/clerk/backend_api/utils/OneOfDeserializer.java: id: eae18da7d4c7 - last_write_checksum: sha1:cb79a5220149019f314183f5f5c2f525e2840fb1 - pristine_git_object: b94e5d79b9acd47f400dbb854a80ab444b408d89 + last_write_checksum: sha1:59d3ed28b14078877bec75c843f917db29a40226 + pristine_git_object: 6407aad0e98857d5f7c5abf7bbed0f3406b8d6a5 src/main/java/com/clerk/backend_api/utils/Options.java: id: 8721c6b2249e last_write_checksum: sha1:224dc7616b85af4efb4b6505045ffd4db5a4e6dd @@ -11419,7 +12399,7 @@ examples: application/json: {} responses: "200": - application/json: {"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "automatic_invitation", "affiliation_email_address": "", "verification": {"status": "unverified", "strategy": "", "attempts": 17365, "expire_at": 459803}, "total_pending_invitations": 497473, "total_pending_suggestions": 817071, "created_at": 687770, "updated_at": 595975} + application/json: {"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "automatic_invitation", "affiliation_email_address": "", "affiliation_verification": {"status": "", "strategy": "", "attempts": 525133, "expire_at": 309031, "verified_at": null}, "ownership_verification": {"status": "", "strategy": "", "attempts": 497473, "expire_at": 687770, "verified_at": 413574}, "verification": {"status": "unverified", "strategy": "", "attempts": 17365, "expire_at": 459803, "verified_at": 839599}, "total_pending_invitations": 497473, "total_pending_suggestions": 817071, "created_at": 687770, "updated_at": 595975} "400": application/json: {"errors": []} ListOrganizationDomains: @@ -11432,7 +12412,7 @@ examples: offset: 0 responses: "200": - application/json: {"data": [{"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "automatic_invitation", "affiliation_email_address": "", "verification": {"status": "unverified", "strategy": "", "attempts": 853407, "expire_at": 43873}, "total_pending_invitations": 731471, "total_pending_suggestions": 283600, "created_at": 290489, "updated_at": 163254}], "total_count": 284403} + application/json: {"data": [{"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "automatic_invitation", "affiliation_email_address": "", "affiliation_verification": {"status": "", "strategy": "", "attempts": 361617, "expire_at": 53323, "verified_at": 853407}, "ownership_verification": {"status": "", "strategy": "", "attempts": null, "expire_at": 283600, "verified_at": 163254}, "verification": {"status": "unverified", "strategy": "", "attempts": 853407, "expire_at": 43873, "verified_at": 188018}, "total_pending_invitations": 731471, "total_pending_suggestions": 283600, "created_at": 290489, "updated_at": 163254}], "total_count": 284403} "401": application/json: {"errors": []} UpdateOrganizationDomain: @@ -11445,7 +12425,7 @@ examples: application/json: {} responses: "200": - application/json: {"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "manual_invitation", "affiliation_email_address": "", "verification": {"status": "verified", "strategy": "", "attempts": 254888, "expire_at": 663325}, "total_pending_invitations": 77212, "total_pending_suggestions": 63286, "created_at": 582286, "updated_at": 510914} + application/json: {"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "manual_invitation", "affiliation_email_address": "", "affiliation_verification": {"status": "", "strategy": "", "attempts": 374293, "expire_at": 806331, "verified_at": 729983}, "ownership_verification": {"status": "", "strategy": "", "attempts": null, "expire_at": null, "verified_at": 510914}, "verification": {"status": "verified", "strategy": "", "attempts": 254888, "expire_at": 663325, "verified_at": 311621}, "total_pending_invitations": 77212, "total_pending_suggestions": 63286, "created_at": 582286, "updated_at": 510914} "400": application/json: {"errors": []} DeleteOrganizationDomain: @@ -11906,7 +12886,7 @@ examples: createM2MToken: speakeasy-default-create-m2-M-token: requestBody: - application/json: {"token_format": "opaque"} + application/json: {"token_format": "opaque", "min_remaining_ttl_seconds": 240} responses: "201": application/json: {"object": "machine_to_machine_token", "id": "mt_f7f0ba8c3b4843ce7d85fcdd5e71853e", "subject": "mch_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "claims": {"important_metadata": "Some useful data"}, "scopes": ["mch_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "mch_2yGkLpQ7Y3rXSwtU24CzTk9I7Em"], "token": "mt_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "revoked": false, "revocation_reason": "Revoked by user", "expired": false, "expiration": 1716883200, "last_used_at": 1716883200, "created_at": 1716883200, "updated_at": 1716883200} @@ -12331,7 +13311,7 @@ examples: application/json: {"plan_id": "", "currency": "USD", "amount": 826545} responses: "200": - application/json: {"object": "commerce_price", "id": "", "plan_id": "", "instance_id": "", "currency": "Ouguiya", "currency_symbol": "Bs", "amount": 908898, "annual_monthly_amount": 821422, "fee": {"amount": 993761, "amount_formatted": "", "currency": "Somoni", "currency_symbol": "kr"}, "annual_monthly_fee": {"amount": 474674, "amount_formatted": "", "currency": "Egyptian Pound", "currency_symbol": "$"}, "is_default": false, "created_at": 69176} + application/json: {"object": "commerce_price", "id": "", "plan_id": "", "instance_id": "", "currency": "Ouguiya", "currency_symbol": "Bs", "amount": 908898, "annual_monthly_amount": 821422, "fee": {"amount": 993761, "amount_formatted": "", "currency": "Somoni", "currency_symbol": "kr"}, "annual_monthly_fee": {"amount": 474674, "amount_formatted": "", "currency": "Egyptian Pound", "currency_symbol": "$"}, "is_default": false, "created_at": 69176, "supported_billing_periods": "both"} "400": application/json: {"errors": []} "500": @@ -12345,7 +13325,7 @@ examples: application/json: {"from_price_id": "", "to_price_id": ""} responses: "200": - application/json: {"object": "commerce_price_transition", "subscription_item": {"object": "commerce_subscription_item", "id": "", "instance_id": "", "status": "past_due", "plan_id": "", "plan": {"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 635940, "amount_formatted": "", "currency": "Liberian Dollar", "currency_symbol": "$"}, "annual_monthly_fee": {"amount": 49311, "amount_formatted": "", "currency": "Pound Sterling", "currency_symbol": "S"}, "annual_fee": {"amount": 798728, "amount_formatted": "", "currency": "Egyptian Pound", "currency_symbol": "Nu"}, "amount": 290472, "amount_formatted": "", "annual_monthly_amount": 101991, "annual_monthly_amount_formatted": "", "annual_amount": 633599, "annual_amount_formatted": "", "currency_symbol": "C$", "currency": "Kyat", "description": "outfit whoever ha vast", "product_id": "", "is_default": true, "is_recurring": true, "publicly_visible": false, "has_base_fee": true, "payer_type": ["", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://zealous-bench.name", "features": [{"object": "feature", "id": "", "name": "", "description": "on outside oh outrun chip rigidly opposite diligently lowball why", "slug": "", "avatar_url": "https://fond-schedule.info/"}]}, "plan_period": "annual", "payment_source_id": "", "payer_id": "", "is_free_trial": true, "proration_date": "", "created_at": 313511, "updated_at": 593206}, "transition": {"previous_plan": {"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 635940, "amount_formatted": "", "currency": "Liberian Dollar", "currency_symbol": "$"}, "annual_monthly_fee": {"amount": 49311, "amount_formatted": "", "currency": "Pound Sterling", "currency_symbol": "S"}, "annual_fee": {"amount": 798728, "amount_formatted": "", "currency": "Egyptian Pound", "currency_symbol": "Nu"}, "amount": 751825, "amount_formatted": "", "annual_monthly_amount": 784555, "annual_monthly_amount_formatted": "", "annual_amount": 306710, "annual_amount_formatted": "", "currency_symbol": "C$", "currency": "Euro", "description": "since skateboard boohoo neaten mammoth fireplace near sneaky", "product_id": "", "is_default": true, "is_recurring": true, "publicly_visible": false, "has_base_fee": false, "payer_type": ["", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://cultivated-apricot.net/", "features": [{"object": "feature", "id": "", "name": "", "description": "on outside oh outrun chip rigidly opposite diligently lowball why", "slug": "", "avatar_url": "https://fond-schedule.info/"}]}, "previous_price": {"object": "commerce_price", "id": "", "plan_id": "", "instance_id": "", "currency": "Lebanese Pound", "currency_symbol": "$", "amount": 681080, "annual_monthly_amount": 939768, "fee": {"amount": 635940, "amount_formatted": "", "currency": "Liberian Dollar", "currency_symbol": "$"}, "annual_monthly_fee": {"amount": 49311, "amount_formatted": "", "currency": "Pound Sterling", "currency_symbol": "S"}, "is_default": true, "created_at": 567741}, "effective_at": 534415, "effective_mode": "immediate", "charged_immediately": true, "previous_subscription_item_status": "abandoned", "previous_subscription_item_id": ""}} + application/json: {"object": "commerce_price_transition", "subscription_item": {"object": "commerce_subscription_item", "id": "", "instance_id": "", "status": "past_due", "plan_id": "", "plan": {"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 635940, "amount_formatted": "", "currency": "Liberian Dollar", "currency_symbol": "$"}, "annual_monthly_fee": {"amount": 49311, "amount_formatted": "", "currency": "Pound Sterling", "currency_symbol": "S"}, "annual_fee": {"amount": 798728, "amount_formatted": "", "currency": "Egyptian Pound", "currency_symbol": "Nu"}, "amount": 290472, "amount_formatted": "", "annual_monthly_amount": 101991, "annual_monthly_amount_formatted": "", "annual_amount": 633599, "annual_amount_formatted": "", "currency_symbol": "C$", "currency": "Kyat", "description": "outfit whoever ha vast", "product_id": "", "is_default": true, "is_recurring": true, "publicly_visible": false, "has_base_fee": true, "payer_type": ["", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://zealous-bench.name", "features": [{"object": "feature", "id": "", "name": "", "description": "on outside oh outrun chip rigidly opposite diligently lowball why", "slug": "", "avatar_url": "https://fond-schedule.info/"}]}, "plan_period": "annual", "payment_source_id": "", "payer_id": "", "is_free_trial": true, "proration_date": "", "created_at": 313511, "updated_at": 593206}, "transition": {"previous_plan": {"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 635940, "amount_formatted": "", "currency": "Liberian Dollar", "currency_symbol": "$"}, "annual_monthly_fee": {"amount": 49311, "amount_formatted": "", "currency": "Pound Sterling", "currency_symbol": "S"}, "annual_fee": {"amount": 798728, "amount_formatted": "", "currency": "Egyptian Pound", "currency_symbol": "Nu"}, "amount": 751825, "amount_formatted": "", "annual_monthly_amount": 784555, "annual_monthly_amount_formatted": "", "annual_amount": 306710, "annual_amount_formatted": "", "currency_symbol": "C$", "currency": "Euro", "description": "since skateboard boohoo neaten mammoth fireplace near sneaky", "product_id": "", "is_default": true, "is_recurring": true, "publicly_visible": false, "has_base_fee": false, "payer_type": ["", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://cultivated-apricot.net/", "features": [{"object": "feature", "id": "", "name": "", "description": "on outside oh outrun chip rigidly opposite diligently lowball why", "slug": "", "avatar_url": "https://fond-schedule.info/"}]}, "previous_price": {"object": "commerce_price", "id": "", "plan_id": "", "instance_id": "", "currency": "Lebanese Pound", "currency_symbol": "$", "amount": 681080, "annual_monthly_amount": 939768, "fee": {"amount": 635940, "amount_formatted": "", "currency": "Liberian Dollar", "currency_symbol": "$"}, "annual_monthly_fee": {"amount": 49311, "amount_formatted": "", "currency": "Pound Sterling", "currency_symbol": "S"}, "is_default": true, "created_at": 567741, "supported_billing_periods": "annual"}, "effective_at": 534415, "effective_mode": "immediate", "charged_immediately": true, "previous_subscription_item_status": "abandoned", "previous_subscription_item_id": ""}} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "500": @@ -12570,9 +13550,181 @@ examples: application/json: {"object": "", "deleted": false} "402": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + PrepareEmailAddressVerification: + speakeasy-default-prepare-email-address-verification: + parameters: + path: + email_address_id: "" + responses: + "200": + application/json: {} + "400": + application/json: {"errors": []} + "500": + application/json: {"errors": []} + AttemptEmailAddressVerification: + speakeasy-default-attempt-email-address-verification: + parameters: + path: + email_address_id: "" + requestBody: + application/json: {"verification_id": "", "code": ""} + responses: + "200": + application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + ReplaceUserEmailAddress: + speakeasy-default-replace-user-email-address: + parameters: + path: + user_id: "" + requestBody: + application/json: {"email_address": "Ines83@gmail.com", "identification_status": "verified"} + responses: + "200": + application/json: {"object": "email_address", "email_address": "Leda_Rippin-Schneider@hotmail.com", "reserved": true, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "attempts": 566515}, "linked_to": [{"type": "", "id": ""}], "created_at": 884737, "updated_at": 419267} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + PreparePhoneNumberVerification: + speakeasy-default-prepare-phone-number-verification: + parameters: + path: + phone_number_id: "" + responses: + "200": + application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + AttemptPhoneNumberVerification: + speakeasy-default-attempt-phone-number-verification: + parameters: + path: + phone_number_id: "" + requestBody: + application/json: {"verification_id": "", "code": ""} + responses: + "200": + application/json: {} + "400": + application/json: {"errors": []} + "500": + application/json: {"errors": []} + ReplaceUserPhoneNumber: + speakeasy-default-replace-user-phone-number: + parameters: + path: + user_id: "" + requestBody: + application/json: {"phone_number": "1-440-484-8878 x689", "identification_status": "verified"} + responses: + "200": + application/json: {"object": "phone_number", "phone_number": "(570) 854-0639 x05082", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 355723, "expire_at": 326619}, "linked_to": [{"type": "", "id": ""}], "created_at": 334057, "updated_at": 825838} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + ReplaceUserMetadata: + speakeasy-default-replace-user-metadata: + parameters: + path: + user_id: "" + responses: + "200": + application/json: {"id": "", "object": "user", "external_id": "", "primary_email_address_id": "", "primary_phone_number_id": "", "primary_web3_wallet_id": "", "username": "Noe_Aufderhar-Kertzmann", "first_name": "Mallory", "last_name": "Walker", "has_image": true, "public_metadata": {}, "email_addresses": [{"object": "email_address", "email_address": "Fermin_Hills10@hotmail.com", "reserved": true, "verification": {"object": "verification_otp", "status": "failed", "strategy": "reset_password_email_code", "attempts": 431301, "expire_at": 2134}, "linked_to": [{"type": "", "id": ""}], "created_at": 145128, "updated_at": 350716}], "phone_numbers": [], "web3_wallets": [], "passkeys": [], "password_enabled": false, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": false, "mfa_enabled_at": 156011, "mfa_disabled_at": 59305, "external_accounts": [], "saml_accounts": [{"id": "", "object": "saml_account", "provider": "", "active": false, "email_address": "Mikel_Kutch@yahoo.com", "verification": {"object": "verification_ticket", "status": "unverified", "strategy": "ticket", "attempts": 627141, "expire_at": 920967}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": true, "email_address": "Lonny_Tromp79@hotmail.com", "verification": {"object": "verification_ticket", "status": "unverified", "strategy": "ticket", "attempts": 216163, "expire_at": null}}], "last_sign_in_at": 476252, "banned": false, "locked": true, "lockout_expires_in_seconds": 171566, "verification_attempts_remaining": 47536, "updated_at": 975234, "created_at": 976035, "delete_self_enabled": false, "create_organization_enabled": false, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000, "bypass_client_trust": false} + "400": + application/json: {"errors": []} + GetInstanceCommunication: + speakeasy-default-get-instance-communication: + responses: + "200": + application/json: {"object": "instance_communication", "blocked_country_codes": [""]} + UpdateInstanceCommunication: + speakeasy-default-update-instance-communication: + responses: + "200": + application/json: {"object": "instance_communication", "blocked_country_codes": ["", "", ""]} + "422": + application/json: {"errors": []} + GetInstanceOrganizationSettings: + speakeasy-default-get-instance-organization-settings: + responses: + "200": + application/json: {"object": "organization_settings", "enabled": true, "max_allowed_memberships": 589671, "max_allowed_roles": 423763, "max_allowed_domains": 934682, "creator_role": "", "admin_delete_enabled": true, "domains_enabled": false, "domains_enrollment_modes": [], "domains_default_role": ""} + "402": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + VerifyOrganizationDomainOwnership: + speakeasy-default-verify-organization-domain-ownership: + parameters: + path: + organization_id: "" + domain_id: "" + responses: + "200": + application/json: {"object": "organization_domain", "id": "", "organization_id": "", "name": "", "enrollment_mode": "automatic_suggestion", "affiliation_email_address": null, "affiliation_verification": {"status": "", "strategy": "", "attempts": 528479, "expire_at": 844726, "verified_at": 620361}, "ownership_verification": {"status": "", "strategy": "", "attempts": 165594, "expire_at": 684680, "verified_at": 480360}, "verification": {"status": "", "strategy": "", "attempts": 83728, "expire_at": 30810, "verified_at": 665615}, "total_pending_invitations": 24330, "total_pending_suggestions": 616562, "created_at": 648070, "updated_at": 306488} + "401": + application/json: {"errors": []} + ListEnterpriseConnectionTestRuns: + speakeasy-default-list-enterprise-connection-test-runs: + parameters: + path: + enterprise_connection_id: "" + query: + limit: 10 + offset: 0 + responses: + "200": + application/json: {"data": [{"id": "", "status": "pending", "connection_type": "saml", "created_at": 107310}], "total_count": 398990} + "402": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + CreateEnterpriseConnectionTestRun: + speakeasy-default-create-enterprise-connection-test-run: + parameters: + path: + enterprise_connection_id: "" + responses: + "200": + application/json: {"url": "https://slushy-annual.info/"} + "402": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + createAdminPortalLinkToken: + speakeasy-default-create-admin-portal-link-token: + requestBody: + application/json: {"seconds_until_expiration": 3600} + responses: + "201": + application/json: {"object": "admin_portal_link_token", "id": "aplt_3beecc9c60adb5f9b850e91a83beecc9", "admin_portal_link_id": "apl_3beecc9c60adb5f9b850e91a8d2", "instance_id": "ins_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "organization_id": "org_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "it_contact_id": "usr_abc123", "scopes": ["admin_portal:read"], "token": "aplt_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "revoked": false, "revocation_reason": "Revoked by user", "expired": false, "expiration": 1716883200000, "created_at": 1716883200000, "updated_at": 1716883200000} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": [{"message": "some details about the error", "long_message": "some details about the error", "code": "some_error_code"}]} + "403": + application/json: {"errors": []} + "409": + application/json: {"errors": []} + revokeAdminPortalLinkToken: + speakeasy-default-revoke-admin-portal-link-token: + parameters: + path: + adminPortalLinkTokenID: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"object": "admin_portal_link_token", "id": "aplt_3beecc9c60adb5f9b850e91a83beecc9", "admin_portal_link_id": "apl_3beecc9c60adb5f9b850e91a8d2", "instance_id": "ins_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "organization_id": "org_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "it_contact_id": "usr_abc123", "scopes": ["admin_portal:read"], "revoked": false, "revocation_reason": "Revoked by user", "expired": false, "expiration": 1716883200000, "created_at": 1716883200000, "updated_at": 1716883200000} + "400": + application/json: {"errors": [{"message": "Bad Request", "long_message": "Invalid 'url_parameter.example': Failed regex check", "code": "bad_request"}]} + "401": + application/json: {"errors": [{"message": "some details about the error", "long_message": "some details about the error", "code": "some_error_code"}]} + "403": + application/json: {"errors": [{"message": "some details about the error", "long_message": "some details about the error", "code": "some_error_code"}]} + "404": + application/json: {"errors": []} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Java SDK Changes:\n* `clerk.users.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.create()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.get()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.update()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.ban()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.billing.createPriceTransition()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.billing.extendSubscriptionItemFreeTrial()`: `response.plan` **Changed** (Breaking ⚠️)\n* `clerk.users.unban()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.bulkBan()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.bulkUnban()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.lock()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.unlock()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.setProfileImage()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.deleteProfileImage()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.updateMetadata()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.getBillingSubscription()`: `response.subscriptionItems[].plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.billing.cancelSubscriptionItem()`: `response.plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.billing.listSubscriptionItems()`: `response.data[].plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.billing.createPrice()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `clerk.billing.listPrices()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `clerk.billing.listPlans()`: `response.data[].fee` **Changed** (Breaking ⚠️)\n* `clerk.organizations.getBillingSubscription()`: `response.subscriptionItems[].plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.users.setPasswordCompromised()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.unsetPasswordCompromised()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.getInstanceOrganizationMemberships()`: `response.data[].publicUserData.banned` **Added**\n* `clerk.samlConnections.get()`: `response` **Changed**\n* `clerk.users.getOrganizationMemberships()`: `response.data[].publicUserData.banned` **Added**\n* `clerk.organizationMemberships.create()`: `response.publicUserData.banned` **Added**\n* `clerk.organizationMemberships.list()`: `response.data[].publicUserData.banned` **Added**\n* `clerk.organizationMemberships.update()`: `response.publicUserData.banned` **Added**\n* `clerk.organizationMemberships.delete()`: `response.publicUserData.banned` **Added**\n* `clerk.organizationMemberships.updateMetadata()`: `response.publicUserData.banned` **Added**\n* `clerk.samlConnections.list()`: **Deprecated**\n* `clerk.samlConnections.list()`: `response.data[]` **Changed**\n* `clerk.samlConnections.create()`: **Deprecated**\n* `clerk.samlConnections.create()`: `response` **Changed**\n* `clerk.samlConnections.get()`: **Deprecated**\n* `clerk.instanceSettings.updateOrganizationSettings()`: `response.maxAllowedDomains` **Added**\n* `clerk.samlConnections.update()`: **Deprecated**\n* `clerk.samlConnections.update()`: \n * `requestBody.allowOrganizationAccountLinking` **Added**\n * `response` **Changed**\n* `clerk.samlConnections.delete()`: **Deprecated**\n* `clerk.agentTasks.create()`: `response.agentTaskId` **Added**\n* `clerk.agentTasks.revoke()`: `response.agentTaskId` **Added**\n* `clerk.emailAddresses.delete()`: `error.status[409]` **Added**\n* `clerk.enterpriseConnections.delete()`: **Added**\n* `clerk.enterpriseConnections.update()`: **Added**\n* `clerk.enterpriseConnections.get()`: **Added**\n* `clerk.enterpriseConnections.create()`: **Added**\n* `clerk.enterpriseConnections.list()`: **Added**\n* `clerk.oauthApplications.uploadLogo()`: **Added**\n" +releaseNotes: "## Java SDK Changes:\n* `clerk.users.unlock()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.organizationDomains.listAll()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `clerk.users.bulkUnban()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.organizationDomains.update()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.organizationDomains.list()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `clerk.organizationDomains.create()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.lock()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.unsetPasswordCompromised()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.setPasswordCompromised()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.updateMetadata()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.deleteProfileImage()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.setProfileImage()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.bulkBan()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.unban()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.ban()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.emailAddresses.create()`: `response.verification` **Changed** (Breaking ⚠️)\n* `clerk.emailAddresses.get()`: `response.verification` **Changed** (Breaking ⚠️)\n* `clerk.emailAddresses.update()`: `response.verification` **Changed** (Breaking ⚠️)\n* `clerk.users.update()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.get()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.create()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n * `error.status[402]` **Added**\n* `clerk.users.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.instanceSettings.update()`: \n * `request.preferredSignInStrategyWhenPasswordRequired` **Added**\n* `clerk.samlConnections.create()`: `error.status[409]` **Added**\n* `clerk.phoneNumbers.create()`: `response.verification.union(verification_otp).channel` **Added**\n* `clerk.adminPortalLinkTokens.revokeAdminPortalLinkToken()`: **Added**\n* `clerk.adminPortalLinkTokens.createAdminPortalLinkToken()`: **Added**\n* `clerk.enterpriseConnections.createTestRun()`: **Added**\n* `clerk.emailAddresses.attemptVerification()`: **Added**\n* `clerk.organizations.getBillingSubscription()`: `response` **Changed**\n* `clerk.phoneNumbers.attemptVerification()`: **Added**\n* `clerk.phoneNumbers.prepareVerification()`: **Added**\n* `clerk.organizationDomains.verifyOwnership()`: **Added**\n* `clerk.instanceSettings.getOrganizationSettings()`: **Added**\n* `clerk.users.getBillingSubscription()`: `response` **Changed**\n* `clerk.instanceSettings.updateCommunication()`: **Added**\n* `clerk.instanceSettings.getCommunication()`: **Added**\n* `clerk.phoneNumbers.replaceForUser()`: **Added**\n* `clerk.instanceSettings.updateOrganizationSettings()`: `error.status[403]` **Added**\n* `clerk.phoneNumbers.update()`: `response.verification.union(verification_otp).channel` **Added**\n* `clerk.phoneNumbers.get()`: `response.verification.union(verification_otp).channel` **Added**\n* `clerk.users.replaceMetadata()`: **Added**\n* `clerk.enterpriseConnections.listTestRuns()`: **Added**\n* `clerk.emailAddresses.replaceForUser()`: **Added**\n* `clerk.emailAddresses.prepareVerification()`: **Added**\n* `clerk.samlConnections.update()`: `error.status[409]` **Added**\n* `clerk.enterpriseConnections.list()`: `response.data[]` **Changed**\n* `clerk.enterpriseConnections.create()`: \n * `request.customAttributes[].multiValued` **Added**\n * `response` **Changed**\n * `error.status[409]` **Added**\n* `clerk.enterpriseConnections.get()`: `response` **Changed**\n* `clerk.enterpriseConnections.update()`: \n * `requestBody.customAttributes[].multiValued` **Added**\n * `response` **Changed**\n* `clerk.billing.listPrices()`: `response.data[].supportedBillingPeriods` **Added**\n* `clerk.billing.createPrice()`: \n * `request.supportedBillingPeriods` **Added**\n * `response.supportedBillingPeriods` **Added**\n* `clerk.billing.listSubscriptionItems()`: `response.data[]` **Changed**\n* `clerk.billing.cancelSubscriptionItem()`: `response` **Changed**\n* `clerk.billing.extendSubscriptionItemFreeTrial()`: `response` **Changed**\n* `clerk.billing.createPriceTransition()`: `response` **Changed**\n* `clerk.billing.listStatements()`: `response.data[].groups[].items[].totals.discounts` **Added**\n* `clerk.billing.getStatement()`: `response.groups[].items[].totals.discounts` **Added**\n* `clerk.billing.getStatementPaymentAttempts()`: `response.data[].totals.discounts` **Added**\n* `clerk.m2m.createToken()`: \n * `request.minRemainingTtlSeconds` **Added**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 05f302b6..9df2261d 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 4.1.5 + version: 4.1.6 additionalDependencies: [] additionalPlugins: [] artifactID: backend-api diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d7872d86..a5083ae4 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.761.9 +speakeasyVersion: 1.776.0 sources: clerk-java-sdk: sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:e03f6d56009bfb224f266d3da9243c18c5d9f0b51f3e4be4c73c85156057379f - sourceBlobDigest: sha256:5af09101a437c8ff1fdeca198717f89e09f460c7c50bac24a236be2bb1033c5a + sourceRevisionDigest: sha256:dd86a35746e55b88c6e6bd757bdd5062dc669496c80fc6f49521705c8b66296e + sourceBlobDigest: sha256:323585320e512159e77625b4ca43c01faee575b6a5fcb76554c6a5d8c6fb0f06 tags: - latest - "2025-11-10" @@ -11,10 +11,10 @@ targets: clerk-java: source: clerk-java-sdk sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:e03f6d56009bfb224f266d3da9243c18c5d9f0b51f3e4be4c73c85156057379f - sourceBlobDigest: sha256:5af09101a437c8ff1fdeca198717f89e09f460c7c50bac24a236be2bb1033c5a + sourceRevisionDigest: sha256:dd86a35746e55b88c6e6bd757bdd5062dc669496c80fc6f49521705c8b66296e + sourceBlobDigest: sha256:323585320e512159e77625b4ca43c01faee575b6a5fcb76554c6a5d8c6fb0f06 codeSamplesNamespace: clerk-java-sdk-code-samples - codeSamplesRevisionDigest: sha256:7aa77e3187d4d1dc439a3fa9a88126a6b7b9e9d0ecb5879593d1bd95065e3f80 + codeSamplesRevisionDigest: sha256:bd3b80e8b1d76804239e7940093863db9b31f8b74ec828cacbf47751cb3854f4 my-first-target: source: clerk-java-sdk sourceNamespace: clerk-java-sdk diff --git a/README.md b/README.md index 117cc647..6042c5ce 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.clerk:backend-api:4.1.5' +implementation 'com.clerk:backend-api:4.1.6' ``` Maven: @@ -61,7 +61,7 @@ Maven: com.clerk backend-api - 4.1.5 + 4.1.6 ``` @@ -216,6 +216,11 @@ public class MachineAuthentication { * [create](docs/sdks/actortokens/README.md#create) - Create actor token * [revoke](docs/sdks/actortokens/README.md#revoke) - Revoke actor token +### [AdminPortalLinkTokens](docs/sdks/adminportallinktokens/README.md) + +* [createAdminPortalLinkToken](docs/sdks/adminportallinktokens/README.md#createadminportallinktoken) - Create an Admin Portal Link Token +* [revokeAdminPortalLinkToken](docs/sdks/adminportallinktokens/README.md#revokeadminportallinktoken) - Revoke an Admin Portal Link Token + ### [AgentTasks](docs/sdks/agenttasks/README.md) * [create](docs/sdks/agenttasks/README.md#create) - Create agent task @@ -281,6 +286,9 @@ public class MachineAuthentication { * [get](docs/sdks/emailaddresses/README.md#get) - Retrieve an email address * [delete](docs/sdks/emailaddresses/README.md#delete) - Delete an email address * [update](docs/sdks/emailaddresses/README.md#update) - Update an email address +* [prepareVerification](docs/sdks/emailaddresses/README.md#prepareverification) - Send a verification code to an email address +* [attemptVerification](docs/sdks/emailaddresses/README.md#attemptverification) - Verify a code sent to an email address +* [replaceForUser](docs/sdks/emailaddresses/README.md#replaceforuser) - Replace a user's email address ### [~~EmailAndSmsTemplates~~](docs/sdks/emailandsmstemplates/README.md) @@ -300,15 +308,20 @@ public class MachineAuthentication { * [get](docs/sdks/enterpriseconnections/README.md#get) - Retrieve an enterprise connection * [update](docs/sdks/enterpriseconnections/README.md#update) - Update an enterprise connection * [delete](docs/sdks/enterpriseconnections/README.md#delete) - Delete an enterprise connection +* [listTestRuns](docs/sdks/enterpriseconnections/README.md#listtestruns) - List enterprise connection test runs +* [createTestRun](docs/sdks/enterpriseconnections/README.md#createtestrun) - Create an enterprise connection test run ### [InstanceSettings](docs/sdks/instancesettings/README.md) * [get](docs/sdks/instancesettings/README.md#get) - Fetch the current instance * [update](docs/sdks/instancesettings/README.md#update) - Update instance settings * [updateRestrictions](docs/sdks/instancesettings/README.md#updaterestrictions) - Update instance restrictions +* [getCommunication](docs/sdks/instancesettings/README.md#getcommunication) - Get instance communication settings +* [updateCommunication](docs/sdks/instancesettings/README.md#updatecommunication) - Update instance communication settings * [getOAuthApplicationSettings](docs/sdks/instancesettings/README.md#getoauthapplicationsettings) - Get OAuth application settings * [updateOAuthApplicationSettings](docs/sdks/instancesettings/README.md#updateoauthapplicationsettings) - Update OAuth application settings * [changeDomain](docs/sdks/instancesettings/README.md#changedomain) - Update production instance domain +* [getOrganizationSettings](docs/sdks/instancesettings/README.md#getorganizationsettings) - Get instance organization settings * [updateOrganizationSettings](docs/sdks/instancesettings/README.md#updateorganizationsettings) - Update instance organization settings * [getInstanceProtect](docs/sdks/instancesettings/README.md#getinstanceprotect) - Get instance protect settings * [updateInstanceProtect](docs/sdks/instancesettings/README.md#updateinstanceprotect) - Update instance protect settings @@ -375,6 +388,7 @@ public class MachineAuthentication { * [list](docs/sdks/organizationdomains/README.md#list) - Get a list of all domains of an organization. * [update](docs/sdks/organizationdomains/README.md#update) - Update an organization domain. * [delete](docs/sdks/organizationdomains/README.md#delete) - Remove a domain from an organization. +* [verifyOwnership](docs/sdks/organizationdomains/README.md#verifyownership) - Mark an organization domain's ownership as verified * [listAll](docs/sdks/organizationdomains/README.md#listall) - List all organization domains ### [OrganizationInvitations](docs/sdks/organizationinvitations/README.md) @@ -433,6 +447,9 @@ public class MachineAuthentication { * [get](docs/sdks/phonenumbers/README.md#get) - Retrieve a phone number * [delete](docs/sdks/phonenumbers/README.md#delete) - Delete a phone number * [update](docs/sdks/phonenumbers/README.md#update) - Update a phone number +* [prepareVerification](docs/sdks/phonenumbers/README.md#prepareverification) - Send a verification code to a phone number +* [attemptVerification](docs/sdks/phonenumbers/README.md#attemptverification) - Verify a code sent to a phone number +* [replaceForUser](docs/sdks/phonenumbers/README.md#replaceforuser) - Replace a user's phone number ### [ProxyChecks](docs/sdks/proxychecks/README.md) @@ -508,6 +525,7 @@ public class MachineAuthentication { * [setProfileImage](docs/sdks/users/README.md#setprofileimage) - Set user profile image * [deleteProfileImage](docs/sdks/users/README.md#deleteprofileimage) - Delete user profile image * [updateMetadata](docs/sdks/users/README.md#updatemetadata) - Merge and update a user's metadata +* [replaceMetadata](docs/sdks/users/README.md#replacemetadata) - Replace a user's metadata * [getBillingSubscription](docs/sdks/users/README.md#getbillingsubscription) - Retrieve a user's billing subscription * [getBillingCreditBalance](docs/sdks/users/README.md#getbillingcreditbalance) - Retrieve a user's credit balance * [adjustBillingCreditBalance](docs/sdks/users/README.md#adjustbillingcreditbalance) - Adjust a user's credit balance @@ -707,7 +725,7 @@ public class Application { * [`ClerkError`](./src/main/java/models/errors/ClerkError.java): The base class for HTTP error responses. * [`com.clerk.backend_api.models.errors.ClerkErrors`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.ClerkErrors.java): Request was not successful. * -
Less common errors (33) +
Less common errors (41)
@@ -717,33 +735,41 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`ClerkError`](./src/main/java/models/errors/ClerkError.java)**: -* [`com.clerk.backend_api.models.errors.CreateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetApiKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeysResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetM2MTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody.java): 403 Forbidden. Status code `403`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 207 methods.* +* [`com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetApiKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeysResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetM2MTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java): 401 Unauthorized. Status code `401`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java): 401 Unauthorized. Status code `401`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java): 403 Forbidden. Status code `403`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java): 403 Forbidden. Status code `403`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody.java): 403 Forbidden. Status code `403`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 222 methods.* +* [`com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 222 methods.*
diff --git a/RELEASES.md b/RELEASES.md index 26c4276b..f485cdee 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -418,4 +418,14 @@ Based on: ### Generated - [java v4.1.5] . ### Releases -- [Maven Central v4.1.5] https://central.sonatype.com/artifact/com.clerk/backend-api/4.1.5 - . \ No newline at end of file +- [Maven Central v4.1.5] https://central.sonatype.com/artifact/com.clerk/backend-api/4.1.5 - . + +## 2026-06-11 00:38:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.776.0 (2.900.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v4.1.6] . +### Releases +- [Maven Central v4.1.6] https://central.sonatype.com/artifact/com.clerk/backend-api/4.1.6 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 633c7cd0..935a9133 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,6 @@ plugins { id 'signing' // V2 publishing plugin (Sonatype Central Portal) id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3' - id "io.spring.dependency-management" version "1.1.6" apply false } compileJava.options.encoding = "UTF-8" @@ -84,47 +83,6 @@ dependencies { implementation 'jakarta.annotation:jakarta.annotation-api:3.0.0' } -ext { - springBootVersion = '2.7.18' -} - -subprojects { - if (name in [ - 'backend-api-spring-boot-autoconfigure', - 'backend-api-spring-boot-starter' - ]) { - // Ensure subprojects use the same group and version as root project - group = rootProject.group - version = rootProject.version - - apply { - plugin "java-library" - plugin "io.spring.dependency-management" - plugin "maven-publish" - plugin "signing" - plugin "cl.franciscosolis.sonatype-central-upload" - } - dependencyManagement { - imports { - mavenBom "org.springframework.boot:spring-boot-dependencies:${rootProject.springBootVersion}" - } - } - repositories { - mavenCentral() - } - java { - withSourcesJar() - withJavadocJar() - } - tasks.withType(JavaCompile).configureEach { - options.release = 11 - } - - // Apply publishing configuration to all subprojects - they'll check for publishingConfig internally - apply from: rootProject.file('publishing.gradle') - } -} - ext { publishingConfig = [ groupId: group, diff --git a/docs/models/components/AffiliationVerification.md b/docs/models/components/AffiliationVerification.md new file mode 100644 index 00000000..995e61ff --- /dev/null +++ b/docs/models/components/AffiliationVerification.md @@ -0,0 +1,15 @@ +# AffiliationVerification + +Verification details for the user-facing affiliation between the domain and the organization (e.g. affiliation_email_code). + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `status` | *String* | :heavy_check_mark: | Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. | +| `strategy` | *String* | :heavy_check_mark: | Name of the strategy used to verify the domain | +| `attempts` | *Optional\* | :heavy_check_mark: | How many attempts have been made to verify the domain | +| `expireAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when the verification will expire | +| `verifiedAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on `affiliation_verification`.
| \ No newline at end of file diff --git a/docs/models/components/BillingPaymentAttemptDiscounts.md b/docs/models/components/BillingPaymentAttemptDiscounts.md new file mode 100644 index 00000000..9100febb --- /dev/null +++ b/docs/models/components/BillingPaymentAttemptDiscounts.md @@ -0,0 +1,11 @@ +# BillingPaymentAttemptDiscounts + +Information about the discounts applied to the payment + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `proration` | [Optional\](../../models/components/BillingPaymentAttemptTotalsProration.md) | :heavy_check_mark: | Proration details from passed subscription time | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/BillingPaymentAttemptTotals.md b/docs/models/components/BillingPaymentAttemptTotals.md index 2960aaac..4403221e 100644 --- a/docs/models/components/BillingPaymentAttemptTotals.md +++ b/docs/models/components/BillingPaymentAttemptTotals.md @@ -5,11 +5,12 @@ Totals breakdown for this payment attempt. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `subtotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | -| `credits` | [JsonNullable\](../../models/components/BillingPaymentAttemptCredits.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `subtotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `perUnitTotals` | List\<[SchemasCommercePerUnitTotal](../../models/components/SchemasCommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | +| `credits` | [JsonNullable\](../../models/components/BillingPaymentAttemptCredits.md) | :heavy_minus_sign: | N/A | +| `discounts` | [JsonNullable\](../../models/components/BillingPaymentAttemptDiscounts.md) | :heavy_minus_sign: | Information about the discounts applied to the payment | \ No newline at end of file diff --git a/docs/models/components/BillingPaymentAttemptTotalsProration.md b/docs/models/components/BillingPaymentAttemptTotalsProration.md new file mode 100644 index 00000000..2bcb0056 --- /dev/null +++ b/docs/models/components/BillingPaymentAttemptTotalsProration.md @@ -0,0 +1,13 @@ +# BillingPaymentAttemptTotalsProration + +Proration details from passed subscription time + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysPassed` | *long* | :heavy_check_mark: | Number of days that have passed in the billing cycle | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | Total number of days in the billing cycle | +| `cyclePassedPercent` | *double* | :heavy_check_mark: | Percentage of the billing cycle that has passed | \ No newline at end of file diff --git a/docs/models/components/BillingPriceResponse.md b/docs/models/components/BillingPriceResponse.md index 8d35b358..c775eb46 100644 --- a/docs/models/components/BillingPriceResponse.md +++ b/docs/models/components/BillingPriceResponse.md @@ -17,4 +17,5 @@ | `annualMonthlyFee` | [Optional\](../../models/components/BillingPriceResponseAnnualMonthlyFee.md) | :heavy_check_mark: | N/A | | `description` | *JsonNullable\* | :heavy_minus_sign: | The description of the price. | | `isDefault` | *boolean* | :heavy_check_mark: | Whether this price is the default price for its plan. | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp (milliseconds) of creation. | \ No newline at end of file +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp (milliseconds) of creation. | +| `supportedBillingPeriods` | [SupportedBillingPeriods](../../models/components/SupportedBillingPeriods.md) | :heavy_check_mark: | Which billing periods this price supports. | \ No newline at end of file diff --git a/docs/models/components/CommercePerUnitTotal.md b/docs/models/components/CommercePerUnitTotal.md index ea913764..728a45ae 100644 --- a/docs/models/components/CommercePerUnitTotal.md +++ b/docs/models/components/CommercePerUnitTotal.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `name` | *String* | :heavy_check_mark: | Name of the billable unit (for example, seats) | -| `blockSize` | *long* | :heavy_check_mark: | Number of units included in each pricing block | -| `tiers` | List\<[CommercePerUnitTotalTier](../../models/components/CommercePerUnitTotalTier.md)> | :heavy_check_mark: | Computed totals for each pricing tier | \ No newline at end of file +| `name` | *String* | :heavy_check_mark: | Name of the billable unit (for example, `seats`). | +| `blockSize` | *long* | :heavy_check_mark: | Number of units included in each pricing block. | +| `tiers` | List\<[CommercePerUnitTotalTier](../../models/components/CommercePerUnitTotalTier.md)> | :heavy_check_mark: | Computed totals for each pricing tier. | \ No newline at end of file diff --git a/docs/models/components/CommercePerUnitTotalTier.md b/docs/models/components/CommercePerUnitTotalTier.md index 1cbe6290..cc883ca7 100644 --- a/docs/models/components/CommercePerUnitTotalTier.md +++ b/docs/models/components/CommercePerUnitTotalTier.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `quantity` | *JsonNullable\* | :heavy_minus_sign: | Units billed in this tier; null means unlimited | +| `quantity` | *JsonNullable\* | :heavy_minus_sign: | Units billed in this tier; null means unlimited. | | `feePerBlock` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | | `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemAmount.md b/docs/models/components/CommerceSubscriptionItemAmount.md index 468a8f0a..c4fd99fc 100644 --- a/docs/models/components/CommerceSubscriptionItemAmount.md +++ b/docs/models/components/CommerceSubscriptionItemAmount.md @@ -1,6 +1,6 @@ # CommerceSubscriptionItemAmount -Amount for the next payment. +Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see `totals.grand_total` for the full amount. ## Fields diff --git a/docs/models/components/CommerceSubscriptionItemDiscounts.md b/docs/models/components/CommerceSubscriptionItemDiscounts.md new file mode 100644 index 00000000..2f7d1c8f --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemDiscounts.md @@ -0,0 +1,9 @@ +# CommerceSubscriptionItemDiscounts + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `proration` | [Optional\](../../models/components/CommerceSubscriptionItemNextPaymentProration.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemNextPaymentCredits.md b/docs/models/components/CommerceSubscriptionItemNextPaymentCredits.md new file mode 100644 index 00000000..9894df0b --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemNextPaymentCredits.md @@ -0,0 +1,10 @@ +# CommerceSubscriptionItemNextPaymentCredits + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `proration` | [Optional\](../../models/components/CommerceSubscriptionItemNextPaymentTotalsProration.md) | :heavy_check_mark: | N/A | +| `payer` | [Optional\](../../models/components/CommerceSubscriptionItemNextPaymentPayer.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemNextPaymentPayer.md b/docs/models/components/CommerceSubscriptionItemNextPaymentPayer.md new file mode 100644 index 00000000..76ef2ece --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemNextPaymentPayer.md @@ -0,0 +1,9 @@ +# CommerceSubscriptionItemNextPaymentPayer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `remainingBalance` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `appliedAmount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemNextPaymentProration.md b/docs/models/components/CommerceSubscriptionItemNextPaymentProration.md new file mode 100644 index 00000000..b573b8e3 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemNextPaymentProration.md @@ -0,0 +1,11 @@ +# CommerceSubscriptionItemNextPaymentProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysPassed` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cyclePassedPercent` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.md b/docs/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.md new file mode 100644 index 00000000..847052be --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.md @@ -0,0 +1,11 @@ +# CommerceSubscriptionItemNextPaymentTotalsProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysRemaining` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cycleRemainingPercent` | *double* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemTotals.md b/docs/models/components/CommerceSubscriptionItemTotals.md new file mode 100644 index 00000000..5422bc57 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemTotals.md @@ -0,0 +1,16 @@ +# CommerceSubscriptionItemTotals + +Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `subtotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | +| `credits` | [JsonNullable\](../../models/components/CommerceSubscriptionItemNextPaymentCredits.md) | :heavy_minus_sign: | N/A | +| `discounts` | [JsonNullable\](../../models/components/CommerceSubscriptionItemDiscounts.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionItemTotalsProration.md b/docs/models/components/CommerceSubscriptionItemTotalsProration.md new file mode 100644 index 00000000..487ae1f4 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionItemTotalsProration.md @@ -0,0 +1,13 @@ +# CommerceSubscriptionItemTotalsProration + +Proration details from passed subscription time + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysPassed` | *long* | :heavy_check_mark: | Number of days that have passed in the billing cycle | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | Total number of days in the billing cycle | +| `cyclePassedPercent` | *double* | :heavy_check_mark: | Percentage of the billing cycle that has passed | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPayment.md b/docs/models/components/CommerceSubscriptionNextPayment.md index 3f0d5f25..f1ce0c22 100644 --- a/docs/models/components/CommerceSubscriptionNextPayment.md +++ b/docs/models/components/CommerceSubscriptionNextPayment.md @@ -3,7 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `date` | *long* | :heavy_check_mark: | Unix timestamp (milliseconds) of the next payment date. | -| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `date` | *long* | :heavy_check_mark: | Unix timestamp (milliseconds) of the next payment date. | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `perUnitTotals` | List\<[SchemasCommercePerUnitTotal](../../models/components/SchemasCommercePerUnitTotal.md)> | :heavy_minus_sign: | Per-unit total breakdown (for example, seats) for the next payment. | +| `totals` | [JsonNullable\](../../models/components/CommerceSubscriptionNextPaymentTotals.md) | :heavy_minus_sign: | Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPaymentCredits.md b/docs/models/components/CommerceSubscriptionNextPaymentCredits.md new file mode 100644 index 00000000..14575569 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionNextPaymentCredits.md @@ -0,0 +1,10 @@ +# CommerceSubscriptionNextPaymentCredits + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `proration` | [Optional\](../../models/components/CommerceSubscriptionNextPaymentProration.md) | :heavy_check_mark: | N/A | +| `payer` | [Optional\](../../models/components/CommerceSubscriptionNextPaymentPayer.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPaymentDiscounts.md b/docs/models/components/CommerceSubscriptionNextPaymentDiscounts.md new file mode 100644 index 00000000..2f900179 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionNextPaymentDiscounts.md @@ -0,0 +1,11 @@ +# CommerceSubscriptionNextPaymentDiscounts + +Information about the discounts applied to the payment + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `proration` | [Optional\](../../models/components/CommerceSubscriptionNextPaymentTotalsProration.md) | :heavy_check_mark: | Proration details from passed subscription time | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPaymentPayer.md b/docs/models/components/CommerceSubscriptionNextPaymentPayer.md new file mode 100644 index 00000000..9916104c --- /dev/null +++ b/docs/models/components/CommerceSubscriptionNextPaymentPayer.md @@ -0,0 +1,9 @@ +# CommerceSubscriptionNextPaymentPayer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `remainingBalance` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `appliedAmount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPaymentProration.md b/docs/models/components/CommerceSubscriptionNextPaymentProration.md new file mode 100644 index 00000000..439d262b --- /dev/null +++ b/docs/models/components/CommerceSubscriptionNextPaymentProration.md @@ -0,0 +1,11 @@ +# CommerceSubscriptionNextPaymentProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysRemaining` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cycleRemainingPercent` | *double* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPaymentTotals.md b/docs/models/components/CommerceSubscriptionNextPaymentTotals.md new file mode 100644 index 00000000..dad851c1 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionNextPaymentTotals.md @@ -0,0 +1,16 @@ +# CommerceSubscriptionNextPaymentTotals + +Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `subtotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `perUnitTotals` | List\<[SchemasCommercePerUnitTotal](../../models/components/SchemasCommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | +| `credits` | [JsonNullable\](../../models/components/CommerceSubscriptionNextPaymentCredits.md) | :heavy_minus_sign: | N/A | +| `discounts` | [JsonNullable\](../../models/components/CommerceSubscriptionNextPaymentDiscounts.md) | :heavy_minus_sign: | Information about the discounts applied to the payment | \ No newline at end of file diff --git a/docs/models/components/CommerceSubscriptionNextPaymentTotalsProration.md b/docs/models/components/CommerceSubscriptionNextPaymentTotalsProration.md new file mode 100644 index 00000000..d340a7c0 --- /dev/null +++ b/docs/models/components/CommerceSubscriptionNextPaymentTotalsProration.md @@ -0,0 +1,13 @@ +# CommerceSubscriptionNextPaymentTotalsProration + +Proration details from passed subscription time + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysPassed` | *long* | :heavy_check_mark: | Number of days that have passed in the billing cycle | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | Total number of days in the billing cycle | +| `cyclePassedPercent` | *double* | :heavy_check_mark: | Percentage of the billing cycle that has passed | \ No newline at end of file diff --git a/docs/models/components/ConnectionType.md b/docs/models/components/ConnectionType.md new file mode 100644 index 00000000..fa3e0a28 --- /dev/null +++ b/docs/models/components/ConnectionType.md @@ -0,0 +1,19 @@ +# ConnectionType + +The type of enterprise connection the test run was performed against + +## Example Usage + +```java +import com.clerk.backend_api.models.components.ConnectionType; + +ConnectionType value = ConnectionType.SAML; +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `SAML` | saml | +| `OAUTH` | oauth | \ No newline at end of file diff --git a/docs/models/components/CreateBillingPriceRequest.md b/docs/models/components/CreateBillingPriceRequest.md index d2e497da..b00896c7 100644 --- a/docs/models/components/CreateBillingPriceRequest.md +++ b/docs/models/components/CreateBillingPriceRequest.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `planId` | *String* | :heavy_check_mark: | The ID of the plan this price belongs to. | -| `currency` | *Optional\* | :heavy_minus_sign: | The currency code (e.g., "USD"). Defaults to USD. | -| `amount` | *Optional\* | :heavy_check_mark: | The monthly amount in cents. Must be at least $1 (100 cents) if not null. | -| `annualMonthlyAmount` | *JsonNullable\* | :heavy_minus_sign: | The monthly amount in cents when billed annually. Must be at least $1 (100 cents) if not null. | -| `description` | *Optional\* | :heavy_minus_sign: | An optional description for this custom price. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `planId` | *String* | :heavy_check_mark: | The ID of the plan this price belongs to. | +| `currency` | *Optional\* | :heavy_minus_sign: | The currency code (e.g., "USD"). Defaults to USD. | +| `amount` | *Optional\* | :heavy_check_mark: | The monthly amount in cents. Must be at least $1 (100 cents) if not null. | +| `annualMonthlyAmount` | *JsonNullable\* | :heavy_minus_sign: | The monthly amount in cents when billed annually. Must be at least $1 (100 cents) if not null. | +| `description` | *Optional\* | :heavy_minus_sign: | An optional description for this custom price. | +| `supportedBillingPeriods` | [Optional\](../../models/components/CreateBillingPriceRequestSupportedBillingPeriods.md) | :heavy_minus_sign: | Which billing periods this price supports. Inferred from amounts if omitted. | \ No newline at end of file diff --git a/docs/models/components/CreateBillingPriceRequestSupportedBillingPeriods.md b/docs/models/components/CreateBillingPriceRequestSupportedBillingPeriods.md new file mode 100644 index 00000000..e5cc1fc8 --- /dev/null +++ b/docs/models/components/CreateBillingPriceRequestSupportedBillingPeriods.md @@ -0,0 +1,20 @@ +# CreateBillingPriceRequestSupportedBillingPeriods + +Which billing periods this price supports. Inferred from amounts if omitted. + +## Example Usage + +```java +import com.clerk.backend_api.models.components.CreateBillingPriceRequestSupportedBillingPeriods; + +CreateBillingPriceRequestSupportedBillingPeriods value = CreateBillingPriceRequestSupportedBillingPeriods.MONTH; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `MONTH` | month | +| `ANNUAL` | annual | +| `BOTH` | both | \ No newline at end of file diff --git a/docs/models/components/CustomAttributes.md b/docs/models/components/CustomAttributes.md index 97686af7..952a97f1 100644 --- a/docs/models/components/CustomAttributes.md +++ b/docs/models/components/CustomAttributes.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `name` | *String* | :heavy_check_mark: | Display name for the custom attribute | -| `key` | *String* | :heavy_check_mark: | Key used to store the attribute in the user's public/private/unsafe metadata | -| `ssoPath` | *Optional\* | :heavy_minus_sign: | Path to extract the attribute value from SSO claims (SAML assertions or OIDC claims) | -| `scimPath` | *Optional\* | :heavy_minus_sign: | GJSON path to extract the attribute value from SCIM user resources | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *String* | :heavy_check_mark: | Display name for the custom attribute | +| `key` | *String* | :heavy_check_mark: | Key used to store the attribute in the user's public/private/unsafe metadata | +| `ssoPath` | *Optional\* | :heavy_minus_sign: | Path to extract the attribute value from SSO claims (SAML assertions or OIDC claims) | +| `scimPath` | *Optional\* | :heavy_minus_sign: | GJSON path to extract the attribute value from SCIM user resources | +| `multiValued` | *Optional\* | :heavy_minus_sign: | When true, the attribute supports multiple values; values from the IdP are written to public_metadata as an array. Defaults to false. | \ No newline at end of file diff --git a/docs/models/components/Discounts.md b/docs/models/components/Discounts.md new file mode 100644 index 00000000..ed035ff6 --- /dev/null +++ b/docs/models/components/Discounts.md @@ -0,0 +1,11 @@ +# Discounts + +Information about the discounts applied to the payment + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `proration` | [Optional\](../../models/components/CommerceSubscriptionItemTotalsProration.md) | :heavy_check_mark: | Proration details from passed subscription time | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/EnterpriseConnectionTestRun.md b/docs/models/components/EnterpriseConnectionTestRun.md new file mode 100644 index 00000000..4954f32d --- /dev/null +++ b/docs/models/components/EnterpriseConnectionTestRun.md @@ -0,0 +1,15 @@ +# EnterpriseConnectionTestRun + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | The test run ID | +| `status` | [EnterpriseConnectionTestRunStatus](../../models/components/EnterpriseConnectionTestRunStatus.md) | :heavy_check_mark: | The status of the test run | +| `connectionType` | [ConnectionType](../../models/components/ConnectionType.md) | :heavy_check_mark: | The type of enterprise connection the test run was performed against | +| `parsedUserInfo` | [JsonNullable\](../../models/components/ParsedUserInfo.md) | :heavy_minus_sign: | The user information parsed from the IdP response | +| `logs` | List\<[Logs](../../models/components/Logs.md)> | :heavy_minus_sign: | Log entries captured during the test run | +| `saml` | [JsonNullable\](../../models/components/Saml.md) | :heavy_minus_sign: | SAML-specific metadata, present for SAML connections | +| `oauth` | [JsonNullable\](../../models/components/Oauth.md) | :heavy_minus_sign: | OAuth-specific metadata, present for OIDC connections | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp in milliseconds when the test run was created | \ No newline at end of file diff --git a/docs/models/components/EnterpriseConnectionTestRunResponse.md b/docs/models/components/EnterpriseConnectionTestRunResponse.md new file mode 100644 index 00000000..58eb0b26 --- /dev/null +++ b/docs/models/components/EnterpriseConnectionTestRunResponse.md @@ -0,0 +1,10 @@ +# EnterpriseConnectionTestRunResponse + +A URL to initiate an enterprise connection test run + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `url` | *String* | :heavy_check_mark: | A short-lived URL that can be used to initiate the test run flow | \ No newline at end of file diff --git a/docs/models/components/EnterpriseConnectionTestRunStatus.md b/docs/models/components/EnterpriseConnectionTestRunStatus.md new file mode 100644 index 00000000..d4c76ddf --- /dev/null +++ b/docs/models/components/EnterpriseConnectionTestRunStatus.md @@ -0,0 +1,20 @@ +# EnterpriseConnectionTestRunStatus + +The status of the test run + +## Example Usage + +```java +import com.clerk.backend_api.models.components.EnterpriseConnectionTestRunStatus; + +EnterpriseConnectionTestRunStatus value = EnterpriseConnectionTestRunStatus.PENDING; +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `PENDING` | pending | +| `SUCCESS` | success | +| `FAILED` | failed | \ No newline at end of file diff --git a/docs/models/components/EnterpriseConnectionTestRuns.md b/docs/models/components/EnterpriseConnectionTestRuns.md new file mode 100644 index 00000000..27c4b327 --- /dev/null +++ b/docs/models/components/EnterpriseConnectionTestRuns.md @@ -0,0 +1,11 @@ +# EnterpriseConnectionTestRuns + +A list of enterprise connection test runs + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `data` | List\<[EnterpriseConnectionTestRun](../../models/components/EnterpriseConnectionTestRun.md)> | :heavy_check_mark: | N/A | +| `totalCount` | *long* | :heavy_check_mark: | Total number of test runs | \ No newline at end of file diff --git a/docs/models/components/InstanceCommunication.md b/docs/models/components/InstanceCommunication.md new file mode 100644 index 00000000..cba4bb03 --- /dev/null +++ b/docs/models/components/InstanceCommunication.md @@ -0,0 +1,11 @@ +# InstanceCommunication + +Per-instance SMS communication settings, including the SMS country blocklist. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [InstanceCommunicationObject](../../models/components/InstanceCommunicationObject.md) | :heavy_check_mark: | N/A | +| `blockedCountryCodes` | List\<*String*> | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that aren't recognized are silently dropped. | \ No newline at end of file diff --git a/docs/models/components/InstanceCommunicationObject.md b/docs/models/components/InstanceCommunicationObject.md new file mode 100644 index 00000000..feae6d06 --- /dev/null +++ b/docs/models/components/InstanceCommunicationObject.md @@ -0,0 +1,16 @@ +# InstanceCommunicationObject + +## Example Usage + +```java +import com.clerk.backend_api.models.components.InstanceCommunicationObject; + +InstanceCommunicationObject value = InstanceCommunicationObject.INSTANCE_COMMUNICATION; +``` + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `INSTANCE_COMMUNICATION` | instance_communication | \ No newline at end of file diff --git a/docs/models/components/Logs.md b/docs/models/components/Logs.md new file mode 100644 index 00000000..50d3aa4a --- /dev/null +++ b/docs/models/components/Logs.md @@ -0,0 +1,11 @@ +# Logs + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `level` | *String* | :heavy_check_mark: | N/A | +| `code` | *Optional\* | :heavy_minus_sign: | N/A | +| `shortMessage` | *Optional\* | :heavy_minus_sign: | N/A | +| `message` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/NextInvoice.md b/docs/models/components/NextInvoice.md index 44ce4e22..1afdbee4 100644 --- a/docs/models/components/NextInvoice.md +++ b/docs/models/components/NextInvoice.md @@ -7,5 +7,7 @@ Information about the next invoice. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md) | :heavy_minus_sign: | Amount for the next payment. | -| `date` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | \ No newline at end of file +| `amount` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md) | :heavy_minus_sign: | Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see `totals.grand_total` for the full amount. | +| `date` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | +| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | Per-unit total breakdown (for example, seats) for the next payment. | +| `totals` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemTotals.md) | :heavy_minus_sign: | Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. | \ No newline at end of file diff --git a/docs/models/components/NextPayment.md b/docs/models/components/NextPayment.md index beeef7ec..e643e64c 100644 --- a/docs/models/components/NextPayment.md +++ b/docs/models/components/NextPayment.md @@ -5,7 +5,9 @@ Information about the next payment. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `amount` | [JsonNullable\](../../models/components/CommerceSubscriptionItemAmount.md) | :heavy_minus_sign: | Amount for the next payment. | -| `date` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | [JsonNullable\](../../models/components/CommerceSubscriptionItemAmount.md) | :heavy_minus_sign: | Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see `totals.grand_total` for the full amount. | +| `date` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | +| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | Per-unit total breakdown (for example, seats) for the next payment. | +| `totals` | [JsonNullable\](../../models/components/CommerceSubscriptionItemTotals.md) | :heavy_minus_sign: | Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. | \ No newline at end of file diff --git a/docs/models/components/Oauth.md b/docs/models/components/Oauth.md index fc9a4f20..327df6fd 100644 --- a/docs/models/components/Oauth.md +++ b/docs/models/components/Oauth.md @@ -1,15 +1,12 @@ # Oauth +OAuth-specific metadata, present for OIDC connections + ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `object` | [Optional\](../../models/components/VerificationOauthVerificationObject.md) | :heavy_minus_sign: | N/A | -| `status` | [VerificationOauthVerificationStatus](../../models/components/VerificationOauthVerificationStatus.md) | :heavy_check_mark: | N/A | -| `strategy` | *String* | :heavy_check_mark: | N/A | -| `externalVerificationRedirectUrl` | *Optional\* | :heavy_minus_sign: | N/A | -| `error` | [JsonNullable\](../../models/components/VerificationOauthVerificationError.md) | :heavy_minus_sign: | N/A | -| `expireAt` | *long* | :heavy_check_mark: | N/A | -| `attempts` | *Optional\* | :heavy_check_mark: | N/A | -| `verifiedAtClient` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `idToken` | *Optional\* | :heavy_minus_sign: | N/A | +| `accessToken` | *Optional\* | :heavy_minus_sign: | N/A | +| `userInfo` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/OauthConfig.md b/docs/models/components/OauthConfig.md index cd78c4bd..32114f8b 100644 --- a/docs/models/components/OauthConfig.md +++ b/docs/models/components/OauthConfig.md @@ -5,13 +5,17 @@ Present when the enterprise connection uses OIDC or EASIE ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | OAuth config ID | -| `name` | *Optional\* | :heavy_minus_sign: | Custom OIDC provider display name | -| `providerKey` | *Optional\* | :heavy_minus_sign: | OAuth provider key (e.g. oidc_custom, oidc_ghe_*, oidc_gitlab_ent_*) | -| `clientId` | *JsonNullable\* | :heavy_minus_sign: | OAuth client ID | -| `discoveryUrl` | *JsonNullable\* | :heavy_minus_sign: | OIDC discovery URL | -| `logoPublicUrl` | *JsonNullable\* | :heavy_minus_sign: | Logo URL for the provider | -| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was created | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was last updated | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | OAuth config ID | +| `name` | *Optional\* | :heavy_minus_sign: | Custom OIDC provider display name | +| `providerKey` | *Optional\* | :heavy_minus_sign: | OAuth provider key (e.g. oidc_custom, oidc_ghe_*, oidc_gitlab_ent_*) | +| `clientId` | *JsonNullable\* | :heavy_minus_sign: | OAuth client ID | +| `discoveryUrl` | *JsonNullable\* | :heavy_minus_sign: | OIDC discovery URL | +| `authUrl` | *JsonNullable\* | :heavy_minus_sign: | OAuth authorization endpoint URL (present when configured or resolved from discovery) | +| `tokenUrl` | *JsonNullable\* | :heavy_minus_sign: | OAuth token endpoint URL (present when configured or resolved from discovery) | +| `userInfoUrl` | *JsonNullable\* | :heavy_minus_sign: | OIDC userinfo endpoint URL (present when configured or resolved from discovery) | +| `requiresPkce` | *Optional\* | :heavy_minus_sign: | Whether PKCE is required for this OAuth client | +| `logoPublicUrl` | *JsonNullable\* | :heavy_minus_sign: | Logo URL for the provider | +| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was created | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was last updated | \ No newline at end of file diff --git a/docs/models/components/OrganizationDomain.md b/docs/models/components/OrganizationDomain.md index 89305d4c..f3ba1ca7 100644 --- a/docs/models/components/OrganizationDomain.md +++ b/docs/models/components/OrganizationDomain.md @@ -5,17 +5,19 @@ An organization domain ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `object` | [OrganizationDomainObject](../../models/components/OrganizationDomainObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. Always `organization_domain`
| -| `id` | *String* | :heavy_check_mark: | Unique identifier for the organization domain | -| `organizationId` | *String* | :heavy_check_mark: | Unique identifier for the organization | -| `name` | *String* | :heavy_check_mark: | Name of the organization domain | -| `enrollmentMode` | [EnrollmentMode](../../models/components/EnrollmentMode.md) | :heavy_check_mark: | Mode of enrollment for the domain | -| `affiliationEmailAddress` | *Optional\* | :heavy_check_mark: | Affiliation email address for the domain, if available. | -| `verification` | [Optional\](../../models/components/OrganizationDomainVerification.md) | :heavy_check_mark: | Verification details for the domain | -| `totalPendingInvitations` | *int* | :heavy_check_mark: | Total number of pending invitations associated with this domain | -| `totalPendingSuggestions` | *int* | :heavy_check_mark: | Total number of pending suggestions associated with this domain | -| `publicOrganizationData` | [JsonNullable\](../../models/components/PublicOrganizationData.md) | :heavy_minus_sign: | Public organization data associated with this domain | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp when the domain was created | -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of the last update to the domain | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `object` | [OrganizationDomainObject](../../models/components/OrganizationDomainObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. Always `organization_domain`
| +| `id` | *String* | :heavy_check_mark: | Unique identifier for the organization domain | +| `organizationId` | *String* | :heavy_check_mark: | Unique identifier for the organization | +| `name` | *String* | :heavy_check_mark: | Name of the organization domain | +| `enrollmentMode` | [EnrollmentMode](../../models/components/EnrollmentMode.md) | :heavy_check_mark: | Mode of enrollment for the domain | +| `affiliationEmailAddress` | *Optional\* | :heavy_check_mark: | Affiliation email address for the domain, if available. | +| `affiliationVerification` | [Optional\](../../models/components/AffiliationVerification.md) | :heavy_check_mark: | Verification details for the user-facing affiliation between the domain and the organization (e.g. affiliation_email_code).
| +| `ownershipVerification` | [Optional\](../../models/components/OwnershipVerification.md) | :heavy_check_mark: | Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard override). Null until ownership has been attempted.
| +| ~~`verification`~~ | [Optional\](../../models/components/OrganizationDomainVerification.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API version; will be removed in the next API version. Prefer `affiliation_verification`.
| +| `totalPendingInvitations` | *int* | :heavy_check_mark: | Total number of pending invitations associated with this domain | +| `totalPendingSuggestions` | *int* | :heavy_check_mark: | Total number of pending suggestions associated with this domain | +| `publicOrganizationData` | [JsonNullable\](../../models/components/PublicOrganizationData.md) | :heavy_minus_sign: | Public organization data associated with this domain | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp when the domain was created | +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of the last update to the domain | \ No newline at end of file diff --git a/docs/models/components/OrganizationDomainStatus.md b/docs/models/components/OrganizationDomainStatus.md deleted file mode 100644 index f1a882bb..00000000 --- a/docs/models/components/OrganizationDomainStatus.md +++ /dev/null @@ -1,19 +0,0 @@ -# OrganizationDomainStatus - -Status of the verification. It can be `unverified` or `verified` - -## Example Usage - -```java -import com.clerk.backend_api.models.components.OrganizationDomainStatus; - -OrganizationDomainStatus value = OrganizationDomainStatus.UNVERIFIED; -``` - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `UNVERIFIED` | unverified | -| `VERIFIED` | verified | \ No newline at end of file diff --git a/docs/models/components/OrganizationDomainVerification.md b/docs/models/components/OrganizationDomainVerification.md index 3bb37b75..e59d1d28 100644 --- a/docs/models/components/OrganizationDomainVerification.md +++ b/docs/models/components/OrganizationDomainVerification.md @@ -1,13 +1,17 @@ -# OrganizationDomainVerification +# ~~OrganizationDomainVerification~~ -Verification details for the domain +Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API version; will be removed in the next API version. Prefer `affiliation_verification`. + + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `status` | [OrganizationDomainStatus](../../models/components/OrganizationDomainStatus.md) | :heavy_check_mark: | Status of the verification. It can be `unverified` or `verified` | -| `strategy` | *String* | :heavy_check_mark: | Name of the strategy used to verify the domain | -| `attempts` | *Optional\* | :heavy_check_mark: | How many attempts have been made to verify the domain | -| `expireAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when the verification will expire | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `status` | *String* | :heavy_check_mark: | Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. | +| `strategy` | *String* | :heavy_check_mark: | Name of the strategy used to verify the domain | +| `attempts` | *Optional\* | :heavy_check_mark: | How many attempts have been made to verify the domain | +| `expireAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when the verification will expire | +| `verifiedAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on `affiliation_verification`.
| \ No newline at end of file diff --git a/docs/models/components/Otp.md b/docs/models/components/Otp.md index 7c23e146..c88c9616 100644 --- a/docs/models/components/Otp.md +++ b/docs/models/components/Otp.md @@ -10,4 +10,5 @@ | `strategy` | [Strategy](../../models/components/Strategy.md) | :heavy_check_mark: | N/A | | `attempts` | *Optional\* | :heavy_check_mark: | N/A | | `expireAt` | *Optional\* | :heavy_check_mark: | N/A | +| `channel` | *JsonNullable\* | :heavy_minus_sign: | The delivery channel of the code (phone codes only). | | `verifiedAtClient` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/OwnershipVerification.md b/docs/models/components/OwnershipVerification.md new file mode 100644 index 00000000..bef63c85 --- /dev/null +++ b/docs/models/components/OwnershipVerification.md @@ -0,0 +1,15 @@ +# OwnershipVerification + +Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard override). Null until ownership has been attempted. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `status` | *String* | :heavy_check_mark: | Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. | +| `strategy` | *String* | :heavy_check_mark: | Name of the strategy used to verify the domain | +| `attempts` | *Optional\* | :heavy_check_mark: | How many attempts have been made to verify the domain | +| `expireAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when the verification will expire | +| `verifiedAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on `affiliation_verification`.
| \ No newline at end of file diff --git a/docs/models/components/ParsedUserInfo.md b/docs/models/components/ParsedUserInfo.md new file mode 100644 index 00000000..67c17f1f --- /dev/null +++ b/docs/models/components/ParsedUserInfo.md @@ -0,0 +1,13 @@ +# ParsedUserInfo + +The user information parsed from the IdP response + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `emailAddress` | *Optional\* | :heavy_minus_sign: | N/A | +| `firstName` | *Optional\* | :heavy_minus_sign: | N/A | +| `lastName` | *Optional\* | :heavy_minus_sign: | N/A | +| `userId` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Saml.md b/docs/models/components/Saml.md index 2723315a..0b1a091b 100644 --- a/docs/models/components/Saml.md +++ b/docs/models/components/Saml.md @@ -1,15 +1,12 @@ # Saml +SAML-specific metadata, present for SAML connections + ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `object` | [Optional\](../../models/components/VerificationSamlVerificationObject.md) | :heavy_minus_sign: | N/A | -| `status` | [VerificationSamlVerificationStatus](../../models/components/VerificationSamlVerificationStatus.md) | :heavy_check_mark: | N/A | -| `strategy` | [VerificationSamlVerificationStrategy](../../models/components/VerificationSamlVerificationStrategy.md) | :heavy_check_mark: | N/A | -| `externalVerificationRedirectUrl` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `error` | [JsonNullable\](../../models/components/VerificationError.md) | :heavy_minus_sign: | N/A | -| `expireAt` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `attempts` | *Optional\* | :heavy_check_mark: | N/A | -| `verifiedAtClient` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `samlRequest` | *Optional\* | :heavy_minus_sign: | N/A | +| `samlResponse` | *Optional\* | :heavy_minus_sign: | N/A | +| `relayState` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommercePerUnitTotal.md b/docs/models/components/SchemasCommercePerUnitTotal.md new file mode 100644 index 00000000..aeedba3f --- /dev/null +++ b/docs/models/components/SchemasCommercePerUnitTotal.md @@ -0,0 +1,10 @@ +# SchemasCommercePerUnitTotal + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *String* | :heavy_check_mark: | Name of the billable unit (for example, seats) | +| `blockSize` | *long* | :heavy_check_mark: | Number of units included in each pricing block | +| `tiers` | List\<[SchemasCommercePerUnitTotalTier](../../models/components/SchemasCommercePerUnitTotalTier.md)> | :heavy_check_mark: | Computed totals for each pricing tier | \ No newline at end of file diff --git a/docs/models/components/SchemasCommercePerUnitTotalTier.md b/docs/models/components/SchemasCommercePerUnitTotalTier.md new file mode 100644 index 00000000..d22814a8 --- /dev/null +++ b/docs/models/components/SchemasCommercePerUnitTotalTier.md @@ -0,0 +1,10 @@ +# SchemasCommercePerUnitTotalTier + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `quantity` | *JsonNullable\* | :heavy_minus_sign: | Units billed in this tier; null means unlimited | +| `feePerBlock` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemCredits.md b/docs/models/components/SchemasCommerceSubscriptionItemCredits.md new file mode 100644 index 00000000..6dbebdd5 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemCredits.md @@ -0,0 +1,10 @@ +# SchemasCommerceSubscriptionItemCredits + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `proration` | [Optional\](../../models/components/SchemasCommerceSubscriptionItemProration.md) | :heavy_check_mark: | N/A | +| `payer` | [Optional\](../../models/components/SchemasCommerceSubscriptionItemPayer.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemDiscounts.md b/docs/models/components/SchemasCommerceSubscriptionItemDiscounts.md new file mode 100644 index 00000000..4274f4e1 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemDiscounts.md @@ -0,0 +1,9 @@ +# SchemasCommerceSubscriptionItemDiscounts + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `proration` | [Optional\](../../models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md b/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md index 85c7c6c5..b92414ea 100644 --- a/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.md @@ -1,6 +1,6 @@ # SchemasCommerceSubscriptionItemNextInvoiceAmount -Amount for the next payment. +Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see `totals.grand_total` for the full amount. ## Fields diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.md b/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.md new file mode 100644 index 00000000..445e67be --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.md @@ -0,0 +1,11 @@ +# SchemasCommerceSubscriptionItemNextInvoiceProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysPassed` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cyclePassedPercent` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPayment.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPayment.md index f435de47..b7227b48 100644 --- a/docs/models/components/SchemasCommerceSubscriptionItemNextPayment.md +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPayment.md @@ -7,5 +7,7 @@ Information about the next payment. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md) | :heavy_minus_sign: | Amount for the next payment. | -| `date` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | \ No newline at end of file +| `amount` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md) | :heavy_minus_sign: | Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see `totals.grand_total` for the full amount. | +| `date` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | +| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | Per-unit total breakdown (for example, seats) for the next payment. | +| `totals` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.md) | :heavy_minus_sign: | Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md index f6cbc926..4689ffdc 100644 --- a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.md @@ -1,6 +1,6 @@ # SchemasCommerceSubscriptionItemNextPaymentAmount -Amount for the next payment. +Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see `totals.grand_total` for the full amount. ## Fields diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.md new file mode 100644 index 00000000..7e5b0876 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.md @@ -0,0 +1,10 @@ +# SchemasCommerceSubscriptionItemNextPaymentCredits + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `proration` | [Optional\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentProration.md) | :heavy_check_mark: | N/A | +| `payer` | [Optional\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.md new file mode 100644 index 00000000..399b4cdb --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.md @@ -0,0 +1,9 @@ +# SchemasCommerceSubscriptionItemNextPaymentDiscounts + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `proration` | [Optional\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.md) | :heavy_check_mark: | N/A | +| `total` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.md new file mode 100644 index 00000000..4f58f153 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.md @@ -0,0 +1,9 @@ +# SchemasCommerceSubscriptionItemNextPaymentPayer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `remainingBalance` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `appliedAmount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.md new file mode 100644 index 00000000..e974a5a6 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.md @@ -0,0 +1,11 @@ +# SchemasCommerceSubscriptionItemNextPaymentProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysRemaining` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cycleRemainingPercent` | *double* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.md new file mode 100644 index 00000000..cf0b09df --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.md @@ -0,0 +1,16 @@ +# SchemasCommerceSubscriptionItemNextPaymentTotals + +Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `subtotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | +| `credits` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.md) | :heavy_minus_sign: | N/A | +| `discounts` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.md b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.md new file mode 100644 index 00000000..d788c0b7 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.md @@ -0,0 +1,11 @@ +# SchemasCommerceSubscriptionItemNextPaymentTotalsProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysPassed` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cyclePassedPercent` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemPayer.md b/docs/models/components/SchemasCommerceSubscriptionItemPayer.md new file mode 100644 index 00000000..1fbc0913 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemPayer.md @@ -0,0 +1,9 @@ +# SchemasCommerceSubscriptionItemPayer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `remainingBalance` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `appliedAmount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemProration.md b/docs/models/components/SchemasCommerceSubscriptionItemProration.md new file mode 100644 index 00000000..3f100e41 --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemProration.md @@ -0,0 +1,11 @@ +# SchemasCommerceSubscriptionItemProration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `amount` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `cycleDaysRemaining` | *long* | :heavy_check_mark: | N/A | +| `cycleDaysTotal` | *long* | :heavy_check_mark: | N/A | +| `cycleRemainingPercent` | *double* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/SchemasCommerceSubscriptionItemTotals.md b/docs/models/components/SchemasCommerceSubscriptionItemTotals.md new file mode 100644 index 00000000..cd8b588f --- /dev/null +++ b/docs/models/components/SchemasCommerceSubscriptionItemTotals.md @@ -0,0 +1,16 @@ +# SchemasCommerceSubscriptionItemTotals + +Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax and credits are not previewed. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `subtotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | +| `credits` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemCredits.md) | :heavy_minus_sign: | N/A | +| `discounts` | [JsonNullable\](../../models/components/SchemasCommerceSubscriptionItemDiscounts.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Scim.md b/docs/models/components/Scim.md new file mode 100644 index 00000000..13c40871 --- /dev/null +++ b/docs/models/components/Scim.md @@ -0,0 +1,13 @@ +# Scim + +Metadata describing a user's linkage to a SCIM directory. This object is only delivered on `user.created` and `user.updated` webhook events, and only when the user is provisioned through a SCIM directory. Its absence does not necessarily mean the user is not SCIM-managed. + + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `directoryId` | *String* | :heavy_check_mark: | The ID of the SCIM directory the user is provisioned from.
| +| `directoryEnabled` | *Optional\* | :heavy_minus_sign: | Whether the SCIM directory is currently enabled. Omitted when false.
| +| `externalId` | *Optional\* | :heavy_check_mark: | The user's external ID as reported by the SCIM directory, if any.
| \ No newline at end of file diff --git a/docs/models/components/Seats.md b/docs/models/components/Seats.md index d8282134..c2c05c2d 100644 --- a/docs/models/components/Seats.md +++ b/docs/models/components/Seats.md @@ -5,6 +5,7 @@ Seat quantity for seat-based billing. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `quantity` | *Optional\* | :heavy_check_mark: | Seat quantity being billed; null means unlimited | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `quantity` | *Optional\* | :heavy_check_mark: | Seat quantity being billed; null means unlimited | +| `tiers` | List\<[SchemasCommercePerUnitTotalTier](../../models/components/SchemasCommercePerUnitTotalTier.md)> | :heavy_minus_sign: | Per-unit cost breakdown by pricing tier | \ No newline at end of file diff --git a/docs/models/components/SupportedBillingPeriods.md b/docs/models/components/SupportedBillingPeriods.md new file mode 100644 index 00000000..889e424d --- /dev/null +++ b/docs/models/components/SupportedBillingPeriods.md @@ -0,0 +1,20 @@ +# SupportedBillingPeriods + +Which billing periods this price supports. + +## Example Usage + +```java +import com.clerk.backend_api.models.components.SupportedBillingPeriods; + +SupportedBillingPeriods value = SupportedBillingPeriods.MONTH; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `MONTH` | month | +| `ANNUAL` | annual | +| `BOTH` | both | \ No newline at end of file diff --git a/docs/models/components/Totals.md b/docs/models/components/Totals.md index d7acc60e..75f051f1 100644 --- a/docs/models/components/Totals.md +++ b/docs/models/components/Totals.md @@ -11,5 +11,6 @@ Totals for this subscription item. | `baseFee` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | | `taxTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | | `grandTotal` | [CommerceMoneyResponse](../../models/components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `perUnitTotals` | List\<[CommercePerUnitTotal](../../models/components/CommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | -| `credits` | [JsonNullable\](../../models/components/CommerceSubscriptionItemCredits.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `perUnitTotals` | List\<[SchemasCommercePerUnitTotal](../../models/components/SchemasCommercePerUnitTotal.md)> | :heavy_minus_sign: | N/A | +| `credits` | [JsonNullable\](../../models/components/CommerceSubscriptionItemCredits.md) | :heavy_minus_sign: | N/A | +| `discounts` | [JsonNullable\](../../models/components/Discounts.md) | :heavy_minus_sign: | Information about the discounts applied to the payment | \ No newline at end of file diff --git a/docs/models/components/User.md b/docs/models/components/User.md index bb0b5f33..c4d1972d 100644 --- a/docs/models/components/User.md +++ b/docs/models/components/User.md @@ -41,6 +41,7 @@ Success | `lastSignInAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of last sign-in.
| | | `banned` | *boolean* | :heavy_check_mark: | Flag to denote whether user is banned or not.
| | | `locked` | *boolean* | :heavy_check_mark: | Flag to denote whether user is currently locked, i.e. restricted from signing in or not.
| | +| `deprovisioned` | *Optional\* | :heavy_minus_sign: | Flag to denote whether user has been deprovisioned and is restricted from signing in.
| | | `lockoutExpiresInSeconds` | *Optional\* | :heavy_check_mark: | The number of seconds remaining until the lockout period expires for a locked user. A null value for a locked user indicates that lockout never expires.
| | | `verificationAttemptsRemaining` | *Optional\* | :heavy_check_mark: | The number of verification attempts remaining until the user is locked. Null if account lockout is not enabled. Note: if a user is locked explicitly via the Backend API, they may still have verification attempts remaining.
| | | `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | @@ -50,4 +51,5 @@ Success | `createOrganizationsLimit` | *JsonNullable\* | :heavy_minus_sign: | The maximum number of organizations the user can create. 0 means unlimited.
| | | `lastActiveAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of the latest session activity, with day precision.
| 1700690400000 | | `legalAcceptedAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when the user accepted the legal requirements.
| 1700690400000 | -| `bypassClientTrust` | *Optional\* | :heavy_minus_sign: | When set to `true`, the user will bypass client trust checks during sign-in. | | \ No newline at end of file +| `bypassClientTrust` | *Optional\* | :heavy_minus_sign: | When set to `true`, the user will bypass client trust checks during sign-in. | | +| `scim` | [JsonNullable\](../../models/components/Scim.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/VerificationOTP.md b/docs/models/components/VerificationOTP.md index 37e24a46..5e04e7ac 100644 --- a/docs/models/components/VerificationOTP.md +++ b/docs/models/components/VerificationOTP.md @@ -10,4 +10,5 @@ | `strategy` | [VerificationOtpVerificationStrategy](../../models/components/VerificationOtpVerificationStrategy.md) | :heavy_check_mark: | N/A | | `attempts` | *Optional\* | :heavy_check_mark: | N/A | | `expireAt` | *Optional\* | :heavy_check_mark: | N/A | +| `channel` | *JsonNullable\* | :heavy_minus_sign: | The delivery channel of the code (phone codes only). | | `verifiedAtClient` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/VerificationOauthVerificationOauth.md b/docs/models/components/VerificationOauthVerificationOauth.md new file mode 100644 index 00000000..1b34156e --- /dev/null +++ b/docs/models/components/VerificationOauthVerificationOauth.md @@ -0,0 +1,15 @@ +# VerificationOauthVerificationOauth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `object` | [Optional\](../../models/components/VerificationOauthVerificationObject.md) | :heavy_minus_sign: | N/A | +| `status` | [VerificationOauthVerificationStatus](../../models/components/VerificationOauthVerificationStatus.md) | :heavy_check_mark: | N/A | +| `strategy` | *String* | :heavy_check_mark: | N/A | +| `externalVerificationRedirectUrl` | *Optional\* | :heavy_minus_sign: | N/A | +| `error` | [JsonNullable\](../../models/components/VerificationOauthVerificationError.md) | :heavy_minus_sign: | N/A | +| `expireAt` | *long* | :heavy_check_mark: | N/A | +| `attempts` | *Optional\* | :heavy_check_mark: | N/A | +| `verifiedAtClient` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/VerificationResponse.md b/docs/models/components/VerificationResponse.md new file mode 100644 index 00000000..f8a8b3a0 --- /dev/null +++ b/docs/models/components/VerificationResponse.md @@ -0,0 +1,17 @@ +# VerificationResponse + +The verification. After prepare_verification it is pending (unverified); +after attempt_verification its status reflects the attempt outcome. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `object` | *Optional\* | :heavy_minus_sign: | The type of the verification object. | +| `id` | *Optional\* | :heavy_minus_sign: | The ID of the verification. Pass this to attempt_verification. | +| `status` | *Optional\* | :heavy_minus_sign: | The status of the verification (unverified, verified, expired, or failed). | +| `strategy` | *Optional\* | :heavy_minus_sign: | The verification strategy (email_code or phone_code). | +| `attempts` | *JsonNullable\* | :heavy_minus_sign: | The number of attempts made against this verification. | +| `expireAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp (milliseconds) at which the code expires. | +| `channel` | *JsonNullable\* | :heavy_minus_sign: | The channel the code was sent over (phone numbers only). | \ No newline at end of file diff --git a/docs/models/components/VerificationSAMLVerificationEmailAddressSAML.md b/docs/models/components/VerificationSAMLVerificationEmailAddressSAML.md new file mode 100644 index 00000000..182e78f1 --- /dev/null +++ b/docs/models/components/VerificationSAMLVerificationEmailAddressSAML.md @@ -0,0 +1,15 @@ +# VerificationSAMLVerificationEmailAddressSAML + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional\](../../models/components/VerificationSamlVerificationObject.md) | :heavy_minus_sign: | N/A | +| `status` | [VerificationSamlVerificationStatus](../../models/components/VerificationSamlVerificationStatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [VerificationSamlVerificationStrategy](../../models/components/VerificationSamlVerificationStrategy.md) | :heavy_check_mark: | N/A | +| `externalVerificationRedirectUrl` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `error` | [JsonNullable\](../../models/components/VerificationError.md) | :heavy_minus_sign: | N/A | +| `expireAt` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `attempts` | *Optional\* | :heavy_check_mark: | N/A | +| `verifiedAtClient` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/VerificationSCIM.md b/docs/models/components/VerificationSCIM.md new file mode 100644 index 00000000..34fdcd3c --- /dev/null +++ b/docs/models/components/VerificationSCIM.md @@ -0,0 +1,12 @@ +# VerificationSCIM + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional\](../../models/components/VerificationScimVerificationObject.md) | :heavy_minus_sign: | N/A | +| `status` | [VerificationScimVerificationStatus](../../models/components/VerificationScimVerificationStatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [VerificationScimVerificationStrategy](../../models/components/VerificationScimVerificationStrategy.md) | :heavy_check_mark: | N/A | +| `attempts` | *Optional\* | :heavy_check_mark: | N/A | +| `expireAt` | *Optional\* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/VerificationScimVerificationObject.md b/docs/models/components/VerificationScimVerificationObject.md new file mode 100644 index 00000000..1c27f9cc --- /dev/null +++ b/docs/models/components/VerificationScimVerificationObject.md @@ -0,0 +1,16 @@ +# VerificationScimVerificationObject + +## Example Usage + +```java +import com.clerk.backend_api.models.components.VerificationScimVerificationObject; + +VerificationScimVerificationObject value = VerificationScimVerificationObject.VERIFICATION_SCIM; +``` + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `VERIFICATION_SCIM` | verification_scim | \ No newline at end of file diff --git a/docs/models/components/VerificationScimVerificationStatus.md b/docs/models/components/VerificationScimVerificationStatus.md new file mode 100644 index 00000000..6238e6bb --- /dev/null +++ b/docs/models/components/VerificationScimVerificationStatus.md @@ -0,0 +1,16 @@ +# VerificationScimVerificationStatus + +## Example Usage + +```java +import com.clerk.backend_api.models.components.VerificationScimVerificationStatus; + +VerificationScimVerificationStatus value = VerificationScimVerificationStatus.VERIFIED; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `VERIFIED` | verified | \ No newline at end of file diff --git a/docs/models/components/VerificationScimVerificationStrategy.md b/docs/models/components/VerificationScimVerificationStrategy.md new file mode 100644 index 00000000..f415805d --- /dev/null +++ b/docs/models/components/VerificationScimVerificationStrategy.md @@ -0,0 +1,16 @@ +# VerificationScimVerificationStrategy + +## Example Usage + +```java +import com.clerk.backend_api.models.components.VerificationScimVerificationStrategy; + +VerificationScimVerificationStrategy value = VerificationScimVerificationStrategy.SCIM; +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `SCIM` | scim | \ No newline at end of file diff --git a/docs/models/errors/CreateAPIKeyAPIKeysErrors.md b/docs/models/errors/CreateAPIKeyAPIKeysErrors.md new file mode 100644 index 00000000..5d0a401e --- /dev/null +++ b/docs/models/errors/CreateAPIKeyAPIKeysErrors.md @@ -0,0 +1,10 @@ +# CreateAPIKeyAPIKeysErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/CreateAPIKeyAPIKeysResponseBody.md b/docs/models/errors/CreateAPIKeyAPIKeysResponseBody.md index 98fd6241..4037235e 100644 --- a/docs/models/errors/CreateAPIKeyAPIKeysResponseBody.md +++ b/docs/models/errors/CreateAPIKeyAPIKeysResponseBody.md @@ -7,5 +7,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `errors` | List\<[CreateApiKeyErrors](../../models/errors/CreateApiKeyErrors.md)> | :heavy_check_mark: | N/A | +| `errors` | List\<[CreateAPIKeyAPIKeysErrors](../../models/errors/CreateAPIKeyAPIKeysErrors.md)> | :heavy_check_mark: | N/A | | `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.md b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.md new file mode 100644 index 00000000..af10d400 --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.md @@ -0,0 +1,10 @@ +# CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.md b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.md new file mode 100644 index 00000000..c514cb65 --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.md @@ -0,0 +1,11 @@ +# CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody + +409 Conflict + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `errors` | List\<[CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors](../../models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md new file mode 100644 index 00000000..06aaccbb --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md @@ -0,0 +1,11 @@ +# CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody + +401 Unauthorized + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `errors` | List\<[CreateAdminPortalLinkTokenErrors](../../models/errors/CreateAdminPortalLinkTokenErrors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md new file mode 100644 index 00000000..c9c72b86 --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md @@ -0,0 +1,10 @@ +# CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md new file mode 100644 index 00000000..74ec887f --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md @@ -0,0 +1,11 @@ +# CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody + +403 Forbidden + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List\<[CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors](../../models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenErrors.md b/docs/models/errors/CreateAdminPortalLinkTokenErrors.md new file mode 100644 index 00000000..9da29234 --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenErrors.md @@ -0,0 +1,10 @@ +# CreateAdminPortalLinkTokenErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/CreateAdminPortalLinkTokenResponseBody.md b/docs/models/errors/CreateAdminPortalLinkTokenResponseBody.md new file mode 100644 index 00000000..8f6d6895 --- /dev/null +++ b/docs/models/errors/CreateAdminPortalLinkTokenResponseBody.md @@ -0,0 +1,11 @@ +# CreateAdminPortalLinkTokenResponseBody + +400 Bad Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `errors` | List\<[Errors](../../models/errors/Errors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/CreateApiKeyErrors.md b/docs/models/errors/CreateApiKeyErrors.md index d7fa15a4..7974cd6f 100644 --- a/docs/models/errors/CreateApiKeyErrors.md +++ b/docs/models/errors/CreateApiKeyErrors.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | -| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | -| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | Bad Request | +| `longMessage` | *String* | :heavy_check_mark: | N/A | Invalid 'url_parameter.example': Failed regex check | +| `code` | *String* | :heavy_check_mark: | N/A | bad_request | \ No newline at end of file diff --git a/docs/models/errors/CreateApiKeyResponseBody.md b/docs/models/errors/CreateApiKeyResponseBody.md index 895a1756..5b79478c 100644 --- a/docs/models/errors/CreateApiKeyResponseBody.md +++ b/docs/models/errors/CreateApiKeyResponseBody.md @@ -7,5 +7,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `errors` | List\<[Errors](../../models/errors/Errors.md)> | :heavy_check_mark: | N/A | +| `errors` | List\<[CreateApiKeyErrors](../../models/errors/CreateApiKeyErrors.md)> | :heavy_check_mark: | N/A | | `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.md b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.md new file mode 100644 index 00000000..74862e59 --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.md @@ -0,0 +1,10 @@ +# RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.md b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.md new file mode 100644 index 00000000..a8887399 --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.md @@ -0,0 +1,10 @@ +# RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.md b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.md new file mode 100644 index 00000000..172a194e --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.md @@ -0,0 +1,11 @@ +# RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody + +404 Not Found + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `errors` | List\<[RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors](../../models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md new file mode 100644 index 00000000..83d45031 --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.md @@ -0,0 +1,11 @@ +# RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody + +401 Unauthorized + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `errors` | List\<[RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors](../../models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md new file mode 100644 index 00000000..a319925a --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md @@ -0,0 +1,10 @@ +# RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `longMessage` | *String* | :heavy_check_mark: | N/A | some details about the error | +| `code` | *String* | :heavy_check_mark: | N/A | some_error_code | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md new file mode 100644 index 00000000..eb01a17c --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.md @@ -0,0 +1,11 @@ +# RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody + +403 Forbidden + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `errors` | List\<[RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors](../../models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenErrors.md b/docs/models/errors/RevokeAdminPortalLinkTokenErrors.md new file mode 100644 index 00000000..a4ac982c --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenErrors.md @@ -0,0 +1,10 @@ +# RevokeAdminPortalLinkTokenErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `message` | *String* | :heavy_check_mark: | N/A | Bad Request | +| `longMessage` | *String* | :heavy_check_mark: | N/A | Invalid 'url_parameter.example': Failed regex check | +| `code` | *String* | :heavy_check_mark: | N/A | bad_request | \ No newline at end of file diff --git a/docs/models/errors/RevokeAdminPortalLinkTokenResponseBody.md b/docs/models/errors/RevokeAdminPortalLinkTokenResponseBody.md new file mode 100644 index 00000000..6264fbd0 --- /dev/null +++ b/docs/models/errors/RevokeAdminPortalLinkTokenResponseBody.md @@ -0,0 +1,11 @@ +# RevokeAdminPortalLinkTokenResponseBody + +400 Bad Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `errors` | List\<[RevokeAdminPortalLinkTokenErrors](../../models/errors/RevokeAdminPortalLinkTokenErrors.md)> | :heavy_check_mark: | N/A | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/AttemptEmailAddressVerificationRequest.md b/docs/models/operations/AttemptEmailAddressVerificationRequest.md new file mode 100644 index 00000000..2274a5f5 --- /dev/null +++ b/docs/models/operations/AttemptEmailAddressVerificationRequest.md @@ -0,0 +1,9 @@ +# AttemptEmailAddressVerificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address whose code is being verified | +| `requestBody` | [AttemptEmailAddressVerificationRequestBody](../../models/operations/AttemptEmailAddressVerificationRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AttemptEmailAddressVerificationRequestBody.md b/docs/models/operations/AttemptEmailAddressVerificationRequestBody.md new file mode 100644 index 00000000..34c998ad --- /dev/null +++ b/docs/models/operations/AttemptEmailAddressVerificationRequestBody.md @@ -0,0 +1,9 @@ +# AttemptEmailAddressVerificationRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `verificationId` | *String* | :heavy_check_mark: | The ID of the verification to check, such as one returned by prepare_verification | +| `code` | *String* | :heavy_check_mark: | The verification code that was sent to the email address | \ No newline at end of file diff --git a/docs/models/operations/AttemptEmailAddressVerificationResponse.md b/docs/models/operations/AttemptEmailAddressVerificationResponse.md new file mode 100644 index 00000000..9acf981a --- /dev/null +++ b/docs/models/operations/AttemptEmailAddressVerificationResponse.md @@ -0,0 +1,11 @@ +# AttemptEmailAddressVerificationResponse + + +## 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 | +| `verificationResponse` | [Optional\](../../models/components/VerificationResponse.md) | :heavy_minus_sign: | The verification. After prepare_verification it is pending (unverified);
after attempt_verification its status reflects the attempt outcome. | \ No newline at end of file diff --git a/docs/models/operations/AttemptPhoneNumberVerificationRequest.md b/docs/models/operations/AttemptPhoneNumberVerificationRequest.md new file mode 100644 index 00000000..3ee8c762 --- /dev/null +++ b/docs/models/operations/AttemptPhoneNumberVerificationRequest.md @@ -0,0 +1,9 @@ +# AttemptPhoneNumberVerificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number whose code is being verified | +| `requestBody` | [AttemptPhoneNumberVerificationRequestBody](../../models/operations/AttemptPhoneNumberVerificationRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AttemptPhoneNumberVerificationRequestBody.md b/docs/models/operations/AttemptPhoneNumberVerificationRequestBody.md new file mode 100644 index 00000000..30a5a686 --- /dev/null +++ b/docs/models/operations/AttemptPhoneNumberVerificationRequestBody.md @@ -0,0 +1,9 @@ +# AttemptPhoneNumberVerificationRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `verificationId` | *String* | :heavy_check_mark: | The ID of the verification to check, such as one returned by prepare_verification | +| `code` | *String* | :heavy_check_mark: | The verification code that was sent to the phone number | \ No newline at end of file diff --git a/docs/models/operations/AttemptPhoneNumberVerificationResponse.md b/docs/models/operations/AttemptPhoneNumberVerificationResponse.md new file mode 100644 index 00000000..6d5c7dcd --- /dev/null +++ b/docs/models/operations/AttemptPhoneNumberVerificationResponse.md @@ -0,0 +1,11 @@ +# AttemptPhoneNumberVerificationResponse + + +## 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 | +| `verificationResponse` | [Optional\](../../models/components/VerificationResponse.md) | :heavy_minus_sign: | The verification. After prepare_verification it is pending (unverified);
after attempt_verification its status reflects the attempt outcome. | \ No newline at end of file diff --git a/docs/models/operations/CreateAdminPortalLinkTokenObject.md b/docs/models/operations/CreateAdminPortalLinkTokenObject.md new file mode 100644 index 00000000..46d03bd7 --- /dev/null +++ b/docs/models/operations/CreateAdminPortalLinkTokenObject.md @@ -0,0 +1,16 @@ +# CreateAdminPortalLinkTokenObject + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenObject; + +CreateAdminPortalLinkTokenObject value = CreateAdminPortalLinkTokenObject.ADMIN_PORTAL_LINK_TOKEN; +``` + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `ADMIN_PORTAL_LINK_TOKEN` | admin_portal_link_token | \ No newline at end of file diff --git a/docs/models/operations/CreateAdminPortalLinkTokenRequestBody.md b/docs/models/operations/CreateAdminPortalLinkTokenRequestBody.md new file mode 100644 index 00000000..d20c4b38 --- /dev/null +++ b/docs/models/operations/CreateAdminPortalLinkTokenRequestBody.md @@ -0,0 +1,11 @@ +# CreateAdminPortalLinkTokenRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `organizationId` | *Optional\* | :heavy_minus_sign: | N/A | +| `itContactId` | *Optional\* | :heavy_minus_sign: | N/A | +| `scopes` | List\<*String*> | :heavy_minus_sign: | N/A | +| `secondsUntilExpiration` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateAdminPortalLinkTokenResponse.md b/docs/models/operations/CreateAdminPortalLinkTokenResponse.md new file mode 100644 index 00000000..5cb3ed2e --- /dev/null +++ b/docs/models/operations/CreateAdminPortalLinkTokenResponse.md @@ -0,0 +1,11 @@ +# CreateAdminPortalLinkTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/CreateAdminPortalLinkTokenResponseBody.md) | :heavy_minus_sign: | 201 Created | \ No newline at end of file diff --git a/docs/models/operations/CreateAdminPortalLinkTokenResponseBody.md b/docs/models/operations/CreateAdminPortalLinkTokenResponseBody.md new file mode 100644 index 00000000..0b66fdcc --- /dev/null +++ b/docs/models/operations/CreateAdminPortalLinkTokenResponseBody.md @@ -0,0 +1,23 @@ +# CreateAdminPortalLinkTokenResponseBody + +201 Created + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `object` | [CreateAdminPortalLinkTokenObject](../../models/operations/CreateAdminPortalLinkTokenObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | aplt_3beecc9c60adb5f9b850e91a83beecc9 | +| `adminPortalLinkId` | *String* | :heavy_check_mark: | The origin-level admin_portal_link this token was issued for. | apl_3beecc9c60adb5f9b850e91a8d2 | +| `instanceId` | *String* | :heavy_check_mark: | N/A | ins_2xhFjEI5X2qWRvtV13BzSj8H6Dk | +| `organizationId` | *Optional\* | :heavy_check_mark: | Optional. Present only when the link is scoped to an existing org. | org_2xhFjEI5X2qWRvtV13BzSj8H6Dk | +| `itContactId` | *Optional\* | :heavy_check_mark: | Optional opaque reference to the IT contact associated with this link. | usr_abc123 | +| `scopes` | List\<*String*> | :heavy_check_mark: | Caller-provided scopes for this token. | [
"admin_portal:read"
] | +| `token` | *String* | :heavy_check_mark: | The single-use admin portal link token. Returned only on creation. URL-borne; treat as a secret. | aplt_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | +| `revoked` | *boolean* | :heavy_check_mark: | N/A | false | +| `revocationReason` | *Optional\* | :heavy_check_mark: | N/A | Revoked by user | +| `expired` | *boolean* | :heavy_check_mark: | N/A | false | +| `expiration` | *Optional\* | :heavy_check_mark: | The timestamp for when the token will expire, in milliseconds. | 1716883200000 | +| `createdAt` | *double* | :heavy_check_mark: | The timestamp for when the token was created, in milliseconds. | 1716883200000 | +| `updatedAt` | *double* | :heavy_check_mark: | The timestamp for when the token was last updated, in milliseconds. | 1716883200000 | \ No newline at end of file diff --git a/docs/models/operations/CreateEnterpriseConnectionTestRunRequest.md b/docs/models/operations/CreateEnterpriseConnectionTestRunRequest.md new file mode 100644 index 00000000..e0ae3a66 --- /dev/null +++ b/docs/models/operations/CreateEnterpriseConnectionTestRunRequest.md @@ -0,0 +1,8 @@ +# CreateEnterpriseConnectionTestRunRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `enterpriseConnectionId` | *String* | :heavy_check_mark: | The ID of the enterprise connection | \ No newline at end of file diff --git a/docs/models/operations/CreateEnterpriseConnectionTestRunResponse.md b/docs/models/operations/CreateEnterpriseConnectionTestRunResponse.md new file mode 100644 index 00000000..16eab25a --- /dev/null +++ b/docs/models/operations/CreateEnterpriseConnectionTestRunResponse.md @@ -0,0 +1,11 @@ +# CreateEnterpriseConnectionTestRunResponse + + +## 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 | +| `enterpriseConnectionTestRunResponse` | [Optional\](../../models/components/EnterpriseConnectionTestRunResponse.md) | :heavy_minus_sign: | A URL to initiate an enterprise connection test run | \ No newline at end of file diff --git a/docs/models/operations/CreateM2MTokenRequestBody.md b/docs/models/operations/CreateM2MTokenRequestBody.md index 6e23fa3b..24ebb4ad 100644 --- a/docs/models/operations/CreateM2MTokenRequestBody.md +++ b/docs/models/operations/CreateM2MTokenRequestBody.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `tokenFormat` | [Optional\](../../models/operations/TokenFormat.md) | :heavy_minus_sign: | N/A | -| `secondsUntilExpiration` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `claims` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tokenFormat` | [Optional\](../../models/operations/TokenFormat.md) | :heavy_minus_sign: | N/A | | +| `secondsUntilExpiration` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `claims` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `minRemainingTtlSeconds` | *Optional\* | :heavy_minus_sign: | Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired M2M token already exists for this machine with identical `claims` and `scopes` and at least this many seconds of remaining lifetime, that existing token is returned and no new token is minted.

Use this when caching tokens in application memory across requests is impractical — for example, in serverless functions, short-lived job workers, or autoscaling containers that churn faster than the token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live token, which is the recommended pattern for high-volume M2M traffic.

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is rejected with a 400, since no freshly-minted token would ever satisfy the requirement.

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are stateless and are never deduplicated. | 240 | \ No newline at end of file diff --git a/docs/models/operations/CreateUserRequestBody.md b/docs/models/operations/CreateUserRequestBody.md index 11c152f8..510848b3 100644 --- a/docs/models/operations/CreateUserRequestBody.md +++ b/docs/models/operations/CreateUserRequestBody.md @@ -9,8 +9,10 @@ | `firstName` | *JsonNullable\* | :heavy_minus_sign: | The first name to assign to the user | | `lastName` | *JsonNullable\* | :heavy_minus_sign: | The last name to assign to the user | | `locale` | *JsonNullable\* | :heavy_minus_sign: | The locale to assign to the user (e.g., "en-US", "fr-FR") | -| `emailAddress` | List\<*String*> | :heavy_minus_sign: | Email addresses to add to the user.
Must be unique across your instance.
The first email address will be set as the user's primary email address. | -| `phoneNumber` | List\<*String*> | :heavy_minus_sign: | Phone numbers to add to the user.
Must be unique across your instance.
The first phone number will be set as the user's primary phone number. | +| `emailAddress` | List\<*String*> | :heavy_minus_sign: | Email addresses to add to the user.
Must be unique across your instance.
The first email address will be set as the user's primary email address.
Created verified by default; see `email_address_identification_status` to create them reserved. | +| `emailAddressIdentificationStatus` | List\<[EmailAddressIdentificationStatus](../../models/operations/EmailAddressIdentificationStatus.md)> | :heavy_minus_sign: | Controls the status each email address is created with. Runs parallel to
`email_address`: when provided, it must contain exactly one item per email
address, applied by position. When omitted or empty, every email address is
created `verified`. Set an item to `reserved` to create the corresponding
email address reserved instead (unverified but usable for sign-in and locked
so no other user can claim it). | +| `phoneNumber` | List\<*String*> | :heavy_minus_sign: | Phone numbers to add to the user.
Must be unique across your instance.
The first phone number will be set as the user's primary phone number.
Created verified by default; see `phone_number_identification_status` to create them reserved. | +| `phoneNumberIdentificationStatus` | List\<[PhoneNumberIdentificationStatus](../../models/operations/PhoneNumberIdentificationStatus.md)> | :heavy_minus_sign: | Controls the status each phone number is created with. Runs parallel to
`phone_number`: when provided, it must contain exactly one item per phone
number, applied by position. When omitted or empty, every phone number is
created `verified`. Set an item to `reserved` to create the corresponding
phone number reserved instead (unverified but usable for sign-in and locked
so no other user can claim it). | | `web3Wallet` | List\<*String*> | :heavy_minus_sign: | Web3 wallets to add to the user.
Must be unique across your instance.
The first wallet will be set as the user's primary wallet. | | `username` | *JsonNullable\* | :heavy_minus_sign: | The username to give to the user.
It must be unique across your instance. | | `password` | *JsonNullable\* | :heavy_minus_sign: | The plaintext password to give the user.
Must be at least 8 characters long, and cannot be in any list of hacked passwords. | @@ -30,4 +32,6 @@ | `createOrganizationEnabled` | *JsonNullable\* | :heavy_minus_sign: | If enabled, user can create organizations via FAPI.
| | `createOrganizationsLimit` | *JsonNullable\* | :heavy_minus_sign: | The maximum number of organizations the user can create. 0 means unlimited.
| | `createdAt` | *JsonNullable\* | :heavy_minus_sign: | A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | -| `bypassClientTrust` | *JsonNullable\* | :heavy_minus_sign: | When set to `true`, the user will bypass client trust checks during sign-in. | \ No newline at end of file +| `bypassClientTrust` | *JsonNullable\* | :heavy_minus_sign: | When set to `true`, the user will bypass client trust checks during sign-in. | +| `banned` | *JsonNullable\* | :heavy_minus_sign: | When set to `true`, the user is created already banned and cannot sign in.
Requires the same plan support as the ban user endpoint. | +| `locked` | *JsonNullable\* | :heavy_minus_sign: | When set to `true`, the user is created already locked.
Requires the user lockout feature to be enabled on the instance. | \ No newline at end of file diff --git a/docs/models/operations/CustomAttributes.md b/docs/models/operations/CustomAttributes.md index 1647af12..ce4645c7 100644 --- a/docs/models/operations/CustomAttributes.md +++ b/docs/models/operations/CustomAttributes.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `name` | *String* | :heavy_check_mark: | Display name for the custom attribute | -| `key` | *String* | :heavy_check_mark: | Key used to store the attribute in the user's metadata | -| `ssoPath` | *Optional\* | :heavy_minus_sign: | Path to extract the attribute value from SSO claims | -| `scimPath` | *Optional\* | :heavy_minus_sign: | GJSON path to extract the attribute value from SCIM user resources | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *String* | :heavy_check_mark: | Display name for the custom attribute | +| `key` | *String* | :heavy_check_mark: | Key used to store the attribute in the user's metadata | +| `ssoPath` | *Optional\* | :heavy_minus_sign: | Path to extract the attribute value from SSO claims | +| `scimPath` | *Optional\* | :heavy_minus_sign: | GJSON path to extract the attribute value from SCIM user resources | +| `multiValued` | *Optional\* | :heavy_minus_sign: | When true, the attribute supports multiple values; values from the IdP are written to public_metadata as an array. Defaults to false. | \ No newline at end of file diff --git a/docs/models/operations/EmailAddressIdentificationStatus.md b/docs/models/operations/EmailAddressIdentificationStatus.md new file mode 100644 index 00000000..5ae6e104 --- /dev/null +++ b/docs/models/operations/EmailAddressIdentificationStatus.md @@ -0,0 +1,17 @@ +# EmailAddressIdentificationStatus + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.EmailAddressIdentificationStatus; + +EmailAddressIdentificationStatus value = EmailAddressIdentificationStatus.VERIFIED; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `VERIFIED` | verified | +| `RESERVED` | reserved | \ No newline at end of file diff --git a/docs/models/operations/GetInstanceCommunicationResponse.md b/docs/models/operations/GetInstanceCommunicationResponse.md new file mode 100644 index 00000000..cf24a70f --- /dev/null +++ b/docs/models/operations/GetInstanceCommunicationResponse.md @@ -0,0 +1,11 @@ +# GetInstanceCommunicationResponse + + +## 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 | +| `instanceCommunication` | [Optional\](../../models/components/InstanceCommunication.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/GetInstanceOrganizationSettingsResponse.md b/docs/models/operations/GetInstanceOrganizationSettingsResponse.md new file mode 100644 index 00000000..4ed16971 --- /dev/null +++ b/docs/models/operations/GetInstanceOrganizationSettingsResponse.md @@ -0,0 +1,11 @@ +# GetInstanceOrganizationSettingsResponse + + +## 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 | +| `organizationSettings` | [Optional\](../../models/components/OrganizationSettings.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/IdentificationStatus.md b/docs/models/operations/IdentificationStatus.md new file mode 100644 index 00000000..f5f441b8 --- /dev/null +++ b/docs/models/operations/IdentificationStatus.md @@ -0,0 +1,21 @@ +# IdentificationStatus + +Controls the status of the replacement email address. Defaults to `verified`. Set to +`reserved` to create it reserved (unverified but usable for sign-in and locked) +instead of verified. + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.IdentificationStatus; + +IdentificationStatus value = IdentificationStatus.VERIFIED; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `VERIFIED` | verified | +| `RESERVED` | reserved | \ No newline at end of file diff --git a/docs/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.md b/docs/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.md new file mode 100644 index 00000000..533ad05d --- /dev/null +++ b/docs/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.md @@ -0,0 +1,18 @@ +# ListEnterpriseConnectionTestRunsQueryParamStatus + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsQueryParamStatus; + +ListEnterpriseConnectionTestRunsQueryParamStatus value = ListEnterpriseConnectionTestRunsQueryParamStatus.PENDING; +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `PENDING` | pending | +| `SUCCESS` | success | +| `FAILED` | failed | \ No newline at end of file diff --git a/docs/models/operations/ListEnterpriseConnectionTestRunsRequest.md b/docs/models/operations/ListEnterpriseConnectionTestRunsRequest.md new file mode 100644 index 00000000..108fa726 --- /dev/null +++ b/docs/models/operations/ListEnterpriseConnectionTestRunsRequest.md @@ -0,0 +1,11 @@ +# ListEnterpriseConnectionTestRunsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `enterpriseConnectionId` | *String* | :heavy_check_mark: | The ID of the enterprise connection | +| `status` | List\<[ListEnterpriseConnectionTestRunsQueryParamStatus](../../models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.md)> | :heavy_minus_sign: | Filter test runs by status (may be repeated) | +| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/models/operations/ListEnterpriseConnectionTestRunsResponse.md b/docs/models/operations/ListEnterpriseConnectionTestRunsResponse.md new file mode 100644 index 00000000..93fb5a65 --- /dev/null +++ b/docs/models/operations/ListEnterpriseConnectionTestRunsResponse.md @@ -0,0 +1,11 @@ +# ListEnterpriseConnectionTestRunsResponse + + +## 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 | +| `enterpriseConnectionTestRuns` | [Optional\](../../models/components/EnterpriseConnectionTestRuns.md) | :heavy_minus_sign: | A list of enterprise connection test runs | \ No newline at end of file diff --git a/docs/models/operations/PhoneNumberIdentificationStatus.md b/docs/models/operations/PhoneNumberIdentificationStatus.md new file mode 100644 index 00000000..2fb43ceb --- /dev/null +++ b/docs/models/operations/PhoneNumberIdentificationStatus.md @@ -0,0 +1,17 @@ +# PhoneNumberIdentificationStatus + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.PhoneNumberIdentificationStatus; + +PhoneNumberIdentificationStatus value = PhoneNumberIdentificationStatus.VERIFIED; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `VERIFIED` | verified | +| `RESERVED` | reserved | \ No newline at end of file diff --git a/docs/models/operations/PreferredSignInStrategyWhenPasswordRequired.md b/docs/models/operations/PreferredSignInStrategyWhenPasswordRequired.md new file mode 100644 index 00000000..d89c3d29 --- /dev/null +++ b/docs/models/operations/PreferredSignInStrategyWhenPasswordRequired.md @@ -0,0 +1,20 @@ +# PreferredSignInStrategyWhenPasswordRequired + +When password is required at the instance level, sets the preferred sign-in strategy surfaced to Clerk components. Has no effect when password is not required. Defaults to `password`. Set to an empty string to clear the override. + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.PreferredSignInStrategyWhenPasswordRequired; + +PreferredSignInStrategyWhenPasswordRequired value = PreferredSignInStrategyWhenPasswordRequired.PASSWORD; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PASSWORD` | password | +| `OTP` | otp | +| `UNKNOWN` | | \ No newline at end of file diff --git a/docs/models/operations/PrepareEmailAddressVerificationRequest.md b/docs/models/operations/PrepareEmailAddressVerificationRequest.md new file mode 100644 index 00000000..1c7f05b0 --- /dev/null +++ b/docs/models/operations/PrepareEmailAddressVerificationRequest.md @@ -0,0 +1,8 @@ +# PrepareEmailAddressVerificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address to send the verification code to | \ No newline at end of file diff --git a/docs/models/operations/PrepareEmailAddressVerificationResponse.md b/docs/models/operations/PrepareEmailAddressVerificationResponse.md new file mode 100644 index 00000000..7744de22 --- /dev/null +++ b/docs/models/operations/PrepareEmailAddressVerificationResponse.md @@ -0,0 +1,11 @@ +# PrepareEmailAddressVerificationResponse + + +## 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 | +| `verificationResponse` | [Optional\](../../models/components/VerificationResponse.md) | :heavy_minus_sign: | The verification. After prepare_verification it is pending (unverified);
after attempt_verification its status reflects the attempt outcome. | \ No newline at end of file diff --git a/docs/models/operations/PreparePhoneNumberVerificationRequest.md b/docs/models/operations/PreparePhoneNumberVerificationRequest.md new file mode 100644 index 00000000..8accf4c5 --- /dev/null +++ b/docs/models/operations/PreparePhoneNumberVerificationRequest.md @@ -0,0 +1,8 @@ +# PreparePhoneNumberVerificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number to send the verification code to | \ No newline at end of file diff --git a/docs/models/operations/PreparePhoneNumberVerificationResponse.md b/docs/models/operations/PreparePhoneNumberVerificationResponse.md new file mode 100644 index 00000000..1fd888eb --- /dev/null +++ b/docs/models/operations/PreparePhoneNumberVerificationResponse.md @@ -0,0 +1,11 @@ +# PreparePhoneNumberVerificationResponse + + +## 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 | +| `verificationResponse` | [Optional\](../../models/components/VerificationResponse.md) | :heavy_minus_sign: | The verification. After prepare_verification it is pending (unverified);
after attempt_verification its status reflects the attempt outcome. | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserEmailAddressRequest.md b/docs/models/operations/ReplaceUserEmailAddressRequest.md new file mode 100644 index 00000000..473336fb --- /dev/null +++ b/docs/models/operations/ReplaceUserEmailAddressRequest.md @@ -0,0 +1,9 @@ +# ReplaceUserEmailAddressRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose email address to replace | +| `requestBody` | [ReplaceUserEmailAddressRequestBody](../../models/operations/ReplaceUserEmailAddressRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserEmailAddressRequestBody.md b/docs/models/operations/ReplaceUserEmailAddressRequestBody.md new file mode 100644 index 00000000..4ccc622b --- /dev/null +++ b/docs/models/operations/ReplaceUserEmailAddressRequestBody.md @@ -0,0 +1,9 @@ +# ReplaceUserEmailAddressRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | *String* | :heavy_check_mark: | The new email address. Must adhere to the RFC 5322 specification for email address format. | +| `identificationStatus` | [Optional\](../../models/operations/IdentificationStatus.md) | :heavy_minus_sign: | Controls the status of the replacement email address. Defaults to `verified`. Set to
`reserved` to create it reserved (unverified but usable for sign-in and locked)
instead of verified. | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserEmailAddressResponse.md b/docs/models/operations/ReplaceUserEmailAddressResponse.md new file mode 100644 index 00000000..581a89bf --- /dev/null +++ b/docs/models/operations/ReplaceUserEmailAddressResponse.md @@ -0,0 +1,11 @@ +# ReplaceUserEmailAddressResponse + + +## 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 | +| `emailAddress` | [Optional\](../../models/components/EmailAddress.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserMetadataRequest.md b/docs/models/operations/ReplaceUserMetadataRequest.md new file mode 100644 index 00000000..47667cf1 --- /dev/null +++ b/docs/models/operations/ReplaceUserMetadataRequest.md @@ -0,0 +1,9 @@ +# ReplaceUserMetadataRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose metadata will be replaced | +| `requestBody` | [Optional\](../../models/operations/ReplaceUserMetadataRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserMetadataRequestBody.md b/docs/models/operations/ReplaceUserMetadataRequestBody.md new file mode 100644 index 00000000..eb3f612e --- /dev/null +++ b/docs/models/operations/ReplaceUserMetadataRequestBody.md @@ -0,0 +1,10 @@ +# ReplaceUserMetadataRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your frontend and backend.
The existing value will be replaced entirely with the new object. | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user that is only visible to your backend.
The existing value will be replaced entirely with the new object. | +| `unsafeMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
The existing value will be replaced entirely with the new object.

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserMetadataResponse.md b/docs/models/operations/ReplaceUserMetadataResponse.md new file mode 100644 index 00000000..8619653e --- /dev/null +++ b/docs/models/operations/ReplaceUserMetadataResponse.md @@ -0,0 +1,11 @@ +# ReplaceUserMetadataResponse + + +## 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 | +| `user` | [Optional\](../../models/components/User.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserPhoneNumberIdentificationStatus.md b/docs/models/operations/ReplaceUserPhoneNumberIdentificationStatus.md new file mode 100644 index 00000000..2987eb41 --- /dev/null +++ b/docs/models/operations/ReplaceUserPhoneNumberIdentificationStatus.md @@ -0,0 +1,21 @@ +# ReplaceUserPhoneNumberIdentificationStatus + +Controls the status of the replacement phone number. Defaults to `verified`. Set to +`reserved` to create it reserved (unverified but usable for sign-in and locked) +instead of verified. + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberIdentificationStatus; + +ReplaceUserPhoneNumberIdentificationStatus value = ReplaceUserPhoneNumberIdentificationStatus.VERIFIED; +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `VERIFIED` | verified | +| `RESERVED` | reserved | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserPhoneNumberRequest.md b/docs/models/operations/ReplaceUserPhoneNumberRequest.md new file mode 100644 index 00000000..5eb8076b --- /dev/null +++ b/docs/models/operations/ReplaceUserPhoneNumberRequest.md @@ -0,0 +1,9 @@ +# ReplaceUserPhoneNumberRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose phone number to replace | +| `requestBody` | [ReplaceUserPhoneNumberRequestBody](../../models/operations/ReplaceUserPhoneNumberRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserPhoneNumberRequestBody.md b/docs/models/operations/ReplaceUserPhoneNumberRequestBody.md new file mode 100644 index 00000000..15cd938a --- /dev/null +++ b/docs/models/operations/ReplaceUserPhoneNumberRequestBody.md @@ -0,0 +1,9 @@ +# ReplaceUserPhoneNumberRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `phoneNumber` | *String* | :heavy_check_mark: | The new phone number. Must adhere to the E.164 standard for phone number format. | +| `identificationStatus` | [Optional\](../../models/operations/ReplaceUserPhoneNumberIdentificationStatus.md) | :heavy_minus_sign: | Controls the status of the replacement phone number. Defaults to `verified`. Set to
`reserved` to create it reserved (unverified but usable for sign-in and locked)
instead of verified. | \ No newline at end of file diff --git a/docs/models/operations/ReplaceUserPhoneNumberResponse.md b/docs/models/operations/ReplaceUserPhoneNumberResponse.md new file mode 100644 index 00000000..35af8477 --- /dev/null +++ b/docs/models/operations/ReplaceUserPhoneNumberResponse.md @@ -0,0 +1,11 @@ +# ReplaceUserPhoneNumberResponse + + +## 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 | +| `phoneNumber` | [Optional\](../../models/components/PhoneNumber.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/RevokeAdminPortalLinkTokenObject.md b/docs/models/operations/RevokeAdminPortalLinkTokenObject.md new file mode 100644 index 00000000..e76212f1 --- /dev/null +++ b/docs/models/operations/RevokeAdminPortalLinkTokenObject.md @@ -0,0 +1,16 @@ +# RevokeAdminPortalLinkTokenObject + +## Example Usage + +```java +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenObject; + +RevokeAdminPortalLinkTokenObject value = RevokeAdminPortalLinkTokenObject.ADMIN_PORTAL_LINK_TOKEN; +``` + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `ADMIN_PORTAL_LINK_TOKEN` | admin_portal_link_token | \ No newline at end of file diff --git a/docs/models/operations/RevokeAdminPortalLinkTokenRequest.md b/docs/models/operations/RevokeAdminPortalLinkTokenRequest.md new file mode 100644 index 00000000..360ab916 --- /dev/null +++ b/docs/models/operations/RevokeAdminPortalLinkTokenRequest.md @@ -0,0 +1,9 @@ +# RevokeAdminPortalLinkTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `adminPortalLinkTokenID` | *String* | :heavy_check_mark: | N/A | +| `requestBody` | [RevokeAdminPortalLinkTokenRequestBody](../../models/operations/RevokeAdminPortalLinkTokenRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RevokeAdminPortalLinkTokenRequestBody.md b/docs/models/operations/RevokeAdminPortalLinkTokenRequestBody.md new file mode 100644 index 00000000..820213ab --- /dev/null +++ b/docs/models/operations/RevokeAdminPortalLinkTokenRequestBody.md @@ -0,0 +1,8 @@ +# RevokeAdminPortalLinkTokenRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `revocationReason` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/RevokeAdminPortalLinkTokenResponse.md b/docs/models/operations/RevokeAdminPortalLinkTokenResponse.md new file mode 100644 index 00000000..7a728968 --- /dev/null +++ b/docs/models/operations/RevokeAdminPortalLinkTokenResponse.md @@ -0,0 +1,11 @@ +# RevokeAdminPortalLinkTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/RevokeAdminPortalLinkTokenResponseBody.md) | :heavy_minus_sign: | 200 OK | \ No newline at end of file diff --git a/docs/models/operations/RevokeAdminPortalLinkTokenResponseBody.md b/docs/models/operations/RevokeAdminPortalLinkTokenResponseBody.md new file mode 100644 index 00000000..76a42ab8 --- /dev/null +++ b/docs/models/operations/RevokeAdminPortalLinkTokenResponseBody.md @@ -0,0 +1,22 @@ +# RevokeAdminPortalLinkTokenResponseBody + +200 OK + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `object` | [RevokeAdminPortalLinkTokenObject](../../models/operations/RevokeAdminPortalLinkTokenObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | aplt_3beecc9c60adb5f9b850e91a83beecc9 | +| `adminPortalLinkId` | *String* | :heavy_check_mark: | The origin-level admin_portal_link this token was issued for. | apl_3beecc9c60adb5f9b850e91a8d2 | +| `instanceId` | *String* | :heavy_check_mark: | N/A | ins_2xhFjEI5X2qWRvtV13BzSj8H6Dk | +| `organizationId` | *Optional\* | :heavy_check_mark: | Optional. Present only when the link is scoped to an existing org. | org_2xhFjEI5X2qWRvtV13BzSj8H6Dk | +| `itContactId` | *Optional\* | :heavy_check_mark: | Optional opaque reference to the IT contact associated with this link. | usr_abc123 | +| `scopes` | List\<*String*> | :heavy_check_mark: | Caller-provided scopes for this token. | [
"admin_portal:read"
] | +| `revoked` | *boolean* | :heavy_check_mark: | N/A | false | +| `revocationReason` | *Optional\* | :heavy_check_mark: | N/A | Revoked by user | +| `expired` | *boolean* | :heavy_check_mark: | N/A | false | +| `expiration` | *Optional\* | :heavy_check_mark: | The timestamp for when the token will expire, in milliseconds. | 1716883200000 | +| `createdAt` | *double* | :heavy_check_mark: | The timestamp for when the token was created, in milliseconds. | 1716883200000 | +| `updatedAt` | *double* | :heavy_check_mark: | The timestamp for when the token was last updated, in milliseconds. | 1716883200000 | \ No newline at end of file diff --git a/docs/models/operations/UpdateEnterpriseConnectionCustomAttributes.md b/docs/models/operations/UpdateEnterpriseConnectionCustomAttributes.md index 35489d96..7b187e2d 100644 --- a/docs/models/operations/UpdateEnterpriseConnectionCustomAttributes.md +++ b/docs/models/operations/UpdateEnterpriseConnectionCustomAttributes.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `name` | *String* | :heavy_check_mark: | Display name for the custom attribute | -| `key` | *String* | :heavy_check_mark: | Key used to store the attribute in the user's metadata | -| `ssoPath` | *Optional\* | :heavy_minus_sign: | Path to extract the attribute value from SSO claims | -| `scimPath` | *Optional\* | :heavy_minus_sign: | GJSON path to extract the attribute value from SCIM user resources | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *String* | :heavy_check_mark: | Display name for the custom attribute | +| `key` | *String* | :heavy_check_mark: | Key used to store the attribute in the user's metadata | +| `ssoPath` | *Optional\* | :heavy_minus_sign: | Path to extract the attribute value from SSO claims | +| `scimPath` | *Optional\* | :heavy_minus_sign: | GJSON path to extract the attribute value from SCIM user resources | +| `multiValued` | *Optional\* | :heavy_minus_sign: | When true, the attribute supports multiple values; values from the IdP are written to public_metadata as an array. Defaults to false. | \ No newline at end of file diff --git a/docs/models/operations/UpdateInstanceCommunicationRequestBody.md b/docs/models/operations/UpdateInstanceCommunicationRequestBody.md new file mode 100644 index 00000000..0582b6a5 --- /dev/null +++ b/docs/models/operations/UpdateInstanceCommunicationRequestBody.md @@ -0,0 +1,8 @@ +# UpdateInstanceCommunicationRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `blockedCountryCodes` | List\<*String*> | :heavy_minus_sign: | ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be uppercase, 2-letter, and unique within the array. | \ No newline at end of file diff --git a/docs/models/operations/UpdateInstanceCommunicationResponse.md b/docs/models/operations/UpdateInstanceCommunicationResponse.md new file mode 100644 index 00000000..fa9b397c --- /dev/null +++ b/docs/models/operations/UpdateInstanceCommunicationResponse.md @@ -0,0 +1,11 @@ +# UpdateInstanceCommunicationResponse + + +## 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 | +| `instanceCommunication` | [Optional\](../../models/components/InstanceCommunication.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/UpdateInstanceRequestBody.md b/docs/models/operations/UpdateInstanceRequestBody.md index 8115ee3c..974233c9 100644 --- a/docs/models/operations/UpdateInstanceRequestBody.md +++ b/docs/models/operations/UpdateInstanceRequestBody.md @@ -12,4 +12,5 @@ | `developmentOrigin` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `allowedOrigins` | List\<*String*> | :heavy_minus_sign: | For browser-like stacks such as browser extensions, Electron (not officially supported), or Capacitor.js (not officially supported), the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages, the origin is chrome-extension://extension_uuid. For Electron apps the default origin is http://localhost:3000. For Capacitor, the origin is capacitor://localhost. | | ~~`cookielessDev`~~ | *JsonNullable\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the instance should operate in cookieless development mode (i.e. without third-party cookies).
Deprecated: Please use `url_based_session_syncing` instead. | -| `urlBasedSessionSyncing` | *JsonNullable\* | :heavy_minus_sign: | Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies). | \ No newline at end of file +| `urlBasedSessionSyncing` | *JsonNullable\* | :heavy_minus_sign: | Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies). | +| `preferredSignInStrategyWhenPasswordRequired` | [JsonNullable\](../../models/operations/PreferredSignInStrategyWhenPasswordRequired.md) | :heavy_minus_sign: | When password is required at the instance level, sets the preferred sign-in strategy surfaced to Clerk components. Has no effect when password is not required. Defaults to `password`. Set to an empty string to clear the override. | \ No newline at end of file diff --git a/docs/models/operations/VerifyOrganizationDomainOwnershipRequest.md b/docs/models/operations/VerifyOrganizationDomainOwnershipRequest.md new file mode 100644 index 00000000..11208d5d --- /dev/null +++ b/docs/models/operations/VerifyOrganizationDomainOwnershipRequest.md @@ -0,0 +1,9 @@ +# VerifyOrganizationDomainOwnershipRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization to which the domain belongs | +| `domainId` | *String* | :heavy_check_mark: | The ID of the domain | \ No newline at end of file diff --git a/docs/models/operations/VerifyOrganizationDomainOwnershipResponse.md b/docs/models/operations/VerifyOrganizationDomainOwnershipResponse.md new file mode 100644 index 00000000..64674a10 --- /dev/null +++ b/docs/models/operations/VerifyOrganizationDomainOwnershipResponse.md @@ -0,0 +1,11 @@ +# VerifyOrganizationDomainOwnershipResponse + + +## 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 | +| `organizationDomain` | [Optional\](../../models/components/OrganizationDomain.md) | :heavy_minus_sign: | An organization domain | \ No newline at end of file diff --git a/docs/sdks/adminportallinktokens/README.md b/docs/sdks/adminportallinktokens/README.md new file mode 100644 index 00000000..12ae8285 --- /dev/null +++ b/docs/sdks/adminportallinktokens/README.md @@ -0,0 +1,124 @@ +# AdminPortalLinkTokens + +## Overview + +### Available Operations + +* [createAdminPortalLinkToken](#createadminportallinktoken) - Create an Admin Portal Link Token +* [revokeAdminPortalLinkToken](#revokeadminportallinktoken) - Revoke an Admin Portal Link Token + +## createAdminPortalLinkToken + +Create an Admin Portal Link Token + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.*; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenRequestBody; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws CreateAdminPortalLinkTokenResponseBody, CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody, CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody, CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + CreateAdminPortalLinkTokenRequestBody req = CreateAdminPortalLinkTokenRequestBody.builder() + .build(); + + CreateAdminPortalLinkTokenResponse res = sdk.adminPortalLinkTokens().createAdminPortalLinkToken() + .request(req) + .call(); + + if (res.object().isPresent()) { + System.out.println(res.object().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [CreateAdminPortalLinkTokenRequestBody](../../models/operations/CreateAdminPortalLinkTokenRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateAdminPortalLinkTokenResponse](../../models/operations/CreateAdminPortalLinkTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| models/errors/CreateAdminPortalLinkTokenResponseBody | 400 | application/json | +| models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody | 401 | application/json | +| models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody | 403 | application/json | +| models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody | 409 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## revokeAdminPortalLinkToken + +Revoke an Admin Portal Link Token + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.*; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenRequestBody; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws RevokeAdminPortalLinkTokenResponseBody, RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody, RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody, RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + RevokeAdminPortalLinkTokenResponse res = sdk.adminPortalLinkTokens().revokeAdminPortalLinkToken() + .adminPortalLinkTokenID("") + .requestBody(RevokeAdminPortalLinkTokenRequestBody.builder() + .build()) + .call(); + + if (res.object().isPresent()) { + System.out.println(res.object().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `adminPortalLinkTokenID` | *String* | :heavy_check_mark: | N/A | +| `requestBody` | [RevokeAdminPortalLinkTokenRequestBody](../../models/operations/RevokeAdminPortalLinkTokenRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[RevokeAdminPortalLinkTokenResponse](../../models/operations/RevokeAdminPortalLinkTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| models/errors/RevokeAdminPortalLinkTokenResponseBody | 400 | application/json | +| models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody | 401 | application/json | +| models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody | 403 | application/json | +| models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody | 404 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/emailaddresses/README.md b/docs/sdks/emailaddresses/README.md index f57b2936..70007a3f 100644 --- a/docs/sdks/emailaddresses/README.md +++ b/docs/sdks/emailaddresses/README.md @@ -8,6 +8,9 @@ * [get](#get) - Retrieve an email address * [delete](#delete) - Delete an email address * [update](#update) - Update an email address +* [prepareVerification](#prepareverification) - Send a verification code to an email address +* [attemptVerification](#attemptverification) - Verify a code sent to an email address +* [replaceForUser](#replaceforuser) - Replace a user's email address ## create @@ -211,4 +214,188 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | models/errors/ClerkErrors | 400, 401, 403, 404, 409 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## prepareVerification + +Sends a one-time code to the given email address so that a backend can +verify the user controls it (for example, in a custom, backend-driven +sign-in flow). The code is tracked on its own verification; confirm it +with attempt_verification. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.PrepareEmailAddressVerificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + PrepareEmailAddressVerificationResponse res = sdk.emailAddresses().prepareVerification() + .emailAddressId("") + .call(); + + if (res.verificationResponse().isPresent()) { + System.out.println(res.verificationResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address to send the verification code to | + +### Response + +**[PrepareEmailAddressVerificationResponse](../../models/operations/PrepareEmailAddressVerificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 403, 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## attemptVerification + +Checks a one-time code against the verification identified by +verification_id, and returns the verification with its updated status +(`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a +backend driving its own frontend can react on every attempt — an incorrect +or expired code is reported through the status, not as an error. Resubmitting +a verification whose code was already accepted is rejected with a +`verification_already_verified` error. If the code +is correct and the email address is not already verified, it is also marked +as verified as a side effect (just as it would be in a frontend verification +flow); an already verified email address is left unchanged. It never creates +a session; to sign the user in afterwards, mint a sign-in token. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationRequestBody; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + AttemptEmailAddressVerificationResponse res = sdk.emailAddresses().attemptVerification() + .emailAddressId("") + .requestBody(AttemptEmailAddressVerificationRequestBody.builder() + .verificationId("") + .code("") + .build()) + .call(); + + if (res.verificationResponse().isPresent()) { + System.out.println(res.verificationResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address whose code is being verified | +| `requestBody` | [AttemptEmailAddressVerificationRequestBody](../../models/operations/AttemptEmailAddressVerificationRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[AttemptEmailAddressVerificationResponse](../../models/operations/AttemptEmailAddressVerificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 403, 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## replaceForUser + +Replaces all of the user's email addresses with a single primary email address. +By default the new email address is created verified, with the admin verification strategy. +When `identification_status` is `reserved` it is created reserved instead: unverified but usable +for sign-in and locked so no other user can claim it. Any existing email addresses are deleted. +If an existing email address is linked to a connected account, the request is rejected; remove +the connected account first. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressRequestBody; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + ReplaceUserEmailAddressResponse res = sdk.emailAddresses().replaceForUser() + .userId("") + .requestBody(ReplaceUserEmailAddressRequestBody.builder() + .emailAddress("Ines83@gmail.com") + .build()) + .call(); + + if (res.emailAddress().isPresent()) { + System.out.println(res.emailAddress().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose email address to replace | +| `requestBody` | [ReplaceUserEmailAddressRequestBody](../../models/operations/ReplaceUserEmailAddressRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[ReplaceUserEmailAddressResponse](../../models/operations/ReplaceUserEmailAddressResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 403, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/enterpriseconnections/README.md b/docs/sdks/enterpriseconnections/README.md index ce0dc21f..03b942a8 100644 --- a/docs/sdks/enterpriseconnections/README.md +++ b/docs/sdks/enterpriseconnections/README.md @@ -9,6 +9,8 @@ * [get](#get) - Retrieve an enterprise connection * [update](#update) - Update an enterprise connection * [delete](#delete) - Delete an enterprise connection +* [listTestRuns](#listtestruns) - List enterprise connection test runs +* [createTestRun](#createtestrun) - Create an enterprise connection test run ## list @@ -113,7 +115,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 409, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -269,6 +271,113 @@ public class Application { ### Errors +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 402, 403, 404 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## listTestRuns + +Returns a paginated list of SAML or OIDC debug test runs for an enterprise connection. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + ListEnterpriseConnectionTestRunsResponse res = sdk.enterpriseConnections().listTestRuns() + .enterpriseConnectionId("") + .limit(10L) + .offset(0L) + .call(); + + if (res.enterpriseConnectionTestRuns().isPresent()) { + System.out.println(res.enterpriseConnectionTestRuns().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `enterpriseConnectionId` | *String* | :heavy_check_mark: | The ID of the enterprise connection | +| `status` | List\<[ListEnterpriseConnectionTestRunsQueryParamStatus](../../models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.md)> | :heavy_minus_sign: | Filter test runs by status (may be repeated) | +| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | + +### Response + +**[ListEnterpriseConnectionTestRunsResponse](../../models/operations/ListEnterpriseConnectionTestRunsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## createTestRun + +Returns a short-lived URL that starts the IdP test flow for this connection. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionTestRunResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + CreateEnterpriseConnectionTestRunResponse res = sdk.enterpriseConnections().createTestRun() + .enterpriseConnectionId("") + .call(); + + if (res.enterpriseConnectionTestRunResponse().isPresent()) { + System.out.println(res.enterpriseConnectionTestRunResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `enterpriseConnectionId` | *String* | :heavy_check_mark: | The ID of the enterprise connection | + +### Response + +**[CreateEnterpriseConnectionTestRunResponse](../../models/operations/CreateEnterpriseConnectionTestRunResponse.md)** + +### Errors + | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | models/errors/ClerkErrors | 402, 403, 404 | application/json | diff --git a/docs/sdks/instancesettings/README.md b/docs/sdks/instancesettings/README.md index 2b268e18..da999afb 100644 --- a/docs/sdks/instancesettings/README.md +++ b/docs/sdks/instancesettings/README.md @@ -9,9 +9,12 @@ Modify the settings of your instance. * [get](#get) - Fetch the current instance * [update](#update) - Update instance settings * [updateRestrictions](#updaterestrictions) - Update instance restrictions +* [getCommunication](#getcommunication) - Get instance communication settings +* [updateCommunication](#updatecommunication) - Update instance communication settings * [getOAuthApplicationSettings](#getoauthapplicationsettings) - Get OAuth application settings * [updateOAuthApplicationSettings](#updateoauthapplicationsettings) - Update OAuth application settings * [changeDomain](#changedomain) - Update production instance domain +* [getOrganizationSettings](#getorganizationsettings) - Get instance organization settings * [updateOrganizationSettings](#updateorganizationsettings) - Update instance organization settings * [getInstanceProtect](#getinstanceprotect) - Get instance protect settings * [updateInstanceProtect](#updateinstanceprotect) - Update instance protect settings @@ -156,6 +159,102 @@ public class Application { | models/errors/ClerkErrors | 402, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## getCommunication + +Retrieves the per-instance SMS communication settings, including the SMS country blocklist. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + GetInstanceCommunicationResponse res = sdk.instanceSettings().getCommunication() + .call(); + + if (res.instanceCommunication().isPresent()) { + System.out.println(res.instanceCommunication().get()); + } + } +} +``` + +### Response + +**[GetInstanceCommunicationResponse](../../models/operations/GetInstanceCommunicationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## updateCommunication + +Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 +alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier +countries are silently dropped from the persisted list. Omitting `blocked_country_codes` +is a no-op. + + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + UpdateInstanceCommunicationResponse res = sdk.instanceSettings().updateCommunication() + .call(); + + if (res.instanceCommunication().isPresent()) { + System.out.println(res.instanceCommunication().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [UpdateInstanceCommunicationRequestBody](../../models/operations/UpdateInstanceCommunicationRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdateInstanceCommunicationResponse](../../models/operations/UpdateInstanceCommunicationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## getOAuthApplicationSettings Retrieves the settings for OAuth applications for the instance (dynamic client registration, JWT access tokens, etc.). @@ -300,6 +399,50 @@ public class Application { | models/errors/ClerkErrors | 400, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## getOrganizationSettings + +Retrieves the organization settings of the instance + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + GetInstanceOrganizationSettingsResponse res = sdk.instanceSettings().getOrganizationSettings() + .call(); + + if (res.organizationSettings().isPresent()) { + System.out.println(res.organizationSettings().get()); + } + } +} +``` + +### Response + +**[GetInstanceOrganizationSettingsResponse](../../models/operations/GetInstanceOrganizationSettingsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 402, 404, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## updateOrganizationSettings Updates the organization settings of the instance @@ -347,7 +490,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 402, 404, 422 | application/json | +| models/errors/ClerkErrors | 400, 402, 403, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## getInstanceProtect diff --git a/docs/sdks/m2m/README.md b/docs/sdks/m2m/README.md index 07f3232e..079d20d9 100644 --- a/docs/sdks/m2m/README.md +++ b/docs/sdks/m2m/README.md @@ -35,6 +35,7 @@ public class Application { .build(); CreateM2MTokenRequestBody req = CreateM2MTokenRequestBody.builder() + .minRemainingTtlSeconds(240L) .build(); CreateM2MTokenResponse res = sdk.m2m().createToken() diff --git a/docs/sdks/organizationdomains/README.md b/docs/sdks/organizationdomains/README.md index a8607ba0..4bc63e3f 100644 --- a/docs/sdks/organizationdomains/README.md +++ b/docs/sdks/organizationdomains/README.md @@ -8,6 +8,7 @@ * [list](#list) - Get a list of all domains of an organization. * [update](#update) - Update an organization domain. * [delete](#delete) - Remove a domain from an organization. +* [verifyOwnership](#verifyownership) - Mark an organization domain's ownership as verified * [listAll](#listall) - List all organization domains ## create @@ -231,6 +232,66 @@ public class Application { | models/errors/ClerkErrors | 400, 401, 404 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## verifyOwnership + +Flips the organization domain's ownership state to verified via the +manual override path, bypassing the self-serve TXT DNS challenge. The +domain row records strategy=`manual_override` and an +`organization_domain.ownership_verified` audit event is emitted with the +same strategy. + +Idempotent: re-calling on an already-verified domain returns the current +ownership state without re-emitting the audit event. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.VerifyOrganizationDomainOwnershipResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + VerifyOrganizationDomainOwnershipResponse res = sdk.organizationDomains().verifyOwnership() + .organizationId("") + .domainId("") + .call(); + + if (res.organizationDomain().isPresent()) { + System.out.println(res.organizationDomain().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization to which the domain belongs | +| `domainId` | *String* | :heavy_check_mark: | The ID of the domain | + +### Response + +**[VerifyOrganizationDomainOwnershipResponse](../../models/operations/VerifyOrganizationDomainOwnershipResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 401, 403, 404 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## listAll Retrieves a list of all organization domains within the current instance. diff --git a/docs/sdks/phonenumbers/README.md b/docs/sdks/phonenumbers/README.md index 71c18bd4..88b6ea9e 100644 --- a/docs/sdks/phonenumbers/README.md +++ b/docs/sdks/phonenumbers/README.md @@ -8,6 +8,9 @@ * [get](#get) - Retrieve a phone number * [delete](#delete) - Delete a phone number * [update](#update) - Update a phone number +* [prepareVerification](#prepareverification) - Send a verification code to a phone number +* [attemptVerification](#attemptverification) - Verify a code sent to a phone number +* [replaceForUser](#replaceforuser) - Replace a user's phone number ## create @@ -211,4 +214,188 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | models/errors/ClerkErrors | 400, 401, 403, 404 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## prepareVerification + +Sends a one-time code to the given phone number so that a backend can +verify the user controls it (for example, in a custom, backend-driven +sign-in flow). The code is tracked on its own verification; confirm it +with attempt_verification. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.PreparePhoneNumberVerificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + PreparePhoneNumberVerificationResponse res = sdk.phoneNumbers().prepareVerification() + .phoneNumberId("") + .call(); + + if (res.verificationResponse().isPresent()) { + System.out.println(res.verificationResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number to send the verification code to | + +### Response + +**[PreparePhoneNumberVerificationResponse](../../models/operations/PreparePhoneNumberVerificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 403, 404, 429 | application/json | +| models/errors/ClerkErrors | 500 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## attemptVerification + +Checks a one-time code against the verification identified by +verification_id, and returns the verification with its updated status +(`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a +backend driving its own frontend can react on every attempt — an incorrect +or expired code is reported through the status, not as an error. Resubmitting +a verification whose code was already accepted is rejected with a +`verification_already_verified` error. If the code +is correct and the phone number is not already verified, it is also marked +as verified as a side effect (just as it would be in a frontend verification +flow); an already verified phone number is left unchanged. It never creates +a session; to sign the user in afterwards, mint a sign-in token. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationRequestBody; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + AttemptPhoneNumberVerificationResponse res = sdk.phoneNumbers().attemptVerification() + .phoneNumberId("") + .requestBody(AttemptPhoneNumberVerificationRequestBody.builder() + .verificationId("") + .code("") + .build()) + .call(); + + if (res.verificationResponse().isPresent()) { + System.out.println(res.verificationResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number whose code is being verified | +| `requestBody` | [AttemptPhoneNumberVerificationRequestBody](../../models/operations/AttemptPhoneNumberVerificationRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[AttemptPhoneNumberVerificationResponse](../../models/operations/AttemptPhoneNumberVerificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 403, 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## replaceForUser + +Replaces all of the user's phone numbers with a single primary phone number. +By default the new phone number is created verified, with the admin verification strategy. +When `identification_status` is `reserved` it is created reserved instead: unverified but usable +for sign-in and locked so no other user can claim it. The new phone number is never reserved for +second factor. Any existing phone numbers are deleted; replacing a phone number that is reserved +for second factor disables the user's MFA. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberRequestBody; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + ReplaceUserPhoneNumberResponse res = sdk.phoneNumbers().replaceForUser() + .userId("") + .requestBody(ReplaceUserPhoneNumberRequestBody.builder() + .phoneNumber("1-440-484-8878 x689") + .build()) + .call(); + + if (res.phoneNumber().isPresent()) { + System.out.println(res.phoneNumber().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose phone number to replace | +| `requestBody` | [ReplaceUserPhoneNumberRequestBody](../../models/operations/ReplaceUserPhoneNumberRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[ReplaceUserPhoneNumberResponse](../../models/operations/ReplaceUserPhoneNumberResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 403, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/samlconnections/README.md b/docs/sdks/samlconnections/README.md index ceda4f5c..906b17e8 100644 --- a/docs/sdks/samlconnections/README.md +++ b/docs/sdks/samlconnections/README.md @@ -135,7 +135,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 409, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~get~~ @@ -271,7 +271,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 409, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~delete~~ diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 1e83e411..37b83ed4 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -19,6 +19,7 @@ * [setProfileImage](#setprofileimage) - Set user profile image * [deleteProfileImage](#deleteprofileimage) - Delete user profile image * [updateMetadata](#updatemetadata) - Merge and update a user's metadata +* [replaceMetadata](#replacemetadata) - Replace a user's metadata * [getBillingSubscription](#getbillingsubscription) - Retrieve a user's billing subscription * [getBillingCreditBalance](#getbillingcreditbalance) - Retrieve a user's credit balance * [adjustBillingCreditBalance](#adjustbillingcreditbalance) - Adjust a user's credit balance @@ -104,7 +105,7 @@ public class Application { Creates a new user. Your user management settings determine how you should setup your user model. -Any email address and phone number created using this method will be marked as verified. +By default, any email address and phone number created using this method is marked as verified. Use the `email_address_identification_status` and `phone_number_identification_status` arrays to instead create some or all of them as reserved (unverified but usable for sign-in and locked so no other user can claim them). Note: If you are performing a migration, check out our guide on [zero downtime migrations](https://clerk.com/docs/deployments/migrate-overview). @@ -158,7 +159,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 401, 403, 422 | application/json | +| models/errors/ClerkErrors | 400, 401, 402, 403, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## count @@ -878,6 +879,66 @@ public class Application { | models/errors/ClerkErrors | 400, 401, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## replaceMetadata + +Replace a user's metadata attributes with the provided values. + +Unlike `PATCH /v1/users/{user_id}/metadata` (merge semantics), this endpoint +replaces the supplied metadata columns entirely — the prior contents of each +supplied column are discarded. Columns omitted from the request body are +left unchanged. + +Prefer the `PATCH` endpoint for partial updates. Use `PUT` only when you +explicitly intend to overwrite a metadata column wholesale. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + ReplaceUserMetadataResponse res = sdk.users().replaceMetadata() + .userId("") + .call(); + + if (res.user().isPresent()) { + System.out.println(res.user().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose metadata will be replaced | +| `requestBody` | [Optional\](../../models/operations/ReplaceUserMetadataRequestBody.md) | :heavy_minus_sign: | N/A | + +### Response + +**[ReplaceUserMetadataResponse](../../models/operations/ReplaceUserMetadataResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 404, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## getBillingSubscription Retrieves the billing subscription for the specified user. diff --git a/gradle.properties b/gradle.properties index cd8513aa..f600b02a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.clerk artifactId=backend-api -version=4.1.5 +version=4.1.6 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/settings.gradle b/settings.gradle index 809eeaf7..c735ecab 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,12 +9,6 @@ rootProject.name = 'backend-api' -include 'backend-api-spring-boot-autoconfigure' -include 'backend-api-spring-boot-starter' - -project(':backend-api-spring-boot-autoconfigure').projectDir = file('spring/backend-api-spring-boot-autoconfigure') -project(':backend-api-spring-boot-starter').projectDir = file('spring/backend-api-spring-boot-starter') - // Apply additional settings if the file exists if (file('settings-extra.gradle').exists()) { apply from: 'settings-extra.gradle' diff --git a/spring/backend-api-spring-boot-autoconfigure/build.gradle b/spring/backend-api-spring-boot-autoconfigure/build.gradle deleted file mode 100644 index 6a821532..00000000 --- a/spring/backend-api-spring-boot-autoconfigure/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ -description = 'api Spring Boot Auto Configuration' - -// Publishing configuration overrides -ext { - publishingConfig = [ - groupId: rootProject.group, - artifactId: 'backend-api-spring-boot-autoconfigure', - version: rootProject.version, - name: 'My Company Java SDK - Spring Boot Auto Configuration', - description: 'Spring Boot auto-configuration for the My Company Java SDK.', - ] -} - -dependencies { - api project(':') - implementation 'org.springframework.boot:spring-boot-autoconfigure' - annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' -} - -test { - useJUnitPlatform() -} - -jar { - dependsOn 'generatePomFileForMavenPublication' - archiveBaseName = 'backend-api-spring-boot-autoconfigure' - into("META-INF/maven/com.clerk/backend-api-spring-boot-autoconfigure") { - from(layout.buildDirectory.file("pom.xml")) { - // Only include if it exists to avoid build ordering issues - duplicatesStrategy = DuplicatesStrategy.INCLUDE - } - } -} \ No newline at end of file diff --git a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfig.java b/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfig.java deleted file mode 100644 index b1fc432d..00000000 --- a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfig.java +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.clerk.backend_api; - -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import java.util.concurrent.TimeUnit; - -import com.clerk.backend_api.utils.BackoffStrategy; -import com.clerk.backend_api.utils.HTTPClient; -import com.clerk.backend_api.utils.RetryConfig; -import com.clerk.backend_api.utils.SpeakeasyHTTPClient; -import java.lang.IllegalStateException; -import java.lang.String; -import java.lang.System; -import java.util.Optional; -import java.util.function.Consumer; - - -/** - * Spring Boot Auto Configuration for api SDK - * This configuration class automatically configures the api SDK - * when Spring Boot detects it on the classpath. - */ -@AutoConfiguration -@ConditionalOnClass(Clerk.class) -@EnableConfigurationProperties(BackendApiAutoConfigProperties.class) -public class BackendApiAutoConfig { - - /** - * Constructor. - */ - public BackendApiAutoConfig() { - } - - /** - * Creates a RetryConfig bean from properties if retry is enabled. - * - * @param properties the configuration properties - * @return A configured RetryConfig instance - */ - @Bean - @ConditionalOnMissingBean - @ConditionalOnProperty(prefix = "backendapi.retry-config", name = "strategy") - public RetryConfig retryConfig(BackendApiAutoConfigProperties properties) { - BackendApiAutoConfigProperties.RetryConfig retryProps = properties.getRetryConfig(); - - if (RetryConfig.Strategy.BACKOFF.equals(retryProps.getStrategy())) { - BackendApiAutoConfigProperties.RetryConfig.Backoff backoff = retryProps.getBackoff(); - return RetryConfig.builder() - .backoff( - BackoffStrategy.builder() - .initialInterval(backoff.getInitialInterval().toMillis(), TimeUnit.MILLISECONDS) - .maxInterval(backoff.getMaxInterval().toMillis(), TimeUnit.MILLISECONDS) - .maxElapsedTime(backoff.getMaxElapsedTime().toMillis(), TimeUnit.MILLISECONDS) - .baseFactor(backoff.getBaseFactor()) - .jitterFactor(backoff.getJitterFactor()) - .retryConnectError(backoff.isRetryConnectError()) - .retryReadTimeoutError(backoff.isRetryReadTimeoutError()) - .build() - ) - .build(); - } - - // Default retry config for other strategies - return RetryConfig.builder().build(); - } - /** - * Creates a {@code Consumer} bean for HTTP debug logging if none exists. - * This logger is used by the SpeakeasyHTTPClient for debug output when debug logging is enabled. - * By default, it logs to {@code System.out}, but can be customized by providing your own {@code Consumer} bean. - * - * @return A {@code Consumer} that logs messages to {@code System.out} - */ - @Bean - @ConditionalOnMissingBean - public Consumer httpLogger() { - return System.out::println; - } - /** - * Creates an HTTPClient bean if none exists. - * - * @param properties the configuration properties - * @param httpLogger the logger for HTTP debug output - * @return A configured HTTPClient instance - */ - @Bean - @ConditionalOnMissingBean - public HTTPClient httpClient(BackendApiAutoConfigProperties properties, Consumer httpLogger) { - BackendApiAutoConfigProperties.HttpClient httpClientProps = properties.getHttpClient(); - - // Configure the static logger - SpeakeasyHTTPClient.setLogger(httpLogger); - - if (httpClientProps != null) { - // Configure debug logging - SpeakeasyHTTPClient.setDebugLogging(httpClientProps.isEnableDebugLogging()); - - // Configure redacted headers - if (httpClientProps.getRedactedHeaders() != null && !httpClientProps.getRedactedHeaders().isEmpty()) { - SpeakeasyHTTPClient.setRedactedHeaders(httpClientProps.getRedactedHeaders()); - } - } - - return new SpeakeasyHTTPClient(); - } - /** - * Creates a SecuritySource bean if none exists and security properties are configured. - * - * @param properties the configuration properties - * @return A configured SecuritySource instance - */ - @Bean - @ConditionalOnMissingBean - @ConditionalOnPropertyPrefix(prefix = "backendapi.security") - public SecuritySource securitySource(BackendApiAutoConfigProperties properties) {BackendApiAutoConfigProperties.Security securityProps = properties.getSecurity(); - com.clerk.backend_api.models.components.Security.Builder securityBuilder = com.clerk.backend_api.models.components.Security.builder(); - boolean hasAnySecurityConfiguration = false; - // Build bearerAuth security from direct properties (primitive value) - if (securityProps.getBearerAuth() != null) { - securityBuilder.bearerAuth(securityProps.getBearerAuth()); - hasAnySecurityConfiguration = true; - } - - if (!hasAnySecurityConfiguration) { - throw new IllegalStateException("Security configuration is present but no security options are configured. " + - "Please configure at least one security option in your application properties."); - } - - return SecuritySource.of(securityBuilder.build()); - } - - /** - * Creates the SDKConfiguration bean as the single source of truth for all SDK configuration. - * - * @param properties the configuration properties - * @param httpClient the HTTP client bean - * @param hooks the hooks bean - * @param securitySource the security source bean (optional) - * @param retryConfig the retry config bean (optional) - * @return A configured SDKConfiguration instance - */ - @Bean - @ConditionalOnMissingBean - public SDKConfiguration sdkConfiguration( - BackendApiAutoConfigProperties properties, - HTTPClient httpClient, - com.clerk.backend_api.utils.Hooks hooks, - SecuritySource securitySource, - Optional retryConfig) { - - SDKConfiguration sdkConfiguration = new SDKConfiguration(); - - sdkConfiguration.setClient(httpClient); - - sdkConfiguration.setHooks(hooks); - sdkConfiguration.setSecuritySource(securitySource); - - if (properties.getServerUrl() != null) { - sdkConfiguration.setServerUrl(properties.getServerUrl()); - } - sdkConfiguration.setServerIdx(properties.getServerIdx()); - - sdkConfiguration.setRetryConfig(retryConfig); - - return sdkConfiguration; - } - - /** - * Creates the main SDK bean using the configured SDKConfiguration. - * - * @param sdkConfiguration the configured SDKConfiguration bean - * @return A configured Clerk instance - */ - @Bean - @ConditionalOnMissingBean - public Clerk clerk(SDKConfiguration sdkConfiguration) { - return new Clerk(sdkConfiguration); - } - - /** - * Creates a Hooks configuration bean if none exists. - * - * @return A configured Hooks instance - */ - @Bean - @ConditionalOnMissingBean - public com.clerk.backend_api.utils.Hooks hooks() { - return new com.clerk.backend_api.utils.Hooks(); - } - /** - * Creates a Miscellaneous sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Miscellaneous instance - */ - @Bean - @ConditionalOnMissingBean - public Miscellaneous miscellaneous(Clerk clerk) { - return clerk.miscellaneous(); - } - /** - * Creates a Jwks sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Jwks instance - */ - @Bean - @ConditionalOnMissingBean - public Jwks jwks(Clerk clerk) { - return clerk.jwks(); - } - /** - * Creates a Clients sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Clients instance - */ - @Bean - @ConditionalOnMissingBean - public Clients clients(Clerk clerk) { - return clerk.clients(); - } - /** - * Creates a EmailAddresses sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured EmailAddresses instance - */ - @Bean - @ConditionalOnMissingBean - public EmailAddresses emailAddresses(Clerk clerk) { - return clerk.emailAddresses(); - } - /** - * Creates a PhoneNumbers sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured PhoneNumbers instance - */ - @Bean - @ConditionalOnMissingBean - public PhoneNumbers phoneNumbers(Clerk clerk) { - return clerk.phoneNumbers(); - } - /** - * Creates a Sessions sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Sessions instance - */ - @Bean - @ConditionalOnMissingBean - public Sessions sessions(Clerk clerk) { - return clerk.sessions(); - } - /** - * Creates a EmailSMSTemplates sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured EmailSMSTemplates instance - */ - @Bean - @ConditionalOnMissingBean - public EmailSMSTemplates emailSMSTemplates(Clerk clerk) { - return clerk.emailSMSTemplates(); - } - /** - * Creates a EmailAndSmsTemplates sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured EmailAndSmsTemplates instance - */ - @Bean - @ConditionalOnMissingBean - public EmailAndSmsTemplates emailAndSmsTemplates(Clerk clerk) { - return clerk.emailAndSmsTemplates(); - } - /** - * Creates a Templates sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Templates instance - */ - @Bean - @ConditionalOnMissingBean - public Templates templates(Clerk clerk) { - return clerk.templates(); - } - /** - * Creates a Users sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Users instance - */ - @Bean - @ConditionalOnMissingBean - public Users users(Clerk clerk) { - return clerk.users(); - } - /** - * Creates a Invitations sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Invitations instance - */ - @Bean - @ConditionalOnMissingBean - public Invitations invitations(Clerk clerk) { - return clerk.invitations(); - } - /** - * Creates a OrganizationInvitations sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OrganizationInvitations instance - */ - @Bean - @ConditionalOnMissingBean - public OrganizationInvitations organizationInvitations(Clerk clerk) { - return clerk.organizationInvitations(); - } - /** - * Creates a AllowlistIdentifiers sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured AllowlistIdentifiers instance - */ - @Bean - @ConditionalOnMissingBean - public AllowlistIdentifiers allowlistIdentifiers(Clerk clerk) { - return clerk.allowlistIdentifiers(); - } - /** - * Creates a BlocklistIdentifiers sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured BlocklistIdentifiers instance - */ - @Bean - @ConditionalOnMissingBean - public BlocklistIdentifiers blocklistIdentifiers(Clerk clerk) { - return clerk.blocklistIdentifiers(); - } - /** - * Creates a BetaFeatures sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured BetaFeatures instance - */ - @Bean - @ConditionalOnMissingBean - public BetaFeatures betaFeatures(Clerk clerk) { - return clerk.betaFeatures(); - } - /** - * Creates a ActorTokens sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured ActorTokens instance - */ - @Bean - @ConditionalOnMissingBean - public ActorTokens actorTokens(Clerk clerk) { - return clerk.actorTokens(); - } - /** - * Creates a Domains sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Domains instance - */ - @Bean - @ConditionalOnMissingBean - public Domains domains(Clerk clerk) { - return clerk.domains(); - } - /** - * Creates a InstanceSettings sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured InstanceSettings instance - */ - @Bean - @ConditionalOnMissingBean - public InstanceSettings instanceSettings(Clerk clerk) { - return clerk.instanceSettings(); - } - /** - * Creates a Webhooks sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Webhooks instance - */ - @Bean - @ConditionalOnMissingBean - public Webhooks webhooks(Clerk clerk) { - return clerk.webhooks(); - } - /** - * Creates a JwtTemplates sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured JwtTemplates instance - */ - @Bean - @ConditionalOnMissingBean - public JwtTemplates jwtTemplates(Clerk clerk) { - return clerk.jwtTemplates(); - } - /** - * Creates a Machines sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Machines instance - */ - @Bean - @ConditionalOnMissingBean - public Machines machines(Clerk clerk) { - return clerk.machines(); - } - /** - * Creates a Organizations sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Organizations instance - */ - @Bean - @ConditionalOnMissingBean - public Organizations organizations(Clerk clerk) { - return clerk.organizations(); - } - /** - * Creates a OrganizationRoles sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OrganizationRoles instance - */ - @Bean - @ConditionalOnMissingBean - public OrganizationRoles organizationRoles(Clerk clerk) { - return clerk.organizationRoles(); - } - /** - * Creates a OrganizationMemberships sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OrganizationMemberships instance - */ - @Bean - @ConditionalOnMissingBean - public OrganizationMemberships organizationMemberships(Clerk clerk) { - return clerk.organizationMemberships(); - } - /** - * Creates a OrganizationDomains sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OrganizationDomains instance - */ - @Bean - @ConditionalOnMissingBean - public OrganizationDomains organizationDomains(Clerk clerk) { - return clerk.organizationDomains(); - } - /** - * Creates a ProxyChecks sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured ProxyChecks instance - */ - @Bean - @ConditionalOnMissingBean - public ProxyChecks proxyChecks(Clerk clerk) { - return clerk.proxyChecks(); - } - /** - * Creates a RedirectUrls sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured RedirectUrls instance - */ - @Bean - @ConditionalOnMissingBean - public RedirectUrls redirectUrls(Clerk clerk) { - return clerk.redirectUrls(); - } - /** - * Creates a SignInTokens sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured SignInTokens instance - */ - @Bean - @ConditionalOnMissingBean - public SignInTokens signInTokens(Clerk clerk) { - return clerk.signInTokens(); - } - /** - * Creates a SignUps sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured SignUps instance - */ - @Bean - @ConditionalOnMissingBean - public SignUps signUps(Clerk clerk) { - return clerk.signUps(); - } - /** - * Creates a OauthApplications sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OauthApplications instance - */ - @Bean - @ConditionalOnMissingBean - public OauthApplications oauthApplications(Clerk clerk) { - return clerk.oauthApplications(); - } - /** - * Creates a SamlConnections sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured SamlConnections instance - */ - @Bean - @ConditionalOnMissingBean - public SamlConnections samlConnections(Clerk clerk) { - return clerk.samlConnections(); - } - /** - * Creates a EnterpriseConnections sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured EnterpriseConnections instance - */ - @Bean - @ConditionalOnMissingBean - public EnterpriseConnections enterpriseConnections(Clerk clerk) { - return clerk.enterpriseConnections(); - } - /** - * Creates a TestingTokens sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured TestingTokens instance - */ - @Bean - @ConditionalOnMissingBean - public TestingTokens testingTokens(Clerk clerk) { - return clerk.testingTokens(); - } - /** - * Creates a AgentTasks sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured AgentTasks instance - */ - @Bean - @ConditionalOnMissingBean - public AgentTasks agentTasks(Clerk clerk) { - return clerk.agentTasks(); - } - /** - * Creates a WaitlistEntries sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured WaitlistEntries instance - */ - @Bean - @ConditionalOnMissingBean - public WaitlistEntries waitlistEntries(Clerk clerk) { - return clerk.waitlistEntries(); - } - /** - * Creates a Billing sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured Billing instance - */ - @Bean - @ConditionalOnMissingBean - public Billing billing(Clerk clerk) { - return clerk.billing(); - } - /** - * Creates a OrganizationPermissions sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OrganizationPermissions instance - */ - @Bean - @ConditionalOnMissingBean - public OrganizationPermissions organizationPermissions(Clerk clerk) { - return clerk.organizationPermissions(); - } - /** - * Creates a RoleSets sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured RoleSets instance - */ - @Bean - @ConditionalOnMissingBean - public RoleSets roleSets(Clerk clerk) { - return clerk.roleSets(); - } - /** - * Creates a APIKeys sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured APIKeys instance - */ - @Bean - @ConditionalOnMissingBean - public APIKeys apiKeys(Clerk clerk) { - return clerk.apiKeys(); - } - /** - * Creates a M2m sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured M2m instance - */ - @Bean - @ConditionalOnMissingBean - public M2m m2m(Clerk clerk) { - return clerk.m2m(); - } - /** - * Creates a OauthAccessTokens sub-SDK bean if none exists. - * - * @param clerk the main SDK instance - * @return A configured OauthAccessTokens instance - */ - @Bean - @ConditionalOnMissingBean - public OauthAccessTokens oauthAccessTokens(Clerk clerk) { - return clerk.oauthAccessTokens(); - } -} \ No newline at end of file diff --git a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfigProperties.java b/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfigProperties.java deleted file mode 100644 index 2a1417da..00000000 --- a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/BackendApiAutoConfigProperties.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.clerk.backend_api; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -import java.time.Duration; -import java.lang.String; -import java.util.Collection; -import java.util.Set; - - -/** - * Spring Boot Configuration Properties for api SDK - */ -@ConfigurationProperties(prefix = "backendapi") -public class BackendApiAutoConfigProperties { - - /** - * Constructor. - */ - public BackendApiAutoConfigProperties() { - } - - /** - * The base URL for the API server. If not specified, the SDK will use the default server URL. - */ - private String serverUrl; - - /** - * Configuration for retry behavior when API calls fail due to transient errors. - */ - private RetryConfig retryConfig = new RetryConfig(); - - /** - * HTTP client configuration for API requests. - */ - private HttpClient httpClient = new HttpClient(); - /** - * The index of the server to use from the list of available servers (0-based). Defaults to the first server. - */ - private int serverIdx = 0; - /** - * Security configuration for API authentication. - */ - private Security security = new Security(); - - /** - * Gets the base URL for the API server. - * - * @return the base URL for the API server - */ - public String getServerUrl() { - return serverUrl; - } - - /** - * Sets the base URL for the API server. - * - * @param serverUrl the base URL for the API server - */ - public void setServerUrl(String serverUrl) { - this.serverUrl = serverUrl; - } - - /** - * Gets the retry configuration for API calls that fail due to transient errors. - * - * @return the retry configuration - */ - public RetryConfig getRetryConfig() { - return retryConfig; - } - - /** - * Sets the retry configuration for API calls that fail due to transient errors. - * - * @param retryConfig the retry configuration to use - */ - public void setRetryConfig(RetryConfig retryConfig) { - this.retryConfig = retryConfig; - } - - /** - * Gets the HTTP client configuration for API requests. - * - * @return the HTTP client configuration - */ - public HttpClient getHttpClient() { - return httpClient; - } - - /** - * Sets the HTTP client configuration for API requests. - * - * @param httpClient the HTTP client configuration to use - */ - public void setHttpClient(HttpClient httpClient) { - this.httpClient = httpClient; - } - /** - * Gets the index of the server to use from the list of available servers (0-based). - * - * @return the server index - */ - public int getServerIdx() { - return serverIdx; - } - - /** - * Sets the index of the server to use from the list of available servers (0-based). - * - * @param serverIdx the server index to use - */ - public void setServerIdx(int serverIdx) { - this.serverIdx = serverIdx; - } - /** - * Gets the security configuration for API authentication. - * - * @return the security configuration - */ - public Security getSecurity() { - return security; - } - - /** - * Sets the security configuration for API authentication. - * - * @param security the security configuration to use - */ - public void setSecurity(Security security) { - this.security = security; - } - - /** - * Retry configuration properties - */ - public static class RetryConfig { - - /** - * Constructor. - */ - public RetryConfig() { - } - - /** - * The retry strategy to use for failed requests. - */ - private com.clerk.backend_api.utils.RetryConfig.Strategy strategy; - - /** - * Configuration for exponential backoff retry strategy. Only used when strategy is set to BACKOFF. - */ - private Backoff backoff = new Backoff(); - - /** - * Gets the retry strategy to use for failed requests. - * - * @return the retry strategy - */ - public com.clerk.backend_api.utils.RetryConfig.Strategy getStrategy() { - return strategy; - } - - /** - * Sets the retry strategy to use for failed requests. - * - * @param strategy the retry strategy to use - */ - public void setStrategy(com.clerk.backend_api.utils.RetryConfig.Strategy strategy) { - this.strategy = strategy; - } - - /** - * Gets the backoff configuration for exponential backoff retry strategy. - * - * @return the backoff configuration - */ - public Backoff getBackoff() { - return backoff; - } - - /** - * Sets the backoff configuration for exponential backoff retry strategy. - * - * @param backoff the backoff configuration to use - */ - public void setBackoff(Backoff backoff) { - this.backoff = backoff; - } - - /** - * Backoff retry configuration matching BackoffStrategy fields - */ - public static class Backoff { - - /** - * Constructor. - */ - public Backoff() { - } - - /** - * The initial delay before the first retry attempt. Supports duration formats like "500ms", "1s", "2m". - */ - private Duration initialInterval = Duration.ofMillis(500); - - /** - * The maximum delay between retry attempts. The backoff will not exceed this value. - */ - private Duration maxInterval = Duration.ofSeconds(60); - - /** - * The maximum total time to spend on all retry attempts. Retries will stop after this duration. - */ - private Duration maxElapsedTime = Duration.ofHours(1); - - /** - * The multiplier for exponential backoff. Each retry delay is multiplied by this factor (e.g., 1.5 means 50% increase). - */ - private double baseFactor = 1.5; - - /** - * Random jitter factor to avoid thundering herd problems. Value between 0.0 (no jitter) and 1.0 (full jitter). - */ - private double jitterFactor = 0.5; - - /** - * Whether to retry requests that fail due to connection errors (e.g., connection refused, timeout). - */ - private boolean retryConnectError = false; - - /** - * Whether to retry requests that fail due to read timeout errors (server doesn't respond within timeout). - */ - private boolean retryReadTimeoutError = false; - - /** - * Gets the initial delay before the first retry attempt. - * - * @return the initial delay duration - */ - public Duration getInitialInterval() { - return initialInterval; - } - - /** - * Sets the initial delay before the first retry attempt. - * - * @param initialInterval the initial delay duration - */ - public void setInitialInterval(Duration initialInterval) { - this.initialInterval = initialInterval; - } - - /** - * Gets the maximum delay between retry attempts. - * - * @return the maximum delay duration - */ - public Duration getMaxInterval() { - return maxInterval; - } - - /** - * Sets the maximum delay between retry attempts. - * - * @param maxInterval the maximum delay duration - */ - public void setMaxInterval(Duration maxInterval) { - this.maxInterval = maxInterval; - } - - /** - * Gets the maximum total time to spend on all retry attempts. - * - * @return the maximum elapsed time duration - */ - public Duration getMaxElapsedTime() { - return maxElapsedTime; - } - - /** - * Sets the maximum total time to spend on all retry attempts. - * - * @param maxElapsedTime the maximum elapsed time duration - */ - public void setMaxElapsedTime(Duration maxElapsedTime) { - this.maxElapsedTime = maxElapsedTime; - } - - /** - * Gets the multiplier for exponential backoff. - * - * @return the base factor for exponential backoff - */ - public double getBaseFactor() { - return baseFactor; - } - - /** - * Sets the multiplier for exponential backoff. - * - * @param baseFactor the base factor for exponential backoff - */ - public void setBaseFactor(double baseFactor) { - this.baseFactor = baseFactor; - } - - /** - * Gets the random jitter factor to avoid thundering herd problems. - * - * @return the jitter factor (0.0 to 1.0) - */ - public double getJitterFactor() { - return jitterFactor; - } - - /** - * Sets the random jitter factor to avoid thundering herd problems. - * - * @param jitterFactor the jitter factor (0.0 to 1.0) - */ - public void setJitterFactor(double jitterFactor) { - this.jitterFactor = jitterFactor; - } - - /** - * Gets whether to retry requests that fail due to connection errors. - * - * @return true if connection errors should be retried, false otherwise - */ - public boolean isRetryConnectError() { - return retryConnectError; - } - - /** - * Sets whether to retry requests that fail due to connection errors. - * - * @param retryConnectError true to retry connection errors, false otherwise - */ - public void setRetryConnectError(boolean retryConnectError) { - this.retryConnectError = retryConnectError; - } - - /** - * Gets whether to retry requests that fail due to read timeout errors. - * - * @return true if read timeout errors should be retried, false otherwise - */ - public boolean isRetryReadTimeoutError() { - return retryReadTimeoutError; - } - - /** - * Sets whether to retry requests that fail due to read timeout errors. - * - * @param retryReadTimeoutError true to retry read timeout errors, false otherwise - */ - public void setRetryReadTimeoutError(boolean retryReadTimeoutError) { - this.retryReadTimeoutError = retryReadTimeoutError; - } - } - } - - /** - * HTTP client configuration properties - */ - public static class HttpClient { - - /** - * Constructor. - */ - public HttpClient() { - } - - /** - * Whether to enable debug logging for HTTP requests and responses, including JSON body content. - */ - private boolean enableDebugLogging = false; - - /** - * Collection of header names (case-insensitive) whose values will be redacted in debug logs. - * By default, Authorization and X-API-KEY headers are redacted for security. - */ - private Collection redactedHeaders = Set.of("Authorization", "X-API-KEY"); - - /** - * Gets whether debug logging is enabled for HTTP requests and responses. - * - * @return true if debug logging is enabled, false otherwise - */ - public boolean isEnableDebugLogging() { - return enableDebugLogging; - } - - /** - * Sets whether to enable debug logging for HTTP requests and responses. - * - * @param enableDebugLogging true to enable debug logging, false otherwise - */ - public void setEnableDebugLogging(boolean enableDebugLogging) { - this.enableDebugLogging = enableDebugLogging; - } - - /** - * Gets the collection of header names whose values will be redacted in debug logs. - * - * @return the collection of header names to redact - */ - public Collection getRedactedHeaders() { - return redactedHeaders; - } - - /** - * Sets the collection of header names whose values will be redacted in debug logs. - * - * @param redactedHeaders the collection of header names to redact - */ - public void setRedactedHeaders(Collection redactedHeaders) { - this.redactedHeaders = redactedHeaders; - } - } - - /** - * Security configuration properties - */ - public static class Security { - - /** - * Constructor. - */ - public Security() { - } - /** - * bearerAuth for authentication. - */ - private String bearerAuth; - - /** - * Gets the bearerAuth value. - * - * @return the bearerAuth value - */ - public String getBearerAuth() { - return bearerAuth; - } - - /** - * Sets the bearerAuth value. - * - * @param bearerAuth the bearerAuth value to use - */ - public void setBearerAuth(String bearerAuth) { - this.bearerAuth = bearerAuth; - } - } -} \ No newline at end of file diff --git a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/ConditionalOnPropertyPrefix.java b/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/ConditionalOnPropertyPrefix.java deleted file mode 100644 index df787ac1..00000000 --- a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/ConditionalOnPropertyPrefix.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.clerk.backend_api; - -import org.springframework.context.annotation.Conditional; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Conditional annotation that matches when any properties exist under the specified prefix. - * This is useful for conditionally creating beans only when configuration properties - * are present under a specific prefix. - * - *

Example usage: - *

- * @Bean
- * @ConditionalOnPropertyPrefix(prefix = "myapp.security")
- * public SecuritySource securitySource() {
- *     // This bean will only be created if properties like myapp.security.* exist
- * }
- * 
- */ -@Target({ ElementType.TYPE, ElementType.METHOD }) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Conditional(OnPropertyPrefixCondition.class) -public @interface ConditionalOnPropertyPrefix { - - /** - * The property prefix to check for. Properties starting with this prefix - * (followed by a dot) will be considered when determining if the condition matches. - * - * @return the property prefix - */ - String prefix(); -} \ No newline at end of file diff --git a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/OnPropertyPrefixCondition.java b/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/OnPropertyPrefixCondition.java deleted file mode 100644 index bd2c3d5e..00000000 --- a/spring/backend-api-spring-boot-autoconfigure/src/main/java/com/clerk/backend_api/OnPropertyPrefixCondition.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package com.clerk.backend_api; - -import org.springframework.boot.autoconfigure.condition.ConditionMessage; -import org.springframework.boot.autoconfigure.condition.ConditionOutcome; -import org.springframework.boot.autoconfigure.condition.SpringBootCondition; -import org.springframework.boot.context.properties.bind.Binder; -import org.springframework.context.annotation.ConditionContext; -import org.springframework.core.type.AnnotatedTypeMetadata; -import org.springframework.core.env.Environment; - -import java.util.Map; - -/** - * Custom condition that checks if any properties exist under a given prefix. - * This is used to conditionally create beans only when configuration properties - * are present under a specific prefix. - */ -public class OnPropertyPrefixCondition extends SpringBootCondition { - - /** - * Default constructor for OnPropertyPrefixCondition. - */ - public OnPropertyPrefixCondition() { - // Default constructor - } - - @Override - public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { - Map attributes = metadata.getAnnotationAttributes(ConditionalOnPropertyPrefix.class.getName()); - if (attributes == null) { - return ConditionOutcome.noMatch("@ConditionalOnPropertyPrefix annotation not found"); - } - - String prefix = (String) attributes.get("prefix"); - if (prefix == null || prefix.isEmpty()) { - return ConditionOutcome.noMatch("Property prefix is empty"); - } - - Environment environment = context.getEnvironment(); - - // Check if any properties exist under the given prefix - boolean hasPropertiesUnderPrefix = hasPropertiesWithPrefix(environment, prefix); - - ConditionMessage.Builder message = ConditionMessage.forCondition(ConditionalOnPropertyPrefix.class, prefix); - - if (hasPropertiesUnderPrefix) { - return ConditionOutcome.match(message.found("properties").items(prefix + ".*")); - } else { - return ConditionOutcome.noMatch(message.didNotFind("properties").items(prefix + ".*")); - } - } - - private boolean hasPropertiesWithPrefix(Environment environment, String prefix) { - try { - // Use Spring Boot's Binder to check if any properties exist under the prefix - Binder binder = Binder.get(environment); - - // Try to bind to a Map to see if any properties exist under the prefix - return binder.bind(prefix, Map.class).isBound(); - } catch (Exception e) { - // If we can't determine, assume no properties exist - return false; - } - } -} \ No newline at end of file diff --git a/spring/backend-api-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring/backend-api-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 3ee380ed..00000000 --- a/spring/backend-api-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.clerk.backend_api.BackendApiAutoConfig \ No newline at end of file diff --git a/spring/backend-api-spring-boot-starter/build.gradle b/spring/backend-api-spring-boot-starter/build.gradle deleted file mode 100644 index 49c27807..00000000 --- a/spring/backend-api-spring-boot-starter/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -description = 'api Spring Boot Starter' - -// Publishing configuration overrides -ext { - publishingConfig = [ - groupId: rootProject.group, - artifactId: 'backend-api-spring-boot-starter', - version: rootProject.version, - name: 'My Company Java SDK - Spring Boot Starter', - description: 'Spring Boot starter for the My Company Java SDK.', - ] -} - -dependencies { - api project(':') - api project(':backend-api-spring-boot-autoconfigure') - api "org.springframework.boot:spring-boot-starter:${rootProject.springBootVersion}" -} - -jar { - dependsOn 'generatePomFileForMavenPublication' - archiveBaseName = 'backend-api-spring-boot-starter' - into("META-INF/maven/com.clerk/backend-api-spring-boot-starter") { - from(layout.buildDirectory.file("pom.xml")) { - // Only include if it exists to avoid build ordering issues - duplicatesStrategy = DuplicatesStrategy.INCLUDE - } - } -} \ No newline at end of file diff --git a/src/main/java/com/clerk/backend_api/AdminPortalLinkTokens.java b/src/main/java/com/clerk/backend_api/AdminPortalLinkTokens.java new file mode 100644 index 00000000..295d47df --- /dev/null +++ b/src/main/java/com/clerk/backend_api/AdminPortalLinkTokens.java @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenRequestBody; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenRequestBuilder; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenResponse; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenRequest; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenRequestBody; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenRequestBuilder; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenResponse; +import com.clerk.backend_api.operations.CreateAdminPortalLinkToken; +import com.clerk.backend_api.operations.RevokeAdminPortalLinkToken; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import java.lang.String; +import java.util.Optional; + + +public class AdminPortalLinkTokens { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + + AdminPortalLinkTokens(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + /** + * Create an Admin Portal Link Token + * + * @return The call builder + */ + public CreateAdminPortalLinkTokenRequestBuilder createAdminPortalLinkToken() { + return new CreateAdminPortalLinkTokenRequestBuilder(sdkConfiguration); + } + + /** + * Create an Admin Portal Link Token + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public CreateAdminPortalLinkTokenResponse createAdminPortalLinkToken(CreateAdminPortalLinkTokenRequestBody request) { + return createAdminPortalLinkToken(request, Optional.empty()); + } + + /** + * Create an Admin Portal Link Token + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public CreateAdminPortalLinkTokenResponse createAdminPortalLinkToken(CreateAdminPortalLinkTokenRequestBody request, Optional options) { + RequestOperation operation + = new CreateAdminPortalLinkToken.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Revoke an Admin Portal Link Token + * + * @return The call builder + */ + public RevokeAdminPortalLinkTokenRequestBuilder revokeAdminPortalLinkToken() { + return new RevokeAdminPortalLinkTokenRequestBuilder(sdkConfiguration); + } + + /** + * Revoke an Admin Portal Link Token + * + * @param adminPortalLinkTokenID + * @param requestBody + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public RevokeAdminPortalLinkTokenResponse revokeAdminPortalLinkToken(String adminPortalLinkTokenID, RevokeAdminPortalLinkTokenRequestBody requestBody) { + return revokeAdminPortalLinkToken(adminPortalLinkTokenID, requestBody, Optional.empty()); + } + + /** + * Revoke an Admin Portal Link Token + * + * @param adminPortalLinkTokenID + * @param requestBody + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public RevokeAdminPortalLinkTokenResponse revokeAdminPortalLinkToken( + String adminPortalLinkTokenID, RevokeAdminPortalLinkTokenRequestBody requestBody, + Optional options) { + RevokeAdminPortalLinkTokenRequest request = + RevokeAdminPortalLinkTokenRequest + .builder() + .adminPortalLinkTokenID(adminPortalLinkTokenID) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new RevokeAdminPortalLinkToken.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/com/clerk/backend_api/Clerk.java b/src/main/java/com/clerk/backend_api/Clerk.java index 25eb6ff9..773c40aa 100644 --- a/src/main/java/com/clerk/backend_api/Clerk.java +++ b/src/main/java/com/clerk/backend_api/Clerk.java @@ -158,6 +158,9 @@ public class Clerk { private final RoleSets roleSets; + + private final AdminPortalLinkTokens adminPortalLinkTokens; + /** * Endpoints for managing API Keys */ @@ -361,6 +364,11 @@ public RoleSets roleSets() { return roleSets; } + + public AdminPortalLinkTokens adminPortalLinkTokens() { + return adminPortalLinkTokens; + } + /** * Endpoints for managing API Keys */ @@ -524,7 +532,7 @@ public static Builder builder() { return new Builder(); } - public Clerk(SDKConfiguration sdkConfiguration) { + private Clerk(SDKConfiguration sdkConfiguration) { sdkConfiguration.initialize(); this.miscellaneous = new Miscellaneous(sdkConfiguration); this.jwks = new Jwks(sdkConfiguration); @@ -564,6 +572,7 @@ public Clerk(SDKConfiguration sdkConfiguration) { this.billing = new Billing(sdkConfiguration); this.organizationPermissions = new OrganizationPermissions(sdkConfiguration); this.roleSets = new RoleSets(sdkConfiguration); + this.adminPortalLinkTokens = new AdminPortalLinkTokens(sdkConfiguration); this.apiKeys = new APIKeys(sdkConfiguration); this.m2m = new M2m(sdkConfiguration); this.oauthAccessTokens = new OauthAccessTokens(sdkConfiguration); diff --git a/src/main/java/com/clerk/backend_api/EmailAddresses.java b/src/main/java/com/clerk/backend_api/EmailAddresses.java index 1d63564e..631cdd4f 100644 --- a/src/main/java/com/clerk/backend_api/EmailAddresses.java +++ b/src/main/java/com/clerk/backend_api/EmailAddresses.java @@ -5,6 +5,10 @@ import static com.clerk.backend_api.operations.Operations.RequestOperation; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationRequest; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationRequestBody; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationRequestBuilder; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationResponse; import com.clerk.backend_api.models.operations.CreateEmailAddressRequestBody; import com.clerk.backend_api.models.operations.CreateEmailAddressRequestBuilder; import com.clerk.backend_api.models.operations.CreateEmailAddressResponse; @@ -14,13 +18,23 @@ import com.clerk.backend_api.models.operations.GetEmailAddressRequest; import com.clerk.backend_api.models.operations.GetEmailAddressRequestBuilder; import com.clerk.backend_api.models.operations.GetEmailAddressResponse; +import com.clerk.backend_api.models.operations.PrepareEmailAddressVerificationRequest; +import com.clerk.backend_api.models.operations.PrepareEmailAddressVerificationRequestBuilder; +import com.clerk.backend_api.models.operations.PrepareEmailAddressVerificationResponse; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressRequest; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressRequestBody; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressRequestBuilder; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressResponse; import com.clerk.backend_api.models.operations.UpdateEmailAddressRequest; import com.clerk.backend_api.models.operations.UpdateEmailAddressRequestBody; import com.clerk.backend_api.models.operations.UpdateEmailAddressRequestBuilder; import com.clerk.backend_api.models.operations.UpdateEmailAddressResponse; +import com.clerk.backend_api.operations.AttemptEmailAddressVerification; import com.clerk.backend_api.operations.CreateEmailAddress; import com.clerk.backend_api.operations.DeleteEmailAddress; import com.clerk.backend_api.operations.GetEmailAddress; +import com.clerk.backend_api.operations.PrepareEmailAddressVerification; +import com.clerk.backend_api.operations.ReplaceUserEmailAddress; import com.clerk.backend_api.operations.UpdateEmailAddress; import com.clerk.backend_api.utils.Headers; import com.clerk.backend_api.utils.Options; @@ -214,4 +228,203 @@ public UpdateEmailAddressResponse update( return operation.handleResponse(operation.doRequest(request)); } + /** + * Send a verification code to an email address + * + *

Sends a one-time code to the given email address so that a backend can + * verify the user controls it (for example, in a custom, backend-driven + * sign-in flow). The code is tracked on its own verification; confirm it + * with attempt_verification. + * + * @return The call builder + */ + public PrepareEmailAddressVerificationRequestBuilder prepareVerification() { + return new PrepareEmailAddressVerificationRequestBuilder(sdkConfiguration); + } + + /** + * Send a verification code to an email address + * + *

Sends a one-time code to the given email address so that a backend can + * verify the user controls it (for example, in a custom, backend-driven + * sign-in flow). The code is tracked on its own verification; confirm it + * with attempt_verification. + * + * @param emailAddressId The ID of the email address to send the verification code to + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PrepareEmailAddressVerificationResponse prepareVerification(String emailAddressId) { + return prepareVerification(emailAddressId, Optional.empty()); + } + + /** + * Send a verification code to an email address + * + *

Sends a one-time code to the given email address so that a backend can + * verify the user controls it (for example, in a custom, backend-driven + * sign-in flow). The code is tracked on its own verification; confirm it + * with attempt_verification. + * + * @param emailAddressId The ID of the email address to send the verification code to + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PrepareEmailAddressVerificationResponse prepareVerification(String emailAddressId, Optional options) { + PrepareEmailAddressVerificationRequest request = + PrepareEmailAddressVerificationRequest + .builder() + .emailAddressId(emailAddressId) + .build(); + RequestOperation operation + = new PrepareEmailAddressVerification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Verify a code sent to an email address + * + *

Checks a one-time code against the verification identified by + * verification_id, and returns the verification with its updated status + * (`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a + * backend driving its own frontend can react on every attempt — an incorrect + * or expired code is reported through the status, not as an error. Resubmitting + * a verification whose code was already accepted is rejected with a + * `verification_already_verified` error. If the code + * is correct and the email address is not already verified, it is also marked + * as verified as a side effect (just as it would be in a frontend verification + * flow); an already verified email address is left unchanged. It never creates + * a session; to sign the user in afterwards, mint a sign-in token. + * + * @return The call builder + */ + public AttemptEmailAddressVerificationRequestBuilder attemptVerification() { + return new AttemptEmailAddressVerificationRequestBuilder(sdkConfiguration); + } + + /** + * Verify a code sent to an email address + * + *

Checks a one-time code against the verification identified by + * verification_id, and returns the verification with its updated status + * (`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a + * backend driving its own frontend can react on every attempt — an incorrect + * or expired code is reported through the status, not as an error. Resubmitting + * a verification whose code was already accepted is rejected with a + * `verification_already_verified` error. If the code + * is correct and the email address is not already verified, it is also marked + * as verified as a side effect (just as it would be in a frontend verification + * flow); an already verified email address is left unchanged. It never creates + * a session; to sign the user in afterwards, mint a sign-in token. + * + * @param emailAddressId The ID of the email address whose code is being verified + * @param requestBody + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public AttemptEmailAddressVerificationResponse attemptVerification(String emailAddressId, AttemptEmailAddressVerificationRequestBody requestBody) { + return attemptVerification(emailAddressId, requestBody, Optional.empty()); + } + + /** + * Verify a code sent to an email address + * + *

Checks a one-time code against the verification identified by + * verification_id, and returns the verification with its updated status + * (`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a + * backend driving its own frontend can react on every attempt — an incorrect + * or expired code is reported through the status, not as an error. Resubmitting + * a verification whose code was already accepted is rejected with a + * `verification_already_verified` error. If the code + * is correct and the email address is not already verified, it is also marked + * as verified as a side effect (just as it would be in a frontend verification + * flow); an already verified email address is left unchanged. It never creates + * a session; to sign the user in afterwards, mint a sign-in token. + * + * @param emailAddressId The ID of the email address whose code is being verified + * @param requestBody + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public AttemptEmailAddressVerificationResponse attemptVerification( + String emailAddressId, AttemptEmailAddressVerificationRequestBody requestBody, + Optional options) { + AttemptEmailAddressVerificationRequest request = + AttemptEmailAddressVerificationRequest + .builder() + .emailAddressId(emailAddressId) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new AttemptEmailAddressVerification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Replace a user's email address + * + *

Replaces all of the user's email addresses with a single primary email address. + * By default the new email address is created verified, with the admin verification strategy. + * When `identification_status` is `reserved` it is created reserved instead: unverified but usable + * for sign-in and locked so no other user can claim it. Any existing email addresses are deleted. + * If an existing email address is linked to a connected account, the request is rejected; remove + * the connected account first. + * + * @return The call builder + */ + public ReplaceUserEmailAddressRequestBuilder replaceForUser() { + return new ReplaceUserEmailAddressRequestBuilder(sdkConfiguration); + } + + /** + * Replace a user's email address + * + *

Replaces all of the user's email addresses with a single primary email address. + * By default the new email address is created verified, with the admin verification strategy. + * When `identification_status` is `reserved` it is created reserved instead: unverified but usable + * for sign-in and locked so no other user can claim it. Any existing email addresses are deleted. + * If an existing email address is linked to a connected account, the request is rejected; remove + * the connected account first. + * + * @param userId The ID of the user whose email address to replace + * @param requestBody + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ReplaceUserEmailAddressResponse replaceForUser(String userId, ReplaceUserEmailAddressRequestBody requestBody) { + return replaceForUser(userId, requestBody, Optional.empty()); + } + + /** + * Replace a user's email address + * + *

Replaces all of the user's email addresses with a single primary email address. + * By default the new email address is created verified, with the admin verification strategy. + * When `identification_status` is `reserved` it is created reserved instead: unverified but usable + * for sign-in and locked so no other user can claim it. Any existing email addresses are deleted. + * If an existing email address is linked to a connected account, the request is rejected; remove + * the connected account first. + * + * @param userId The ID of the user whose email address to replace + * @param requestBody + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ReplaceUserEmailAddressResponse replaceForUser( + String userId, ReplaceUserEmailAddressRequestBody requestBody, + Optional options) { + ReplaceUserEmailAddressRequest request = + ReplaceUserEmailAddressRequest + .builder() + .userId(userId) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new ReplaceUserEmailAddress.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/com/clerk/backend_api/EnterpriseConnections.java b/src/main/java/com/clerk/backend_api/EnterpriseConnections.java index 8854cd6a..b798ae75 100644 --- a/src/main/java/com/clerk/backend_api/EnterpriseConnections.java +++ b/src/main/java/com/clerk/backend_api/EnterpriseConnections.java @@ -8,12 +8,19 @@ import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionRequestBody; import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionRequestBuilder; import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionResponse; +import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionTestRunRequest; +import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionTestRunRequestBuilder; +import com.clerk.backend_api.models.operations.CreateEnterpriseConnectionTestRunResponse; import com.clerk.backend_api.models.operations.DeleteEnterpriseConnectionRequest; import com.clerk.backend_api.models.operations.DeleteEnterpriseConnectionRequestBuilder; import com.clerk.backend_api.models.operations.DeleteEnterpriseConnectionResponse; import com.clerk.backend_api.models.operations.GetEnterpriseConnectionRequest; import com.clerk.backend_api.models.operations.GetEnterpriseConnectionRequestBuilder; import com.clerk.backend_api.models.operations.GetEnterpriseConnectionResponse; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsQueryParamStatus; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsRequest; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsRequestBuilder; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsResponse; import com.clerk.backend_api.models.operations.ListEnterpriseConnectionsRequest; import com.clerk.backend_api.models.operations.ListEnterpriseConnectionsRequestBuilder; import com.clerk.backend_api.models.operations.ListEnterpriseConnectionsResponse; @@ -22,8 +29,10 @@ import com.clerk.backend_api.models.operations.UpdateEnterpriseConnectionRequestBuilder; import com.clerk.backend_api.models.operations.UpdateEnterpriseConnectionResponse; import com.clerk.backend_api.operations.CreateEnterpriseConnection; +import com.clerk.backend_api.operations.CreateEnterpriseConnectionTestRun; import com.clerk.backend_api.operations.DeleteEnterpriseConnection; import com.clerk.backend_api.operations.GetEnterpriseConnection; +import com.clerk.backend_api.operations.ListEnterpriseConnectionTestRuns; import com.clerk.backend_api.operations.ListEnterpriseConnections; import com.clerk.backend_api.operations.UpdateEnterpriseConnection; import com.clerk.backend_api.utils.Headers; @@ -31,6 +40,7 @@ import java.lang.Boolean; import java.lang.Long; import java.lang.String; +import java.util.List; import java.util.Optional; @@ -299,4 +309,107 @@ public DeleteEnterpriseConnectionResponse delete(String enterpriseConnectionId, return operation.handleResponse(operation.doRequest(request)); } + /** + * List enterprise connection test runs + * + *

Returns a paginated list of SAML or OIDC debug test runs for an enterprise connection. + * + * @return The call builder + */ + public ListEnterpriseConnectionTestRunsRequestBuilder listTestRuns() { + return new ListEnterpriseConnectionTestRunsRequestBuilder(sdkConfiguration); + } + + /** + * List enterprise connection test runs + * + *

Returns a paginated list of SAML or OIDC debug test runs for an enterprise connection. + * + * @param enterpriseConnectionId The ID of the enterprise connection + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ListEnterpriseConnectionTestRunsResponse listTestRuns(String enterpriseConnectionId) { + return listTestRuns(enterpriseConnectionId, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * List enterprise connection test runs + * + *

Returns a paginated list of SAML or OIDC debug test runs for an enterprise connection. + * + * @param enterpriseConnectionId The ID of the enterprise connection + * @param status Filter test runs by status (may be repeated) + * @param limit Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + * @param offset Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ListEnterpriseConnectionTestRunsResponse listTestRuns( + String enterpriseConnectionId, Optional> status, + Optional limit, Optional offset, + Optional options) { + ListEnterpriseConnectionTestRunsRequest request = + ListEnterpriseConnectionTestRunsRequest + .builder() + .enterpriseConnectionId(enterpriseConnectionId) + .status(status) + .limit(limit) + .offset(offset) + .build(); + RequestOperation operation + = new ListEnterpriseConnectionTestRuns.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create an enterprise connection test run + * + *

Returns a short-lived URL that starts the IdP test flow for this connection. + * + * @return The call builder + */ + public CreateEnterpriseConnectionTestRunRequestBuilder createTestRun() { + return new CreateEnterpriseConnectionTestRunRequestBuilder(sdkConfiguration); + } + + /** + * Create an enterprise connection test run + * + *

Returns a short-lived URL that starts the IdP test flow for this connection. + * + * @param enterpriseConnectionId The ID of the enterprise connection + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public CreateEnterpriseConnectionTestRunResponse createTestRun(String enterpriseConnectionId) { + return createTestRun(enterpriseConnectionId, Optional.empty()); + } + + /** + * Create an enterprise connection test run + * + *

Returns a short-lived URL that starts the IdP test flow for this connection. + * + * @param enterpriseConnectionId The ID of the enterprise connection + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public CreateEnterpriseConnectionTestRunResponse createTestRun(String enterpriseConnectionId, Optional options) { + CreateEnterpriseConnectionTestRunRequest request = + CreateEnterpriseConnectionTestRunRequest + .builder() + .enterpriseConnectionId(enterpriseConnectionId) + .build(); + RequestOperation operation + = new CreateEnterpriseConnectionTestRun.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/com/clerk/backend_api/InstanceSettings.java b/src/main/java/com/clerk/backend_api/InstanceSettings.java index bac846fc..87efcf77 100644 --- a/src/main/java/com/clerk/backend_api/InstanceSettings.java +++ b/src/main/java/com/clerk/backend_api/InstanceSettings.java @@ -9,12 +9,19 @@ import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainRequestBody; import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainRequestBuilder; import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainResponse; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationRequestBuilder; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse; import com.clerk.backend_api.models.operations.GetInstanceOAuthApplicationSettingsRequestBuilder; import com.clerk.backend_api.models.operations.GetInstanceOAuthApplicationSettingsResponse; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsRequestBuilder; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse; import com.clerk.backend_api.models.operations.GetInstanceProtectRequestBuilder; import com.clerk.backend_api.models.operations.GetInstanceProtectResponse; import com.clerk.backend_api.models.operations.GetInstanceRequestBuilder; import com.clerk.backend_api.models.operations.GetInstanceResponse; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationRequestBody; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationRequestBuilder; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse; import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsRequestBody; import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsRequestBuilder; import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsResponse; @@ -32,9 +39,12 @@ import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse; import com.clerk.backend_api.operations.ChangeProductionInstanceDomain; import com.clerk.backend_api.operations.GetInstance; +import com.clerk.backend_api.operations.GetInstanceCommunication; import com.clerk.backend_api.operations.GetInstanceOAuthApplicationSettings; +import com.clerk.backend_api.operations.GetInstanceOrganizationSettings; import com.clerk.backend_api.operations.GetInstanceProtect; import com.clerk.backend_api.operations.UpdateInstance; +import com.clerk.backend_api.operations.UpdateInstanceCommunication; import com.clerk.backend_api.operations.UpdateInstanceOAuthApplicationSettings; import com.clerk.backend_api.operations.UpdateInstanceOrganizationSettings; import com.clerk.backend_api.operations.UpdateInstanceProtect; @@ -170,6 +180,92 @@ public UpdateInstanceRestrictionsResponse updateRestrictions(OptionalRetrieves the per-instance SMS communication settings, including the SMS country blocklist. + * + * @return The call builder + */ + public GetInstanceCommunicationRequestBuilder getCommunication() { + return new GetInstanceCommunicationRequestBuilder(sdkConfiguration); + } + + /** + * Get instance communication settings + * + *

Retrieves the per-instance SMS communication settings, including the SMS country blocklist. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceCommunicationResponse getCommunicationDirect() { + return getCommunication(Optional.empty()); + } + + /** + * Get instance communication settings + * + *

Retrieves the per-instance SMS communication settings, including the SMS country blocklist. + * + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceCommunicationResponse getCommunication(Optional options) { + RequestlessOperation operation + = new GetInstanceCommunication.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Update instance communication settings + * + *

Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 + * alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier + * countries are silently dropped from the persisted list. Omitting `blocked_country_codes` + * is a no-op. + * + * @return The call builder + */ + public UpdateInstanceCommunicationRequestBuilder updateCommunication() { + return new UpdateInstanceCommunicationRequestBuilder(sdkConfiguration); + } + + /** + * Update instance communication settings + * + *

Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 + * alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier + * countries are silently dropped from the persisted list. Omitting `blocked_country_codes` + * is a no-op. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public UpdateInstanceCommunicationResponse updateCommunicationDirect() { + return updateCommunication(Optional.empty(), Optional.empty()); + } + + /** + * Update instance communication settings + * + *

Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 + * alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier + * countries are silently dropped from the persisted list. Omitting `blocked_country_codes` + * is a no-op. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public UpdateInstanceCommunicationResponse updateCommunication(Optional request, Optional options) { + RequestOperation, UpdateInstanceCommunicationResponse> operation + = new UpdateInstanceCommunication.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Get OAuth application settings * @@ -313,6 +409,44 @@ public ChangeProductionInstanceDomainResponse changeDomain(OptionalRetrieves the organization settings of the instance + * + * @return The call builder + */ + public GetInstanceOrganizationSettingsRequestBuilder getOrganizationSettings() { + return new GetInstanceOrganizationSettingsRequestBuilder(sdkConfiguration); + } + + /** + * Get instance organization settings + * + *

Retrieves the organization settings of the instance + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceOrganizationSettingsResponse getOrganizationSettingsDirect() { + return getOrganizationSettings(Optional.empty()); + } + + /** + * Get instance organization settings + * + *

Retrieves the organization settings of the instance + * + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceOrganizationSettingsResponse getOrganizationSettings(Optional options) { + RequestlessOperation operation + = new GetInstanceOrganizationSettings.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest()); + } + /** * Update instance organization settings * diff --git a/src/main/java/com/clerk/backend_api/OrganizationDomains.java b/src/main/java/com/clerk/backend_api/OrganizationDomains.java index 275fa352..a792850f 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationDomains.java +++ b/src/main/java/com/clerk/backend_api/OrganizationDomains.java @@ -22,11 +22,15 @@ import com.clerk.backend_api.models.operations.UpdateOrganizationDomainRequestBody; import com.clerk.backend_api.models.operations.UpdateOrganizationDomainRequestBuilder; import com.clerk.backend_api.models.operations.UpdateOrganizationDomainResponse; +import com.clerk.backend_api.models.operations.VerifyOrganizationDomainOwnershipRequest; +import com.clerk.backend_api.models.operations.VerifyOrganizationDomainOwnershipRequestBuilder; +import com.clerk.backend_api.models.operations.VerifyOrganizationDomainOwnershipResponse; import com.clerk.backend_api.operations.CreateOrganizationDomain; import com.clerk.backend_api.operations.DeleteOrganizationDomain; import com.clerk.backend_api.operations.ListAllOrganizationDomains; import com.clerk.backend_api.operations.ListOrganizationDomains; import com.clerk.backend_api.operations.UpdateOrganizationDomain; +import com.clerk.backend_api.operations.VerifyOrganizationDomainOwnership; import com.clerk.backend_api.utils.Headers; import com.clerk.backend_api.utils.Options; import java.lang.String; @@ -240,6 +244,77 @@ public DeleteOrganizationDomainResponse delete( return operation.handleResponse(operation.doRequest(request)); } + /** + * Mark an organization domain's ownership as verified + * + *

Flips the organization domain's ownership state to verified via the + * manual override path, bypassing the self-serve TXT DNS challenge. The + * domain row records strategy=`manual_override` and an + * `organization_domain.ownership_verified` audit event is emitted with the + * same strategy. + * + *

Idempotent: re-calling on an already-verified domain returns the current + * ownership state without re-emitting the audit event. + * + * @return The call builder + */ + public VerifyOrganizationDomainOwnershipRequestBuilder verifyOwnership() { + return new VerifyOrganizationDomainOwnershipRequestBuilder(sdkConfiguration); + } + + /** + * Mark an organization domain's ownership as verified + * + *

Flips the organization domain's ownership state to verified via the + * manual override path, bypassing the self-serve TXT DNS challenge. The + * domain row records strategy=`manual_override` and an + * `organization_domain.ownership_verified` audit event is emitted with the + * same strategy. + * + *

Idempotent: re-calling on an already-verified domain returns the current + * ownership state without re-emitting the audit event. + * + * @param organizationId The ID of the organization to which the domain belongs + * @param domainId The ID of the domain + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public VerifyOrganizationDomainOwnershipResponse verifyOwnership(String organizationId, String domainId) { + return verifyOwnership(organizationId, domainId, Optional.empty()); + } + + /** + * Mark an organization domain's ownership as verified + * + *

Flips the organization domain's ownership state to verified via the + * manual override path, bypassing the self-serve TXT DNS challenge. The + * domain row records strategy=`manual_override` and an + * `organization_domain.ownership_verified` audit event is emitted with the + * same strategy. + * + *

Idempotent: re-calling on an already-verified domain returns the current + * ownership state without re-emitting the audit event. + * + * @param organizationId The ID of the organization to which the domain belongs + * @param domainId The ID of the domain + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public VerifyOrganizationDomainOwnershipResponse verifyOwnership( + String organizationId, String domainId, + Optional options) { + VerifyOrganizationDomainOwnershipRequest request = + VerifyOrganizationDomainOwnershipRequest + .builder() + .organizationId(organizationId) + .domainId(domainId) + .build(); + RequestOperation operation + = new VerifyOrganizationDomainOwnership.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * List all organization domains * diff --git a/src/main/java/com/clerk/backend_api/PhoneNumbers.java b/src/main/java/com/clerk/backend_api/PhoneNumbers.java index 9cc7554d..bf9e09be 100644 --- a/src/main/java/com/clerk/backend_api/PhoneNumbers.java +++ b/src/main/java/com/clerk/backend_api/PhoneNumbers.java @@ -5,6 +5,10 @@ import static com.clerk.backend_api.operations.Operations.RequestOperation; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationRequest; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationRequestBody; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationRequestBuilder; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationResponse; import com.clerk.backend_api.models.operations.CreatePhoneNumberRequestBody; import com.clerk.backend_api.models.operations.CreatePhoneNumberRequestBuilder; import com.clerk.backend_api.models.operations.CreatePhoneNumberResponse; @@ -14,13 +18,23 @@ import com.clerk.backend_api.models.operations.GetPhoneNumberRequest; import com.clerk.backend_api.models.operations.GetPhoneNumberRequestBuilder; import com.clerk.backend_api.models.operations.GetPhoneNumberResponse; +import com.clerk.backend_api.models.operations.PreparePhoneNumberVerificationRequest; +import com.clerk.backend_api.models.operations.PreparePhoneNumberVerificationRequestBuilder; +import com.clerk.backend_api.models.operations.PreparePhoneNumberVerificationResponse; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberRequest; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberRequestBody; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberRequestBuilder; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberResponse; import com.clerk.backend_api.models.operations.UpdatePhoneNumberRequest; import com.clerk.backend_api.models.operations.UpdatePhoneNumberRequestBody; import com.clerk.backend_api.models.operations.UpdatePhoneNumberRequestBuilder; import com.clerk.backend_api.models.operations.UpdatePhoneNumberResponse; +import com.clerk.backend_api.operations.AttemptPhoneNumberVerification; import com.clerk.backend_api.operations.CreatePhoneNumber; import com.clerk.backend_api.operations.DeletePhoneNumber; import com.clerk.backend_api.operations.GetPhoneNumber; +import com.clerk.backend_api.operations.PreparePhoneNumberVerification; +import com.clerk.backend_api.operations.ReplaceUserPhoneNumber; import com.clerk.backend_api.operations.UpdatePhoneNumber; import com.clerk.backend_api.utils.Headers; import com.clerk.backend_api.utils.Options; @@ -214,4 +228,203 @@ public UpdatePhoneNumberResponse update( return operation.handleResponse(operation.doRequest(request)); } + /** + * Send a verification code to a phone number + * + *

Sends a one-time code to the given phone number so that a backend can + * verify the user controls it (for example, in a custom, backend-driven + * sign-in flow). The code is tracked on its own verification; confirm it + * with attempt_verification. + * + * @return The call builder + */ + public PreparePhoneNumberVerificationRequestBuilder prepareVerification() { + return new PreparePhoneNumberVerificationRequestBuilder(sdkConfiguration); + } + + /** + * Send a verification code to a phone number + * + *

Sends a one-time code to the given phone number so that a backend can + * verify the user controls it (for example, in a custom, backend-driven + * sign-in flow). The code is tracked on its own verification; confirm it + * with attempt_verification. + * + * @param phoneNumberId The ID of the phone number to send the verification code to + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PreparePhoneNumberVerificationResponse prepareVerification(String phoneNumberId) { + return prepareVerification(phoneNumberId, Optional.empty()); + } + + /** + * Send a verification code to a phone number + * + *

Sends a one-time code to the given phone number so that a backend can + * verify the user controls it (for example, in a custom, backend-driven + * sign-in flow). The code is tracked on its own verification; confirm it + * with attempt_verification. + * + * @param phoneNumberId The ID of the phone number to send the verification code to + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public PreparePhoneNumberVerificationResponse prepareVerification(String phoneNumberId, Optional options) { + PreparePhoneNumberVerificationRequest request = + PreparePhoneNumberVerificationRequest + .builder() + .phoneNumberId(phoneNumberId) + .build(); + RequestOperation operation + = new PreparePhoneNumberVerification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Verify a code sent to a phone number + * + *

Checks a one-time code against the verification identified by + * verification_id, and returns the verification with its updated status + * (`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a + * backend driving its own frontend can react on every attempt — an incorrect + * or expired code is reported through the status, not as an error. Resubmitting + * a verification whose code was already accepted is rejected with a + * `verification_already_verified` error. If the code + * is correct and the phone number is not already verified, it is also marked + * as verified as a side effect (just as it would be in a frontend verification + * flow); an already verified phone number is left unchanged. It never creates + * a session; to sign the user in afterwards, mint a sign-in token. + * + * @return The call builder + */ + public AttemptPhoneNumberVerificationRequestBuilder attemptVerification() { + return new AttemptPhoneNumberVerificationRequestBuilder(sdkConfiguration); + } + + /** + * Verify a code sent to a phone number + * + *

Checks a one-time code against the verification identified by + * verification_id, and returns the verification with its updated status + * (`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a + * backend driving its own frontend can react on every attempt — an incorrect + * or expired code is reported through the status, not as an error. Resubmitting + * a verification whose code was already accepted is rejected with a + * `verification_already_verified` error. If the code + * is correct and the phone number is not already verified, it is also marked + * as verified as a side effect (just as it would be in a frontend verification + * flow); an already verified phone number is left unchanged. It never creates + * a session; to sign the user in afterwards, mint a sign-in token. + * + * @param phoneNumberId The ID of the phone number whose code is being verified + * @param requestBody + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public AttemptPhoneNumberVerificationResponse attemptVerification(String phoneNumberId, AttemptPhoneNumberVerificationRequestBody requestBody) { + return attemptVerification(phoneNumberId, requestBody, Optional.empty()); + } + + /** + * Verify a code sent to a phone number + * + *

Checks a one-time code against the verification identified by + * verification_id, and returns the verification with its updated status + * (`verified`, `unverified`, `expired`, or `failed`) and attempt count, so a + * backend driving its own frontend can react on every attempt — an incorrect + * or expired code is reported through the status, not as an error. Resubmitting + * a verification whose code was already accepted is rejected with a + * `verification_already_verified` error. If the code + * is correct and the phone number is not already verified, it is also marked + * as verified as a side effect (just as it would be in a frontend verification + * flow); an already verified phone number is left unchanged. It never creates + * a session; to sign the user in afterwards, mint a sign-in token. + * + * @param phoneNumberId The ID of the phone number whose code is being verified + * @param requestBody + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public AttemptPhoneNumberVerificationResponse attemptVerification( + String phoneNumberId, AttemptPhoneNumberVerificationRequestBody requestBody, + Optional options) { + AttemptPhoneNumberVerificationRequest request = + AttemptPhoneNumberVerificationRequest + .builder() + .phoneNumberId(phoneNumberId) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new AttemptPhoneNumberVerification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Replace a user's phone number + * + *

Replaces all of the user's phone numbers with a single primary phone number. + * By default the new phone number is created verified, with the admin verification strategy. + * When `identification_status` is `reserved` it is created reserved instead: unverified but usable + * for sign-in and locked so no other user can claim it. The new phone number is never reserved for + * second factor. Any existing phone numbers are deleted; replacing a phone number that is reserved + * for second factor disables the user's MFA. + * + * @return The call builder + */ + public ReplaceUserPhoneNumberRequestBuilder replaceForUser() { + return new ReplaceUserPhoneNumberRequestBuilder(sdkConfiguration); + } + + /** + * Replace a user's phone number + * + *

Replaces all of the user's phone numbers with a single primary phone number. + * By default the new phone number is created verified, with the admin verification strategy. + * When `identification_status` is `reserved` it is created reserved instead: unverified but usable + * for sign-in and locked so no other user can claim it. The new phone number is never reserved for + * second factor. Any existing phone numbers are deleted; replacing a phone number that is reserved + * for second factor disables the user's MFA. + * + * @param userId The ID of the user whose phone number to replace + * @param requestBody + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ReplaceUserPhoneNumberResponse replaceForUser(String userId, ReplaceUserPhoneNumberRequestBody requestBody) { + return replaceForUser(userId, requestBody, Optional.empty()); + } + + /** + * Replace a user's phone number + * + *

Replaces all of the user's phone numbers with a single primary phone number. + * By default the new phone number is created verified, with the admin verification strategy. + * When `identification_status` is `reserved` it is created reserved instead: unverified but usable + * for sign-in and locked so no other user can claim it. The new phone number is never reserved for + * second factor. Any existing phone numbers are deleted; replacing a phone number that is reserved + * for second factor disables the user's MFA. + * + * @param userId The ID of the user whose phone number to replace + * @param requestBody + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ReplaceUserPhoneNumberResponse replaceForUser( + String userId, ReplaceUserPhoneNumberRequestBody requestBody, + Optional options) { + ReplaceUserPhoneNumberRequest request = + ReplaceUserPhoneNumberRequest + .builder() + .userId(userId) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new ReplaceUserPhoneNumber.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + } diff --git a/src/main/java/com/clerk/backend_api/SDKConfiguration.java b/src/main/java/com/clerk/backend_api/SDKConfiguration.java index 03adfd4b..1ec8db49 100644 --- a/src/main/java/com/clerk/backend_api/SDKConfiguration.java +++ b/src/main/java/com/clerk/backend_api/SDKConfiguration.java @@ -16,8 +16,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "2025-11-10"; - public static final String SDK_VERSION = "4.1.5"; - public static final String GEN_VERSION = "2.881.4"; + public static final String SDK_VERSION = "4.1.6"; + public static final String GEN_VERSION = "2.900.1"; private static final String BASE_PACKAGE = "com.clerk.backend_api"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/clerk/backend_api/Users.java b/src/main/java/com/clerk/backend_api/Users.java index fc33fe62..68a64515 100644 --- a/src/main/java/com/clerk/backend_api/Users.java +++ b/src/main/java/com/clerk/backend_api/Users.java @@ -58,6 +58,10 @@ import com.clerk.backend_api.models.operations.LockUserRequestBuilder; import com.clerk.backend_api.models.operations.LockUserResponse; import com.clerk.backend_api.models.operations.QueryParamStatus; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataRequest; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataRequestBody; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataRequestBuilder; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataResponse; import com.clerk.backend_api.models.operations.SetUserPasswordCompromisedRequest; import com.clerk.backend_api.models.operations.SetUserPasswordCompromisedRequestBody; import com.clerk.backend_api.models.operations.SetUserPasswordCompromisedRequestBuilder; @@ -126,6 +130,7 @@ import com.clerk.backend_api.operations.GetUsersCount; import com.clerk.backend_api.operations.InstanceGetOrganizationMemberships; import com.clerk.backend_api.operations.LockUser; +import com.clerk.backend_api.operations.ReplaceUserMetadata; import com.clerk.backend_api.operations.SetUserPasswordCompromised; import com.clerk.backend_api.operations.SetUserProfileImage; import com.clerk.backend_api.operations.UnbanUser; @@ -204,7 +209,10 @@ public GetUserListResponse list(GetUserListRequest request, Optional op * *

Creates a new user. Your user management settings determine how you should setup your user model. * - *

Any email address and phone number created using this method will be marked as verified. + *

By default, any email address and phone number created using this method is marked as verified. Use + * the `email_address_identification_status` and `phone_number_identification_status` arrays to instead + * create some or all of them as reserved (unverified but usable for sign-in and locked so no other + * user can claim them). * *

Note: If you are performing a migration, check out our guide on [zero downtime * migrations](https://clerk.com/docs/deployments/migrate-overview). @@ -223,7 +231,10 @@ public CreateUserRequestBuilder create() { * *

Creates a new user. Your user management settings determine how you should setup your user model. * - *

Any email address and phone number created using this method will be marked as verified. + *

By default, any email address and phone number created using this method is marked as verified. Use + * the `email_address_identification_status` and `phone_number_identification_status` arrays to instead + * create some or all of them as reserved (unverified but usable for sign-in and locked so no other + * user can claim them). * *

Note: If you are performing a migration, check out our guide on [zero downtime * migrations](https://clerk.com/docs/deployments/migrate-overview). @@ -244,7 +255,10 @@ public CreateUserResponse create(CreateUserRequestBody request) { * *

Creates a new user. Your user management settings determine how you should setup your user model. * - *

Any email address and phone number created using this method will be marked as verified. + *

By default, any email address and phone number created using this method is marked as verified. Use + * the `email_address_identification_status` and `phone_number_identification_status` arrays to instead + * create some or all of them as reserved (unverified but usable for sign-in and locked so no other + * user can claim them). * *

Note: If you are performing a migration, check out our guide on [zero downtime * migrations](https://clerk.com/docs/deployments/migrate-overview). @@ -928,6 +942,79 @@ public UpdateUserMetadataResponse updateMetadata( return operation.handleResponse(operation.doRequest(request)); } + /** + * Replace a user's metadata + * + *

Replace a user's metadata attributes with the provided values. + * + *

Unlike `PATCH /v1/users/{user_id}/metadata` (merge semantics), this endpoint + * replaces the supplied metadata columns entirely — the prior contents of each + * supplied column are discarded. Columns omitted from the request body are + * left unchanged. + * + *

Prefer the `PATCH` endpoint for partial updates. Use `PUT` only when you + * explicitly intend to overwrite a metadata column wholesale. + * + * @return The call builder + */ + public ReplaceUserMetadataRequestBuilder replaceMetadata() { + return new ReplaceUserMetadataRequestBuilder(sdkConfiguration); + } + + /** + * Replace a user's metadata + * + *

Replace a user's metadata attributes with the provided values. + * + *

Unlike `PATCH /v1/users/{user_id}/metadata` (merge semantics), this endpoint + * replaces the supplied metadata columns entirely — the prior contents of each + * supplied column are discarded. Columns omitted from the request body are + * left unchanged. + * + *

Prefer the `PATCH` endpoint for partial updates. Use `PUT` only when you + * explicitly intend to overwrite a metadata column wholesale. + * + * @param userId The ID of the user whose metadata will be replaced + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ReplaceUserMetadataResponse replaceMetadata(String userId) { + return replaceMetadata(userId, Optional.empty(), Optional.empty()); + } + + /** + * Replace a user's metadata + * + *

Replace a user's metadata attributes with the provided values. + * + *

Unlike `PATCH /v1/users/{user_id}/metadata` (merge semantics), this endpoint + * replaces the supplied metadata columns entirely — the prior contents of each + * supplied column are discarded. Columns omitted from the request body are + * left unchanged. + * + *

Prefer the `PATCH` endpoint for partial updates. Use `PUT` only when you + * explicitly intend to overwrite a metadata column wholesale. + * + * @param userId The ID of the user whose metadata will be replaced + * @param requestBody + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public ReplaceUserMetadataResponse replaceMetadata( + String userId, Optional requestBody, + Optional options) { + ReplaceUserMetadataRequest request = + ReplaceUserMetadataRequest + .builder() + .userId(userId) + .requestBody(requestBody) + .build(); + RequestOperation operation + = new ReplaceUserMetadata.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Retrieve a user's billing subscription * diff --git a/src/main/java/com/clerk/backend_api/models/components/AffiliationVerification.java b/src/main/java/com/clerk/backend_api/models/components/AffiliationVerification.java new file mode 100644 index 00000000..60e7da13 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/AffiliationVerification.java @@ -0,0 +1,345 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * AffiliationVerification + * + *

Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). + */ +public class AffiliationVerification { + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + @JsonProperty("status") + private String status; + + /** + * Name of the strategy used to verify the domain + */ + @JsonProperty("strategy") + private String strategy; + + /** + * How many attempts have been made to verify the domain + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("attempts") + private Optional attempts; + + /** + * Unix timestamp of when the verification will expire + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("expire_at") + private Optional expireAt; + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("verified_at") + private Optional verifiedAt; + + @JsonCreator + public AffiliationVerification( + @JsonProperty("status") String status, + @JsonProperty("strategy") String strategy, + @JsonProperty("attempts") Optional attempts, + @JsonProperty("expire_at") Optional expireAt, + @JsonProperty("verified_at") Optional verifiedAt) { + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(strategy, "strategy"); + Utils.checkNotNull(attempts, "attempts"); + Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.status = status; + this.strategy = strategy; + this.attempts = attempts; + this.expireAt = expireAt; + this.verifiedAt = verifiedAt; + } + + public AffiliationVerification( + String status, + String strategy) { + this(status, strategy, Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Name of the strategy used to verify the domain + */ + @JsonIgnore + public String strategy() { + return strategy; + } + + /** + * How many attempts have been made to verify the domain + */ + @JsonIgnore + public Optional attempts() { + return attempts; + } + + /** + * Unix timestamp of when the verification will expire + */ + @JsonIgnore + public Optional expireAt() { + return expireAt; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + @JsonIgnore + public Optional verifiedAt() { + return verifiedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + public AffiliationVerification withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Name of the strategy used to verify the domain + */ + public AffiliationVerification withStrategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + /** + * How many attempts have been made to verify the domain + */ + public AffiliationVerification withAttempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + + /** + * How many attempts have been made to verify the domain + */ + public AffiliationVerification withAttempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + /** + * Unix timestamp of when the verification will expire + */ + public AffiliationVerification withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + + /** + * Unix timestamp of when the verification will expire + */ + public AffiliationVerification withExpireAt(Optional expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public AffiliationVerification withVerifiedAt(long verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = Optional.ofNullable(verifiedAt); + return this; + } + + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public AffiliationVerification withVerifiedAt(Optional verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = verifiedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AffiliationVerification other = (AffiliationVerification) o; + return + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.strategy, other.strategy) && + Utils.enhancedDeepEquals(this.attempts, other.attempts) && + Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.verifiedAt, other.verifiedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + status, strategy, attempts, + expireAt, verifiedAt); + } + + @Override + public String toString() { + return Utils.toString(AffiliationVerification.class, + "status", status, + "strategy", strategy, + "attempts", attempts, + "expireAt", expireAt, + "verifiedAt", verifiedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String status; + + private String strategy; + + private Optional attempts = Optional.empty(); + + private Optional expireAt = Optional.empty(); + + private Optional verifiedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Name of the strategy used to verify the domain + */ + public Builder strategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + + /** + * How many attempts have been made to verify the domain + */ + public Builder attempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + /** + * How many attempts have been made to verify the domain + */ + public Builder attempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + + /** + * Unix timestamp of when the verification will expire + */ + public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + /** + * Unix timestamp of when the verification will expire + */ + public Builder expireAt(Optional expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public Builder verifiedAt(long verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = Optional.ofNullable(verifiedAt); + return this; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public Builder verifiedAt(Optional verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = verifiedAt; + return this; + } + + public AffiliationVerification build() { + + return new AffiliationVerification( + status, strategy, attempts, + expireAt, verifiedAt); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptDiscounts.java b/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptDiscounts.java new file mode 100644 index 00000000..595b7536 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptDiscounts.java @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * BillingPaymentAttemptDiscounts + * + *

Information about the discounts applied to the payment + */ +public class BillingPaymentAttemptDiscounts { + /** + * Proration details from passed subscription time + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public BillingPaymentAttemptDiscounts( + @JsonProperty("proration") Optional proration, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.total = total; + } + + public BillingPaymentAttemptDiscounts( + CommerceMoneyResponse total) { + this(Optional.empty(), total); + } + + /** + * Proration details from passed subscription time + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Proration details from passed subscription time + */ + public BillingPaymentAttemptDiscounts withProration(BillingPaymentAttemptTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + /** + * Proration details from passed subscription time + */ + public BillingPaymentAttemptDiscounts withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public BillingPaymentAttemptDiscounts withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillingPaymentAttemptDiscounts other = (BillingPaymentAttemptDiscounts) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, total); + } + + @Override + public String toString() { + return Utils.toString(BillingPaymentAttemptDiscounts.class, + "proration", proration, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + /** + * Proration details from passed subscription time + */ + public Builder proration(BillingPaymentAttemptTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + /** + * Proration details from passed subscription time + */ + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public BillingPaymentAttemptDiscounts build() { + + return new BillingPaymentAttemptDiscounts( + proration, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotals.java b/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotals.java index 97735074..9e3129ae 100644 --- a/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotals.java +++ b/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotals.java @@ -41,33 +41,43 @@ public class BillingPaymentAttemptTotals { @JsonInclude(Include.NON_ABSENT) @JsonProperty("per_unit_totals") - private Optional> perUnitTotals; + private Optional> perUnitTotals; @JsonInclude(Include.NON_ABSENT) @JsonProperty("credits") private JsonNullable credits; + /** + * Information about the discounts applied to the payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discounts") + private JsonNullable discounts; + @JsonCreator public BillingPaymentAttemptTotals( @JsonProperty("subtotal") CommerceMoneyResponse subtotal, @JsonProperty("base_fee") CommerceMoneyResponse baseFee, @JsonProperty("tax_total") CommerceMoneyResponse taxTotal, @JsonProperty("grand_total") CommerceMoneyResponse grandTotal, - @JsonProperty("per_unit_totals") Optional> perUnitTotals, - @JsonProperty("credits") JsonNullable credits) { + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("credits") JsonNullable credits, + @JsonProperty("discounts") JsonNullable discounts) { Utils.checkNotNull(subtotal, "subtotal"); Utils.checkNotNull(baseFee, "baseFee"); Utils.checkNotNull(taxTotal, "taxTotal"); Utils.checkNotNull(grandTotal, "grandTotal"); Utils.checkNotNull(perUnitTotals, "perUnitTotals"); Utils.checkNotNull(credits, "credits"); + Utils.checkNotNull(discounts, "discounts"); this.subtotal = subtotal; this.baseFee = baseFee; this.taxTotal = taxTotal; this.grandTotal = grandTotal; this.perUnitTotals = perUnitTotals; this.credits = credits; + this.discounts = discounts; } public BillingPaymentAttemptTotals( @@ -76,7 +86,8 @@ public BillingPaymentAttemptTotals( CommerceMoneyResponse taxTotal, CommerceMoneyResponse grandTotal) { this(subtotal, baseFee, taxTotal, - grandTotal, Optional.empty(), JsonNullable.undefined()); + grandTotal, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); } @JsonIgnore @@ -101,8 +112,8 @@ public CommerceMoneyResponse grandTotal() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> perUnitTotals() { - return (Optional>) perUnitTotals; + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; } @SuppressWarnings("unchecked") @@ -111,6 +122,15 @@ public JsonNullable credits() { return (JsonNullable) credits; } + /** + * Information about the discounts applied to the payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable discounts() { + return (JsonNullable) discounts; + } + public static Builder builder() { return new Builder(); } @@ -140,14 +160,14 @@ public BillingPaymentAttemptTotals withGrandTotal(CommerceMoneyResponse grandTot return this; } - public BillingPaymentAttemptTotals withPerUnitTotals(List perUnitTotals) { + public BillingPaymentAttemptTotals withPerUnitTotals(List perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = Optional.ofNullable(perUnitTotals); return this; } - public BillingPaymentAttemptTotals withPerUnitTotals(Optional> perUnitTotals) { + public BillingPaymentAttemptTotals withPerUnitTotals(Optional> perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = perUnitTotals; return this; @@ -165,6 +185,24 @@ public BillingPaymentAttemptTotals withCredits(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -180,14 +218,16 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.taxTotal, other.taxTotal) && Utils.enhancedDeepEquals(this.grandTotal, other.grandTotal) && Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && - Utils.enhancedDeepEquals(this.credits, other.credits); + Utils.enhancedDeepEquals(this.credits, other.credits) && + Utils.enhancedDeepEquals(this.discounts, other.discounts); } @Override public int hashCode() { return Utils.enhancedHash( subtotal, baseFee, taxTotal, - grandTotal, perUnitTotals, credits); + grandTotal, perUnitTotals, credits, + discounts); } @Override @@ -198,7 +238,8 @@ public String toString() { "taxTotal", taxTotal, "grandTotal", grandTotal, "perUnitTotals", perUnitTotals, - "credits", credits); + "credits", credits, + "discounts", discounts); } @SuppressWarnings("UnusedReturnValue") @@ -212,10 +253,12 @@ public final static class Builder { private CommerceMoneyResponse grandTotal; - private Optional> perUnitTotals = Optional.empty(); + private Optional> perUnitTotals = Optional.empty(); private JsonNullable credits = JsonNullable.undefined(); + private JsonNullable discounts = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -249,13 +292,13 @@ public Builder grandTotal(CommerceMoneyResponse grandTotal) { } - public Builder perUnitTotals(List perUnitTotals) { + public Builder perUnitTotals(List perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = Optional.ofNullable(perUnitTotals); return this; } - public Builder perUnitTotals(Optional> perUnitTotals) { + public Builder perUnitTotals(Optional> perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = perUnitTotals; return this; @@ -274,11 +317,31 @@ public Builder credits(JsonNullable cred return this; } + + /** + * Information about the discounts applied to the payment + */ + public Builder discounts(BillingPaymentAttemptDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + /** + * Information about the discounts applied to the payment + */ + public Builder discounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + public BillingPaymentAttemptTotals build() { return new BillingPaymentAttemptTotals( subtotal, baseFee, taxTotal, - grandTotal, perUnitTotals, credits); + grandTotal, perUnitTotals, credits, + discounts); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotalsProration.java b/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotalsProration.java new file mode 100644 index 00000000..8b1cf355 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/BillingPaymentAttemptTotalsProration.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + +/** + * BillingPaymentAttemptTotalsProration + * + *

Proration details from passed subscription time + */ +public class BillingPaymentAttemptTotalsProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + /** + * Number of days that have passed in the billing cycle + */ + @JsonProperty("cycle_days_passed") + private long cycleDaysPassed; + + /** + * Total number of days in the billing cycle + */ + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + /** + * Percentage of the billing cycle that has passed + */ + @JsonProperty("cycle_passed_percent") + private double cyclePassedPercent; + + @JsonCreator + public BillingPaymentAttemptTotalsProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_passed") long cycleDaysPassed, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_passed_percent") double cyclePassedPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.amount = amount; + this.cycleDaysPassed = cycleDaysPassed; + this.cycleDaysTotal = cycleDaysTotal; + this.cyclePassedPercent = cyclePassedPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + /** + * Number of days that have passed in the billing cycle + */ + @JsonIgnore + public long cycleDaysPassed() { + return cycleDaysPassed; + } + + /** + * Total number of days in the billing cycle + */ + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + /** + * Percentage of the billing cycle that has passed + */ + @JsonIgnore + public double cyclePassedPercent() { + return cyclePassedPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public BillingPaymentAttemptTotalsProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + /** + * Number of days that have passed in the billing cycle + */ + public BillingPaymentAttemptTotalsProration withCycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + /** + * Total number of days in the billing cycle + */ + public BillingPaymentAttemptTotalsProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + /** + * Percentage of the billing cycle that has passed + */ + public BillingPaymentAttemptTotalsProration withCyclePassedPercent(double cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillingPaymentAttemptTotalsProration other = (BillingPaymentAttemptTotalsProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysPassed, other.cycleDaysPassed) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cyclePassedPercent, other.cyclePassedPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + @Override + public String toString() { + return Utils.toString(BillingPaymentAttemptTotalsProration.class, + "amount", amount, + "cycleDaysPassed", cycleDaysPassed, + "cycleDaysTotal", cycleDaysTotal, + "cyclePassedPercent", cyclePassedPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysPassed; + + private Long cycleDaysTotal; + + private Double cyclePassedPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + /** + * Number of days that have passed in the billing cycle + */ + public Builder cycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + + /** + * Total number of days in the billing cycle + */ + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + /** + * Percentage of the billing cycle that has passed + */ + public Builder cyclePassedPercent(double cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + public BillingPaymentAttemptTotalsProration build() { + + return new BillingPaymentAttemptTotalsProration( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/BillingPriceResponse.java b/src/main/java/com/clerk/backend_api/models/components/BillingPriceResponse.java index c3fbeda4..da4ad935 100644 --- a/src/main/java/com/clerk/backend_api/models/components/BillingPriceResponse.java +++ b/src/main/java/com/clerk/backend_api/models/components/BillingPriceResponse.java @@ -96,6 +96,12 @@ public class BillingPriceResponse { @JsonProperty("created_at") private long createdAt; + /** + * Which billing periods this price supports. + */ + @JsonProperty("supported_billing_periods") + private SupportedBillingPeriods supportedBillingPeriods; + @JsonCreator public BillingPriceResponse( @JsonProperty("object") BillingPriceResponseObject object, @@ -110,7 +116,8 @@ public BillingPriceResponse( @JsonProperty("annual_monthly_fee") Optional annualMonthlyFee, @JsonProperty("description") JsonNullable description, @JsonProperty("is_default") boolean isDefault, - @JsonProperty("created_at") long createdAt) { + @JsonProperty("created_at") long createdAt, + @JsonProperty("supported_billing_periods") SupportedBillingPeriods supportedBillingPeriods) { Utils.checkNotNull(object, "object"); Utils.checkNotNull(id, "id"); Utils.checkNotNull(planId, "planId"); @@ -124,6 +131,7 @@ public BillingPriceResponse( Utils.checkNotNull(description, "description"); Utils.checkNotNull(isDefault, "isDefault"); Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); this.object = object; this.id = id; this.planId = planId; @@ -137,6 +145,7 @@ public BillingPriceResponse( this.description = description; this.isDefault = isDefault; this.createdAt = createdAt; + this.supportedBillingPeriods = supportedBillingPeriods; } public BillingPriceResponse( @@ -149,12 +158,13 @@ public BillingPriceResponse( long amount, long annualMonthlyAmount, boolean isDefault, - long createdAt) { + long createdAt, + SupportedBillingPeriods supportedBillingPeriods) { this(object, id, planId, instanceId, currency, currencySymbol, amount, annualMonthlyAmount, Optional.empty(), Optional.empty(), JsonNullable.undefined(), isDefault, - createdAt); + createdAt, supportedBillingPeriods); } /** @@ -257,6 +267,14 @@ public long createdAt() { return createdAt; } + /** + * Which billing periods this price supports. + */ + @JsonIgnore + public SupportedBillingPeriods supportedBillingPeriods() { + return supportedBillingPeriods; + } + public static Builder builder() { return new Builder(); } @@ -396,6 +414,15 @@ public BillingPriceResponse withCreatedAt(long createdAt) { return this; } + /** + * Which billing periods this price supports. + */ + public BillingPriceResponse withSupportedBillingPeriods(SupportedBillingPeriods supportedBillingPeriods) { + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); + this.supportedBillingPeriods = supportedBillingPeriods; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -418,7 +445,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.annualMonthlyFee, other.annualMonthlyFee) && Utils.enhancedDeepEquals(this.description, other.description) && Utils.enhancedDeepEquals(this.isDefault, other.isDefault) && - Utils.enhancedDeepEquals(this.createdAt, other.createdAt); + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.supportedBillingPeriods, other.supportedBillingPeriods); } @Override @@ -428,7 +456,7 @@ public int hashCode() { instanceId, currency, currencySymbol, amount, annualMonthlyAmount, fee, annualMonthlyFee, description, isDefault, - createdAt); + createdAt, supportedBillingPeriods); } @Override @@ -446,7 +474,8 @@ public String toString() { "annualMonthlyFee", annualMonthlyFee, "description", description, "isDefault", isDefault, - "createdAt", createdAt); + "createdAt", createdAt, + "supportedBillingPeriods", supportedBillingPeriods); } @SuppressWarnings("UnusedReturnValue") @@ -478,6 +507,8 @@ public final static class Builder { private Long createdAt; + private SupportedBillingPeriods supportedBillingPeriods; + private Builder() { // force use of static builder() method } @@ -627,6 +658,16 @@ public Builder createdAt(long createdAt) { return this; } + + /** + * Which billing periods this price supports. + */ + public Builder supportedBillingPeriods(SupportedBillingPeriods supportedBillingPeriods) { + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); + this.supportedBillingPeriods = supportedBillingPeriods; + return this; + } + public BillingPriceResponse build() { return new BillingPriceResponse( @@ -634,7 +675,7 @@ public BillingPriceResponse build() { instanceId, currency, currencySymbol, amount, annualMonthlyAmount, fee, annualMonthlyFee, description, isDefault, - createdAt); + createdAt, supportedBillingPeriods); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotal.java b/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotal.java index cc262dd0..0e84d03e 100644 --- a/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotal.java +++ b/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotal.java @@ -15,19 +15,19 @@ public class CommercePerUnitTotal { /** - * Name of the billable unit (for example, seats) + * Name of the billable unit (for example, `seats`). */ @JsonProperty("name") private String name; /** - * Number of units included in each pricing block + * Number of units included in each pricing block. */ @JsonProperty("block_size") private long blockSize; /** - * Computed totals for each pricing tier + * Computed totals for each pricing tier. */ @JsonProperty("tiers") private List tiers; @@ -46,7 +46,7 @@ public CommercePerUnitTotal( } /** - * Name of the billable unit (for example, seats) + * Name of the billable unit (for example, `seats`). */ @JsonIgnore public String name() { @@ -54,7 +54,7 @@ public String name() { } /** - * Number of units included in each pricing block + * Number of units included in each pricing block. */ @JsonIgnore public long blockSize() { @@ -62,7 +62,7 @@ public long blockSize() { } /** - * Computed totals for each pricing tier + * Computed totals for each pricing tier. */ @JsonIgnore public List tiers() { @@ -75,7 +75,7 @@ public static Builder builder() { /** - * Name of the billable unit (for example, seats) + * Name of the billable unit (for example, `seats`). */ public CommercePerUnitTotal withName(String name) { Utils.checkNotNull(name, "name"); @@ -84,7 +84,7 @@ public CommercePerUnitTotal withName(String name) { } /** - * Number of units included in each pricing block + * Number of units included in each pricing block. */ public CommercePerUnitTotal withBlockSize(long blockSize) { Utils.checkNotNull(blockSize, "blockSize"); @@ -93,7 +93,7 @@ public CommercePerUnitTotal withBlockSize(long blockSize) { } /** - * Computed totals for each pricing tier + * Computed totals for each pricing tier. */ public CommercePerUnitTotal withTiers(List tiers) { Utils.checkNotNull(tiers, "tiers"); @@ -145,7 +145,7 @@ private Builder() { /** - * Name of the billable unit (for example, seats) + * Name of the billable unit (for example, `seats`). */ public Builder name(String name) { Utils.checkNotNull(name, "name"); @@ -155,7 +155,7 @@ public Builder name(String name) { /** - * Number of units included in each pricing block + * Number of units included in each pricing block. */ public Builder blockSize(long blockSize) { Utils.checkNotNull(blockSize, "blockSize"); @@ -165,7 +165,7 @@ public Builder blockSize(long blockSize) { /** - * Computed totals for each pricing tier + * Computed totals for each pricing tier. */ public Builder tiers(List tiers) { Utils.checkNotNull(tiers, "tiers"); diff --git a/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotalTier.java b/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotalTier.java index 395860f8..d409b811 100644 --- a/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotalTier.java +++ b/src/main/java/com/clerk/backend_api/models/components/CommercePerUnitTotalTier.java @@ -17,7 +17,7 @@ public class CommercePerUnitTotalTier { /** - * Units billed in this tier; null means unlimited + * Units billed in this tier; null means unlimited. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("quantity") @@ -51,7 +51,7 @@ public CommercePerUnitTotalTier( } /** - * Units billed in this tier; null means unlimited + * Units billed in this tier; null means unlimited. */ @JsonIgnore public JsonNullable quantity() { @@ -74,7 +74,7 @@ public static Builder builder() { /** - * Units billed in this tier; null means unlimited + * Units billed in this tier; null means unlimited. */ public CommercePerUnitTotalTier withQuantity(long quantity) { Utils.checkNotNull(quantity, "quantity"); @@ -83,7 +83,7 @@ public CommercePerUnitTotalTier withQuantity(long quantity) { } /** - * Units billed in this tier; null means unlimited + * Units billed in this tier; null means unlimited. */ public CommercePerUnitTotalTier withQuantity(JsonNullable quantity) { Utils.checkNotNull(quantity, "quantity"); @@ -147,7 +147,7 @@ private Builder() { /** - * Units billed in this tier; null means unlimited + * Units billed in this tier; null means unlimited. */ public Builder quantity(long quantity) { Utils.checkNotNull(quantity, "quantity"); @@ -156,7 +156,7 @@ public Builder quantity(long quantity) { } /** - * Units billed in this tier; null means unlimited + * Units billed in this tier; null means unlimited. */ public Builder quantity(JsonNullable quantity) { Utils.checkNotNull(quantity, "quantity"); diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemAmount.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemAmount.java index d0060d81..d05fa284 100644 --- a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemAmount.java +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemAmount.java @@ -14,7 +14,8 @@ /** * CommerceSubscriptionItemAmount * - *

Amount for the next payment. + *

Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public class CommerceSubscriptionItemAmount { /** diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemDiscounts.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemDiscounts.java new file mode 100644 index 00000000..c82079f6 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemDiscounts.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CommerceSubscriptionItemDiscounts { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public CommerceSubscriptionItemDiscounts( + @JsonProperty("proration") Optional proration, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.total = total; + } + + public CommerceSubscriptionItemDiscounts( + CommerceMoneyResponse total) { + this(Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemDiscounts withProration(CommerceSubscriptionItemNextPaymentProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public CommerceSubscriptionItemDiscounts withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public CommerceSubscriptionItemDiscounts withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemDiscounts other = (CommerceSubscriptionItemDiscounts) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, total); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemDiscounts.class, + "proration", proration, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(CommerceSubscriptionItemNextPaymentProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public CommerceSubscriptionItemDiscounts build() { + + return new CommerceSubscriptionItemDiscounts( + proration, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentCredits.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentCredits.java new file mode 100644 index 00000000..f2c2fab9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentCredits.java @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CommerceSubscriptionItemNextPaymentCredits { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("payer") + private Optional payer; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public CommerceSubscriptionItemNextPaymentCredits( + @JsonProperty("proration") Optional proration, + @JsonProperty("payer") Optional payer, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(payer, "payer"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.payer = payer; + this.total = total; + } + + public CommerceSubscriptionItemNextPaymentCredits( + CommerceMoneyResponse total) { + this(Optional.empty(), Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional payer() { + return (Optional) payer; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemNextPaymentCredits withProration(CommerceSubscriptionItemNextPaymentTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public CommerceSubscriptionItemNextPaymentCredits withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public CommerceSubscriptionItemNextPaymentCredits withPayer(CommerceSubscriptionItemNextPaymentPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + + public CommerceSubscriptionItemNextPaymentCredits withPayer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + public CommerceSubscriptionItemNextPaymentCredits withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemNextPaymentCredits other = (CommerceSubscriptionItemNextPaymentCredits) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.payer, other.payer) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, payer, total); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemNextPaymentCredits.class, + "proration", proration, + "payer", payer, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private Optional payer = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(CommerceSubscriptionItemNextPaymentTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder payer(CommerceSubscriptionItemNextPaymentPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + public Builder payer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public CommerceSubscriptionItemNextPaymentCredits build() { + + return new CommerceSubscriptionItemNextPaymentCredits( + proration, payer, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentPayer.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentPayer.java new file mode 100644 index 00000000..966c3c2b --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentPayer.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class CommerceSubscriptionItemNextPaymentPayer { + + @JsonProperty("remaining_balance") + private CommerceMoneyResponse remainingBalance; + + + @JsonProperty("applied_amount") + private CommerceMoneyResponse appliedAmount; + + @JsonCreator + public CommerceSubscriptionItemNextPaymentPayer( + @JsonProperty("remaining_balance") CommerceMoneyResponse remainingBalance, + @JsonProperty("applied_amount") CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.remainingBalance = remainingBalance; + this.appliedAmount = appliedAmount; + } + + @JsonIgnore + public CommerceMoneyResponse remainingBalance() { + return remainingBalance; + } + + @JsonIgnore + public CommerceMoneyResponse appliedAmount() { + return appliedAmount; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemNextPaymentPayer withRemainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + public CommerceSubscriptionItemNextPaymentPayer withAppliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemNextPaymentPayer other = (CommerceSubscriptionItemNextPaymentPayer) o; + return + Utils.enhancedDeepEquals(this.remainingBalance, other.remainingBalance) && + Utils.enhancedDeepEquals(this.appliedAmount, other.appliedAmount); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + remainingBalance, appliedAmount); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemNextPaymentPayer.class, + "remainingBalance", remainingBalance, + "appliedAmount", appliedAmount); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse remainingBalance; + + private CommerceMoneyResponse appliedAmount; + + private Builder() { + // force use of static builder() method + } + + + public Builder remainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + + public Builder appliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + public CommerceSubscriptionItemNextPaymentPayer build() { + + return new CommerceSubscriptionItemNextPaymentPayer( + remainingBalance, appliedAmount); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentProration.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentProration.java new file mode 100644 index 00000000..0ce3e52e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Float; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class CommerceSubscriptionItemNextPaymentProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_passed") + private long cycleDaysPassed; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_passed_percent") + private float cyclePassedPercent; + + @JsonCreator + public CommerceSubscriptionItemNextPaymentProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_passed") long cycleDaysPassed, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_passed_percent") float cyclePassedPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.amount = amount; + this.cycleDaysPassed = cycleDaysPassed; + this.cycleDaysTotal = cycleDaysTotal; + this.cyclePassedPercent = cyclePassedPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysPassed() { + return cycleDaysPassed; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public float cyclePassedPercent() { + return cyclePassedPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemNextPaymentProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public CommerceSubscriptionItemNextPaymentProration withCycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + public CommerceSubscriptionItemNextPaymentProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public CommerceSubscriptionItemNextPaymentProration withCyclePassedPercent(float cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemNextPaymentProration other = (CommerceSubscriptionItemNextPaymentProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysPassed, other.cycleDaysPassed) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cyclePassedPercent, other.cyclePassedPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemNextPaymentProration.class, + "amount", amount, + "cycleDaysPassed", cycleDaysPassed, + "cycleDaysTotal", cycleDaysTotal, + "cyclePassedPercent", cyclePassedPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysPassed; + + private Long cycleDaysTotal; + + private Float cyclePassedPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cyclePassedPercent(float cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + public CommerceSubscriptionItemNextPaymentProration build() { + + return new CommerceSubscriptionItemNextPaymentProration( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.java new file mode 100644 index 00000000..48338eee --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemNextPaymentTotalsProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class CommerceSubscriptionItemNextPaymentTotalsProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_remaining") + private long cycleDaysRemaining; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_remaining_percent") + private double cycleRemainingPercent; + + @JsonCreator + public CommerceSubscriptionItemNextPaymentTotalsProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_remaining") long cycleDaysRemaining, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_remaining_percent") double cycleRemainingPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.amount = amount; + this.cycleDaysRemaining = cycleDaysRemaining; + this.cycleDaysTotal = cycleDaysTotal; + this.cycleRemainingPercent = cycleRemainingPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysRemaining() { + return cycleDaysRemaining; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public double cycleRemainingPercent() { + return cycleRemainingPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemNextPaymentTotalsProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public CommerceSubscriptionItemNextPaymentTotalsProration withCycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + public CommerceSubscriptionItemNextPaymentTotalsProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public CommerceSubscriptionItemNextPaymentTotalsProration withCycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemNextPaymentTotalsProration other = (CommerceSubscriptionItemNextPaymentTotalsProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysRemaining, other.cycleDaysRemaining) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cycleRemainingPercent, other.cycleRemainingPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemNextPaymentTotalsProration.class, + "amount", amount, + "cycleDaysRemaining", cycleDaysRemaining, + "cycleDaysTotal", cycleDaysTotal, + "cycleRemainingPercent", cycleRemainingPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysRemaining; + + private Long cycleDaysTotal; + + private Double cycleRemainingPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + public CommerceSubscriptionItemNextPaymentTotalsProration build() { + + return new CommerceSubscriptionItemNextPaymentTotalsProration( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotals.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotals.java new file mode 100644 index 00000000..d2539ab7 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotals.java @@ -0,0 +1,332 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * CommerceSubscriptionItemTotals + * + *

Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ +public class CommerceSubscriptionItemTotals { + + @JsonProperty("subtotal") + private CommerceMoneyResponse subtotal; + + + @JsonProperty("base_fee") + private CommerceMoneyResponse baseFee; + + + @JsonProperty("tax_total") + private CommerceMoneyResponse taxTotal; + + + @JsonProperty("grand_total") + private CommerceMoneyResponse grandTotal; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("credits") + private JsonNullable credits; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discounts") + private JsonNullable discounts; + + @JsonCreator + public CommerceSubscriptionItemTotals( + @JsonProperty("subtotal") CommerceMoneyResponse subtotal, + @JsonProperty("base_fee") CommerceMoneyResponse baseFee, + @JsonProperty("tax_total") CommerceMoneyResponse taxTotal, + @JsonProperty("grand_total") CommerceMoneyResponse grandTotal, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("credits") JsonNullable credits, + @JsonProperty("discounts") JsonNullable discounts) { + Utils.checkNotNull(subtotal, "subtotal"); + Utils.checkNotNull(baseFee, "baseFee"); + Utils.checkNotNull(taxTotal, "taxTotal"); + Utils.checkNotNull(grandTotal, "grandTotal"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(credits, "credits"); + Utils.checkNotNull(discounts, "discounts"); + this.subtotal = subtotal; + this.baseFee = baseFee; + this.taxTotal = taxTotal; + this.grandTotal = grandTotal; + this.perUnitTotals = perUnitTotals; + this.credits = credits; + this.discounts = discounts; + } + + public CommerceSubscriptionItemTotals( + CommerceMoneyResponse subtotal, + CommerceMoneyResponse baseFee, + CommerceMoneyResponse taxTotal, + CommerceMoneyResponse grandTotal) { + this(subtotal, baseFee, taxTotal, + grandTotal, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); + } + + @JsonIgnore + public CommerceMoneyResponse subtotal() { + return subtotal; + } + + @JsonIgnore + public CommerceMoneyResponse baseFee() { + return baseFee; + } + + @JsonIgnore + public CommerceMoneyResponse taxTotal() { + return taxTotal; + } + + @JsonIgnore + public CommerceMoneyResponse grandTotal() { + return grandTotal; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable credits() { + return (JsonNullable) credits; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable discounts() { + return (JsonNullable) discounts; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemTotals withSubtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + public CommerceSubscriptionItemTotals withBaseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + public CommerceSubscriptionItemTotals withTaxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + public CommerceSubscriptionItemTotals withGrandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + public CommerceSubscriptionItemTotals withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + public CommerceSubscriptionItemTotals withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + public CommerceSubscriptionItemTotals withCredits(CommerceSubscriptionItemNextPaymentCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public CommerceSubscriptionItemTotals withCredits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + public CommerceSubscriptionItemTotals withDiscounts(CommerceSubscriptionItemDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + public CommerceSubscriptionItemTotals withDiscounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemTotals other = (CommerceSubscriptionItemTotals) o; + return + Utils.enhancedDeepEquals(this.subtotal, other.subtotal) && + Utils.enhancedDeepEquals(this.baseFee, other.baseFee) && + Utils.enhancedDeepEquals(this.taxTotal, other.taxTotal) && + Utils.enhancedDeepEquals(this.grandTotal, other.grandTotal) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.credits, other.credits) && + Utils.enhancedDeepEquals(this.discounts, other.discounts); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemTotals.class, + "subtotal", subtotal, + "baseFee", baseFee, + "taxTotal", taxTotal, + "grandTotal", grandTotal, + "perUnitTotals", perUnitTotals, + "credits", credits, + "discounts", discounts); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse subtotal; + + private CommerceMoneyResponse baseFee; + + private CommerceMoneyResponse taxTotal; + + private CommerceMoneyResponse grandTotal; + + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable credits = JsonNullable.undefined(); + + private JsonNullable discounts = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder subtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + + public Builder baseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + + public Builder taxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + + public Builder grandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + public Builder credits(CommerceSubscriptionItemNextPaymentCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public Builder credits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + + public Builder discounts(CommerceSubscriptionItemDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + public Builder discounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + public CommerceSubscriptionItemTotals build() { + + return new CommerceSubscriptionItemTotals( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotalsProration.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotalsProration.java new file mode 100644 index 00000000..69dbdc00 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionItemTotalsProration.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + +/** + * CommerceSubscriptionItemTotalsProration + * + *

Proration details from passed subscription time + */ +public class CommerceSubscriptionItemTotalsProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + /** + * Number of days that have passed in the billing cycle + */ + @JsonProperty("cycle_days_passed") + private long cycleDaysPassed; + + /** + * Total number of days in the billing cycle + */ + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + /** + * Percentage of the billing cycle that has passed + */ + @JsonProperty("cycle_passed_percent") + private double cyclePassedPercent; + + @JsonCreator + public CommerceSubscriptionItemTotalsProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_passed") long cycleDaysPassed, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_passed_percent") double cyclePassedPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.amount = amount; + this.cycleDaysPassed = cycleDaysPassed; + this.cycleDaysTotal = cycleDaysTotal; + this.cyclePassedPercent = cyclePassedPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + /** + * Number of days that have passed in the billing cycle + */ + @JsonIgnore + public long cycleDaysPassed() { + return cycleDaysPassed; + } + + /** + * Total number of days in the billing cycle + */ + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + /** + * Percentage of the billing cycle that has passed + */ + @JsonIgnore + public double cyclePassedPercent() { + return cyclePassedPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionItemTotalsProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + /** + * Number of days that have passed in the billing cycle + */ + public CommerceSubscriptionItemTotalsProration withCycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + /** + * Total number of days in the billing cycle + */ + public CommerceSubscriptionItemTotalsProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + /** + * Percentage of the billing cycle that has passed + */ + public CommerceSubscriptionItemTotalsProration withCyclePassedPercent(double cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionItemTotalsProration other = (CommerceSubscriptionItemTotalsProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysPassed, other.cycleDaysPassed) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cyclePassedPercent, other.cyclePassedPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionItemTotalsProration.class, + "amount", amount, + "cycleDaysPassed", cycleDaysPassed, + "cycleDaysTotal", cycleDaysTotal, + "cyclePassedPercent", cyclePassedPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysPassed; + + private Long cycleDaysTotal; + + private Double cyclePassedPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + /** + * Number of days that have passed in the billing cycle + */ + public Builder cycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + + /** + * Total number of days in the billing cycle + */ + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + /** + * Percentage of the billing cycle that has passed + */ + public Builder cyclePassedPercent(double cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + public CommerceSubscriptionItemTotalsProration build() { + + return new CommerceSubscriptionItemTotalsProration( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPayment.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPayment.java index bd80406a..799cfa8e 100644 --- a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPayment.java +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPayment.java @@ -6,10 +6,16 @@ import com.clerk.backend_api.utils.Utils; 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 java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; public class CommerceSubscriptionNextPayment { @@ -23,14 +29,42 @@ public class CommerceSubscriptionNextPayment { @JsonProperty("amount") private CommerceMoneyResponse amount; + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totals") + private JsonNullable totals; + @JsonCreator public CommerceSubscriptionNextPayment( @JsonProperty("date") long date, - @JsonProperty("amount") CommerceMoneyResponse amount) { + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("totals") JsonNullable totals) { Utils.checkNotNull(date, "date"); Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(totals, "totals"); this.date = date; this.amount = amount; + this.perUnitTotals = perUnitTotals; + this.totals = totals; + } + + public CommerceSubscriptionNextPayment( + long date, + CommerceMoneyResponse amount) { + this(date, amount, Optional.empty(), + JsonNullable.undefined()); } /** @@ -46,6 +80,25 @@ public CommerceMoneyResponse amount() { return amount; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable totals() { + return (JsonNullable) totals; + } + public static Builder builder() { return new Builder(); } @@ -66,6 +119,45 @@ public CommerceSubscriptionNextPayment withAmount(CommerceMoneyResponse amount) return this; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public CommerceSubscriptionNextPayment withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public CommerceSubscriptionNextPayment withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public CommerceSubscriptionNextPayment withTotals(CommerceSubscriptionNextPaymentTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public CommerceSubscriptionNextPayment withTotals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -77,20 +169,25 @@ public boolean equals(java.lang.Object o) { CommerceSubscriptionNextPayment other = (CommerceSubscriptionNextPayment) o; return Utils.enhancedDeepEquals(this.date, other.date) && - Utils.enhancedDeepEquals(this.amount, other.amount); + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.totals, other.totals); } @Override public int hashCode() { return Utils.enhancedHash( - date, amount); + date, amount, perUnitTotals, + totals); } @Override public String toString() { return Utils.toString(CommerceSubscriptionNextPayment.class, "date", date, - "amount", amount); + "amount", amount, + "perUnitTotals", perUnitTotals, + "totals", totals); } @SuppressWarnings("UnusedReturnValue") @@ -100,6 +197,10 @@ public final static class Builder { private CommerceMoneyResponse amount; + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable totals = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -121,10 +222,51 @@ public Builder amount(CommerceMoneyResponse amount) { return this; } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(CommerceSubscriptionNextPaymentTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + public CommerceSubscriptionNextPayment build() { return new CommerceSubscriptionNextPayment( - date, amount); + date, amount, perUnitTotals, + totals); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentCredits.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentCredits.java new file mode 100644 index 00000000..d16b741a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentCredits.java @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class CommerceSubscriptionNextPaymentCredits { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("payer") + private Optional payer; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public CommerceSubscriptionNextPaymentCredits( + @JsonProperty("proration") Optional proration, + @JsonProperty("payer") Optional payer, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(payer, "payer"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.payer = payer; + this.total = total; + } + + public CommerceSubscriptionNextPaymentCredits( + CommerceMoneyResponse total) { + this(Optional.empty(), Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional payer() { + return (Optional) payer; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionNextPaymentCredits withProration(CommerceSubscriptionNextPaymentProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public CommerceSubscriptionNextPaymentCredits withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public CommerceSubscriptionNextPaymentCredits withPayer(CommerceSubscriptionNextPaymentPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + + public CommerceSubscriptionNextPaymentCredits withPayer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + public CommerceSubscriptionNextPaymentCredits withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionNextPaymentCredits other = (CommerceSubscriptionNextPaymentCredits) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.payer, other.payer) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, payer, total); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionNextPaymentCredits.class, + "proration", proration, + "payer", payer, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private Optional payer = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(CommerceSubscriptionNextPaymentProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder payer(CommerceSubscriptionNextPaymentPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + public Builder payer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public CommerceSubscriptionNextPaymentCredits build() { + + return new CommerceSubscriptionNextPaymentCredits( + proration, payer, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentDiscounts.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentDiscounts.java new file mode 100644 index 00000000..9c9e2d39 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentDiscounts.java @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * CommerceSubscriptionNextPaymentDiscounts + * + *

Information about the discounts applied to the payment + */ +public class CommerceSubscriptionNextPaymentDiscounts { + /** + * Proration details from passed subscription time + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public CommerceSubscriptionNextPaymentDiscounts( + @JsonProperty("proration") Optional proration, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.total = total; + } + + public CommerceSubscriptionNextPaymentDiscounts( + CommerceMoneyResponse total) { + this(Optional.empty(), total); + } + + /** + * Proration details from passed subscription time + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Proration details from passed subscription time + */ + public CommerceSubscriptionNextPaymentDiscounts withProration(CommerceSubscriptionNextPaymentTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + /** + * Proration details from passed subscription time + */ + public CommerceSubscriptionNextPaymentDiscounts withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public CommerceSubscriptionNextPaymentDiscounts withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionNextPaymentDiscounts other = (CommerceSubscriptionNextPaymentDiscounts) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, total); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionNextPaymentDiscounts.class, + "proration", proration, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + /** + * Proration details from passed subscription time + */ + public Builder proration(CommerceSubscriptionNextPaymentTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + /** + * Proration details from passed subscription time + */ + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public CommerceSubscriptionNextPaymentDiscounts build() { + + return new CommerceSubscriptionNextPaymentDiscounts( + proration, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentPayer.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentPayer.java new file mode 100644 index 00000000..a3e827e9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentPayer.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class CommerceSubscriptionNextPaymentPayer { + + @JsonProperty("remaining_balance") + private CommerceMoneyResponse remainingBalance; + + + @JsonProperty("applied_amount") + private CommerceMoneyResponse appliedAmount; + + @JsonCreator + public CommerceSubscriptionNextPaymentPayer( + @JsonProperty("remaining_balance") CommerceMoneyResponse remainingBalance, + @JsonProperty("applied_amount") CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.remainingBalance = remainingBalance; + this.appliedAmount = appliedAmount; + } + + @JsonIgnore + public CommerceMoneyResponse remainingBalance() { + return remainingBalance; + } + + @JsonIgnore + public CommerceMoneyResponse appliedAmount() { + return appliedAmount; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionNextPaymentPayer withRemainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + public CommerceSubscriptionNextPaymentPayer withAppliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionNextPaymentPayer other = (CommerceSubscriptionNextPaymentPayer) o; + return + Utils.enhancedDeepEquals(this.remainingBalance, other.remainingBalance) && + Utils.enhancedDeepEquals(this.appliedAmount, other.appliedAmount); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + remainingBalance, appliedAmount); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionNextPaymentPayer.class, + "remainingBalance", remainingBalance, + "appliedAmount", appliedAmount); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse remainingBalance; + + private CommerceMoneyResponse appliedAmount; + + private Builder() { + // force use of static builder() method + } + + + public Builder remainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + + public Builder appliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + public CommerceSubscriptionNextPaymentPayer build() { + + return new CommerceSubscriptionNextPaymentPayer( + remainingBalance, appliedAmount); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentProration.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentProration.java new file mode 100644 index 00000000..6e7d2c94 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class CommerceSubscriptionNextPaymentProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_remaining") + private long cycleDaysRemaining; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_remaining_percent") + private double cycleRemainingPercent; + + @JsonCreator + public CommerceSubscriptionNextPaymentProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_remaining") long cycleDaysRemaining, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_remaining_percent") double cycleRemainingPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.amount = amount; + this.cycleDaysRemaining = cycleDaysRemaining; + this.cycleDaysTotal = cycleDaysTotal; + this.cycleRemainingPercent = cycleRemainingPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysRemaining() { + return cycleDaysRemaining; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public double cycleRemainingPercent() { + return cycleRemainingPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionNextPaymentProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public CommerceSubscriptionNextPaymentProration withCycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + public CommerceSubscriptionNextPaymentProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public CommerceSubscriptionNextPaymentProration withCycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionNextPaymentProration other = (CommerceSubscriptionNextPaymentProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysRemaining, other.cycleDaysRemaining) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cycleRemainingPercent, other.cycleRemainingPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionNextPaymentProration.class, + "amount", amount, + "cycleDaysRemaining", cycleDaysRemaining, + "cycleDaysTotal", cycleDaysTotal, + "cycleRemainingPercent", cycleRemainingPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysRemaining; + + private Long cycleDaysTotal; + + private Double cycleRemainingPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + public CommerceSubscriptionNextPaymentProration build() { + + return new CommerceSubscriptionNextPaymentProration( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotals.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotals.java new file mode 100644 index 00000000..67c58898 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotals.java @@ -0,0 +1,349 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * CommerceSubscriptionNextPaymentTotals + * + *

Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ +public class CommerceSubscriptionNextPaymentTotals { + + @JsonProperty("subtotal") + private CommerceMoneyResponse subtotal; + + + @JsonProperty("base_fee") + private CommerceMoneyResponse baseFee; + + + @JsonProperty("tax_total") + private CommerceMoneyResponse taxTotal; + + + @JsonProperty("grand_total") + private CommerceMoneyResponse grandTotal; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("credits") + private JsonNullable credits; + + /** + * Information about the discounts applied to the payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discounts") + private JsonNullable discounts; + + @JsonCreator + public CommerceSubscriptionNextPaymentTotals( + @JsonProperty("subtotal") CommerceMoneyResponse subtotal, + @JsonProperty("base_fee") CommerceMoneyResponse baseFee, + @JsonProperty("tax_total") CommerceMoneyResponse taxTotal, + @JsonProperty("grand_total") CommerceMoneyResponse grandTotal, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("credits") JsonNullable credits, + @JsonProperty("discounts") JsonNullable discounts) { + Utils.checkNotNull(subtotal, "subtotal"); + Utils.checkNotNull(baseFee, "baseFee"); + Utils.checkNotNull(taxTotal, "taxTotal"); + Utils.checkNotNull(grandTotal, "grandTotal"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(credits, "credits"); + Utils.checkNotNull(discounts, "discounts"); + this.subtotal = subtotal; + this.baseFee = baseFee; + this.taxTotal = taxTotal; + this.grandTotal = grandTotal; + this.perUnitTotals = perUnitTotals; + this.credits = credits; + this.discounts = discounts; + } + + public CommerceSubscriptionNextPaymentTotals( + CommerceMoneyResponse subtotal, + CommerceMoneyResponse baseFee, + CommerceMoneyResponse taxTotal, + CommerceMoneyResponse grandTotal) { + this(subtotal, baseFee, taxTotal, + grandTotal, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); + } + + @JsonIgnore + public CommerceMoneyResponse subtotal() { + return subtotal; + } + + @JsonIgnore + public CommerceMoneyResponse baseFee() { + return baseFee; + } + + @JsonIgnore + public CommerceMoneyResponse taxTotal() { + return taxTotal; + } + + @JsonIgnore + public CommerceMoneyResponse grandTotal() { + return grandTotal; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable credits() { + return (JsonNullable) credits; + } + + /** + * Information about the discounts applied to the payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable discounts() { + return (JsonNullable) discounts; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionNextPaymentTotals withSubtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + public CommerceSubscriptionNextPaymentTotals withBaseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + public CommerceSubscriptionNextPaymentTotals withTaxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + public CommerceSubscriptionNextPaymentTotals withGrandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + public CommerceSubscriptionNextPaymentTotals withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + public CommerceSubscriptionNextPaymentTotals withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + public CommerceSubscriptionNextPaymentTotals withCredits(CommerceSubscriptionNextPaymentCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public CommerceSubscriptionNextPaymentTotals withCredits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + /** + * Information about the discounts applied to the payment + */ + public CommerceSubscriptionNextPaymentTotals withDiscounts(CommerceSubscriptionNextPaymentDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + /** + * Information about the discounts applied to the payment + */ + public CommerceSubscriptionNextPaymentTotals withDiscounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionNextPaymentTotals other = (CommerceSubscriptionNextPaymentTotals) o; + return + Utils.enhancedDeepEquals(this.subtotal, other.subtotal) && + Utils.enhancedDeepEquals(this.baseFee, other.baseFee) && + Utils.enhancedDeepEquals(this.taxTotal, other.taxTotal) && + Utils.enhancedDeepEquals(this.grandTotal, other.grandTotal) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.credits, other.credits) && + Utils.enhancedDeepEquals(this.discounts, other.discounts); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionNextPaymentTotals.class, + "subtotal", subtotal, + "baseFee", baseFee, + "taxTotal", taxTotal, + "grandTotal", grandTotal, + "perUnitTotals", perUnitTotals, + "credits", credits, + "discounts", discounts); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse subtotal; + + private CommerceMoneyResponse baseFee; + + private CommerceMoneyResponse taxTotal; + + private CommerceMoneyResponse grandTotal; + + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable credits = JsonNullable.undefined(); + + private JsonNullable discounts = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder subtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + + public Builder baseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + + public Builder taxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + + public Builder grandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + public Builder credits(CommerceSubscriptionNextPaymentCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public Builder credits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + + /** + * Information about the discounts applied to the payment + */ + public Builder discounts(CommerceSubscriptionNextPaymentDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + /** + * Information about the discounts applied to the payment + */ + public Builder discounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + public CommerceSubscriptionNextPaymentTotals build() { + + return new CommerceSubscriptionNextPaymentTotals( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotalsProration.java b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotalsProration.java new file mode 100644 index 00000000..9560e6a5 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CommerceSubscriptionNextPaymentTotalsProration.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + +/** + * CommerceSubscriptionNextPaymentTotalsProration + * + *

Proration details from passed subscription time + */ +public class CommerceSubscriptionNextPaymentTotalsProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + /** + * Number of days that have passed in the billing cycle + */ + @JsonProperty("cycle_days_passed") + private long cycleDaysPassed; + + /** + * Total number of days in the billing cycle + */ + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + /** + * Percentage of the billing cycle that has passed + */ + @JsonProperty("cycle_passed_percent") + private double cyclePassedPercent; + + @JsonCreator + public CommerceSubscriptionNextPaymentTotalsProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_passed") long cycleDaysPassed, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_passed_percent") double cyclePassedPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.amount = amount; + this.cycleDaysPassed = cycleDaysPassed; + this.cycleDaysTotal = cycleDaysTotal; + this.cyclePassedPercent = cyclePassedPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + /** + * Number of days that have passed in the billing cycle + */ + @JsonIgnore + public long cycleDaysPassed() { + return cycleDaysPassed; + } + + /** + * Total number of days in the billing cycle + */ + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + /** + * Percentage of the billing cycle that has passed + */ + @JsonIgnore + public double cyclePassedPercent() { + return cyclePassedPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public CommerceSubscriptionNextPaymentTotalsProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + /** + * Number of days that have passed in the billing cycle + */ + public CommerceSubscriptionNextPaymentTotalsProration withCycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + /** + * Total number of days in the billing cycle + */ + public CommerceSubscriptionNextPaymentTotalsProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + /** + * Percentage of the billing cycle that has passed + */ + public CommerceSubscriptionNextPaymentTotalsProration withCyclePassedPercent(double cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommerceSubscriptionNextPaymentTotalsProration other = (CommerceSubscriptionNextPaymentTotalsProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysPassed, other.cycleDaysPassed) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cyclePassedPercent, other.cyclePassedPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + @Override + public String toString() { + return Utils.toString(CommerceSubscriptionNextPaymentTotalsProration.class, + "amount", amount, + "cycleDaysPassed", cycleDaysPassed, + "cycleDaysTotal", cycleDaysTotal, + "cyclePassedPercent", cyclePassedPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysPassed; + + private Long cycleDaysTotal; + + private Double cyclePassedPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + /** + * Number of days that have passed in the billing cycle + */ + public Builder cycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + + /** + * Total number of days in the billing cycle + */ + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + /** + * Percentage of the billing cycle that has passed + */ + public Builder cyclePassedPercent(double cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + public CommerceSubscriptionNextPaymentTotalsProration build() { + + return new CommerceSubscriptionNextPaymentTotalsProration( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/ConnectionType.java b/src/main/java/com/clerk/backend_api/models/components/ConnectionType.java new file mode 100644 index 00000000..e1a4cd3a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/ConnectionType.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ConnectionType + * + *

The type of enterprise connection the test run was performed against + */ +public enum ConnectionType { + SAML("saml"), + OAUTH("oauth"); + + @JsonValue + private final String value; + + ConnectionType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ConnectionType o: ConnectionType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequest.java b/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequest.java index c8c8b73a..f98fea66 100644 --- a/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequest.java +++ b/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequest.java @@ -14,6 +14,7 @@ import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -53,29 +54,39 @@ public class CreateBillingPriceRequest { @JsonProperty("description") private Optional description; + /** + * Which billing periods this price supports. Inferred from amounts if omitted. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supported_billing_periods") + private Optional supportedBillingPeriods; + @JsonCreator public CreateBillingPriceRequest( @JsonProperty("plan_id") String planId, @JsonProperty("currency") Optional currency, @JsonProperty("amount") Optional amount, @JsonProperty("annual_monthly_amount") JsonNullable annualMonthlyAmount, - @JsonProperty("description") Optional description) { + @JsonProperty("description") Optional description, + @JsonProperty("supported_billing_periods") Optional supportedBillingPeriods) { Utils.checkNotNull(planId, "planId"); Utils.checkNotNull(currency, "currency"); Utils.checkNotNull(amount, "amount"); Utils.checkNotNull(annualMonthlyAmount, "annualMonthlyAmount"); Utils.checkNotNull(description, "description"); + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); this.planId = planId; this.currency = currency; this.amount = amount; this.annualMonthlyAmount = annualMonthlyAmount; this.description = description; + this.supportedBillingPeriods = supportedBillingPeriods; } public CreateBillingPriceRequest( String planId) { this(planId, Optional.empty(), Optional.empty(), - JsonNullable.undefined(), Optional.empty()); + JsonNullable.undefined(), Optional.empty(), Optional.empty()); } /** @@ -118,6 +129,15 @@ public Optional description() { return description; } + /** + * Which billing periods this price supports. Inferred from amounts if omitted. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional supportedBillingPeriods() { + return (Optional) supportedBillingPeriods; + } + public static Builder builder() { return new Builder(); } @@ -207,6 +227,25 @@ public CreateBillingPriceRequest withDescription(Optional description) { return this; } + /** + * Which billing periods this price supports. Inferred from amounts if omitted. + */ + public CreateBillingPriceRequest withSupportedBillingPeriods(CreateBillingPriceRequestSupportedBillingPeriods supportedBillingPeriods) { + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); + this.supportedBillingPeriods = Optional.ofNullable(supportedBillingPeriods); + return this; + } + + + /** + * Which billing periods this price supports. Inferred from amounts if omitted. + */ + public CreateBillingPriceRequest withSupportedBillingPeriods(Optional supportedBillingPeriods) { + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); + this.supportedBillingPeriods = supportedBillingPeriods; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -221,14 +260,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.currency, other.currency) && Utils.enhancedDeepEquals(this.amount, other.amount) && Utils.enhancedDeepEquals(this.annualMonthlyAmount, other.annualMonthlyAmount) && - Utils.enhancedDeepEquals(this.description, other.description); + Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.supportedBillingPeriods, other.supportedBillingPeriods); } @Override public int hashCode() { return Utils.enhancedHash( planId, currency, amount, - annualMonthlyAmount, description); + annualMonthlyAmount, description, supportedBillingPeriods); } @Override @@ -238,7 +278,8 @@ public String toString() { "currency", currency, "amount", amount, "annualMonthlyAmount", annualMonthlyAmount, - "description", description); + "description", description, + "supportedBillingPeriods", supportedBillingPeriods); } @SuppressWarnings("UnusedReturnValue") @@ -254,6 +295,8 @@ public final static class Builder { private Optional description = Optional.empty(); + private Optional supportedBillingPeriods = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -344,6 +387,25 @@ public Builder description(Optional description) { return this; } + + /** + * Which billing periods this price supports. Inferred from amounts if omitted. + */ + public Builder supportedBillingPeriods(CreateBillingPriceRequestSupportedBillingPeriods supportedBillingPeriods) { + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); + this.supportedBillingPeriods = Optional.ofNullable(supportedBillingPeriods); + return this; + } + + /** + * Which billing periods this price supports. Inferred from amounts if omitted. + */ + public Builder supportedBillingPeriods(Optional supportedBillingPeriods) { + Utils.checkNotNull(supportedBillingPeriods, "supportedBillingPeriods"); + this.supportedBillingPeriods = supportedBillingPeriods; + return this; + } + public CreateBillingPriceRequest build() { if (currency == null) { currency = _SINGLETON_VALUE_Currency.value(); @@ -351,7 +413,7 @@ public CreateBillingPriceRequest build() { return new CreateBillingPriceRequest( planId, currency, amount, - annualMonthlyAmount, description); + annualMonthlyAmount, description, supportedBillingPeriods); } diff --git a/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequestSupportedBillingPeriods.java b/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequestSupportedBillingPeriods.java new file mode 100644 index 00000000..81fd3a83 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/CreateBillingPriceRequestSupportedBillingPeriods.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * CreateBillingPriceRequestSupportedBillingPeriods + * + *

Which billing periods this price supports. Inferred from amounts if omitted. + */ +public enum CreateBillingPriceRequestSupportedBillingPeriods { + MONTH("month"), + ANNUAL("annual"), + BOTH("both"); + + @JsonValue + private final String value; + + CreateBillingPriceRequestSupportedBillingPeriods(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (CreateBillingPriceRequestSupportedBillingPeriods o: CreateBillingPriceRequestSupportedBillingPeriods.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/CustomAttributes.java b/src/main/java/com/clerk/backend_api/models/components/CustomAttributes.java index 963ef1d0..8664e8cd 100644 --- a/src/main/java/com/clerk/backend_api/models/components/CustomAttributes.java +++ b/src/main/java/com/clerk/backend_api/models/components/CustomAttributes.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.util.Optional; @@ -41,27 +42,38 @@ public class CustomAttributes { @JsonProperty("scim_path") private Optional scimPath; + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("multi_valued") + private Optional multiValued; + @JsonCreator public CustomAttributes( @JsonProperty("name") String name, @JsonProperty("key") String key, @JsonProperty("sso_path") Optional ssoPath, - @JsonProperty("scim_path") Optional scimPath) { + @JsonProperty("scim_path") Optional scimPath, + @JsonProperty("multi_valued") Optional multiValued) { Utils.checkNotNull(name, "name"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(ssoPath, "ssoPath"); Utils.checkNotNull(scimPath, "scimPath"); + Utils.checkNotNull(multiValued, "multiValued"); this.name = name; this.key = key; this.ssoPath = ssoPath; this.scimPath = scimPath; + this.multiValued = multiValued; } public CustomAttributes( String name, String key) { this(name, key, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -96,6 +108,15 @@ public Optional scimPath() { return scimPath; } + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + @JsonIgnore + public Optional multiValued() { + return multiValued; + } + public static Builder builder() { return new Builder(); } @@ -157,6 +178,27 @@ public CustomAttributes withScimPath(Optional scimPath) { return this; } + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public CustomAttributes withMultiValued(boolean multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = Optional.ofNullable(multiValued); + return this; + } + + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public CustomAttributes withMultiValued(Optional multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = multiValued; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -170,14 +212,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.name, other.name) && Utils.enhancedDeepEquals(this.key, other.key) && Utils.enhancedDeepEquals(this.ssoPath, other.ssoPath) && - Utils.enhancedDeepEquals(this.scimPath, other.scimPath); + Utils.enhancedDeepEquals(this.scimPath, other.scimPath) && + Utils.enhancedDeepEquals(this.multiValued, other.multiValued); } @Override public int hashCode() { return Utils.enhancedHash( name, key, ssoPath, - scimPath); + scimPath, multiValued); } @Override @@ -186,7 +229,8 @@ public String toString() { "name", name, "key", key, "ssoPath", ssoPath, - "scimPath", scimPath); + "scimPath", scimPath, + "multiValued", multiValued); } @SuppressWarnings("UnusedReturnValue") @@ -200,6 +244,8 @@ public final static class Builder { private Optional scimPath = Optional.empty(); + private Optional multiValued = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -262,11 +308,32 @@ public Builder scimPath(Optional scimPath) { return this; } + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public Builder multiValued(boolean multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = Optional.ofNullable(multiValued); + return this; + } + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public Builder multiValued(Optional multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = multiValued; + return this; + } + public CustomAttributes build() { return new CustomAttributes( name, key, ssoPath, - scimPath); + scimPath, multiValued); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Discounts.java b/src/main/java/com/clerk/backend_api/models/components/Discounts.java new file mode 100644 index 00000000..1d26d495 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/Discounts.java @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +/** + * Discounts + * + *

Information about the discounts applied to the payment + */ +public class Discounts { + /** + * Proration details from passed subscription time + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public Discounts( + @JsonProperty("proration") Optional proration, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.total = total; + } + + public Discounts( + CommerceMoneyResponse total) { + this(Optional.empty(), total); + } + + /** + * Proration details from passed subscription time + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Proration details from passed subscription time + */ + public Discounts withProration(CommerceSubscriptionItemTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + /** + * Proration details from passed subscription time + */ + public Discounts withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public Discounts withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Discounts other = (Discounts) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, total); + } + + @Override + public String toString() { + return Utils.toString(Discounts.class, + "proration", proration, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + /** + * Proration details from passed subscription time + */ + public Builder proration(CommerceSubscriptionItemTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + /** + * Proration details from passed subscription time + */ + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public Discounts build() { + + return new Discounts( + proration, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRun.java b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRun.java new file mode 100644 index 00000000..0581a566 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRun.java @@ -0,0 +1,483 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class EnterpriseConnectionTestRun { + /** + * The test run ID + */ + @JsonProperty("id") + private String id; + + /** + * The status of the test run + */ + @JsonProperty("status") + private EnterpriseConnectionTestRunStatus status; + + /** + * The type of enterprise connection the test run was performed against + */ + @JsonProperty("connection_type") + private ConnectionType connectionType; + + /** + * The user information parsed from the IdP response + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parsed_user_info") + private JsonNullable parsedUserInfo; + + /** + * Log entries captured during the test run + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("logs") + private Optional> logs; + + /** + * SAML-specific metadata, present for SAML connections + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("saml") + private JsonNullable saml; + + /** + * OAuth-specific metadata, present for OIDC connections + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("oauth") + private JsonNullable oauth; + + /** + * Unix timestamp in milliseconds when the test run was created + */ + @JsonProperty("created_at") + private long createdAt; + + @JsonCreator + public EnterpriseConnectionTestRun( + @JsonProperty("id") String id, + @JsonProperty("status") EnterpriseConnectionTestRunStatus status, + @JsonProperty("connection_type") ConnectionType connectionType, + @JsonProperty("parsed_user_info") JsonNullable parsedUserInfo, + @JsonProperty("logs") Optional> logs, + @JsonProperty("saml") JsonNullable saml, + @JsonProperty("oauth") JsonNullable oauth, + @JsonProperty("created_at") long createdAt) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(connectionType, "connectionType"); + Utils.checkNotNull(parsedUserInfo, "parsedUserInfo"); + Utils.checkNotNull(logs, "logs"); + Utils.checkNotNull(saml, "saml"); + Utils.checkNotNull(oauth, "oauth"); + Utils.checkNotNull(createdAt, "createdAt"); + this.id = id; + this.status = status; + this.connectionType = connectionType; + this.parsedUserInfo = parsedUserInfo; + this.logs = logs; + this.saml = saml; + this.oauth = oauth; + this.createdAt = createdAt; + } + + public EnterpriseConnectionTestRun( + String id, + EnterpriseConnectionTestRunStatus status, + ConnectionType connectionType, + long createdAt) { + this(id, status, connectionType, + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), createdAt); + } + + /** + * The test run ID + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * The status of the test run + */ + @JsonIgnore + public EnterpriseConnectionTestRunStatus status() { + return status; + } + + /** + * The type of enterprise connection the test run was performed against + */ + @JsonIgnore + public ConnectionType connectionType() { + return connectionType; + } + + /** + * The user information parsed from the IdP response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable parsedUserInfo() { + return (JsonNullable) parsedUserInfo; + } + + /** + * Log entries captured during the test run + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> logs() { + return (Optional>) logs; + } + + /** + * SAML-specific metadata, present for SAML connections + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable saml() { + return (JsonNullable) saml; + } + + /** + * OAuth-specific metadata, present for OIDC connections + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable oauth() { + return (JsonNullable) oauth; + } + + /** + * Unix timestamp in milliseconds when the test run was created + */ + @JsonIgnore + public long createdAt() { + return createdAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The test run ID + */ + public EnterpriseConnectionTestRun withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The status of the test run + */ + public EnterpriseConnectionTestRun withStatus(EnterpriseConnectionTestRunStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The type of enterprise connection the test run was performed against + */ + public EnterpriseConnectionTestRun withConnectionType(ConnectionType connectionType) { + Utils.checkNotNull(connectionType, "connectionType"); + this.connectionType = connectionType; + return this; + } + + /** + * The user information parsed from the IdP response + */ + public EnterpriseConnectionTestRun withParsedUserInfo(ParsedUserInfo parsedUserInfo) { + Utils.checkNotNull(parsedUserInfo, "parsedUserInfo"); + this.parsedUserInfo = JsonNullable.of(parsedUserInfo); + return this; + } + + /** + * The user information parsed from the IdP response + */ + public EnterpriseConnectionTestRun withParsedUserInfo(JsonNullable parsedUserInfo) { + Utils.checkNotNull(parsedUserInfo, "parsedUserInfo"); + this.parsedUserInfo = parsedUserInfo; + return this; + } + + /** + * Log entries captured during the test run + */ + public EnterpriseConnectionTestRun withLogs(List logs) { + Utils.checkNotNull(logs, "logs"); + this.logs = Optional.ofNullable(logs); + return this; + } + + + /** + * Log entries captured during the test run + */ + public EnterpriseConnectionTestRun withLogs(Optional> logs) { + Utils.checkNotNull(logs, "logs"); + this.logs = logs; + return this; + } + + /** + * SAML-specific metadata, present for SAML connections + */ + public EnterpriseConnectionTestRun withSaml(Saml saml) { + Utils.checkNotNull(saml, "saml"); + this.saml = JsonNullable.of(saml); + return this; + } + + /** + * SAML-specific metadata, present for SAML connections + */ + public EnterpriseConnectionTestRun withSaml(JsonNullable saml) { + Utils.checkNotNull(saml, "saml"); + this.saml = saml; + return this; + } + + /** + * OAuth-specific metadata, present for OIDC connections + */ + public EnterpriseConnectionTestRun withOauth(Oauth oauth) { + Utils.checkNotNull(oauth, "oauth"); + this.oauth = JsonNullable.of(oauth); + return this; + } + + /** + * OAuth-specific metadata, present for OIDC connections + */ + public EnterpriseConnectionTestRun withOauth(JsonNullable oauth) { + Utils.checkNotNull(oauth, "oauth"); + this.oauth = oauth; + return this; + } + + /** + * Unix timestamp in milliseconds when the test run was created + */ + public EnterpriseConnectionTestRun withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnterpriseConnectionTestRun other = (EnterpriseConnectionTestRun) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.connectionType, other.connectionType) && + Utils.enhancedDeepEquals(this.parsedUserInfo, other.parsedUserInfo) && + Utils.enhancedDeepEquals(this.logs, other.logs) && + Utils.enhancedDeepEquals(this.saml, other.saml) && + Utils.enhancedDeepEquals(this.oauth, other.oauth) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, status, connectionType, + parsedUserInfo, logs, saml, + oauth, createdAt); + } + + @Override + public String toString() { + return Utils.toString(EnterpriseConnectionTestRun.class, + "id", id, + "status", status, + "connectionType", connectionType, + "parsedUserInfo", parsedUserInfo, + "logs", logs, + "saml", saml, + "oauth", oauth, + "createdAt", createdAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private EnterpriseConnectionTestRunStatus status; + + private ConnectionType connectionType; + + private JsonNullable parsedUserInfo = JsonNullable.undefined(); + + private Optional> logs = Optional.empty(); + + private JsonNullable saml = JsonNullable.undefined(); + + private JsonNullable oauth = JsonNullable.undefined(); + + private Long createdAt; + + private Builder() { + // force use of static builder() method + } + + + /** + * The test run ID + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The status of the test run + */ + public Builder status(EnterpriseConnectionTestRunStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * The type of enterprise connection the test run was performed against + */ + public Builder connectionType(ConnectionType connectionType) { + Utils.checkNotNull(connectionType, "connectionType"); + this.connectionType = connectionType; + return this; + } + + + /** + * The user information parsed from the IdP response + */ + public Builder parsedUserInfo(ParsedUserInfo parsedUserInfo) { + Utils.checkNotNull(parsedUserInfo, "parsedUserInfo"); + this.parsedUserInfo = JsonNullable.of(parsedUserInfo); + return this; + } + + /** + * The user information parsed from the IdP response + */ + public Builder parsedUserInfo(JsonNullable parsedUserInfo) { + Utils.checkNotNull(parsedUserInfo, "parsedUserInfo"); + this.parsedUserInfo = parsedUserInfo; + return this; + } + + + /** + * Log entries captured during the test run + */ + public Builder logs(List logs) { + Utils.checkNotNull(logs, "logs"); + this.logs = Optional.ofNullable(logs); + return this; + } + + /** + * Log entries captured during the test run + */ + public Builder logs(Optional> logs) { + Utils.checkNotNull(logs, "logs"); + this.logs = logs; + return this; + } + + + /** + * SAML-specific metadata, present for SAML connections + */ + public Builder saml(Saml saml) { + Utils.checkNotNull(saml, "saml"); + this.saml = JsonNullable.of(saml); + return this; + } + + /** + * SAML-specific metadata, present for SAML connections + */ + public Builder saml(JsonNullable saml) { + Utils.checkNotNull(saml, "saml"); + this.saml = saml; + return this; + } + + + /** + * OAuth-specific metadata, present for OIDC connections + */ + public Builder oauth(Oauth oauth) { + Utils.checkNotNull(oauth, "oauth"); + this.oauth = JsonNullable.of(oauth); + return this; + } + + /** + * OAuth-specific metadata, present for OIDC connections + */ + public Builder oauth(JsonNullable oauth) { + Utils.checkNotNull(oauth, "oauth"); + this.oauth = oauth; + return this; + } + + + /** + * Unix timestamp in milliseconds when the test run was created + */ + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public EnterpriseConnectionTestRun build() { + + return new EnterpriseConnectionTestRun( + id, status, connectionType, + parsedUserInfo, logs, saml, + oauth, createdAt); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunResponse.java b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunResponse.java new file mode 100644 index 00000000..45f1da21 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunResponse.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + +/** + * EnterpriseConnectionTestRunResponse + * + *

A URL to initiate an enterprise connection test run + */ +public class EnterpriseConnectionTestRunResponse { + /** + * A short-lived URL that can be used to initiate the test run flow + */ + @JsonProperty("url") + private String url; + + @JsonCreator + public EnterpriseConnectionTestRunResponse( + @JsonProperty("url") String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + } + + /** + * A short-lived URL that can be used to initiate the test run flow + */ + @JsonIgnore + public String url() { + return url; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A short-lived URL that can be used to initiate the test run flow + */ + public EnterpriseConnectionTestRunResponse withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnterpriseConnectionTestRunResponse other = (EnterpriseConnectionTestRunResponse) o; + return + Utils.enhancedDeepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + url); + } + + @Override + public String toString() { + return Utils.toString(EnterpriseConnectionTestRunResponse.class, + "url", url); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String url; + + private Builder() { + // force use of static builder() method + } + + + /** + * A short-lived URL that can be used to initiate the test run flow + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public EnterpriseConnectionTestRunResponse build() { + + return new EnterpriseConnectionTestRunResponse( + url); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunStatus.java b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunStatus.java new file mode 100644 index 00000000..2afc8ff9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRunStatus.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * EnterpriseConnectionTestRunStatus + * + *

The status of the test run + */ +public enum EnterpriseConnectionTestRunStatus { + PENDING("pending"), + SUCCESS("success"), + FAILED("failed"); + + @JsonValue + private final String value; + + EnterpriseConnectionTestRunStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (EnterpriseConnectionTestRunStatus o: EnterpriseConnectionTestRunStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRuns.java b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRuns.java new file mode 100644 index 00000000..7f65a2f0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/EnterpriseConnectionTestRuns.java @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; + +/** + * EnterpriseConnectionTestRuns + * + *

A list of enterprise connection test runs + */ +public class EnterpriseConnectionTestRuns { + + @JsonProperty("data") + private List data; + + /** + * Total number of test runs + */ + @JsonProperty("total_count") + private long totalCount; + + @JsonCreator + public EnterpriseConnectionTestRuns( + @JsonProperty("data") List data, + @JsonProperty("total_count") long totalCount) { + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(totalCount, "totalCount"); + this.data = data; + this.totalCount = totalCount; + } + + @JsonIgnore + public List data() { + return data; + } + + /** + * Total number of test runs + */ + @JsonIgnore + public long totalCount() { + return totalCount; + } + + public static Builder builder() { + return new Builder(); + } + + + public EnterpriseConnectionTestRuns withData(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Total number of test runs + */ + public EnterpriseConnectionTestRuns withTotalCount(long totalCount) { + Utils.checkNotNull(totalCount, "totalCount"); + this.totalCount = totalCount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnterpriseConnectionTestRuns other = (EnterpriseConnectionTestRuns) o; + return + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.totalCount, other.totalCount); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + data, totalCount); + } + + @Override + public String toString() { + return Utils.toString(EnterpriseConnectionTestRuns.class, + "data", data, + "totalCount", totalCount); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List data; + + private Long totalCount; + + private Builder() { + // force use of static builder() method + } + + + public Builder data(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Total number of test runs + */ + public Builder totalCount(long totalCount) { + Utils.checkNotNull(totalCount, "totalCount"); + this.totalCount = totalCount; + return this; + } + + public EnterpriseConnectionTestRuns build() { + + return new EnterpriseConnectionTestRuns( + data, totalCount); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/ExternalAccountWithVerificationVerificationTypeIdResolver.java b/src/main/java/com/clerk/backend_api/models/components/ExternalAccountWithVerificationVerificationTypeIdResolver.java index 295d23b3..a69885db 100644 --- a/src/main/java/com/clerk/backend_api/models/components/ExternalAccountWithVerificationVerificationTypeIdResolver.java +++ b/src/main/java/com/clerk/backend_api/models/components/ExternalAccountWithVerificationVerificationTypeIdResolver.java @@ -19,7 +19,7 @@ public ExternalAccountWithVerificationVerificationTypeIdResolver() { } private void initializeTypeMap() { - registerType("verification_oauth", Oauth.class); + registerType("verification_oauth", VerificationOauthVerificationOauth.class); registerType("verification_google_one_tap", GoogleOneTap.class); } diff --git a/src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java new file mode 100644 index 00000000..83252bea --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.List; + +/** + * InstanceCommunication + * + *

Per-instance SMS communication settings, including the SMS country blocklist. + */ +public class InstanceCommunication { + + @JsonProperty("object") + private InstanceCommunicationObject object; + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + @JsonProperty("blocked_country_codes") + private List blockedCountryCodes; + + @JsonCreator + public InstanceCommunication( + @JsonProperty("object") InstanceCommunicationObject object, + @JsonProperty("blocked_country_codes") List blockedCountryCodes) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.object = object; + this.blockedCountryCodes = blockedCountryCodes; + } + + @JsonIgnore + public InstanceCommunicationObject object() { + return object; + } + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + @JsonIgnore + public List blockedCountryCodes() { + return blockedCountryCodes; + } + + public static Builder builder() { + return new Builder(); + } + + + public InstanceCommunication withObject(InstanceCommunicationObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + public InstanceCommunication withBlockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstanceCommunication other = (InstanceCommunication) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.blockedCountryCodes, other.blockedCountryCodes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, blockedCountryCodes); + } + + @Override + public String toString() { + return Utils.toString(InstanceCommunication.class, + "object", object, + "blockedCountryCodes", blockedCountryCodes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private InstanceCommunicationObject object; + + private List blockedCountryCodes; + + private Builder() { + // force use of static builder() method + } + + + public Builder object(InstanceCommunicationObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + public Builder blockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + public InstanceCommunication build() { + + return new InstanceCommunication( + object, blockedCountryCodes); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java new file mode 100644 index 00000000..641bf41f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum InstanceCommunicationObject { + INSTANCE_COMMUNICATION("instance_communication"); + + @JsonValue + private final String value; + + InstanceCommunicationObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (InstanceCommunicationObject o: InstanceCommunicationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/Logs.java b/src/main/java/com/clerk/backend_api/models/components/Logs.java new file mode 100644 index 00000000..d6488ddd --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/Logs.java @@ -0,0 +1,217 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class Logs { + + @JsonProperty("level") + private String level; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private Optional code; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("short_message") + private Optional shortMessage; + + + @JsonProperty("message") + private String message; + + @JsonCreator + public Logs( + @JsonProperty("level") String level, + @JsonProperty("code") Optional code, + @JsonProperty("short_message") Optional shortMessage, + @JsonProperty("message") String message) { + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(shortMessage, "shortMessage"); + Utils.checkNotNull(message, "message"); + this.level = level; + this.code = code; + this.shortMessage = shortMessage; + this.message = message; + } + + public Logs( + String level, + String message) { + this(level, Optional.empty(), Optional.empty(), + message); + } + + @JsonIgnore + public String level() { + return level; + } + + @JsonIgnore + public Optional code() { + return code; + } + + @JsonIgnore + public Optional shortMessage() { + return shortMessage; + } + + @JsonIgnore + public String message() { + return message; + } + + public static Builder builder() { + return new Builder(); + } + + + public Logs withLevel(String level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public Logs withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + + public Logs withCode(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public Logs withShortMessage(String shortMessage) { + Utils.checkNotNull(shortMessage, "shortMessage"); + this.shortMessage = Optional.ofNullable(shortMessage); + return this; + } + + + public Logs withShortMessage(Optional shortMessage) { + Utils.checkNotNull(shortMessage, "shortMessage"); + this.shortMessage = shortMessage; + return this; + } + + public Logs withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Logs other = (Logs) o; + return + Utils.enhancedDeepEquals(this.level, other.level) && + Utils.enhancedDeepEquals(this.code, other.code) && + Utils.enhancedDeepEquals(this.shortMessage, other.shortMessage) && + Utils.enhancedDeepEquals(this.message, other.message); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + level, code, shortMessage, + message); + } + + @Override + public String toString() { + return Utils.toString(Logs.class, + "level", level, + "code", code, + "shortMessage", shortMessage, + "message", message); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String level; + + private Optional code = Optional.empty(); + + private Optional shortMessage = Optional.empty(); + + private String message; + + private Builder() { + // force use of static builder() method + } + + + public Builder level(String level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = Optional.ofNullable(code); + return this; + } + + public Builder code(Optional code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + + public Builder shortMessage(String shortMessage) { + Utils.checkNotNull(shortMessage, "shortMessage"); + this.shortMessage = Optional.ofNullable(shortMessage); + return this; + } + + public Builder shortMessage(Optional shortMessage) { + Utils.checkNotNull(shortMessage, "shortMessage"); + this.shortMessage = shortMessage; + return this; + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public Logs build() { + + return new Logs( + level, code, shortMessage, + message); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/NextInvoice.java b/src/main/java/com/clerk/backend_api/models/components/NextInvoice.java index cc5aac0b..9789270b 100644 --- a/src/main/java/com/clerk/backend_api/models/components/NextInvoice.java +++ b/src/main/java/com/clerk/backend_api/models/components/NextInvoice.java @@ -13,6 +13,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; /** @@ -22,7 +24,8 @@ */ public class NextInvoice { /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("amount") @@ -35,22 +38,45 @@ public class NextInvoice { @JsonProperty("date") private JsonNullable date; + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totals") + private JsonNullable totals; + @JsonCreator public NextInvoice( @JsonProperty("amount") JsonNullable amount, - @JsonProperty("date") JsonNullable date) { + @JsonProperty("date") JsonNullable date, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("totals") JsonNullable totals) { Utils.checkNotNull(amount, "amount"); Utils.checkNotNull(date, "date"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(totals, "totals"); this.amount = amount; this.date = date; + this.perUnitTotals = perUnitTotals; + this.totals = totals; } public NextInvoice() { - this(JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined()); } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -66,13 +92,33 @@ public JsonNullable date() { return date; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable totals() { + return (JsonNullable) totals; + } + public static Builder builder() { return new Builder(); } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public NextInvoice withAmount(SchemasCommerceSubscriptionItemNextInvoiceAmount amount) { Utils.checkNotNull(amount, "amount"); @@ -81,7 +127,8 @@ public NextInvoice withAmount(SchemasCommerceSubscriptionItemNextInvoiceAmount a } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public NextInvoice withAmount(JsonNullable amount) { Utils.checkNotNull(amount, "amount"); @@ -107,6 +154,45 @@ public NextInvoice withDate(JsonNullable date) { return this; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public NextInvoice withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public NextInvoice withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public NextInvoice withTotals(SchemasCommerceSubscriptionItemTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public NextInvoice withTotals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,20 +204,25 @@ public boolean equals(java.lang.Object o) { NextInvoice other = (NextInvoice) o; return Utils.enhancedDeepEquals(this.amount, other.amount) && - Utils.enhancedDeepEquals(this.date, other.date); + Utils.enhancedDeepEquals(this.date, other.date) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.totals, other.totals); } @Override public int hashCode() { return Utils.enhancedHash( - amount, date); + amount, date, perUnitTotals, + totals); } @Override public String toString() { return Utils.toString(NextInvoice.class, "amount", amount, - "date", date); + "date", date, + "perUnitTotals", perUnitTotals, + "totals", totals); } @SuppressWarnings("UnusedReturnValue") @@ -141,13 +232,18 @@ public final static class Builder { private JsonNullable date = JsonNullable.undefined(); + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable totals = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public Builder amount(SchemasCommerceSubscriptionItemNextInvoiceAmount amount) { Utils.checkNotNull(amount, "amount"); @@ -156,7 +252,8 @@ public Builder amount(SchemasCommerceSubscriptionItemNextInvoiceAmount amount) { } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public Builder amount(JsonNullable amount) { Utils.checkNotNull(amount, "amount"); @@ -183,10 +280,51 @@ public Builder date(JsonNullable date) { return this; } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(SchemasCommerceSubscriptionItemTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + public NextInvoice build() { return new NextInvoice( - amount, date); + amount, date, perUnitTotals, + totals); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/NextPayment.java b/src/main/java/com/clerk/backend_api/models/components/NextPayment.java index 0c456e32..c0a95012 100644 --- a/src/main/java/com/clerk/backend_api/models/components/NextPayment.java +++ b/src/main/java/com/clerk/backend_api/models/components/NextPayment.java @@ -13,6 +13,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; /** @@ -22,7 +24,8 @@ */ public class NextPayment { /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("amount") @@ -35,22 +38,45 @@ public class NextPayment { @JsonProperty("date") private JsonNullable date; + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totals") + private JsonNullable totals; + @JsonCreator public NextPayment( @JsonProperty("amount") JsonNullable amount, - @JsonProperty("date") JsonNullable date) { + @JsonProperty("date") JsonNullable date, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("totals") JsonNullable totals) { Utils.checkNotNull(amount, "amount"); Utils.checkNotNull(date, "date"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(totals, "totals"); this.amount = amount; this.date = date; + this.perUnitTotals = perUnitTotals; + this.totals = totals; } public NextPayment() { - this(JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined()); } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -66,13 +92,33 @@ public JsonNullable date() { return date; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable totals() { + return (JsonNullable) totals; + } + public static Builder builder() { return new Builder(); } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public NextPayment withAmount(CommerceSubscriptionItemAmount amount) { Utils.checkNotNull(amount, "amount"); @@ -81,7 +127,8 @@ public NextPayment withAmount(CommerceSubscriptionItemAmount amount) { } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public NextPayment withAmount(JsonNullable amount) { Utils.checkNotNull(amount, "amount"); @@ -107,6 +154,45 @@ public NextPayment withDate(JsonNullable date) { return this; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public NextPayment withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public NextPayment withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public NextPayment withTotals(CommerceSubscriptionItemTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public NextPayment withTotals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,20 +204,25 @@ public boolean equals(java.lang.Object o) { NextPayment other = (NextPayment) o; return Utils.enhancedDeepEquals(this.amount, other.amount) && - Utils.enhancedDeepEquals(this.date, other.date); + Utils.enhancedDeepEquals(this.date, other.date) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.totals, other.totals); } @Override public int hashCode() { return Utils.enhancedHash( - amount, date); + amount, date, perUnitTotals, + totals); } @Override public String toString() { return Utils.toString(NextPayment.class, "amount", amount, - "date", date); + "date", date, + "perUnitTotals", perUnitTotals, + "totals", totals); } @SuppressWarnings("UnusedReturnValue") @@ -141,13 +232,18 @@ public final static class Builder { private JsonNullable date = JsonNullable.undefined(); + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable totals = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public Builder amount(CommerceSubscriptionItemAmount amount) { Utils.checkNotNull(amount, "amount"); @@ -156,7 +252,8 @@ public Builder amount(CommerceSubscriptionItemAmount amount) { } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public Builder amount(JsonNullable amount) { Utils.checkNotNull(amount, "amount"); @@ -183,10 +280,51 @@ public Builder date(JsonNullable date) { return this; } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(CommerceSubscriptionItemTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + public NextPayment build() { return new NextPayment( - amount, date); + amount, date, perUnitTotals, + totals); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Oauth.java b/src/main/java/com/clerk/backend_api/models/components/Oauth.java index 53da109f..d36eab45 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Oauth.java +++ b/src/main/java/com/clerk/backend_api/models/components/Oauth.java @@ -9,129 +9,61 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Long; import java.lang.Override; import java.lang.String; -import java.lang.SuppressWarnings; import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -public class Oauth implements ExternalAccountWithVerificationVerification { +/** + * Oauth + * + *

OAuth-specific metadata, present for OIDC connections + */ +public class Oauth { @JsonInclude(Include.NON_ABSENT) - @JsonProperty("object") - private Optional object; - - - @JsonProperty("status") - private VerificationOauthVerificationStatus status; - - - @JsonProperty("strategy") - private String strategy; + @JsonProperty("id_token") + private Optional idToken; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("external_verification_redirect_url") - private Optional externalVerificationRedirectUrl; + @JsonProperty("access_token") + private Optional accessToken; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("error") - private JsonNullable error; - - - @JsonProperty("expire_at") - private long expireAt; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("attempts") - private Optional attempts; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("verified_at_client") - private JsonNullable verifiedAtClient; + @JsonProperty("user_info") + private Optional userInfo; @JsonCreator public Oauth( - @JsonProperty("object") Optional object, - @JsonProperty("status") VerificationOauthVerificationStatus status, - @JsonProperty("strategy") String strategy, - @JsonProperty("external_verification_redirect_url") Optional externalVerificationRedirectUrl, - @JsonProperty("error") JsonNullable error, - @JsonProperty("expire_at") long expireAt, - @JsonProperty("attempts") Optional attempts, - @JsonProperty("verified_at_client") JsonNullable verifiedAtClient) { - Utils.checkNotNull(object, "object"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(strategy, "strategy"); - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - Utils.checkNotNull(error, "error"); - Utils.checkNotNull(expireAt, "expireAt"); - Utils.checkNotNull(attempts, "attempts"); - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.object = object; - this.status = status; - this.strategy = strategy; - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; - this.error = error; - this.expireAt = expireAt; - this.attempts = attempts; - this.verifiedAtClient = verifiedAtClient; + @JsonProperty("id_token") Optional idToken, + @JsonProperty("access_token") Optional accessToken, + @JsonProperty("user_info") Optional userInfo) { + Utils.checkNotNull(idToken, "idToken"); + Utils.checkNotNull(accessToken, "accessToken"); + Utils.checkNotNull(userInfo, "userInfo"); + this.idToken = idToken; + this.accessToken = accessToken; + this.userInfo = userInfo; } - public Oauth( - VerificationOauthVerificationStatus status, - String strategy, - long expireAt) { - this(Optional.empty(), status, strategy, - Optional.empty(), JsonNullable.undefined(), expireAt, - Optional.empty(), JsonNullable.undefined()); - } - - @JsonIgnore - @Override - public String object() { - return Utils.discriminatorToString(object); - } - - @JsonIgnore - public VerificationOauthVerificationStatus status() { - return status; + public Oauth() { + this(Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore - public String strategy() { - return strategy; + public Optional idToken() { + return idToken; } @JsonIgnore - public Optional externalVerificationRedirectUrl() { - return externalVerificationRedirectUrl; + public Optional accessToken() { + return accessToken; } - @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable error() { - return (JsonNullable) error; - } - - @JsonIgnore - public long expireAt() { - return expireAt; - } - - @JsonIgnore - public Optional attempts() { - return attempts; - } - - @JsonIgnore - public JsonNullable verifiedAtClient() { - return verifiedAtClient; + public Optional userInfo() { + return userInfo; } public static Builder builder() { @@ -139,84 +71,42 @@ public static Builder builder() { } - public Oauth withObject(VerificationOauthVerificationObject object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - public Oauth withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public Oauth withStatus(VerificationOauthVerificationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public Oauth withStrategy(String strategy) { - Utils.checkNotNull(strategy, "strategy"); - this.strategy = strategy; - return this; - } - - public Oauth withExternalVerificationRedirectUrl(String externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = Optional.ofNullable(externalVerificationRedirectUrl); + public Oauth withIdToken(String idToken) { + Utils.checkNotNull(idToken, "idToken"); + this.idToken = Optional.ofNullable(idToken); return this; } - public Oauth withExternalVerificationRedirectUrl(Optional externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + public Oauth withIdToken(Optional idToken) { + Utils.checkNotNull(idToken, "idToken"); + this.idToken = idToken; return this; } - public Oauth withError(VerificationOauthVerificationError error) { - Utils.checkNotNull(error, "error"); - this.error = JsonNullable.of(error); + public Oauth withAccessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = Optional.ofNullable(accessToken); return this; } - public Oauth withError(JsonNullable error) { - Utils.checkNotNull(error, "error"); - this.error = error; - return this; - } - public Oauth withExpireAt(long expireAt) { - Utils.checkNotNull(expireAt, "expireAt"); - this.expireAt = expireAt; + public Oauth withAccessToken(Optional accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; return this; } - public Oauth withAttempts(long attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = Optional.ofNullable(attempts); + public Oauth withUserInfo(String userInfo) { + Utils.checkNotNull(userInfo, "userInfo"); + this.userInfo = Optional.ofNullable(userInfo); return this; } - public Oauth withAttempts(Optional attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = attempts; - return this; - } - - public Oauth withVerifiedAtClient(String verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = JsonNullable.of(verifiedAtClient); - return this; - } - - public Oauth withVerifiedAtClient(JsonNullable verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = verifiedAtClient; + public Oauth withUserInfo(Optional userInfo) { + Utils.checkNotNull(userInfo, "userInfo"); + this.userInfo = userInfo; return this; } @@ -230,152 +120,81 @@ public boolean equals(java.lang.Object o) { } Oauth other = (Oauth) o; return - Utils.enhancedDeepEquals(this.object, other.object) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.strategy, other.strategy) && - Utils.enhancedDeepEquals(this.externalVerificationRedirectUrl, other.externalVerificationRedirectUrl) && - Utils.enhancedDeepEquals(this.error, other.error) && - Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && - Utils.enhancedDeepEquals(this.attempts, other.attempts) && - Utils.enhancedDeepEquals(this.verifiedAtClient, other.verifiedAtClient); + Utils.enhancedDeepEquals(this.idToken, other.idToken) && + Utils.enhancedDeepEquals(this.accessToken, other.accessToken) && + Utils.enhancedDeepEquals(this.userInfo, other.userInfo); } @Override public int hashCode() { return Utils.enhancedHash( - object, status, strategy, - externalVerificationRedirectUrl, error, expireAt, - attempts, verifiedAtClient); + idToken, accessToken, userInfo); } @Override public String toString() { return Utils.toString(Oauth.class, - "object", object, - "status", status, - "strategy", strategy, - "externalVerificationRedirectUrl", externalVerificationRedirectUrl, - "error", error, - "expireAt", expireAt, - "attempts", attempts, - "verifiedAtClient", verifiedAtClient); + "idToken", idToken, + "accessToken", accessToken, + "userInfo", userInfo); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional object = Optional.empty(); - - private VerificationOauthVerificationStatus status; + private Optional idToken = Optional.empty(); - private String strategy; + private Optional accessToken = Optional.empty(); - private Optional externalVerificationRedirectUrl = Optional.empty(); - - private JsonNullable error = JsonNullable.undefined(); - - private Long expireAt; - - private Optional attempts = Optional.empty(); - - private JsonNullable verifiedAtClient = JsonNullable.undefined(); + private Optional userInfo = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder object(VerificationOauthVerificationObject object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; + public Builder idToken(String idToken) { + Utils.checkNotNull(idToken, "idToken"); + this.idToken = Optional.ofNullable(idToken); return this; } - - public Builder status(VerificationOauthVerificationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - public Builder strategy(String strategy) { - Utils.checkNotNull(strategy, "strategy"); - this.strategy = strategy; - return this; - } - - - public Builder externalVerificationRedirectUrl(String externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = Optional.ofNullable(externalVerificationRedirectUrl); - return this; - } - - public Builder externalVerificationRedirectUrl(Optional externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; - return this; - } - - - public Builder error(VerificationOauthVerificationError error) { - Utils.checkNotNull(error, "error"); - this.error = JsonNullable.of(error); - return this; - } - - public Builder error(JsonNullable error) { - Utils.checkNotNull(error, "error"); - this.error = error; - return this; - } - - - public Builder expireAt(long expireAt) { - Utils.checkNotNull(expireAt, "expireAt"); - this.expireAt = expireAt; + public Builder idToken(Optional idToken) { + Utils.checkNotNull(idToken, "idToken"); + this.idToken = idToken; return this; } - public Builder attempts(long attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = Optional.ofNullable(attempts); + public Builder accessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = Optional.ofNullable(accessToken); return this; } - public Builder attempts(Optional attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = attempts; + public Builder accessToken(Optional accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; return this; } - public Builder verifiedAtClient(String verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = JsonNullable.of(verifiedAtClient); + public Builder userInfo(String userInfo) { + Utils.checkNotNull(userInfo, "userInfo"); + this.userInfo = Optional.ofNullable(userInfo); return this; } - public Builder verifiedAtClient(JsonNullable verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = verifiedAtClient; + public Builder userInfo(Optional userInfo) { + Utils.checkNotNull(userInfo, "userInfo"); + this.userInfo = userInfo; return this; } public Oauth build() { return new Oauth( - object, status, strategy, - externalVerificationRedirectUrl, error, expireAt, - attempts, verifiedAtClient); + idToken, accessToken, userInfo); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java b/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java index dd8711fe..6d4f09ff 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java +++ b/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -56,6 +57,34 @@ public class OauthConfig { @JsonProperty("discovery_url") private JsonNullable discoveryUrl; + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("auth_url") + private JsonNullable authUrl; + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("token_url") + private JsonNullable tokenUrl; + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("user_info_url") + private JsonNullable userInfoUrl; + + /** + * Whether PKCE is required for this OAuth client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("requires_pkce") + private Optional requiresPkce; + /** * Logo URL for the provider */ @@ -84,6 +113,10 @@ public OauthConfig( @JsonProperty("provider_key") Optional providerKey, @JsonProperty("client_id") JsonNullable clientId, @JsonProperty("discovery_url") JsonNullable discoveryUrl, + @JsonProperty("auth_url") JsonNullable authUrl, + @JsonProperty("token_url") JsonNullable tokenUrl, + @JsonProperty("user_info_url") JsonNullable userInfoUrl, + @JsonProperty("requires_pkce") Optional requiresPkce, @JsonProperty("logo_public_url") JsonNullable logoPublicUrl, @JsonProperty("created_at") Optional createdAt, @JsonProperty("updated_at") Optional updatedAt) { @@ -92,6 +125,10 @@ public OauthConfig( Utils.checkNotNull(providerKey, "providerKey"); Utils.checkNotNull(clientId, "clientId"); Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + Utils.checkNotNull(authUrl, "authUrl"); + Utils.checkNotNull(tokenUrl, "tokenUrl"); + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + Utils.checkNotNull(requiresPkce, "requiresPkce"); Utils.checkNotNull(logoPublicUrl, "logoPublicUrl"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -100,6 +137,10 @@ public OauthConfig( this.providerKey = providerKey; this.clientId = clientId; this.discoveryUrl = discoveryUrl; + this.authUrl = authUrl; + this.tokenUrl = tokenUrl; + this.userInfoUrl = userInfoUrl; + this.requiresPkce = requiresPkce; this.logoPublicUrl = logoPublicUrl; this.createdAt = createdAt; this.updatedAt = updatedAt; @@ -108,7 +149,8 @@ public OauthConfig( public OauthConfig() { this(Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), Optional.empty()); + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty(), Optional.empty()); } /** @@ -151,6 +193,38 @@ public JsonNullable discoveryUrl() { return discoveryUrl; } + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + @JsonIgnore + public JsonNullable authUrl() { + return authUrl; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + @JsonIgnore + public JsonNullable tokenUrl() { + return tokenUrl; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + @JsonIgnore + public JsonNullable userInfoUrl() { + return userInfoUrl; + } + + /** + * Whether PKCE is required for this OAuth client + */ + @JsonIgnore + public Optional requiresPkce() { + return requiresPkce; + } + /** * Logo URL for the provider */ @@ -273,6 +347,79 @@ public OauthConfig withDiscoveryUrl(JsonNullable discoveryUrl) { return this; } + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withAuthUrl(String authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = JsonNullable.of(authUrl); + return this; + } + + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withAuthUrl(JsonNullable authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = authUrl; + return this; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withTokenUrl(String tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = JsonNullable.of(tokenUrl); + return this; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withTokenUrl(JsonNullable tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = tokenUrl; + return this; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withUserInfoUrl(String userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = JsonNullable.of(userInfoUrl); + return this; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withUserInfoUrl(JsonNullable userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = userInfoUrl; + return this; + } + + /** + * Whether PKCE is required for this OAuth client + */ + public OauthConfig withRequiresPkce(boolean requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = Optional.ofNullable(requiresPkce); + return this; + } + + + /** + * Whether PKCE is required for this OAuth client + */ + public OauthConfig withRequiresPkce(Optional requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = requiresPkce; + return this; + } + /** * Logo URL for the provider */ @@ -344,6 +491,10 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.providerKey, other.providerKey) && Utils.enhancedDeepEquals(this.clientId, other.clientId) && Utils.enhancedDeepEquals(this.discoveryUrl, other.discoveryUrl) && + Utils.enhancedDeepEquals(this.authUrl, other.authUrl) && + Utils.enhancedDeepEquals(this.tokenUrl, other.tokenUrl) && + Utils.enhancedDeepEquals(this.userInfoUrl, other.userInfoUrl) && + Utils.enhancedDeepEquals(this.requiresPkce, other.requiresPkce) && Utils.enhancedDeepEquals(this.logoPublicUrl, other.logoPublicUrl) && Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); @@ -353,8 +504,9 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( id, name, providerKey, - clientId, discoveryUrl, logoPublicUrl, - createdAt, updatedAt); + clientId, discoveryUrl, authUrl, + tokenUrl, userInfoUrl, requiresPkce, + logoPublicUrl, createdAt, updatedAt); } @Override @@ -365,6 +517,10 @@ public String toString() { "providerKey", providerKey, "clientId", clientId, "discoveryUrl", discoveryUrl, + "authUrl", authUrl, + "tokenUrl", tokenUrl, + "userInfoUrl", userInfoUrl, + "requiresPkce", requiresPkce, "logoPublicUrl", logoPublicUrl, "createdAt", createdAt, "updatedAt", updatedAt); @@ -383,6 +539,14 @@ public final static class Builder { private JsonNullable discoveryUrl = JsonNullable.undefined(); + private JsonNullable authUrl = JsonNullable.undefined(); + + private JsonNullable tokenUrl = JsonNullable.undefined(); + + private JsonNullable userInfoUrl = JsonNullable.undefined(); + + private Optional requiresPkce = Optional.empty(); + private JsonNullable logoPublicUrl = JsonNullable.undefined(); private Optional createdAt = Optional.empty(); @@ -489,6 +653,82 @@ public Builder discoveryUrl(JsonNullable discoveryUrl) { } + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public Builder authUrl(String authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = JsonNullable.of(authUrl); + return this; + } + + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public Builder authUrl(JsonNullable authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = authUrl; + return this; + } + + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public Builder tokenUrl(String tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = JsonNullable.of(tokenUrl); + return this; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public Builder tokenUrl(JsonNullable tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = tokenUrl; + return this; + } + + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public Builder userInfoUrl(String userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = JsonNullable.of(userInfoUrl); + return this; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public Builder userInfoUrl(JsonNullable userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = userInfoUrl; + return this; + } + + + /** + * Whether PKCE is required for this OAuth client + */ + public Builder requiresPkce(boolean requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = Optional.ofNullable(requiresPkce); + return this; + } + + /** + * Whether PKCE is required for this OAuth client + */ + public Builder requiresPkce(Optional requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = requiresPkce; + return this; + } + + /** * Logo URL for the provider */ @@ -549,8 +789,9 @@ public OauthConfig build() { return new OauthConfig( id, name, providerKey, - clientId, discoveryUrl, logoPublicUrl, - createdAt, updatedAt); + clientId, discoveryUrl, authUrl, + tokenUrl, userInfoUrl, requiresPkce, + logoPublicUrl, createdAt, updatedAt); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomain.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomain.java index be09e40b..ad4e4b59 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomain.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomain.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Deprecated; import java.lang.Integer; import java.lang.Long; import java.lang.Override; @@ -62,10 +63,30 @@ public class OrganizationDomain { private Optional affiliationEmailAddress; /** - * Verification details for the domain + * Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("affiliation_verification") + private Optional affiliationVerification; + + /** + * Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("ownership_verification") + private Optional ownershipVerification; + + /** + * Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.ALWAYS) @JsonProperty("verification") + @Deprecated private Optional verification; /** @@ -107,6 +128,8 @@ public OrganizationDomain( @JsonProperty("name") String name, @JsonProperty("enrollment_mode") EnrollmentMode enrollmentMode, @JsonProperty("affiliation_email_address") Optional affiliationEmailAddress, + @JsonProperty("affiliation_verification") Optional affiliationVerification, + @JsonProperty("ownership_verification") Optional ownershipVerification, @JsonProperty("verification") Optional verification, @JsonProperty("total_pending_invitations") int totalPendingInvitations, @JsonProperty("total_pending_suggestions") int totalPendingSuggestions, @@ -119,6 +142,8 @@ public OrganizationDomain( Utils.checkNotNull(name, "name"); Utils.checkNotNull(enrollmentMode, "enrollmentMode"); Utils.checkNotNull(affiliationEmailAddress, "affiliationEmailAddress"); + Utils.checkNotNull(affiliationVerification, "affiliationVerification"); + Utils.checkNotNull(ownershipVerification, "ownershipVerification"); Utils.checkNotNull(verification, "verification"); Utils.checkNotNull(totalPendingInvitations, "totalPendingInvitations"); Utils.checkNotNull(totalPendingSuggestions, "totalPendingSuggestions"); @@ -131,6 +156,8 @@ public OrganizationDomain( this.name = name; this.enrollmentMode = enrollmentMode; this.affiliationEmailAddress = affiliationEmailAddress; + this.affiliationVerification = affiliationVerification; + this.ownershipVerification = ownershipVerification; this.verification = verification; this.totalPendingInvitations = totalPendingInvitations; this.totalPendingSuggestions = totalPendingSuggestions; @@ -151,8 +178,9 @@ public OrganizationDomain( long updatedAt) { this(object, id, organizationId, name, enrollmentMode, Optional.empty(), - Optional.empty(), totalPendingInvitations, totalPendingSuggestions, - JsonNullable.undefined(), createdAt, updatedAt); + Optional.empty(), Optional.empty(), Optional.empty(), + totalPendingInvitations, totalPendingSuggestions, JsonNullable.undefined(), + createdAt, updatedAt); } /** @@ -205,10 +233,34 @@ public Optional affiliationEmailAddress() { } /** - * Verification details for the domain + * Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). */ @SuppressWarnings("unchecked") @JsonIgnore + public Optional affiliationVerification() { + return (Optional) affiliationVerification; + } + + /** + * Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional ownershipVerification() { + return (Optional) ownershipVerification; + } + + /** + * Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + @SuppressWarnings("unchecked") + @JsonIgnore public Optional verification() { return (Optional) verification; } @@ -325,8 +377,54 @@ public OrganizationDomain withAffiliationEmailAddress(Optional affiliati } /** - * Verification details for the domain + * Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). + */ + public OrganizationDomain withAffiliationVerification(AffiliationVerification affiliationVerification) { + Utils.checkNotNull(affiliationVerification, "affiliationVerification"); + this.affiliationVerification = Optional.ofNullable(affiliationVerification); + return this; + } + + + /** + * Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). + */ + public OrganizationDomain withAffiliationVerification(Optional affiliationVerification) { + Utils.checkNotNull(affiliationVerification, "affiliationVerification"); + this.affiliationVerification = affiliationVerification; + return this; + } + + /** + * Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ + public OrganizationDomain withOwnershipVerification(OwnershipVerification ownershipVerification) { + Utils.checkNotNull(ownershipVerification, "ownershipVerification"); + this.ownershipVerification = Optional.ofNullable(ownershipVerification); + return this; + } + + + /** + * Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ + public OrganizationDomain withOwnershipVerification(Optional ownershipVerification) { + Utils.checkNotNull(ownershipVerification, "ownershipVerification"); + this.ownershipVerification = ownershipVerification; + return this; + } + + /** + * Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public OrganizationDomain withVerification(OrganizationDomainVerification verification) { Utils.checkNotNull(verification, "verification"); this.verification = Optional.ofNullable(verification); @@ -335,8 +433,12 @@ public OrganizationDomain withVerification(OrganizationDomainVerification verifi /** - * Verification details for the domain + * Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public OrganizationDomain withVerification(Optional verification) { Utils.checkNotNull(verification, "verification"); this.verification = verification; @@ -413,6 +515,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.name, other.name) && Utils.enhancedDeepEquals(this.enrollmentMode, other.enrollmentMode) && Utils.enhancedDeepEquals(this.affiliationEmailAddress, other.affiliationEmailAddress) && + Utils.enhancedDeepEquals(this.affiliationVerification, other.affiliationVerification) && + Utils.enhancedDeepEquals(this.ownershipVerification, other.ownershipVerification) && Utils.enhancedDeepEquals(this.verification, other.verification) && Utils.enhancedDeepEquals(this.totalPendingInvitations, other.totalPendingInvitations) && Utils.enhancedDeepEquals(this.totalPendingSuggestions, other.totalPendingSuggestions) && @@ -426,8 +530,9 @@ public int hashCode() { return Utils.enhancedHash( object, id, organizationId, name, enrollmentMode, affiliationEmailAddress, - verification, totalPendingInvitations, totalPendingSuggestions, - publicOrganizationData, createdAt, updatedAt); + affiliationVerification, ownershipVerification, verification, + totalPendingInvitations, totalPendingSuggestions, publicOrganizationData, + createdAt, updatedAt); } @Override @@ -439,6 +544,8 @@ public String toString() { "name", name, "enrollmentMode", enrollmentMode, "affiliationEmailAddress", affiliationEmailAddress, + "affiliationVerification", affiliationVerification, + "ownershipVerification", ownershipVerification, "verification", verification, "totalPendingInvitations", totalPendingInvitations, "totalPendingSuggestions", totalPendingSuggestions, @@ -462,6 +569,11 @@ public final static class Builder { private Optional affiliationEmailAddress = Optional.empty(); + private Optional affiliationVerification = Optional.empty(); + + private Optional ownershipVerification = Optional.empty(); + + @Deprecated private Optional verification = Optional.empty(); private Integer totalPendingInvitations; @@ -550,8 +662,54 @@ public Builder affiliationEmailAddress(Optional affiliationEmailAddress) /** - * Verification details for the domain + * Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). + */ + public Builder affiliationVerification(AffiliationVerification affiliationVerification) { + Utils.checkNotNull(affiliationVerification, "affiliationVerification"); + this.affiliationVerification = Optional.ofNullable(affiliationVerification); + return this; + } + + /** + * Verification details for the user-facing affiliation between the domain and the organization (e.g. + * affiliation_email_code). + */ + public Builder affiliationVerification(Optional affiliationVerification) { + Utils.checkNotNull(affiliationVerification, "affiliationVerification"); + this.affiliationVerification = affiliationVerification; + return this; + } + + + /** + * Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ + public Builder ownershipVerification(OwnershipVerification ownershipVerification) { + Utils.checkNotNull(ownershipVerification, "ownershipVerification"); + this.ownershipVerification = Optional.ofNullable(ownershipVerification); + return this; + } + + /** + * Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ + public Builder ownershipVerification(Optional ownershipVerification) { + Utils.checkNotNull(ownershipVerification, "ownershipVerification"); + this.ownershipVerification = ownershipVerification; + return this; + } + + + /** + * Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder verification(OrganizationDomainVerification verification) { Utils.checkNotNull(verification, "verification"); this.verification = Optional.ofNullable(verification); @@ -559,8 +717,12 @@ public Builder verification(OrganizationDomainVerification verification) { } /** - * Verification details for the domain + * Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder verification(Optional verification) { Utils.checkNotNull(verification, "verification"); this.verification = verification; @@ -631,8 +793,9 @@ public OrganizationDomain build() { return new OrganizationDomain( object, id, organizationId, name, enrollmentMode, affiliationEmailAddress, - verification, totalPendingInvitations, totalPendingSuggestions, - publicOrganizationData, createdAt, updatedAt); + affiliationVerification, ownershipVerification, verification, + totalPendingInvitations, totalPendingSuggestions, publicOrganizationData, + createdAt, updatedAt); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainVerification.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainVerification.java index 62d064c1..adcef428 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainVerification.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainVerification.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Deprecated; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -17,14 +18,18 @@ /** * OrganizationDomainVerification * - *

Verification details for the domain + *

Deprecated alias for `affiliation_verification`. Kept for backward compatibility on the current API + * version; will be removed in the next API version. Prefer `affiliation_verification`. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. */ +@Deprecated public class OrganizationDomainVerification { /** - * Status of the verification. It can be `unverified` or `verified` + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. */ @JsonProperty("status") - private OrganizationDomainStatus status; + private String status; /** * Name of the strategy used to verify the domain @@ -46,34 +51,45 @@ public class OrganizationDomainVerification { @JsonProperty("expire_at") private Optional expireAt; + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("verified_at") + private Optional verifiedAt; + @JsonCreator public OrganizationDomainVerification( - @JsonProperty("status") OrganizationDomainStatus status, + @JsonProperty("status") String status, @JsonProperty("strategy") String strategy, @JsonProperty("attempts") Optional attempts, - @JsonProperty("expire_at") Optional expireAt) { + @JsonProperty("expire_at") Optional expireAt, + @JsonProperty("verified_at") Optional verifiedAt) { Utils.checkNotNull(status, "status"); Utils.checkNotNull(strategy, "strategy"); Utils.checkNotNull(attempts, "attempts"); Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(verifiedAt, "verifiedAt"); this.status = status; this.strategy = strategy; this.attempts = attempts; this.expireAt = expireAt; + this.verifiedAt = verifiedAt; } public OrganizationDomainVerification( - OrganizationDomainStatus status, + String status, String strategy) { this(status, strategy, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** - * Status of the verification. It can be `unverified` or `verified` + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. */ @JsonIgnore - public OrganizationDomainStatus status() { + public String status() { return status; } @@ -101,15 +117,24 @@ public Optional expireAt() { return expireAt; } + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + @JsonIgnore + public Optional verifiedAt() { + return verifiedAt; + } + public static Builder builder() { return new Builder(); } /** - * Status of the verification. It can be `unverified` or `verified` + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. */ - public OrganizationDomainVerification withStatus(OrganizationDomainStatus status) { + public OrganizationDomainVerification withStatus(String status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -162,6 +187,27 @@ public OrganizationDomainVerification withExpireAt(Optional expireAt) { return this; } + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public OrganizationDomainVerification withVerifiedAt(long verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = Optional.ofNullable(verifiedAt); + return this; + } + + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public OrganizationDomainVerification withVerifiedAt(Optional verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = verifiedAt; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -175,14 +221,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.status, other.status) && Utils.enhancedDeepEquals(this.strategy, other.strategy) && Utils.enhancedDeepEquals(this.attempts, other.attempts) && - Utils.enhancedDeepEquals(this.expireAt, other.expireAt); + Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.verifiedAt, other.verifiedAt); } @Override public int hashCode() { return Utils.enhancedHash( status, strategy, attempts, - expireAt); + expireAt, verifiedAt); } @Override @@ -191,13 +238,14 @@ public String toString() { "status", status, "strategy", strategy, "attempts", attempts, - "expireAt", expireAt); + "expireAt", expireAt, + "verifiedAt", verifiedAt); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private OrganizationDomainStatus status; + private String status; private String strategy; @@ -205,15 +253,17 @@ public final static class Builder { private Optional expireAt = Optional.empty(); + private Optional verifiedAt = Optional.empty(); + private Builder() { // force use of static builder() method } /** - * Status of the verification. It can be `unverified` or `verified` + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. */ - public Builder status(OrganizationDomainStatus status) { + public Builder status(String status) { Utils.checkNotNull(status, "status"); this.status = status; return this; @@ -267,11 +317,32 @@ public Builder expireAt(Optional expireAt) { return this; } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public Builder verifiedAt(long verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = Optional.ofNullable(verifiedAt); + return this; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public Builder verifiedAt(Optional verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = verifiedAt; + return this; + } + public OrganizationDomainVerification build() { return new OrganizationDomainVerification( status, strategy, attempts, - expireAt); + expireAt, verifiedAt); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Otp.java b/src/main/java/com/clerk/backend_api/models/components/Otp.java index 7b990bf2..8d6e9e00 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Otp.java +++ b/src/main/java/com/clerk/backend_api/models/components/Otp.java @@ -40,6 +40,13 @@ public class Otp implements Verification { @JsonProperty("expire_at") private Optional expireAt; + /** + * The delivery channel of the code (phone codes only). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channel") + private JsonNullable channel; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("verified_at_client") @@ -52,18 +59,21 @@ public Otp( @JsonProperty("strategy") Strategy strategy, @JsonProperty("attempts") Optional attempts, @JsonProperty("expire_at") Optional expireAt, + @JsonProperty("channel") JsonNullable channel, @JsonProperty("verified_at_client") JsonNullable verifiedAtClient) { Utils.checkNotNull(object, "object"); Utils.checkNotNull(status, "status"); Utils.checkNotNull(strategy, "strategy"); Utils.checkNotNull(attempts, "attempts"); Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(channel, "channel"); Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); this.object = object; this.status = status; this.strategy = strategy; this.attempts = attempts; this.expireAt = expireAt; + this.channel = channel; this.verifiedAtClient = verifiedAtClient; } @@ -71,7 +81,8 @@ public Otp( VerificationStatus status, Strategy strategy) { this(Optional.empty(), status, strategy, - Optional.empty(), Optional.empty(), JsonNullable.undefined()); + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); } @JsonIgnore @@ -100,6 +111,14 @@ public Optional expireAt() { return expireAt; } + /** + * The delivery channel of the code (phone codes only). + */ + @JsonIgnore + public JsonNullable channel() { + return channel; + } + @JsonIgnore public JsonNullable verifiedAtClient() { return verifiedAtClient; @@ -161,6 +180,24 @@ public Otp withExpireAt(Optional expireAt) { return this; } + /** + * The delivery channel of the code (phone codes only). + */ + public Otp withChannel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = JsonNullable.of(channel); + return this; + } + + /** + * The delivery channel of the code (phone codes only). + */ + public Otp withChannel(JsonNullable channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + public Otp withVerifiedAtClient(String verifiedAtClient) { Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); this.verifiedAtClient = JsonNullable.of(verifiedAtClient); @@ -188,6 +225,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.strategy, other.strategy) && Utils.enhancedDeepEquals(this.attempts, other.attempts) && Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.channel, other.channel) && Utils.enhancedDeepEquals(this.verifiedAtClient, other.verifiedAtClient); } @@ -195,7 +233,8 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( object, status, strategy, - attempts, expireAt, verifiedAtClient); + attempts, expireAt, channel, + verifiedAtClient); } @Override @@ -206,6 +245,7 @@ public String toString() { "strategy", strategy, "attempts", attempts, "expireAt", expireAt, + "channel", channel, "verifiedAtClient", verifiedAtClient); } @@ -222,6 +262,8 @@ public final static class Builder { private Optional expireAt = Optional.empty(); + private JsonNullable channel = JsonNullable.undefined(); + private JsonNullable verifiedAtClient = JsonNullable.undefined(); private Builder() { @@ -282,6 +324,25 @@ public Builder expireAt(Optional expireAt) { } + /** + * The delivery channel of the code (phone codes only). + */ + public Builder channel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = JsonNullable.of(channel); + return this; + } + + /** + * The delivery channel of the code (phone codes only). + */ + public Builder channel(JsonNullable channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + public Builder verifiedAtClient(String verifiedAtClient) { Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); this.verifiedAtClient = JsonNullable.of(verifiedAtClient); @@ -298,7 +359,8 @@ public Otp build() { return new Otp( object, status, strategy, - attempts, expireAt, verifiedAtClient); + attempts, expireAt, channel, + verifiedAtClient); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OwnershipVerification.java b/src/main/java/com/clerk/backend_api/models/components/OwnershipVerification.java new file mode 100644 index 00000000..9c3bda4b --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/OwnershipVerification.java @@ -0,0 +1,345 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * OwnershipVerification + * + *

Verification details for the underlying DNS domain ownership proof (TXT challenge or dashboard + * override). Null until ownership has been attempted. + */ +public class OwnershipVerification { + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + @JsonProperty("status") + private String status; + + /** + * Name of the strategy used to verify the domain + */ + @JsonProperty("strategy") + private String strategy; + + /** + * How many attempts have been made to verify the domain + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("attempts") + private Optional attempts; + + /** + * Unix timestamp of when the verification will expire + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("expire_at") + private Optional expireAt; + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("verified_at") + private Optional verifiedAt; + + @JsonCreator + public OwnershipVerification( + @JsonProperty("status") String status, + @JsonProperty("strategy") String strategy, + @JsonProperty("attempts") Optional attempts, + @JsonProperty("expire_at") Optional expireAt, + @JsonProperty("verified_at") Optional verifiedAt) { + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(strategy, "strategy"); + Utils.checkNotNull(attempts, "attempts"); + Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.status = status; + this.strategy = strategy; + this.attempts = attempts; + this.expireAt = expireAt; + this.verifiedAt = verifiedAt; + } + + public OwnershipVerification( + String status, + String strategy) { + this(status, strategy, Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Name of the strategy used to verify the domain + */ + @JsonIgnore + public String strategy() { + return strategy; + } + + /** + * How many attempts have been made to verify the domain + */ + @JsonIgnore + public Optional attempts() { + return attempts; + } + + /** + * Unix timestamp of when the verification will expire + */ + @JsonIgnore + public Optional expireAt() { + return expireAt; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + @JsonIgnore + public Optional verifiedAt() { + return verifiedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + public OwnershipVerification withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Name of the strategy used to verify the domain + */ + public OwnershipVerification withStrategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + /** + * How many attempts have been made to verify the domain + */ + public OwnershipVerification withAttempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + + /** + * How many attempts have been made to verify the domain + */ + public OwnershipVerification withAttempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + /** + * Unix timestamp of when the verification will expire + */ + public OwnershipVerification withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + + /** + * Unix timestamp of when the verification will expire + */ + public OwnershipVerification withExpireAt(Optional expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public OwnershipVerification withVerifiedAt(long verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = Optional.ofNullable(verifiedAt); + return this; + } + + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public OwnershipVerification withVerifiedAt(Optional verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = verifiedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipVerification other = (OwnershipVerification) o; + return + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.strategy, other.strategy) && + Utils.enhancedDeepEquals(this.attempts, other.attempts) && + Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.verifiedAt, other.verifiedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + status, strategy, attempts, + expireAt, verifiedAt); + } + + @Override + public String toString() { + return Utils.toString(OwnershipVerification.class, + "status", status, + "strategy", strategy, + "attempts", attempts, + "expireAt", expireAt, + "verifiedAt", verifiedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String status; + + private String strategy; + + private Optional attempts = Optional.empty(); + + private Optional expireAt = Optional.empty(); + + private Optional verifiedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Status of the verification. It can be `unverified`, `verified`, `failed`, or `expired`. + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Name of the strategy used to verify the domain + */ + public Builder strategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + + /** + * How many attempts have been made to verify the domain + */ + public Builder attempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + /** + * How many attempts have been made to verify the domain + */ + public Builder attempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + + /** + * Unix timestamp of when the verification will expire + */ + public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + /** + * Unix timestamp of when the verification will expire + */ + public Builder expireAt(Optional expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public Builder verifiedAt(long verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = Optional.ofNullable(verifiedAt); + return this; + } + + /** + * Unix timestamp of when ownership was verified. Only populated on `ownership_verification`; null on + * `affiliation_verification`. + */ + public Builder verifiedAt(Optional verifiedAt) { + Utils.checkNotNull(verifiedAt, "verifiedAt"); + this.verifiedAt = verifiedAt; + return this; + } + + public OwnershipVerification build() { + + return new OwnershipVerification( + status, strategy, attempts, + expireAt, verifiedAt); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/ParsedUserInfo.java b/src/main/java/com/clerk/backend_api/models/components/ParsedUserInfo.java new file mode 100644 index 00000000..62d2dcaa --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/ParsedUserInfo.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * ParsedUserInfo + * + *

The user information parsed from the IdP response + */ +public class ParsedUserInfo { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("email_address") + private Optional emailAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("first_name") + private Optional firstName; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("last_name") + private Optional lastName; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("user_id") + private Optional userId; + + @JsonCreator + public ParsedUserInfo( + @JsonProperty("email_address") Optional emailAddress, + @JsonProperty("first_name") Optional firstName, + @JsonProperty("last_name") Optional lastName, + @JsonProperty("user_id") Optional userId) { + Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(firstName, "firstName"); + Utils.checkNotNull(lastName, "lastName"); + Utils.checkNotNull(userId, "userId"); + this.emailAddress = emailAddress; + this.firstName = firstName; + this.lastName = lastName; + this.userId = userId; + } + + public ParsedUserInfo() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional emailAddress() { + return emailAddress; + } + + @JsonIgnore + public Optional firstName() { + return firstName; + } + + @JsonIgnore + public Optional lastName() { + return lastName; + } + + @JsonIgnore + public Optional userId() { + return userId; + } + + public static Builder builder() { + return new Builder(); + } + + + public ParsedUserInfo withEmailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = Optional.ofNullable(emailAddress); + return this; + } + + + public ParsedUserInfo withEmailAddress(Optional emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + public ParsedUserInfo withFirstName(String firstName) { + Utils.checkNotNull(firstName, "firstName"); + this.firstName = Optional.ofNullable(firstName); + return this; + } + + + public ParsedUserInfo withFirstName(Optional firstName) { + Utils.checkNotNull(firstName, "firstName"); + this.firstName = firstName; + return this; + } + + public ParsedUserInfo withLastName(String lastName) { + Utils.checkNotNull(lastName, "lastName"); + this.lastName = Optional.ofNullable(lastName); + return this; + } + + + public ParsedUserInfo withLastName(Optional lastName) { + Utils.checkNotNull(lastName, "lastName"); + this.lastName = lastName; + return this; + } + + public ParsedUserInfo withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = Optional.ofNullable(userId); + return this; + } + + + public ParsedUserInfo withUserId(Optional userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParsedUserInfo other = (ParsedUserInfo) o; + return + Utils.enhancedDeepEquals(this.emailAddress, other.emailAddress) && + Utils.enhancedDeepEquals(this.firstName, other.firstName) && + Utils.enhancedDeepEquals(this.lastName, other.lastName) && + Utils.enhancedDeepEquals(this.userId, other.userId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + emailAddress, firstName, lastName, + userId); + } + + @Override + public String toString() { + return Utils.toString(ParsedUserInfo.class, + "emailAddress", emailAddress, + "firstName", firstName, + "lastName", lastName, + "userId", userId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional emailAddress = Optional.empty(); + + private Optional firstName = Optional.empty(); + + private Optional lastName = Optional.empty(); + + private Optional userId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder emailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = Optional.ofNullable(emailAddress); + return this; + } + + public Builder emailAddress(Optional emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + + public Builder firstName(String firstName) { + Utils.checkNotNull(firstName, "firstName"); + this.firstName = Optional.ofNullable(firstName); + return this; + } + + public Builder firstName(Optional firstName) { + Utils.checkNotNull(firstName, "firstName"); + this.firstName = firstName; + return this; + } + + + public Builder lastName(String lastName) { + Utils.checkNotNull(lastName, "lastName"); + this.lastName = Optional.ofNullable(lastName); + return this; + } + + public Builder lastName(Optional lastName) { + Utils.checkNotNull(lastName, "lastName"); + this.lastName = lastName; + return this; + } + + + public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = Optional.ofNullable(userId); + return this; + } + + public Builder userId(Optional userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ParsedUserInfo build() { + + return new ParsedUserInfo( + emailAddress, firstName, lastName, + userId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/Saml.java b/src/main/java/com/clerk/backend_api/models/components/Saml.java index 5fa16016..f75b3532 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Saml.java +++ b/src/main/java/com/clerk/backend_api/models/components/Saml.java @@ -9,129 +9,61 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Long; import java.lang.Override; import java.lang.String; -import java.lang.SuppressWarnings; import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - - -public class Saml implements Verification { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("object") - private Optional object; - - - @JsonProperty("status") - private VerificationSamlVerificationStatus status; - - - @JsonProperty("strategy") - private VerificationSamlVerificationStrategy strategy; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("external_verification_redirect_url") - private JsonNullable externalVerificationRedirectUrl; +/** + * Saml + * + *

SAML-specific metadata, present for SAML connections + */ +public class Saml { @JsonInclude(Include.NON_ABSENT) - @JsonProperty("error") - private JsonNullable error; + @JsonProperty("saml_request") + private Optional samlRequest; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("expire_at") - private JsonNullable expireAt; - - - @JsonInclude(Include.ALWAYS) - @JsonProperty("attempts") - private Optional attempts; + @JsonProperty("saml_response") + private Optional samlResponse; @JsonInclude(Include.NON_ABSENT) - @JsonProperty("verified_at_client") - private JsonNullable verifiedAtClient; + @JsonProperty("relay_state") + private Optional relayState; @JsonCreator public Saml( - @JsonProperty("object") Optional object, - @JsonProperty("status") VerificationSamlVerificationStatus status, - @JsonProperty("strategy") VerificationSamlVerificationStrategy strategy, - @JsonProperty("external_verification_redirect_url") JsonNullable externalVerificationRedirectUrl, - @JsonProperty("error") JsonNullable error, - @JsonProperty("expire_at") JsonNullable expireAt, - @JsonProperty("attempts") Optional attempts, - @JsonProperty("verified_at_client") JsonNullable verifiedAtClient) { - Utils.checkNotNull(object, "object"); - Utils.checkNotNull(status, "status"); - Utils.checkNotNull(strategy, "strategy"); - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - Utils.checkNotNull(error, "error"); - Utils.checkNotNull(expireAt, "expireAt"); - Utils.checkNotNull(attempts, "attempts"); - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.object = object; - this.status = status; - this.strategy = strategy; - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; - this.error = error; - this.expireAt = expireAt; - this.attempts = attempts; - this.verifiedAtClient = verifiedAtClient; + @JsonProperty("saml_request") Optional samlRequest, + @JsonProperty("saml_response") Optional samlResponse, + @JsonProperty("relay_state") Optional relayState) { + Utils.checkNotNull(samlRequest, "samlRequest"); + Utils.checkNotNull(samlResponse, "samlResponse"); + Utils.checkNotNull(relayState, "relayState"); + this.samlRequest = samlRequest; + this.samlResponse = samlResponse; + this.relayState = relayState; } - public Saml( - VerificationSamlVerificationStatus status, - VerificationSamlVerificationStrategy strategy) { - this(Optional.empty(), status, strategy, - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined()); - } - - @JsonIgnore - @Override - public String object() { - return Utils.discriminatorToString(object); - } - - @JsonIgnore - public VerificationSamlVerificationStatus status() { - return status; + public Saml() { + this(Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore - public VerificationSamlVerificationStrategy strategy() { - return strategy; + public Optional samlRequest() { + return samlRequest; } @JsonIgnore - public JsonNullable externalVerificationRedirectUrl() { - return externalVerificationRedirectUrl; + public Optional samlResponse() { + return samlResponse; } - @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable error() { - return (JsonNullable) error; - } - - @JsonIgnore - public JsonNullable expireAt() { - return expireAt; - } - - @JsonIgnore - public Optional attempts() { - return attempts; - } - - @JsonIgnore - public JsonNullable verifiedAtClient() { - return verifiedAtClient; + public Optional relayState() { + return relayState; } public static Builder builder() { @@ -139,89 +71,42 @@ public static Builder builder() { } - public Saml withObject(VerificationSamlVerificationObject object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - - public Saml withObject(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public Saml withStatus(VerificationSamlVerificationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - public Saml withStrategy(VerificationSamlVerificationStrategy strategy) { - Utils.checkNotNull(strategy, "strategy"); - this.strategy = strategy; - return this; - } - - public Saml withExternalVerificationRedirectUrl(String externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = JsonNullable.of(externalVerificationRedirectUrl); - return this; - } - - public Saml withExternalVerificationRedirectUrl(JsonNullable externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + public Saml withSamlRequest(String samlRequest) { + Utils.checkNotNull(samlRequest, "samlRequest"); + this.samlRequest = Optional.ofNullable(samlRequest); return this; } - public Saml withError(VerificationError error) { - Utils.checkNotNull(error, "error"); - this.error = JsonNullable.of(error); - return this; - } - public Saml withError(JsonNullable error) { - Utils.checkNotNull(error, "error"); - this.error = error; + public Saml withSamlRequest(Optional samlRequest) { + Utils.checkNotNull(samlRequest, "samlRequest"); + this.samlRequest = samlRequest; return this; } - public Saml withExpireAt(long expireAt) { - Utils.checkNotNull(expireAt, "expireAt"); - this.expireAt = JsonNullable.of(expireAt); + public Saml withSamlResponse(String samlResponse) { + Utils.checkNotNull(samlResponse, "samlResponse"); + this.samlResponse = Optional.ofNullable(samlResponse); return this; } - public Saml withExpireAt(JsonNullable expireAt) { - Utils.checkNotNull(expireAt, "expireAt"); - this.expireAt = expireAt; - return this; - } - public Saml withAttempts(long attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = Optional.ofNullable(attempts); + public Saml withSamlResponse(Optional samlResponse) { + Utils.checkNotNull(samlResponse, "samlResponse"); + this.samlResponse = samlResponse; return this; } - - public Saml withAttempts(Optional attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = attempts; + public Saml withRelayState(String relayState) { + Utils.checkNotNull(relayState, "relayState"); + this.relayState = Optional.ofNullable(relayState); return this; } - public Saml withVerifiedAtClient(String verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = JsonNullable.of(verifiedAtClient); - return this; - } - public Saml withVerifiedAtClient(JsonNullable verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = verifiedAtClient; + public Saml withRelayState(Optional relayState) { + Utils.checkNotNull(relayState, "relayState"); + this.relayState = relayState; return this; } @@ -235,158 +120,81 @@ public boolean equals(java.lang.Object o) { } Saml other = (Saml) o; return - Utils.enhancedDeepEquals(this.object, other.object) && - Utils.enhancedDeepEquals(this.status, other.status) && - Utils.enhancedDeepEquals(this.strategy, other.strategy) && - Utils.enhancedDeepEquals(this.externalVerificationRedirectUrl, other.externalVerificationRedirectUrl) && - Utils.enhancedDeepEquals(this.error, other.error) && - Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && - Utils.enhancedDeepEquals(this.attempts, other.attempts) && - Utils.enhancedDeepEquals(this.verifiedAtClient, other.verifiedAtClient); + Utils.enhancedDeepEquals(this.samlRequest, other.samlRequest) && + Utils.enhancedDeepEquals(this.samlResponse, other.samlResponse) && + Utils.enhancedDeepEquals(this.relayState, other.relayState); } @Override public int hashCode() { return Utils.enhancedHash( - object, status, strategy, - externalVerificationRedirectUrl, error, expireAt, - attempts, verifiedAtClient); + samlRequest, samlResponse, relayState); } @Override public String toString() { return Utils.toString(Saml.class, - "object", object, - "status", status, - "strategy", strategy, - "externalVerificationRedirectUrl", externalVerificationRedirectUrl, - "error", error, - "expireAt", expireAt, - "attempts", attempts, - "verifiedAtClient", verifiedAtClient); + "samlRequest", samlRequest, + "samlResponse", samlResponse, + "relayState", relayState); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private Optional object = Optional.empty(); - - private VerificationSamlVerificationStatus status; + private Optional samlRequest = Optional.empty(); - private VerificationSamlVerificationStrategy strategy; + private Optional samlResponse = Optional.empty(); - private JsonNullable externalVerificationRedirectUrl = JsonNullable.undefined(); - - private JsonNullable error = JsonNullable.undefined(); - - private JsonNullable expireAt = JsonNullable.undefined(); - - private Optional attempts = Optional.empty(); - - private JsonNullable verifiedAtClient = JsonNullable.undefined(); + private Optional relayState = Optional.empty(); private Builder() { // force use of static builder() method } - public Builder object(VerificationSamlVerificationObject object) { - Utils.checkNotNull(object, "object"); - this.object = Optional.ofNullable(object); - return this; - } - - public Builder object(Optional object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - - public Builder status(VerificationSamlVerificationStatus status) { - Utils.checkNotNull(status, "status"); - this.status = status; - return this; - } - - - public Builder strategy(VerificationSamlVerificationStrategy strategy) { - Utils.checkNotNull(strategy, "strategy"); - this.strategy = strategy; - return this; - } - - - public Builder externalVerificationRedirectUrl(String externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = JsonNullable.of(externalVerificationRedirectUrl); - return this; - } - - public Builder externalVerificationRedirectUrl(JsonNullable externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; - return this; - } - - - public Builder error(VerificationError error) { - Utils.checkNotNull(error, "error"); - this.error = JsonNullable.of(error); - return this; - } - - public Builder error(JsonNullable error) { - Utils.checkNotNull(error, "error"); - this.error = error; - return this; - } - - - public Builder expireAt(long expireAt) { - Utils.checkNotNull(expireAt, "expireAt"); - this.expireAt = JsonNullable.of(expireAt); + public Builder samlRequest(String samlRequest) { + Utils.checkNotNull(samlRequest, "samlRequest"); + this.samlRequest = Optional.ofNullable(samlRequest); return this; } - public Builder expireAt(JsonNullable expireAt) { - Utils.checkNotNull(expireAt, "expireAt"); - this.expireAt = expireAt; + public Builder samlRequest(Optional samlRequest) { + Utils.checkNotNull(samlRequest, "samlRequest"); + this.samlRequest = samlRequest; return this; } - public Builder attempts(long attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = Optional.ofNullable(attempts); + public Builder samlResponse(String samlResponse) { + Utils.checkNotNull(samlResponse, "samlResponse"); + this.samlResponse = Optional.ofNullable(samlResponse); return this; } - public Builder attempts(Optional attempts) { - Utils.checkNotNull(attempts, "attempts"); - this.attempts = attempts; + public Builder samlResponse(Optional samlResponse) { + Utils.checkNotNull(samlResponse, "samlResponse"); + this.samlResponse = samlResponse; return this; } - public Builder verifiedAtClient(String verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = JsonNullable.of(verifiedAtClient); + public Builder relayState(String relayState) { + Utils.checkNotNull(relayState, "relayState"); + this.relayState = Optional.ofNullable(relayState); return this; } - public Builder verifiedAtClient(JsonNullable verifiedAtClient) { - Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); - this.verifiedAtClient = verifiedAtClient; + public Builder relayState(Optional relayState) { + Utils.checkNotNull(relayState, "relayState"); + this.relayState = relayState; return this; } public Saml build() { return new Saml( - object, status, strategy, - externalVerificationRedirectUrl, error, expireAt, - attempts, verifiedAtClient); + samlRequest, samlResponse, relayState); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotal.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotal.java new file mode 100644 index 00000000..1de35538 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotal.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; + + +public class SchemasCommercePerUnitTotal { + /** + * Name of the billable unit (for example, seats) + */ + @JsonProperty("name") + private String name; + + /** + * Number of units included in each pricing block + */ + @JsonProperty("block_size") + private long blockSize; + + /** + * Computed totals for each pricing tier + */ + @JsonProperty("tiers") + private List tiers; + + @JsonCreator + public SchemasCommercePerUnitTotal( + @JsonProperty("name") String name, + @JsonProperty("block_size") long blockSize, + @JsonProperty("tiers") List tiers) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(blockSize, "blockSize"); + Utils.checkNotNull(tiers, "tiers"); + this.name = name; + this.blockSize = blockSize; + this.tiers = tiers; + } + + /** + * Name of the billable unit (for example, seats) + */ + @JsonIgnore + public String name() { + return name; + } + + /** + * Number of units included in each pricing block + */ + @JsonIgnore + public long blockSize() { + return blockSize; + } + + /** + * Computed totals for each pricing tier + */ + @JsonIgnore + public List tiers() { + return tiers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Name of the billable unit (for example, seats) + */ + public SchemasCommercePerUnitTotal withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * Number of units included in each pricing block + */ + public SchemasCommercePerUnitTotal withBlockSize(long blockSize) { + Utils.checkNotNull(blockSize, "blockSize"); + this.blockSize = blockSize; + return this; + } + + /** + * Computed totals for each pricing tier + */ + public SchemasCommercePerUnitTotal withTiers(List tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = tiers; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommercePerUnitTotal other = (SchemasCommercePerUnitTotal) o; + return + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.blockSize, other.blockSize) && + Utils.enhancedDeepEquals(this.tiers, other.tiers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + name, blockSize, tiers); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommercePerUnitTotal.class, + "name", name, + "blockSize", blockSize, + "tiers", tiers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String name; + + private Long blockSize; + + private List tiers; + + private Builder() { + // force use of static builder() method + } + + + /** + * Name of the billable unit (for example, seats) + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * Number of units included in each pricing block + */ + public Builder blockSize(long blockSize) { + Utils.checkNotNull(blockSize, "blockSize"); + this.blockSize = blockSize; + return this; + } + + + /** + * Computed totals for each pricing tier + */ + public Builder tiers(List tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = tiers; + return this; + } + + public SchemasCommercePerUnitTotal build() { + + return new SchemasCommercePerUnitTotal( + name, blockSize, tiers); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotalTier.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotalTier.java new file mode 100644 index 00000000..d706dcc9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommercePerUnitTotalTier.java @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class SchemasCommercePerUnitTotalTier { + /** + * Units billed in this tier; null means unlimited + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("quantity") + private JsonNullable quantity; + + + @JsonProperty("fee_per_block") + private CommerceMoneyResponse feePerBlock; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public SchemasCommercePerUnitTotalTier( + @JsonProperty("quantity") JsonNullable quantity, + @JsonProperty("fee_per_block") CommerceMoneyResponse feePerBlock, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(quantity, "quantity"); + Utils.checkNotNull(feePerBlock, "feePerBlock"); + Utils.checkNotNull(total, "total"); + this.quantity = quantity; + this.feePerBlock = feePerBlock; + this.total = total; + } + + public SchemasCommercePerUnitTotalTier( + CommerceMoneyResponse feePerBlock, + CommerceMoneyResponse total) { + this(JsonNullable.undefined(), feePerBlock, total); + } + + /** + * Units billed in this tier; null means unlimited + */ + @JsonIgnore + public JsonNullable quantity() { + return quantity; + } + + @JsonIgnore + public CommerceMoneyResponse feePerBlock() { + return feePerBlock; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Units billed in this tier; null means unlimited + */ + public SchemasCommercePerUnitTotalTier withQuantity(long quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = JsonNullable.of(quantity); + return this; + } + + /** + * Units billed in this tier; null means unlimited + */ + public SchemasCommercePerUnitTotalTier withQuantity(JsonNullable quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = quantity; + return this; + } + + public SchemasCommercePerUnitTotalTier withFeePerBlock(CommerceMoneyResponse feePerBlock) { + Utils.checkNotNull(feePerBlock, "feePerBlock"); + this.feePerBlock = feePerBlock; + return this; + } + + public SchemasCommercePerUnitTotalTier withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommercePerUnitTotalTier other = (SchemasCommercePerUnitTotalTier) o; + return + Utils.enhancedDeepEquals(this.quantity, other.quantity) && + Utils.enhancedDeepEquals(this.feePerBlock, other.feePerBlock) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + quantity, feePerBlock, total); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommercePerUnitTotalTier.class, + "quantity", quantity, + "feePerBlock", feePerBlock, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable quantity = JsonNullable.undefined(); + + private CommerceMoneyResponse feePerBlock; + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + /** + * Units billed in this tier; null means unlimited + */ + public Builder quantity(long quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = JsonNullable.of(quantity); + return this; + } + + /** + * Units billed in this tier; null means unlimited + */ + public Builder quantity(JsonNullable quantity) { + Utils.checkNotNull(quantity, "quantity"); + this.quantity = quantity; + return this; + } + + + public Builder feePerBlock(CommerceMoneyResponse feePerBlock) { + Utils.checkNotNull(feePerBlock, "feePerBlock"); + this.feePerBlock = feePerBlock; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public SchemasCommercePerUnitTotalTier build() { + + return new SchemasCommercePerUnitTotalTier( + quantity, feePerBlock, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemCredits.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemCredits.java new file mode 100644 index 00000000..068ae38b --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemCredits.java @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SchemasCommerceSubscriptionItemCredits { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("payer") + private Optional payer; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public SchemasCommerceSubscriptionItemCredits( + @JsonProperty("proration") Optional proration, + @JsonProperty("payer") Optional payer, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(payer, "payer"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.payer = payer; + this.total = total; + } + + public SchemasCommerceSubscriptionItemCredits( + CommerceMoneyResponse total) { + this(Optional.empty(), Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional payer() { + return (Optional) payer; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemCredits withProration(SchemasCommerceSubscriptionItemProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public SchemasCommerceSubscriptionItemCredits withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public SchemasCommerceSubscriptionItemCredits withPayer(SchemasCommerceSubscriptionItemPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + + public SchemasCommerceSubscriptionItemCredits withPayer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + public SchemasCommerceSubscriptionItemCredits withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemCredits other = (SchemasCommerceSubscriptionItemCredits) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.payer, other.payer) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, payer, total); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemCredits.class, + "proration", proration, + "payer", payer, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private Optional payer = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(SchemasCommerceSubscriptionItemProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder payer(SchemasCommerceSubscriptionItemPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + public Builder payer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public SchemasCommerceSubscriptionItemCredits build() { + + return new SchemasCommerceSubscriptionItemCredits( + proration, payer, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemDiscounts.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemDiscounts.java new file mode 100644 index 00000000..78da3cfd --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemDiscounts.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SchemasCommerceSubscriptionItemDiscounts { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public SchemasCommerceSubscriptionItemDiscounts( + @JsonProperty("proration") Optional proration, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.total = total; + } + + public SchemasCommerceSubscriptionItemDiscounts( + CommerceMoneyResponse total) { + this(Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemDiscounts withProration(SchemasCommerceSubscriptionItemNextInvoiceProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public SchemasCommerceSubscriptionItemDiscounts withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public SchemasCommerceSubscriptionItemDiscounts withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemDiscounts other = (SchemasCommerceSubscriptionItemDiscounts) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, total); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemDiscounts.class, + "proration", proration, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(SchemasCommerceSubscriptionItemNextInvoiceProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public SchemasCommerceSubscriptionItemDiscounts build() { + + return new SchemasCommerceSubscriptionItemDiscounts( + proration, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.java index 2582e649..e856a532 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.java +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceAmount.java @@ -14,7 +14,8 @@ /** * SchemasCommerceSubscriptionItemNextInvoiceAmount * - *

Amount for the next payment. + *

Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public class SchemasCommerceSubscriptionItemNextInvoiceAmount { /** diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.java new file mode 100644 index 00000000..be16e369 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextInvoiceProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Float; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class SchemasCommerceSubscriptionItemNextInvoiceProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_passed") + private long cycleDaysPassed; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_passed_percent") + private float cyclePassedPercent; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextInvoiceProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_passed") long cycleDaysPassed, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_passed_percent") float cyclePassedPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.amount = amount; + this.cycleDaysPassed = cycleDaysPassed; + this.cycleDaysTotal = cycleDaysTotal; + this.cyclePassedPercent = cyclePassedPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysPassed() { + return cycleDaysPassed; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public float cyclePassedPercent() { + return cyclePassedPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextInvoiceProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public SchemasCommerceSubscriptionItemNextInvoiceProration withCycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + public SchemasCommerceSubscriptionItemNextInvoiceProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public SchemasCommerceSubscriptionItemNextInvoiceProration withCyclePassedPercent(float cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextInvoiceProration other = (SchemasCommerceSubscriptionItemNextInvoiceProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysPassed, other.cycleDaysPassed) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cyclePassedPercent, other.cyclePassedPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextInvoiceProration.class, + "amount", amount, + "cycleDaysPassed", cycleDaysPassed, + "cycleDaysTotal", cycleDaysTotal, + "cyclePassedPercent", cyclePassedPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysPassed; + + private Long cycleDaysTotal; + + private Float cyclePassedPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cyclePassedPercent(float cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + public SchemasCommerceSubscriptionItemNextInvoiceProration build() { + + return new SchemasCommerceSubscriptionItemNextInvoiceProration( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPayment.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPayment.java index e172641b..e203189d 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPayment.java +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPayment.java @@ -13,6 +13,8 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; /** @@ -22,7 +24,8 @@ */ public class SchemasCommerceSubscriptionItemNextPayment { /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("amount") @@ -35,22 +38,45 @@ public class SchemasCommerceSubscriptionItemNextPayment { @JsonProperty("date") private JsonNullable date; + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("totals") + private JsonNullable totals; + @JsonCreator public SchemasCommerceSubscriptionItemNextPayment( @JsonProperty("amount") JsonNullable amount, - @JsonProperty("date") JsonNullable date) { + @JsonProperty("date") JsonNullable date, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("totals") JsonNullable totals) { Utils.checkNotNull(amount, "amount"); Utils.checkNotNull(date, "date"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(totals, "totals"); this.amount = amount; this.date = date; + this.perUnitTotals = perUnitTotals; + this.totals = totals; } public SchemasCommerceSubscriptionItemNextPayment() { - this(JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined()); } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -66,13 +92,33 @@ public JsonNullable date() { return date; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable totals() { + return (JsonNullable) totals; + } + public static Builder builder() { return new Builder(); } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public SchemasCommerceSubscriptionItemNextPayment withAmount(SchemasCommerceSubscriptionItemNextPaymentAmount amount) { Utils.checkNotNull(amount, "amount"); @@ -81,7 +127,8 @@ public SchemasCommerceSubscriptionItemNextPayment withAmount(SchemasCommerceSubs } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public SchemasCommerceSubscriptionItemNextPayment withAmount(JsonNullable amount) { Utils.checkNotNull(amount, "amount"); @@ -107,6 +154,45 @@ public SchemasCommerceSubscriptionItemNextPayment withDate(JsonNullable da return this; } + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public SchemasCommerceSubscriptionItemNextPayment withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public SchemasCommerceSubscriptionItemNextPayment withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public SchemasCommerceSubscriptionItemNextPayment withTotals(SchemasCommerceSubscriptionItemNextPaymentTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public SchemasCommerceSubscriptionItemNextPayment withTotals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,20 +204,25 @@ public boolean equals(java.lang.Object o) { SchemasCommerceSubscriptionItemNextPayment other = (SchemasCommerceSubscriptionItemNextPayment) o; return Utils.enhancedDeepEquals(this.amount, other.amount) && - Utils.enhancedDeepEquals(this.date, other.date); + Utils.enhancedDeepEquals(this.date, other.date) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.totals, other.totals); } @Override public int hashCode() { return Utils.enhancedHash( - amount, date); + amount, date, perUnitTotals, + totals); } @Override public String toString() { return Utils.toString(SchemasCommerceSubscriptionItemNextPayment.class, "amount", amount, - "date", date); + "date", date, + "perUnitTotals", perUnitTotals, + "totals", totals); } @SuppressWarnings("UnusedReturnValue") @@ -141,13 +232,18 @@ public final static class Builder { private JsonNullable date = JsonNullable.undefined(); + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable totals = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public Builder amount(SchemasCommerceSubscriptionItemNextPaymentAmount amount) { Utils.checkNotNull(amount, "amount"); @@ -156,7 +252,8 @@ public Builder amount(SchemasCommerceSubscriptionItemNextPaymentAmount amount) { } /** - * Amount for the next payment. + * Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public Builder amount(JsonNullable amount) { Utils.checkNotNull(amount, "amount"); @@ -183,10 +280,51 @@ public Builder date(JsonNullable date) { return this; } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + /** + * Per-unit total breakdown (for example, seats) for the next payment. + */ + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(SchemasCommerceSubscriptionItemNextPaymentTotals totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = JsonNullable.of(totals); + return this; + } + + /** + * Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ + public Builder totals(JsonNullable totals) { + Utils.checkNotNull(totals, "totals"); + this.totals = totals; + return this; + } + public SchemasCommerceSubscriptionItemNextPayment build() { return new SchemasCommerceSubscriptionItemNextPayment( - amount, date); + amount, date, perUnitTotals, + totals); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.java index cece0711..88c2cb49 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.java +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentAmount.java @@ -14,7 +14,8 @@ /** * SchemasCommerceSubscriptionItemNextPaymentAmount * - *

Amount for the next payment. + *

Base plan fee for the next payment. Does not include per-unit (e.g. seat) charges; see + * `totals.grand_total` for the full amount. */ public class SchemasCommerceSubscriptionItemNextPaymentAmount { /** diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.java new file mode 100644 index 00000000..e548d4af --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentCredits.java @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SchemasCommerceSubscriptionItemNextPaymentCredits { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("payer") + private Optional payer; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextPaymentCredits( + @JsonProperty("proration") Optional proration, + @JsonProperty("payer") Optional payer, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(payer, "payer"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.payer = payer; + this.total = total; + } + + public SchemasCommerceSubscriptionItemNextPaymentCredits( + CommerceMoneyResponse total) { + this(Optional.empty(), Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional payer() { + return (Optional) payer; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextPaymentCredits withProration(SchemasCommerceSubscriptionItemNextPaymentProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public SchemasCommerceSubscriptionItemNextPaymentCredits withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentCredits withPayer(SchemasCommerceSubscriptionItemNextPaymentPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + + public SchemasCommerceSubscriptionItemNextPaymentCredits withPayer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentCredits withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextPaymentCredits other = (SchemasCommerceSubscriptionItemNextPaymentCredits) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.payer, other.payer) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, payer, total); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextPaymentCredits.class, + "proration", proration, + "payer", payer, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private Optional payer = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(SchemasCommerceSubscriptionItemNextPaymentProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder payer(SchemasCommerceSubscriptionItemNextPaymentPayer payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = Optional.ofNullable(payer); + return this; + } + + public Builder payer(Optional payer) { + Utils.checkNotNull(payer, "payer"); + this.payer = payer; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentCredits build() { + + return new SchemasCommerceSubscriptionItemNextPaymentCredits( + proration, payer, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.java new file mode 100644 index 00000000..0f6c3f20 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentDiscounts.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SchemasCommerceSubscriptionItemNextPaymentDiscounts { + + @JsonInclude(Include.ALWAYS) + @JsonProperty("proration") + private Optional proration; + + + @JsonProperty("total") + private CommerceMoneyResponse total; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextPaymentDiscounts( + @JsonProperty("proration") Optional proration, + @JsonProperty("total") CommerceMoneyResponse total) { + Utils.checkNotNull(proration, "proration"); + Utils.checkNotNull(total, "total"); + this.proration = proration; + this.total = total; + } + + public SchemasCommerceSubscriptionItemNextPaymentDiscounts( + CommerceMoneyResponse total) { + this(Optional.empty(), total); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional proration() { + return (Optional) proration; + } + + @JsonIgnore + public CommerceMoneyResponse total() { + return total; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextPaymentDiscounts withProration(SchemasCommerceSubscriptionItemNextPaymentTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + + public SchemasCommerceSubscriptionItemNextPaymentDiscounts withProration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentDiscounts withTotal(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextPaymentDiscounts other = (SchemasCommerceSubscriptionItemNextPaymentDiscounts) o; + return + Utils.enhancedDeepEquals(this.proration, other.proration) && + Utils.enhancedDeepEquals(this.total, other.total); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + proration, total); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextPaymentDiscounts.class, + "proration", proration, + "total", total); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional proration = Optional.empty(); + + private CommerceMoneyResponse total; + + private Builder() { + // force use of static builder() method + } + + + public Builder proration(SchemasCommerceSubscriptionItemNextPaymentTotalsProration proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = Optional.ofNullable(proration); + return this; + } + + public Builder proration(Optional proration) { + Utils.checkNotNull(proration, "proration"); + this.proration = proration; + return this; + } + + + public Builder total(CommerceMoneyResponse total) { + Utils.checkNotNull(total, "total"); + this.total = total; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentDiscounts build() { + + return new SchemasCommerceSubscriptionItemNextPaymentDiscounts( + proration, total); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.java new file mode 100644 index 00000000..a8987676 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentPayer.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class SchemasCommerceSubscriptionItemNextPaymentPayer { + + @JsonProperty("remaining_balance") + private CommerceMoneyResponse remainingBalance; + + + @JsonProperty("applied_amount") + private CommerceMoneyResponse appliedAmount; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextPaymentPayer( + @JsonProperty("remaining_balance") CommerceMoneyResponse remainingBalance, + @JsonProperty("applied_amount") CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.remainingBalance = remainingBalance; + this.appliedAmount = appliedAmount; + } + + @JsonIgnore + public CommerceMoneyResponse remainingBalance() { + return remainingBalance; + } + + @JsonIgnore + public CommerceMoneyResponse appliedAmount() { + return appliedAmount; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextPaymentPayer withRemainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentPayer withAppliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextPaymentPayer other = (SchemasCommerceSubscriptionItemNextPaymentPayer) o; + return + Utils.enhancedDeepEquals(this.remainingBalance, other.remainingBalance) && + Utils.enhancedDeepEquals(this.appliedAmount, other.appliedAmount); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + remainingBalance, appliedAmount); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextPaymentPayer.class, + "remainingBalance", remainingBalance, + "appliedAmount", appliedAmount); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse remainingBalance; + + private CommerceMoneyResponse appliedAmount; + + private Builder() { + // force use of static builder() method + } + + + public Builder remainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + + public Builder appliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentPayer build() { + + return new SchemasCommerceSubscriptionItemNextPaymentPayer( + remainingBalance, appliedAmount); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.java new file mode 100644 index 00000000..9336045d --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class SchemasCommerceSubscriptionItemNextPaymentProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_remaining") + private long cycleDaysRemaining; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_remaining_percent") + private double cycleRemainingPercent; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextPaymentProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_remaining") long cycleDaysRemaining, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_remaining_percent") double cycleRemainingPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.amount = amount; + this.cycleDaysRemaining = cycleDaysRemaining; + this.cycleDaysTotal = cycleDaysTotal; + this.cycleRemainingPercent = cycleRemainingPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysRemaining() { + return cycleDaysRemaining; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public double cycleRemainingPercent() { + return cycleRemainingPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextPaymentProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentProration withCycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentProration withCycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextPaymentProration other = (SchemasCommerceSubscriptionItemNextPaymentProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysRemaining, other.cycleDaysRemaining) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cycleRemainingPercent, other.cycleRemainingPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextPaymentProration.class, + "amount", amount, + "cycleDaysRemaining", cycleDaysRemaining, + "cycleDaysTotal", cycleDaysTotal, + "cycleRemainingPercent", cycleRemainingPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysRemaining; + + private Long cycleDaysTotal; + + private Double cycleRemainingPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentProration build() { + + return new SchemasCommerceSubscriptionItemNextPaymentProration( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.java new file mode 100644 index 00000000..07b44a7a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotals.java @@ -0,0 +1,332 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * SchemasCommerceSubscriptionItemNextPaymentTotals + * + *

Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ +public class SchemasCommerceSubscriptionItemNextPaymentTotals { + + @JsonProperty("subtotal") + private CommerceMoneyResponse subtotal; + + + @JsonProperty("base_fee") + private CommerceMoneyResponse baseFee; + + + @JsonProperty("tax_total") + private CommerceMoneyResponse taxTotal; + + + @JsonProperty("grand_total") + private CommerceMoneyResponse grandTotal; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("credits") + private JsonNullable credits; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discounts") + private JsonNullable discounts; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextPaymentTotals( + @JsonProperty("subtotal") CommerceMoneyResponse subtotal, + @JsonProperty("base_fee") CommerceMoneyResponse baseFee, + @JsonProperty("tax_total") CommerceMoneyResponse taxTotal, + @JsonProperty("grand_total") CommerceMoneyResponse grandTotal, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("credits") JsonNullable credits, + @JsonProperty("discounts") JsonNullable discounts) { + Utils.checkNotNull(subtotal, "subtotal"); + Utils.checkNotNull(baseFee, "baseFee"); + Utils.checkNotNull(taxTotal, "taxTotal"); + Utils.checkNotNull(grandTotal, "grandTotal"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(credits, "credits"); + Utils.checkNotNull(discounts, "discounts"); + this.subtotal = subtotal; + this.baseFee = baseFee; + this.taxTotal = taxTotal; + this.grandTotal = grandTotal; + this.perUnitTotals = perUnitTotals; + this.credits = credits; + this.discounts = discounts; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals( + CommerceMoneyResponse subtotal, + CommerceMoneyResponse baseFee, + CommerceMoneyResponse taxTotal, + CommerceMoneyResponse grandTotal) { + this(subtotal, baseFee, taxTotal, + grandTotal, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); + } + + @JsonIgnore + public CommerceMoneyResponse subtotal() { + return subtotal; + } + + @JsonIgnore + public CommerceMoneyResponse baseFee() { + return baseFee; + } + + @JsonIgnore + public CommerceMoneyResponse taxTotal() { + return taxTotal; + } + + @JsonIgnore + public CommerceMoneyResponse grandTotal() { + return grandTotal; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable credits() { + return (JsonNullable) credits; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable discounts() { + return (JsonNullable) discounts; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextPaymentTotals withSubtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withBaseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withTaxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withGrandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + public SchemasCommerceSubscriptionItemNextPaymentTotals withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withCredits(SchemasCommerceSubscriptionItemNextPaymentCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withCredits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withDiscounts(SchemasCommerceSubscriptionItemNextPaymentDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals withDiscounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextPaymentTotals other = (SchemasCommerceSubscriptionItemNextPaymentTotals) o; + return + Utils.enhancedDeepEquals(this.subtotal, other.subtotal) && + Utils.enhancedDeepEquals(this.baseFee, other.baseFee) && + Utils.enhancedDeepEquals(this.taxTotal, other.taxTotal) && + Utils.enhancedDeepEquals(this.grandTotal, other.grandTotal) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.credits, other.credits) && + Utils.enhancedDeepEquals(this.discounts, other.discounts); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextPaymentTotals.class, + "subtotal", subtotal, + "baseFee", baseFee, + "taxTotal", taxTotal, + "grandTotal", grandTotal, + "perUnitTotals", perUnitTotals, + "credits", credits, + "discounts", discounts); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse subtotal; + + private CommerceMoneyResponse baseFee; + + private CommerceMoneyResponse taxTotal; + + private CommerceMoneyResponse grandTotal; + + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable credits = JsonNullable.undefined(); + + private JsonNullable discounts = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder subtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + + public Builder baseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + + public Builder taxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + + public Builder grandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + public Builder credits(SchemasCommerceSubscriptionItemNextPaymentCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public Builder credits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + + public Builder discounts(SchemasCommerceSubscriptionItemNextPaymentDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + public Builder discounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotals build() { + + return new SchemasCommerceSubscriptionItemNextPaymentTotals( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.java new file mode 100644 index 00000000..6bf07131 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemNextPaymentTotalsProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Float; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class SchemasCommerceSubscriptionItemNextPaymentTotalsProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_passed") + private long cycleDaysPassed; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_passed_percent") + private float cyclePassedPercent; + + @JsonCreator + public SchemasCommerceSubscriptionItemNextPaymentTotalsProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_passed") long cycleDaysPassed, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_passed_percent") float cyclePassedPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.amount = amount; + this.cycleDaysPassed = cycleDaysPassed; + this.cycleDaysTotal = cycleDaysTotal; + this.cyclePassedPercent = cyclePassedPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysPassed() { + return cycleDaysPassed; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public float cyclePassedPercent() { + return cyclePassedPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemNextPaymentTotalsProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotalsProration withCycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotalsProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotalsProration withCyclePassedPercent(float cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemNextPaymentTotalsProration other = (SchemasCommerceSubscriptionItemNextPaymentTotalsProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysPassed, other.cycleDaysPassed) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cyclePassedPercent, other.cyclePassedPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemNextPaymentTotalsProration.class, + "amount", amount, + "cycleDaysPassed", cycleDaysPassed, + "cycleDaysTotal", cycleDaysTotal, + "cyclePassedPercent", cyclePassedPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysPassed; + + private Long cycleDaysTotal; + + private Float cyclePassedPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysPassed(long cycleDaysPassed) { + Utils.checkNotNull(cycleDaysPassed, "cycleDaysPassed"); + this.cycleDaysPassed = cycleDaysPassed; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cyclePassedPercent(float cyclePassedPercent) { + Utils.checkNotNull(cyclePassedPercent, "cyclePassedPercent"); + this.cyclePassedPercent = cyclePassedPercent; + return this; + } + + public SchemasCommerceSubscriptionItemNextPaymentTotalsProration build() { + + return new SchemasCommerceSubscriptionItemNextPaymentTotalsProration( + amount, cycleDaysPassed, cycleDaysTotal, + cyclePassedPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemPayer.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemPayer.java new file mode 100644 index 00000000..166c01ae --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemPayer.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class SchemasCommerceSubscriptionItemPayer { + + @JsonProperty("remaining_balance") + private CommerceMoneyResponse remainingBalance; + + + @JsonProperty("applied_amount") + private CommerceMoneyResponse appliedAmount; + + @JsonCreator + public SchemasCommerceSubscriptionItemPayer( + @JsonProperty("remaining_balance") CommerceMoneyResponse remainingBalance, + @JsonProperty("applied_amount") CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.remainingBalance = remainingBalance; + this.appliedAmount = appliedAmount; + } + + @JsonIgnore + public CommerceMoneyResponse remainingBalance() { + return remainingBalance; + } + + @JsonIgnore + public CommerceMoneyResponse appliedAmount() { + return appliedAmount; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemPayer withRemainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + public SchemasCommerceSubscriptionItemPayer withAppliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemPayer other = (SchemasCommerceSubscriptionItemPayer) o; + return + Utils.enhancedDeepEquals(this.remainingBalance, other.remainingBalance) && + Utils.enhancedDeepEquals(this.appliedAmount, other.appliedAmount); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + remainingBalance, appliedAmount); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemPayer.class, + "remainingBalance", remainingBalance, + "appliedAmount", appliedAmount); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse remainingBalance; + + private CommerceMoneyResponse appliedAmount; + + private Builder() { + // force use of static builder() method + } + + + public Builder remainingBalance(CommerceMoneyResponse remainingBalance) { + Utils.checkNotNull(remainingBalance, "remainingBalance"); + this.remainingBalance = remainingBalance; + return this; + } + + + public Builder appliedAmount(CommerceMoneyResponse appliedAmount) { + Utils.checkNotNull(appliedAmount, "appliedAmount"); + this.appliedAmount = appliedAmount; + return this; + } + + public SchemasCommerceSubscriptionItemPayer build() { + + return new SchemasCommerceSubscriptionItemPayer( + remainingBalance, appliedAmount); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemProration.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemProration.java new file mode 100644 index 00000000..6cf59f66 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemProration.java @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; + + +public class SchemasCommerceSubscriptionItemProration { + + @JsonProperty("amount") + private CommerceMoneyResponse amount; + + + @JsonProperty("cycle_days_remaining") + private long cycleDaysRemaining; + + + @JsonProperty("cycle_days_total") + private long cycleDaysTotal; + + + @JsonProperty("cycle_remaining_percent") + private double cycleRemainingPercent; + + @JsonCreator + public SchemasCommerceSubscriptionItemProration( + @JsonProperty("amount") CommerceMoneyResponse amount, + @JsonProperty("cycle_days_remaining") long cycleDaysRemaining, + @JsonProperty("cycle_days_total") long cycleDaysTotal, + @JsonProperty("cycle_remaining_percent") double cycleRemainingPercent) { + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.amount = amount; + this.cycleDaysRemaining = cycleDaysRemaining; + this.cycleDaysTotal = cycleDaysTotal; + this.cycleRemainingPercent = cycleRemainingPercent; + } + + @JsonIgnore + public CommerceMoneyResponse amount() { + return amount; + } + + @JsonIgnore + public long cycleDaysRemaining() { + return cycleDaysRemaining; + } + + @JsonIgnore + public long cycleDaysTotal() { + return cycleDaysTotal; + } + + @JsonIgnore + public double cycleRemainingPercent() { + return cycleRemainingPercent; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemProration withAmount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + public SchemasCommerceSubscriptionItemProration withCycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + public SchemasCommerceSubscriptionItemProration withCycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + public SchemasCommerceSubscriptionItemProration withCycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemProration other = (SchemasCommerceSubscriptionItemProration) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.cycleDaysRemaining, other.cycleDaysRemaining) && + Utils.enhancedDeepEquals(this.cycleDaysTotal, other.cycleDaysTotal) && + Utils.enhancedDeepEquals(this.cycleRemainingPercent, other.cycleRemainingPercent); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemProration.class, + "amount", amount, + "cycleDaysRemaining", cycleDaysRemaining, + "cycleDaysTotal", cycleDaysTotal, + "cycleRemainingPercent", cycleRemainingPercent); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse amount; + + private Long cycleDaysRemaining; + + private Long cycleDaysTotal; + + private Double cycleRemainingPercent; + + private Builder() { + // force use of static builder() method + } + + + public Builder amount(CommerceMoneyResponse amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + public Builder cycleDaysRemaining(long cycleDaysRemaining) { + Utils.checkNotNull(cycleDaysRemaining, "cycleDaysRemaining"); + this.cycleDaysRemaining = cycleDaysRemaining; + return this; + } + + + public Builder cycleDaysTotal(long cycleDaysTotal) { + Utils.checkNotNull(cycleDaysTotal, "cycleDaysTotal"); + this.cycleDaysTotal = cycleDaysTotal; + return this; + } + + + public Builder cycleRemainingPercent(double cycleRemainingPercent) { + Utils.checkNotNull(cycleRemainingPercent, "cycleRemainingPercent"); + this.cycleRemainingPercent = cycleRemainingPercent; + return this; + } + + public SchemasCommerceSubscriptionItemProration build() { + + return new SchemasCommerceSubscriptionItemProration( + amount, cycleDaysRemaining, cycleDaysTotal, + cycleRemainingPercent); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemTotals.java b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemTotals.java new file mode 100644 index 00000000..85b46643 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasCommerceSubscriptionItemTotals.java @@ -0,0 +1,332 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * SchemasCommerceSubscriptionItemTotals + * + *

Breakdown of the recurring amount that will be billed at renewal (base fee + per-unit charges). Tax + * and credits are not previewed. + */ +public class SchemasCommerceSubscriptionItemTotals { + + @JsonProperty("subtotal") + private CommerceMoneyResponse subtotal; + + + @JsonProperty("base_fee") + private CommerceMoneyResponse baseFee; + + + @JsonProperty("tax_total") + private CommerceMoneyResponse taxTotal; + + + @JsonProperty("grand_total") + private CommerceMoneyResponse grandTotal; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("per_unit_totals") + private Optional> perUnitTotals; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("credits") + private JsonNullable credits; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discounts") + private JsonNullable discounts; + + @JsonCreator + public SchemasCommerceSubscriptionItemTotals( + @JsonProperty("subtotal") CommerceMoneyResponse subtotal, + @JsonProperty("base_fee") CommerceMoneyResponse baseFee, + @JsonProperty("tax_total") CommerceMoneyResponse taxTotal, + @JsonProperty("grand_total") CommerceMoneyResponse grandTotal, + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("credits") JsonNullable credits, + @JsonProperty("discounts") JsonNullable discounts) { + Utils.checkNotNull(subtotal, "subtotal"); + Utils.checkNotNull(baseFee, "baseFee"); + Utils.checkNotNull(taxTotal, "taxTotal"); + Utils.checkNotNull(grandTotal, "grandTotal"); + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + Utils.checkNotNull(credits, "credits"); + Utils.checkNotNull(discounts, "discounts"); + this.subtotal = subtotal; + this.baseFee = baseFee; + this.taxTotal = taxTotal; + this.grandTotal = grandTotal; + this.perUnitTotals = perUnitTotals; + this.credits = credits; + this.discounts = discounts; + } + + public SchemasCommerceSubscriptionItemTotals( + CommerceMoneyResponse subtotal, + CommerceMoneyResponse baseFee, + CommerceMoneyResponse taxTotal, + CommerceMoneyResponse grandTotal) { + this(subtotal, baseFee, taxTotal, + grandTotal, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); + } + + @JsonIgnore + public CommerceMoneyResponse subtotal() { + return subtotal; + } + + @JsonIgnore + public CommerceMoneyResponse baseFee() { + return baseFee; + } + + @JsonIgnore + public CommerceMoneyResponse taxTotal() { + return taxTotal; + } + + @JsonIgnore + public CommerceMoneyResponse grandTotal() { + return grandTotal; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable credits() { + return (JsonNullable) credits; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable discounts() { + return (JsonNullable) discounts; + } + + public static Builder builder() { + return new Builder(); + } + + + public SchemasCommerceSubscriptionItemTotals withSubtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + public SchemasCommerceSubscriptionItemTotals withBaseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + public SchemasCommerceSubscriptionItemTotals withTaxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + public SchemasCommerceSubscriptionItemTotals withGrandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + public SchemasCommerceSubscriptionItemTotals withPerUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + + public SchemasCommerceSubscriptionItemTotals withPerUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + public SchemasCommerceSubscriptionItemTotals withCredits(SchemasCommerceSubscriptionItemCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public SchemasCommerceSubscriptionItemTotals withCredits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + public SchemasCommerceSubscriptionItemTotals withDiscounts(SchemasCommerceSubscriptionItemDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + public SchemasCommerceSubscriptionItemTotals withDiscounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemasCommerceSubscriptionItemTotals other = (SchemasCommerceSubscriptionItemTotals) o; + return + Utils.enhancedDeepEquals(this.subtotal, other.subtotal) && + Utils.enhancedDeepEquals(this.baseFee, other.baseFee) && + Utils.enhancedDeepEquals(this.taxTotal, other.taxTotal) && + Utils.enhancedDeepEquals(this.grandTotal, other.grandTotal) && + Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && + Utils.enhancedDeepEquals(this.credits, other.credits) && + Utils.enhancedDeepEquals(this.discounts, other.discounts); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + @Override + public String toString() { + return Utils.toString(SchemasCommerceSubscriptionItemTotals.class, + "subtotal", subtotal, + "baseFee", baseFee, + "taxTotal", taxTotal, + "grandTotal", grandTotal, + "perUnitTotals", perUnitTotals, + "credits", credits, + "discounts", discounts); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CommerceMoneyResponse subtotal; + + private CommerceMoneyResponse baseFee; + + private CommerceMoneyResponse taxTotal; + + private CommerceMoneyResponse grandTotal; + + private Optional> perUnitTotals = Optional.empty(); + + private JsonNullable credits = JsonNullable.undefined(); + + private JsonNullable discounts = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder subtotal(CommerceMoneyResponse subtotal) { + Utils.checkNotNull(subtotal, "subtotal"); + this.subtotal = subtotal; + return this; + } + + + public Builder baseFee(CommerceMoneyResponse baseFee) { + Utils.checkNotNull(baseFee, "baseFee"); + this.baseFee = baseFee; + return this; + } + + + public Builder taxTotal(CommerceMoneyResponse taxTotal) { + Utils.checkNotNull(taxTotal, "taxTotal"); + this.taxTotal = taxTotal; + return this; + } + + + public Builder grandTotal(CommerceMoneyResponse grandTotal) { + Utils.checkNotNull(grandTotal, "grandTotal"); + this.grandTotal = grandTotal; + return this; + } + + + public Builder perUnitTotals(List perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = Optional.ofNullable(perUnitTotals); + return this; + } + + public Builder perUnitTotals(Optional> perUnitTotals) { + Utils.checkNotNull(perUnitTotals, "perUnitTotals"); + this.perUnitTotals = perUnitTotals; + return this; + } + + + public Builder credits(SchemasCommerceSubscriptionItemCredits credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = JsonNullable.of(credits); + return this; + } + + public Builder credits(JsonNullable credits) { + Utils.checkNotNull(credits, "credits"); + this.credits = credits; + return this; + } + + + public Builder discounts(SchemasCommerceSubscriptionItemDiscounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + public Builder discounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + + public SchemasCommerceSubscriptionItemTotals build() { + + return new SchemasCommerceSubscriptionItemTotals( + subtotal, baseFee, taxTotal, + grandTotal, perUnitTotals, credits, + discounts); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/Scim.java b/src/main/java/com/clerk/backend_api/models/components/Scim.java new file mode 100644 index 00000000..33344e51 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/Scim.java @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * Scim + * + *

Metadata describing a user's linkage to a SCIM directory. This object is only delivered on + * `user.created` and `user.updated` webhook events, and only when the user is provisioned through a + * SCIM directory. Its absence does not necessarily mean the user is not SCIM-managed. + */ +public class Scim { + /** + * The ID of the SCIM directory the user is provisioned from. + */ + @JsonProperty("directory_id") + private String directoryId; + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directory_enabled") + private Optional directoryEnabled; + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("external_id") + private Optional externalId; + + @JsonCreator + public Scim( + @JsonProperty("directory_id") String directoryId, + @JsonProperty("directory_enabled") Optional directoryEnabled, + @JsonProperty("external_id") Optional externalId) { + Utils.checkNotNull(directoryId, "directoryId"); + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + Utils.checkNotNull(externalId, "externalId"); + this.directoryId = directoryId; + this.directoryEnabled = directoryEnabled; + this.externalId = externalId; + } + + public Scim( + String directoryId) { + this(directoryId, Optional.empty(), Optional.empty()); + } + + /** + * The ID of the SCIM directory the user is provisioned from. + */ + @JsonIgnore + public String directoryId() { + return directoryId; + } + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + @JsonIgnore + public Optional directoryEnabled() { + return directoryEnabled; + } + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + @JsonIgnore + public Optional externalId() { + return externalId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the SCIM directory the user is provisioned from. + */ + public Scim withDirectoryId(String directoryId) { + Utils.checkNotNull(directoryId, "directoryId"); + this.directoryId = directoryId; + return this; + } + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Scim withDirectoryEnabled(boolean directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = Optional.ofNullable(directoryEnabled); + return this; + } + + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Scim withDirectoryEnabled(Optional directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = directoryEnabled; + return this; + } + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Scim withExternalId(String externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = Optional.ofNullable(externalId); + return this; + } + + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Scim withExternalId(Optional externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = externalId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Scim other = (Scim) o; + return + Utils.enhancedDeepEquals(this.directoryId, other.directoryId) && + Utils.enhancedDeepEquals(this.directoryEnabled, other.directoryEnabled) && + Utils.enhancedDeepEquals(this.externalId, other.externalId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + directoryId, directoryEnabled, externalId); + } + + @Override + public String toString() { + return Utils.toString(Scim.class, + "directoryId", directoryId, + "directoryEnabled", directoryEnabled, + "externalId", externalId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String directoryId; + + private Optional directoryEnabled = Optional.empty(); + + private Optional externalId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the SCIM directory the user is provisioned from. + */ + public Builder directoryId(String directoryId) { + Utils.checkNotNull(directoryId, "directoryId"); + this.directoryId = directoryId; + return this; + } + + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Builder directoryEnabled(boolean directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = Optional.ofNullable(directoryEnabled); + return this; + } + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Builder directoryEnabled(Optional directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = directoryEnabled; + return this; + } + + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Builder externalId(String externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Builder externalId(Optional externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = externalId; + return this; + } + + public Scim build() { + + return new Scim( + directoryId, directoryEnabled, externalId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/Seats.java b/src/main/java/com/clerk/backend_api/models/components/Seats.java index 340c82c7..990e1c6a 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Seats.java +++ b/src/main/java/com/clerk/backend_api/models/components/Seats.java @@ -12,6 +12,8 @@ import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; import java.util.Optional; /** @@ -27,15 +29,25 @@ public class Seats { @JsonProperty("quantity") private Optional quantity; + /** + * Per-unit cost breakdown by pricing tier + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tiers") + private Optional> tiers; + @JsonCreator public Seats( - @JsonProperty("quantity") Optional quantity) { + @JsonProperty("quantity") Optional quantity, + @JsonProperty("tiers") Optional> tiers) { Utils.checkNotNull(quantity, "quantity"); + Utils.checkNotNull(tiers, "tiers"); this.quantity = quantity; + this.tiers = tiers; } public Seats() { - this(Optional.empty()); + this(Optional.empty(), Optional.empty()); } /** @@ -46,6 +58,15 @@ public Optional quantity() { return quantity; } + /** + * Per-unit cost breakdown by pricing tier + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> tiers() { + return (Optional>) tiers; + } + public static Builder builder() { return new Builder(); } @@ -70,6 +91,25 @@ public Seats withQuantity(Optional quantity) { return this; } + /** + * Per-unit cost breakdown by pricing tier + */ + public Seats withTiers(List tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = Optional.ofNullable(tiers); + return this; + } + + + /** + * Per-unit cost breakdown by pricing tier + */ + public Seats withTiers(Optional> tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = tiers; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -80,19 +120,21 @@ public boolean equals(java.lang.Object o) { } Seats other = (Seats) o; return - Utils.enhancedDeepEquals(this.quantity, other.quantity); + Utils.enhancedDeepEquals(this.quantity, other.quantity) && + Utils.enhancedDeepEquals(this.tiers, other.tiers); } @Override public int hashCode() { return Utils.enhancedHash( - quantity); + quantity, tiers); } @Override public String toString() { return Utils.toString(Seats.class, - "quantity", quantity); + "quantity", quantity, + "tiers", tiers); } @SuppressWarnings("UnusedReturnValue") @@ -100,6 +142,8 @@ public final static class Builder { private Optional quantity = Optional.empty(); + private Optional> tiers = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -123,10 +167,29 @@ public Builder quantity(Optional quantity) { return this; } + + /** + * Per-unit cost breakdown by pricing tier + */ + public Builder tiers(List tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = Optional.ofNullable(tiers); + return this; + } + + /** + * Per-unit cost breakdown by pricing tier + */ + public Builder tiers(Optional> tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = tiers; + return this; + } + public Seats build() { return new Seats( - quantity); + quantity, tiers); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SupportedBillingPeriods.java b/src/main/java/com/clerk/backend_api/models/components/SupportedBillingPeriods.java new file mode 100644 index 00000000..34b3a2ed --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/SupportedBillingPeriods.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * SupportedBillingPeriods + * + *

Which billing periods this price supports. + */ +public enum SupportedBillingPeriods { + MONTH("month"), + ANNUAL("annual"), + BOTH("both"); + + @JsonValue + private final String value; + + SupportedBillingPeriods(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (SupportedBillingPeriods o: SupportedBillingPeriods.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/Totals.java b/src/main/java/com/clerk/backend_api/models/components/Totals.java index 957f6137..52776546 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Totals.java +++ b/src/main/java/com/clerk/backend_api/models/components/Totals.java @@ -41,33 +41,43 @@ public class Totals { @JsonInclude(Include.NON_ABSENT) @JsonProperty("per_unit_totals") - private Optional> perUnitTotals; + private Optional> perUnitTotals; @JsonInclude(Include.NON_ABSENT) @JsonProperty("credits") private JsonNullable credits; + /** + * Information about the discounts applied to the payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discounts") + private JsonNullable discounts; + @JsonCreator public Totals( @JsonProperty("subtotal") CommerceMoneyResponse subtotal, @JsonProperty("base_fee") CommerceMoneyResponse baseFee, @JsonProperty("tax_total") CommerceMoneyResponse taxTotal, @JsonProperty("grand_total") CommerceMoneyResponse grandTotal, - @JsonProperty("per_unit_totals") Optional> perUnitTotals, - @JsonProperty("credits") JsonNullable credits) { + @JsonProperty("per_unit_totals") Optional> perUnitTotals, + @JsonProperty("credits") JsonNullable credits, + @JsonProperty("discounts") JsonNullable discounts) { Utils.checkNotNull(subtotal, "subtotal"); Utils.checkNotNull(baseFee, "baseFee"); Utils.checkNotNull(taxTotal, "taxTotal"); Utils.checkNotNull(grandTotal, "grandTotal"); Utils.checkNotNull(perUnitTotals, "perUnitTotals"); Utils.checkNotNull(credits, "credits"); + Utils.checkNotNull(discounts, "discounts"); this.subtotal = subtotal; this.baseFee = baseFee; this.taxTotal = taxTotal; this.grandTotal = grandTotal; this.perUnitTotals = perUnitTotals; this.credits = credits; + this.discounts = discounts; } public Totals( @@ -76,7 +86,8 @@ public Totals( CommerceMoneyResponse taxTotal, CommerceMoneyResponse grandTotal) { this(subtotal, baseFee, taxTotal, - grandTotal, Optional.empty(), JsonNullable.undefined()); + grandTotal, Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); } @JsonIgnore @@ -101,8 +112,8 @@ public CommerceMoneyResponse grandTotal() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> perUnitTotals() { - return (Optional>) perUnitTotals; + public Optional> perUnitTotals() { + return (Optional>) perUnitTotals; } @SuppressWarnings("unchecked") @@ -111,6 +122,15 @@ public JsonNullable credits() { return (JsonNullable) credits; } + /** + * Information about the discounts applied to the payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable discounts() { + return (JsonNullable) discounts; + } + public static Builder builder() { return new Builder(); } @@ -140,14 +160,14 @@ public Totals withGrandTotal(CommerceMoneyResponse grandTotal) { return this; } - public Totals withPerUnitTotals(List perUnitTotals) { + public Totals withPerUnitTotals(List perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = Optional.ofNullable(perUnitTotals); return this; } - public Totals withPerUnitTotals(Optional> perUnitTotals) { + public Totals withPerUnitTotals(Optional> perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = perUnitTotals; return this; @@ -165,6 +185,24 @@ public Totals withCredits(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -180,14 +218,16 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.taxTotal, other.taxTotal) && Utils.enhancedDeepEquals(this.grandTotal, other.grandTotal) && Utils.enhancedDeepEquals(this.perUnitTotals, other.perUnitTotals) && - Utils.enhancedDeepEquals(this.credits, other.credits); + Utils.enhancedDeepEquals(this.credits, other.credits) && + Utils.enhancedDeepEquals(this.discounts, other.discounts); } @Override public int hashCode() { return Utils.enhancedHash( subtotal, baseFee, taxTotal, - grandTotal, perUnitTotals, credits); + grandTotal, perUnitTotals, credits, + discounts); } @Override @@ -198,7 +238,8 @@ public String toString() { "taxTotal", taxTotal, "grandTotal", grandTotal, "perUnitTotals", perUnitTotals, - "credits", credits); + "credits", credits, + "discounts", discounts); } @SuppressWarnings("UnusedReturnValue") @@ -212,10 +253,12 @@ public final static class Builder { private CommerceMoneyResponse grandTotal; - private Optional> perUnitTotals = Optional.empty(); + private Optional> perUnitTotals = Optional.empty(); private JsonNullable credits = JsonNullable.undefined(); + private JsonNullable discounts = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -249,13 +292,13 @@ public Builder grandTotal(CommerceMoneyResponse grandTotal) { } - public Builder perUnitTotals(List perUnitTotals) { + public Builder perUnitTotals(List perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = Optional.ofNullable(perUnitTotals); return this; } - public Builder perUnitTotals(Optional> perUnitTotals) { + public Builder perUnitTotals(Optional> perUnitTotals) { Utils.checkNotNull(perUnitTotals, "perUnitTotals"); this.perUnitTotals = perUnitTotals; return this; @@ -274,11 +317,31 @@ public Builder credits(JsonNullable c return this; } + + /** + * Information about the discounts applied to the payment + */ + public Builder discounts(Discounts discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = JsonNullable.of(discounts); + return this; + } + + /** + * Information about the discounts applied to the payment + */ + public Builder discounts(JsonNullable discounts) { + Utils.checkNotNull(discounts, "discounts"); + this.discounts = discounts; + return this; + } + public Totals build() { return new Totals( subtotal, baseFee, taxTotal, - grandTotal, perUnitTotals, credits); + grandTotal, perUnitTotals, credits, + discounts); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/User.java b/src/main/java/com/clerk/backend_api/models/components/User.java index 1c915fdb..e9466480 100644 --- a/src/main/java/com/clerk/backend_api/models/components/User.java +++ b/src/main/java/com/clerk/backend_api/models/components/User.java @@ -202,6 +202,13 @@ public class User { @JsonProperty("locked") private boolean locked; + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deprovisioned") + private Optional deprovisioned; + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -271,6 +278,11 @@ public class User { @JsonProperty("bypass_client_trust") private Optional bypassClientTrust; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scim") + private JsonNullable scim; + @JsonCreator public User( @JsonProperty("id") String id, @@ -307,6 +319,7 @@ public User( @JsonProperty("last_sign_in_at") Optional lastSignInAt, @JsonProperty("banned") boolean banned, @JsonProperty("locked") boolean locked, + @JsonProperty("deprovisioned") Optional deprovisioned, @JsonProperty("lockout_expires_in_seconds") Optional lockoutExpiresInSeconds, @JsonProperty("verification_attempts_remaining") Optional verificationAttemptsRemaining, @JsonProperty("updated_at") long updatedAt, @@ -316,7 +329,8 @@ public User( @JsonProperty("create_organizations_limit") JsonNullable createOrganizationsLimit, @JsonProperty("last_active_at") Optional lastActiveAt, @JsonProperty("legal_accepted_at") Optional legalAcceptedAt, - @JsonProperty("bypass_client_trust") Optional bypassClientTrust) { + @JsonProperty("bypass_client_trust") Optional bypassClientTrust, + @JsonProperty("scim") JsonNullable scim) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(object, "object"); Utils.checkNotNull(externalId, "externalId"); @@ -352,6 +366,7 @@ public User( Utils.checkNotNull(lastSignInAt, "lastSignInAt"); Utils.checkNotNull(banned, "banned"); Utils.checkNotNull(locked, "locked"); + Utils.checkNotNull(deprovisioned, "deprovisioned"); Utils.checkNotNull(lockoutExpiresInSeconds, "lockoutExpiresInSeconds"); Utils.checkNotNull(verificationAttemptsRemaining, "verificationAttemptsRemaining"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -362,6 +377,7 @@ public User( Utils.checkNotNull(lastActiveAt, "lastActiveAt"); Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); Utils.checkNotNull(bypassClientTrust, "bypassClientTrust"); + Utils.checkNotNull(scim, "scim"); this.id = id; this.object = object; this.externalId = externalId; @@ -396,6 +412,7 @@ public User( this.lastSignInAt = lastSignInAt; this.banned = banned; this.locked = locked; + this.deprovisioned = deprovisioned; this.lockoutExpiresInSeconds = lockoutExpiresInSeconds; this.verificationAttemptsRemaining = verificationAttemptsRemaining; this.updatedAt = updatedAt; @@ -406,6 +423,7 @@ public User( this.lastActiveAt = lastActiveAt; this.legalAcceptedAt = legalAcceptedAt; this.bypassClientTrust = bypassClientTrust; + this.scim = scim; } public User( @@ -442,9 +460,10 @@ public User( externalAccounts, samlAccounts, enterpriseAccounts, Optional.empty(), Optional.empty(), banned, locked, Optional.empty(), Optional.empty(), - updatedAt, createdAt, deleteSelfEnabled, - createOrganizationEnabled, JsonNullable.undefined(), Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), updatedAt, createdAt, + deleteSelfEnabled, createOrganizationEnabled, JsonNullable.undefined(), + Optional.empty(), Optional.empty(), Optional.empty(), + JsonNullable.undefined()); } @JsonIgnore @@ -648,6 +667,14 @@ public boolean locked() { return locked; } + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + @JsonIgnore + public Optional deprovisioned() { + return deprovisioned; + } + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -731,6 +758,12 @@ public Optional bypassClientTrust() { return bypassClientTrust; } + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable scim() { + return (JsonNullable) scim; + } + public static Builder builder() { return new Builder(); } @@ -1103,6 +1136,25 @@ public User withLocked(boolean locked) { return this; } + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public User withDeprovisioned(boolean deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = Optional.ofNullable(deprovisioned); + return this; + } + + + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public User withDeprovisioned(Optional deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = deprovisioned; + return this; + } + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -1258,6 +1310,18 @@ public User withBypassClientTrust(Optional bypassClientTrust) { return this; } + public User withScim(Scim scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = JsonNullable.of(scim); + return this; + } + + public User withScim(JsonNullable scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = scim; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1302,6 +1366,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.lastSignInAt, other.lastSignInAt) && Utils.enhancedDeepEquals(this.banned, other.banned) && Utils.enhancedDeepEquals(this.locked, other.locked) && + Utils.enhancedDeepEquals(this.deprovisioned, other.deprovisioned) && Utils.enhancedDeepEquals(this.lockoutExpiresInSeconds, other.lockoutExpiresInSeconds) && Utils.enhancedDeepEquals(this.verificationAttemptsRemaining, other.verificationAttemptsRemaining) && Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && @@ -1311,7 +1376,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.createOrganizationsLimit, other.createOrganizationsLimit) && Utils.enhancedDeepEquals(this.lastActiveAt, other.lastActiveAt) && Utils.enhancedDeepEquals(this.legalAcceptedAt, other.legalAcceptedAt) && - Utils.enhancedDeepEquals(this.bypassClientTrust, other.bypassClientTrust); + Utils.enhancedDeepEquals(this.bypassClientTrust, other.bypassClientTrust) && + Utils.enhancedDeepEquals(this.scim, other.scim); } @Override @@ -1328,10 +1394,11 @@ public int hashCode() { mfaEnabledAt, mfaDisabledAt, passwordLastUpdatedAt, externalAccounts, samlAccounts, enterpriseAccounts, organizationMemberships, lastSignInAt, banned, - locked, lockoutExpiresInSeconds, verificationAttemptsRemaining, - updatedAt, createdAt, deleteSelfEnabled, - createOrganizationEnabled, createOrganizationsLimit, lastActiveAt, - legalAcceptedAt, bypassClientTrust); + locked, deprovisioned, lockoutExpiresInSeconds, + verificationAttemptsRemaining, updatedAt, createdAt, + deleteSelfEnabled, createOrganizationEnabled, createOrganizationsLimit, + lastActiveAt, legalAcceptedAt, bypassClientTrust, + scim); } @Override @@ -1371,6 +1438,7 @@ public String toString() { "lastSignInAt", lastSignInAt, "banned", banned, "locked", locked, + "deprovisioned", deprovisioned, "lockoutExpiresInSeconds", lockoutExpiresInSeconds, "verificationAttemptsRemaining", verificationAttemptsRemaining, "updatedAt", updatedAt, @@ -1380,7 +1448,8 @@ public String toString() { "createOrganizationsLimit", createOrganizationsLimit, "lastActiveAt", lastActiveAt, "legalAcceptedAt", legalAcceptedAt, - "bypassClientTrust", bypassClientTrust); + "bypassClientTrust", bypassClientTrust, + "scim", scim); } @SuppressWarnings("UnusedReturnValue") @@ -1455,6 +1524,8 @@ public final static class Builder { private Boolean locked; + private Optional deprovisioned = Optional.empty(); + private Optional lockoutExpiresInSeconds = Optional.empty(); private Optional verificationAttemptsRemaining = Optional.empty(); @@ -1475,6 +1546,8 @@ public final static class Builder { private Optional bypassClientTrust; + private JsonNullable scim = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -1867,6 +1940,25 @@ public Builder locked(boolean locked) { } + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public Builder deprovisioned(boolean deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = Optional.ofNullable(deprovisioned); + return this; + } + + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public Builder deprovisioned(Optional deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = deprovisioned; + return this; + } + + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -2026,6 +2118,19 @@ public Builder bypassClientTrust(Optional bypassClientTrust) { return this; } + + public Builder scim(Scim scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = JsonNullable.of(scim); + return this; + } + + public Builder scim(JsonNullable scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = scim; + return this; + } + public User build() { if (bypassClientTrust == null) { bypassClientTrust = _SINGLETON_VALUE_BypassClientTrust.value(); @@ -2043,10 +2148,11 @@ public User build() { mfaEnabledAt, mfaDisabledAt, passwordLastUpdatedAt, externalAccounts, samlAccounts, enterpriseAccounts, organizationMemberships, lastSignInAt, banned, - locked, lockoutExpiresInSeconds, verificationAttemptsRemaining, - updatedAt, createdAt, deleteSelfEnabled, - createOrganizationEnabled, createOrganizationsLimit, lastActiveAt, - legalAcceptedAt, bypassClientTrust); + locked, deprovisioned, lockoutExpiresInSeconds, + verificationAttemptsRemaining, updatedAt, createdAt, + deleteSelfEnabled, createOrganizationEnabled, createOrganizationsLimit, + lastActiveAt, legalAcceptedAt, bypassClientTrust, + scim); } diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationOTP.java b/src/main/java/com/clerk/backend_api/models/components/VerificationOTP.java index 5c997947..bce52e3a 100644 --- a/src/main/java/com/clerk/backend_api/models/components/VerificationOTP.java +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationOTP.java @@ -40,6 +40,13 @@ public class VerificationOTP implements PhoneNumberVerification { @JsonProperty("expire_at") private Optional expireAt; + /** + * The delivery channel of the code (phone codes only). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channel") + private JsonNullable channel; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("verified_at_client") @@ -52,18 +59,21 @@ public VerificationOTP( @JsonProperty("strategy") VerificationOtpVerificationStrategy strategy, @JsonProperty("attempts") Optional attempts, @JsonProperty("expire_at") Optional expireAt, + @JsonProperty("channel") JsonNullable channel, @JsonProperty("verified_at_client") JsonNullable verifiedAtClient) { Utils.checkNotNull(object, "object"); Utils.checkNotNull(status, "status"); Utils.checkNotNull(strategy, "strategy"); Utils.checkNotNull(attempts, "attempts"); Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(channel, "channel"); Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); this.object = object; this.status = status; this.strategy = strategy; this.attempts = attempts; this.expireAt = expireAt; + this.channel = channel; this.verifiedAtClient = verifiedAtClient; } @@ -71,7 +81,8 @@ public VerificationOTP( VerificationOtpVerificationStatus status, VerificationOtpVerificationStrategy strategy) { this(Optional.empty(), status, strategy, - Optional.empty(), Optional.empty(), JsonNullable.undefined()); + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined()); } @JsonIgnore @@ -100,6 +111,14 @@ public Optional expireAt() { return expireAt; } + /** + * The delivery channel of the code (phone codes only). + */ + @JsonIgnore + public JsonNullable channel() { + return channel; + } + @JsonIgnore public JsonNullable verifiedAtClient() { return verifiedAtClient; @@ -161,6 +180,24 @@ public VerificationOTP withExpireAt(Optional expireAt) { return this; } + /** + * The delivery channel of the code (phone codes only). + */ + public VerificationOTP withChannel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = JsonNullable.of(channel); + return this; + } + + /** + * The delivery channel of the code (phone codes only). + */ + public VerificationOTP withChannel(JsonNullable channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + public VerificationOTP withVerifiedAtClient(String verifiedAtClient) { Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); this.verifiedAtClient = JsonNullable.of(verifiedAtClient); @@ -188,6 +225,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.strategy, other.strategy) && Utils.enhancedDeepEquals(this.attempts, other.attempts) && Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.channel, other.channel) && Utils.enhancedDeepEquals(this.verifiedAtClient, other.verifiedAtClient); } @@ -195,7 +233,8 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( object, status, strategy, - attempts, expireAt, verifiedAtClient); + attempts, expireAt, channel, + verifiedAtClient); } @Override @@ -206,6 +245,7 @@ public String toString() { "strategy", strategy, "attempts", attempts, "expireAt", expireAt, + "channel", channel, "verifiedAtClient", verifiedAtClient); } @@ -222,6 +262,8 @@ public final static class Builder { private Optional expireAt = Optional.empty(); + private JsonNullable channel = JsonNullable.undefined(); + private JsonNullable verifiedAtClient = JsonNullable.undefined(); private Builder() { @@ -282,6 +324,25 @@ public Builder expireAt(Optional expireAt) { } + /** + * The delivery channel of the code (phone codes only). + */ + public Builder channel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = JsonNullable.of(channel); + return this; + } + + /** + * The delivery channel of the code (phone codes only). + */ + public Builder channel(JsonNullable channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + public Builder verifiedAtClient(String verifiedAtClient) { Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); this.verifiedAtClient = JsonNullable.of(verifiedAtClient); @@ -298,7 +359,8 @@ public VerificationOTP build() { return new VerificationOTP( object, status, strategy, - attempts, expireAt, verifiedAtClient); + attempts, expireAt, channel, + verifiedAtClient); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationOauthVerificationOauth.java b/src/main/java/com/clerk/backend_api/models/components/VerificationOauthVerificationOauth.java new file mode 100644 index 00000000..9afb7ab2 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationOauthVerificationOauth.java @@ -0,0 +1,382 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class VerificationOauthVerificationOauth implements ExternalAccountWithVerificationVerification { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("object") + private Optional object; + + + @JsonProperty("status") + private VerificationOauthVerificationStatus status; + + + @JsonProperty("strategy") + private String strategy; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("external_verification_redirect_url") + private Optional externalVerificationRedirectUrl; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private JsonNullable error; + + + @JsonProperty("expire_at") + private long expireAt; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("attempts") + private Optional attempts; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("verified_at_client") + private JsonNullable verifiedAtClient; + + @JsonCreator + public VerificationOauthVerificationOauth( + @JsonProperty("object") Optional object, + @JsonProperty("status") VerificationOauthVerificationStatus status, + @JsonProperty("strategy") String strategy, + @JsonProperty("external_verification_redirect_url") Optional externalVerificationRedirectUrl, + @JsonProperty("error") JsonNullable error, + @JsonProperty("expire_at") long expireAt, + @JsonProperty("attempts") Optional attempts, + @JsonProperty("verified_at_client") JsonNullable verifiedAtClient) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(strategy, "strategy"); + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(attempts, "attempts"); + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.object = object; + this.status = status; + this.strategy = strategy; + this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + this.error = error; + this.expireAt = expireAt; + this.attempts = attempts; + this.verifiedAtClient = verifiedAtClient; + } + + public VerificationOauthVerificationOauth( + VerificationOauthVerificationStatus status, + String strategy, + long expireAt) { + this(Optional.empty(), status, strategy, + Optional.empty(), JsonNullable.undefined(), expireAt, + Optional.empty(), JsonNullable.undefined()); + } + + @JsonIgnore + @Override + public String object() { + return Utils.discriminatorToString(object); + } + + @JsonIgnore + public VerificationOauthVerificationStatus status() { + return status; + } + + @JsonIgnore + public String strategy() { + return strategy; + } + + @JsonIgnore + public Optional externalVerificationRedirectUrl() { + return externalVerificationRedirectUrl; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable error() { + return (JsonNullable) error; + } + + @JsonIgnore + public long expireAt() { + return expireAt; + } + + @JsonIgnore + public Optional attempts() { + return attempts; + } + + @JsonIgnore + public JsonNullable verifiedAtClient() { + return verifiedAtClient; + } + + public static Builder builder() { + return new Builder(); + } + + + public VerificationOauthVerificationOauth withObject(VerificationOauthVerificationObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + public VerificationOauthVerificationOauth withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public VerificationOauthVerificationOauth withStatus(VerificationOauthVerificationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public VerificationOauthVerificationOauth withStrategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + public VerificationOauthVerificationOauth withExternalVerificationRedirectUrl(String externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = Optional.ofNullable(externalVerificationRedirectUrl); + return this; + } + + + public VerificationOauthVerificationOauth withExternalVerificationRedirectUrl(Optional externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + return this; + } + + public VerificationOauthVerificationOauth withError(VerificationOauthVerificationError error) { + Utils.checkNotNull(error, "error"); + this.error = JsonNullable.of(error); + return this; + } + + public VerificationOauthVerificationOauth withError(JsonNullable error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public VerificationOauthVerificationOauth withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + public VerificationOauthVerificationOauth withAttempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + + public VerificationOauthVerificationOauth withAttempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + public VerificationOauthVerificationOauth withVerifiedAtClient(String verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = JsonNullable.of(verifiedAtClient); + return this; + } + + public VerificationOauthVerificationOauth withVerifiedAtClient(JsonNullable verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = verifiedAtClient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerificationOauthVerificationOauth other = (VerificationOauthVerificationOauth) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.strategy, other.strategy) && + Utils.enhancedDeepEquals(this.externalVerificationRedirectUrl, other.externalVerificationRedirectUrl) && + Utils.enhancedDeepEquals(this.error, other.error) && + Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.attempts, other.attempts) && + Utils.enhancedDeepEquals(this.verifiedAtClient, other.verifiedAtClient); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, status, strategy, + externalVerificationRedirectUrl, error, expireAt, + attempts, verifiedAtClient); + } + + @Override + public String toString() { + return Utils.toString(VerificationOauthVerificationOauth.class, + "object", object, + "status", status, + "strategy", strategy, + "externalVerificationRedirectUrl", externalVerificationRedirectUrl, + "error", error, + "expireAt", expireAt, + "attempts", attempts, + "verifiedAtClient", verifiedAtClient); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional object = Optional.empty(); + + private VerificationOauthVerificationStatus status; + + private String strategy; + + private Optional externalVerificationRedirectUrl = Optional.empty(); + + private JsonNullable error = JsonNullable.undefined(); + + private Long expireAt; + + private Optional attempts = Optional.empty(); + + private JsonNullable verifiedAtClient = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder object(VerificationOauthVerificationObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder status(VerificationOauthVerificationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder strategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + + public Builder externalVerificationRedirectUrl(String externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = Optional.ofNullable(externalVerificationRedirectUrl); + return this; + } + + public Builder externalVerificationRedirectUrl(Optional externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + return this; + } + + + public Builder error(VerificationOauthVerificationError error) { + Utils.checkNotNull(error, "error"); + this.error = JsonNullable.of(error); + return this; + } + + public Builder error(JsonNullable error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + + public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + + public Builder attempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + public Builder attempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + + public Builder verifiedAtClient(String verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = JsonNullable.of(verifiedAtClient); + return this; + } + + public Builder verifiedAtClient(JsonNullable verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = verifiedAtClient; + return this; + } + + public VerificationOauthVerificationOauth build() { + + return new VerificationOauthVerificationOauth( + object, status, strategy, + externalVerificationRedirectUrl, error, expireAt, + attempts, verifiedAtClient); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationResponse.java b/src/main/java/com/clerk/backend_api/models/components/VerificationResponse.java new file mode 100644 index 00000000..3ef95f46 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationResponse.java @@ -0,0 +1,498 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * VerificationResponse + * + *

The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ +public class VerificationResponse { + /** + * The type of the verification object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("object") + private Optional object; + + /** + * The ID of the verification. Pass this to attempt_verification. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The status of the verification (unverified, verified, expired, or failed). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * The verification strategy (email_code or phone_code). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("strategy") + private Optional strategy; + + /** + * The number of attempts made against this verification. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("attempts") + private JsonNullable attempts; + + /** + * Unix timestamp (milliseconds) at which the code expires. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expire_at") + private JsonNullable expireAt; + + /** + * The channel the code was sent over (phone numbers only). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("channel") + private JsonNullable channel; + + @JsonCreator + public VerificationResponse( + @JsonProperty("object") Optional object, + @JsonProperty("id") Optional id, + @JsonProperty("status") Optional status, + @JsonProperty("strategy") Optional strategy, + @JsonProperty("attempts") JsonNullable attempts, + @JsonProperty("expire_at") JsonNullable expireAt, + @JsonProperty("channel") JsonNullable channel) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(strategy, "strategy"); + Utils.checkNotNull(attempts, "attempts"); + Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(channel, "channel"); + this.object = object; + this.id = id; + this.status = status; + this.strategy = strategy; + this.attempts = attempts; + this.expireAt = expireAt; + this.channel = channel; + } + + public VerificationResponse() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined()); + } + + /** + * The type of the verification object. + */ + @JsonIgnore + public Optional object() { + return object; + } + + /** + * The ID of the verification. Pass this to attempt_verification. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The status of the verification (unverified, verified, expired, or failed). + */ + @JsonIgnore + public Optional status() { + return status; + } + + /** + * The verification strategy (email_code or phone_code). + */ + @JsonIgnore + public Optional strategy() { + return strategy; + } + + /** + * The number of attempts made against this verification. + */ + @JsonIgnore + public JsonNullable attempts() { + return attempts; + } + + /** + * Unix timestamp (milliseconds) at which the code expires. + */ + @JsonIgnore + public JsonNullable expireAt() { + return expireAt; + } + + /** + * The channel the code was sent over (phone numbers only). + */ + @JsonIgnore + public JsonNullable channel() { + return channel; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The type of the verification object. + */ + public VerificationResponse withObject(String object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * The type of the verification object. + */ + public VerificationResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + /** + * The ID of the verification. Pass this to attempt_verification. + */ + public VerificationResponse withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * The ID of the verification. Pass this to attempt_verification. + */ + public VerificationResponse withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The status of the verification (unverified, verified, expired, or failed). + */ + public VerificationResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * The status of the verification (unverified, verified, expired, or failed). + */ + public VerificationResponse withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The verification strategy (email_code or phone_code). + */ + public VerificationResponse withStrategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = Optional.ofNullable(strategy); + return this; + } + + + /** + * The verification strategy (email_code or phone_code). + */ + public VerificationResponse withStrategy(Optional strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + /** + * The number of attempts made against this verification. + */ + public VerificationResponse withAttempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = JsonNullable.of(attempts); + return this; + } + + /** + * The number of attempts made against this verification. + */ + public VerificationResponse withAttempts(JsonNullable attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + /** + * Unix timestamp (milliseconds) at which the code expires. + */ + public VerificationResponse withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = JsonNullable.of(expireAt); + return this; + } + + /** + * Unix timestamp (milliseconds) at which the code expires. + */ + public VerificationResponse withExpireAt(JsonNullable expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + /** + * The channel the code was sent over (phone numbers only). + */ + public VerificationResponse withChannel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = JsonNullable.of(channel); + return this; + } + + /** + * The channel the code was sent over (phone numbers only). + */ + public VerificationResponse withChannel(JsonNullable channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerificationResponse other = (VerificationResponse) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.strategy, other.strategy) && + Utils.enhancedDeepEquals(this.attempts, other.attempts) && + Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.channel, other.channel); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, id, status, + strategy, attempts, expireAt, + channel); + } + + @Override + public String toString() { + return Utils.toString(VerificationResponse.class, + "object", object, + "id", id, + "status", status, + "strategy", strategy, + "attempts", attempts, + "expireAt", expireAt, + "channel", channel); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional object = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional strategy = Optional.empty(); + + private JsonNullable attempts = JsonNullable.undefined(); + + private JsonNullable expireAt = JsonNullable.undefined(); + + private JsonNullable channel = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The type of the verification object. + */ + public Builder object(String object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * The type of the verification object. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + /** + * The ID of the verification. Pass this to attempt_verification. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * The ID of the verification. Pass this to attempt_verification. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The status of the verification (unverified, verified, expired, or failed). + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * The status of the verification (unverified, verified, expired, or failed). + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * The verification strategy (email_code or phone_code). + */ + public Builder strategy(String strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = Optional.ofNullable(strategy); + return this; + } + + /** + * The verification strategy (email_code or phone_code). + */ + public Builder strategy(Optional strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + + /** + * The number of attempts made against this verification. + */ + public Builder attempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = JsonNullable.of(attempts); + return this; + } + + /** + * The number of attempts made against this verification. + */ + public Builder attempts(JsonNullable attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + + /** + * Unix timestamp (milliseconds) at which the code expires. + */ + public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = JsonNullable.of(expireAt); + return this; + } + + /** + * Unix timestamp (milliseconds) at which the code expires. + */ + public Builder expireAt(JsonNullable expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + + /** + * The channel the code was sent over (phone numbers only). + */ + public Builder channel(String channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = JsonNullable.of(channel); + return this; + } + + /** + * The channel the code was sent over (phone numbers only). + */ + public Builder channel(JsonNullable channel) { + Utils.checkNotNull(channel, "channel"); + this.channel = channel; + return this; + } + + public VerificationResponse build() { + + return new VerificationResponse( + object, id, status, + strategy, attempts, expireAt, + channel); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationSAMLVerificationEmailAddressSAML.java b/src/main/java/com/clerk/backend_api/models/components/VerificationSAMLVerificationEmailAddressSAML.java new file mode 100644 index 00000000..9191b756 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationSAMLVerificationEmailAddressSAML.java @@ -0,0 +1,393 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class VerificationSAMLVerificationEmailAddressSAML implements Verification { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("object") + private Optional object; + + + @JsonProperty("status") + private VerificationSamlVerificationStatus status; + + + @JsonProperty("strategy") + private VerificationSamlVerificationStrategy strategy; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("external_verification_redirect_url") + private JsonNullable externalVerificationRedirectUrl; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private JsonNullable error; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expire_at") + private JsonNullable expireAt; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("attempts") + private Optional attempts; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("verified_at_client") + private JsonNullable verifiedAtClient; + + @JsonCreator + public VerificationSAMLVerificationEmailAddressSAML( + @JsonProperty("object") Optional object, + @JsonProperty("status") VerificationSamlVerificationStatus status, + @JsonProperty("strategy") VerificationSamlVerificationStrategy strategy, + @JsonProperty("external_verification_redirect_url") JsonNullable externalVerificationRedirectUrl, + @JsonProperty("error") JsonNullable error, + @JsonProperty("expire_at") JsonNullable expireAt, + @JsonProperty("attempts") Optional attempts, + @JsonProperty("verified_at_client") JsonNullable verifiedAtClient) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(strategy, "strategy"); + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(expireAt, "expireAt"); + Utils.checkNotNull(attempts, "attempts"); + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.object = object; + this.status = status; + this.strategy = strategy; + this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + this.error = error; + this.expireAt = expireAt; + this.attempts = attempts; + this.verifiedAtClient = verifiedAtClient; + } + + public VerificationSAMLVerificationEmailAddressSAML( + VerificationSamlVerificationStatus status, + VerificationSamlVerificationStrategy strategy) { + this(Optional.empty(), status, strategy, + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined()); + } + + @JsonIgnore + @Override + public String object() { + return Utils.discriminatorToString(object); + } + + @JsonIgnore + public VerificationSamlVerificationStatus status() { + return status; + } + + @JsonIgnore + public VerificationSamlVerificationStrategy strategy() { + return strategy; + } + + @JsonIgnore + public JsonNullable externalVerificationRedirectUrl() { + return externalVerificationRedirectUrl; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable error() { + return (JsonNullable) error; + } + + @JsonIgnore + public JsonNullable expireAt() { + return expireAt; + } + + @JsonIgnore + public Optional attempts() { + return attempts; + } + + @JsonIgnore + public JsonNullable verifiedAtClient() { + return verifiedAtClient; + } + + public static Builder builder() { + return new Builder(); + } + + + public VerificationSAMLVerificationEmailAddressSAML withObject(VerificationSamlVerificationObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + public VerificationSAMLVerificationEmailAddressSAML withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withStatus(VerificationSamlVerificationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withStrategy(VerificationSamlVerificationStrategy strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withExternalVerificationRedirectUrl(String externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = JsonNullable.of(externalVerificationRedirectUrl); + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withExternalVerificationRedirectUrl(JsonNullable externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withError(VerificationError error) { + Utils.checkNotNull(error, "error"); + this.error = JsonNullable.of(error); + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withError(JsonNullable error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = JsonNullable.of(expireAt); + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withExpireAt(JsonNullable expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withAttempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + + public VerificationSAMLVerificationEmailAddressSAML withAttempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withVerifiedAtClient(String verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = JsonNullable.of(verifiedAtClient); + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML withVerifiedAtClient(JsonNullable verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = verifiedAtClient; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerificationSAMLVerificationEmailAddressSAML other = (VerificationSAMLVerificationEmailAddressSAML) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.strategy, other.strategy) && + Utils.enhancedDeepEquals(this.externalVerificationRedirectUrl, other.externalVerificationRedirectUrl) && + Utils.enhancedDeepEquals(this.error, other.error) && + Utils.enhancedDeepEquals(this.expireAt, other.expireAt) && + Utils.enhancedDeepEquals(this.attempts, other.attempts) && + Utils.enhancedDeepEquals(this.verifiedAtClient, other.verifiedAtClient); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, status, strategy, + externalVerificationRedirectUrl, error, expireAt, + attempts, verifiedAtClient); + } + + @Override + public String toString() { + return Utils.toString(VerificationSAMLVerificationEmailAddressSAML.class, + "object", object, + "status", status, + "strategy", strategy, + "externalVerificationRedirectUrl", externalVerificationRedirectUrl, + "error", error, + "expireAt", expireAt, + "attempts", attempts, + "verifiedAtClient", verifiedAtClient); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional object = Optional.empty(); + + private VerificationSamlVerificationStatus status; + + private VerificationSamlVerificationStrategy strategy; + + private JsonNullable externalVerificationRedirectUrl = JsonNullable.undefined(); + + private JsonNullable error = JsonNullable.undefined(); + + private JsonNullable expireAt = JsonNullable.undefined(); + + private Optional attempts = Optional.empty(); + + private JsonNullable verifiedAtClient = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder object(VerificationSamlVerificationObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder status(VerificationSamlVerificationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder strategy(VerificationSamlVerificationStrategy strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + + public Builder externalVerificationRedirectUrl(String externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = JsonNullable.of(externalVerificationRedirectUrl); + return this; + } + + public Builder externalVerificationRedirectUrl(JsonNullable externalVerificationRedirectUrl) { + Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); + this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; + return this; + } + + + public Builder error(VerificationError error) { + Utils.checkNotNull(error, "error"); + this.error = JsonNullable.of(error); + return this; + } + + public Builder error(JsonNullable error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + + public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = JsonNullable.of(expireAt); + return this; + } + + public Builder expireAt(JsonNullable expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + + public Builder attempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + public Builder attempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + + public Builder verifiedAtClient(String verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = JsonNullable.of(verifiedAtClient); + return this; + } + + public Builder verifiedAtClient(JsonNullable verifiedAtClient) { + Utils.checkNotNull(verifiedAtClient, "verifiedAtClient"); + this.verifiedAtClient = verifiedAtClient; + return this; + } + + public VerificationSAMLVerificationEmailAddressSAML build() { + + return new VerificationSAMLVerificationEmailAddressSAML( + object, status, strategy, + externalVerificationRedirectUrl, error, expireAt, + attempts, verifiedAtClient); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationSCIM.java b/src/main/java/com/clerk/backend_api/models/components/VerificationSCIM.java new file mode 100644 index 00000000..8e5f07cd --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationSCIM.java @@ -0,0 +1,262 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class VerificationSCIM implements Verification { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("object") + private Optional object; + + + @JsonProperty("status") + private VerificationScimVerificationStatus status; + + + @JsonProperty("strategy") + private VerificationScimVerificationStrategy strategy; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("attempts") + private Optional attempts; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("expire_at") + private Optional expireAt; + + @JsonCreator + public VerificationSCIM( + @JsonProperty("object") Optional object, + @JsonProperty("status") VerificationScimVerificationStatus status, + @JsonProperty("strategy") VerificationScimVerificationStrategy strategy, + @JsonProperty("attempts") Optional attempts, + @JsonProperty("expire_at") Optional expireAt) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(strategy, "strategy"); + Utils.checkNotNull(attempts, "attempts"); + Utils.checkNotNull(expireAt, "expireAt"); + this.object = object; + this.status = status; + this.strategy = strategy; + this.attempts = attempts; + this.expireAt = expireAt; + } + + public VerificationSCIM( + VerificationScimVerificationStatus status, + VerificationScimVerificationStrategy strategy) { + this(Optional.empty(), status, strategy, + Optional.empty(), Optional.empty()); + } + + @JsonIgnore + @Override + public String object() { + return Utils.discriminatorToString(object); + } + + @JsonIgnore + public VerificationScimVerificationStatus status() { + return status; + } + + @JsonIgnore + public VerificationScimVerificationStrategy strategy() { + return strategy; + } + + @JsonIgnore + public Optional attempts() { + return attempts; + } + + @JsonIgnore + public Optional expireAt() { + return expireAt; + } + + public static Builder builder() { + return new Builder(); + } + + + public VerificationSCIM withObject(VerificationScimVerificationObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + public VerificationSCIM withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public VerificationSCIM withStatus(VerificationScimVerificationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public VerificationSCIM withStrategy(VerificationScimVerificationStrategy strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + public VerificationSCIM withAttempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + + public VerificationSCIM withAttempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + public VerificationSCIM withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + + public VerificationSCIM withExpireAt(Optional expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerificationSCIM other = (VerificationSCIM) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.strategy, other.strategy) && + Utils.enhancedDeepEquals(this.attempts, other.attempts) && + Utils.enhancedDeepEquals(this.expireAt, other.expireAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, status, strategy, + attempts, expireAt); + } + + @Override + public String toString() { + return Utils.toString(VerificationSCIM.class, + "object", object, + "status", status, + "strategy", strategy, + "attempts", attempts, + "expireAt", expireAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional object = Optional.empty(); + + private VerificationScimVerificationStatus status; + + private VerificationScimVerificationStrategy strategy; + + private Optional attempts = Optional.empty(); + + private Optional expireAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder object(VerificationScimVerificationObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder status(VerificationScimVerificationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder strategy(VerificationScimVerificationStrategy strategy) { + Utils.checkNotNull(strategy, "strategy"); + this.strategy = strategy; + return this; + } + + + public Builder attempts(long attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = Optional.ofNullable(attempts); + return this; + } + + public Builder attempts(Optional attempts) { + Utils.checkNotNull(attempts, "attempts"); + this.attempts = attempts; + return this; + } + + + public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + public Builder expireAt(Optional expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = expireAt; + return this; + } + + public VerificationSCIM build() { + + return new VerificationSCIM( + object, status, strategy, + attempts, expireAt); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationObject.java b/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationObject.java new file mode 100644 index 00000000..6c0e1561 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum VerificationScimVerificationObject { + VERIFICATION_SCIM("verification_scim"); + + @JsonValue + private final String value; + + VerificationScimVerificationObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (VerificationScimVerificationObject o: VerificationScimVerificationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java b/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStatus.java similarity index 60% rename from src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java rename to src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStatus.java index 44fe88ea..c3c2e225 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStatus.java @@ -8,19 +8,13 @@ import java.util.Objects; import java.util.Optional; -/** - * OrganizationDomainStatus - * - *

Status of the verification. It can be `unverified` or `verified` - */ -public enum OrganizationDomainStatus { - UNVERIFIED("unverified"), +public enum VerificationScimVerificationStatus { VERIFIED("verified"); @JsonValue private final String value; - OrganizationDomainStatus(String value) { + VerificationScimVerificationStatus(String value) { this.value = value; } @@ -28,8 +22,8 @@ public String value() { return value; } - public static Optional fromValue(String value) { - for (OrganizationDomainStatus o: OrganizationDomainStatus.values()) { + public static Optional fromValue(String value) { + for (VerificationScimVerificationStatus o: VerificationScimVerificationStatus.values()) { if (Objects.deepEquals(o.value, value)) { return Optional.of(o); } diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStrategy.java new file mode 100644 index 00000000..600c5c90 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationScimVerificationStrategy.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum VerificationScimVerificationStrategy { + SCIM("scim"); + + @JsonValue + private final String value; + + VerificationScimVerificationStrategy(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (VerificationScimVerificationStrategy o: VerificationScimVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationTypeIdResolver.java b/src/main/java/com/clerk/backend_api/models/components/VerificationTypeIdResolver.java index 23e8e1db..2da04104 100644 --- a/src/main/java/com/clerk/backend_api/models/components/VerificationTypeIdResolver.java +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationTypeIdResolver.java @@ -23,8 +23,9 @@ private void initializeTypeMap() { registerType("verification_admin", Admin.class); registerType("verification_from_oauth", FromOAuth.class); registerType("verification_ticket", Ticket.class); - registerType("verification_saml", Saml.class); + registerType("verification_saml", VerificationSAMLVerificationEmailAddressSAML.class); registerType("verification_email_link", EmailLink.class); + registerType("verification_scim", VerificationSCIM.class); } @Override diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysErrors.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysErrors.java new file mode 100644 index 00000000..9c7cde6d --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class CreateAPIKeyAPIKeysErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public CreateAPIKeyAPIKeysErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateAPIKeyAPIKeysErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CreateAPIKeyAPIKeysErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public CreateAPIKeyAPIKeysErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAPIKeyAPIKeysErrors other = (CreateAPIKeyAPIKeysErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(CreateAPIKeyAPIKeysErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CreateAPIKeyAPIKeysErrors build() { + + return new CreateAPIKeyAPIKeysErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysResponseBody.java index c09d01e6..2c1a461c 100644 --- a/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysResponseBody.java +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAPIKeyAPIKeysResponseBody.java @@ -53,7 +53,7 @@ public static CreateAPIKeyAPIKeysResponseBody from(HttpResponse res } @Deprecated - public Optional> errors() { + public Optional> errors() { return data().map(Data::errors); } @@ -75,17 +75,17 @@ public Optional deserializationException() { public static class Data { @JsonProperty("errors") - private List errors; + private List errors; @JsonCreator public Data( - @JsonProperty("errors") List errors) { + @JsonProperty("errors") List errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; } @JsonIgnore - public List errors() { + public List errors() { return errors; } @@ -94,7 +94,7 @@ public static Builder builder() { } - public Data withErrors(List errors) { + public Data withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -128,14 +128,14 @@ public String toString() { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private List errors; + private List errors; private Builder() { // force use of static builder() method } - public Builder errors(List errors) { + public Builder errors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.java new file mode 100644 index 00000000..fb1915fb --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors other = (CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors build() { + + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.java new file mode 100644 index 00000000..346575b5 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody. If deserialization of the response body fails, + * the resulting CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

409 Conflict + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java new file mode 100644 index 00000000..54b88a8a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody. If deserialization of the response body fails, + * the resulting CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

401 Unauthorized + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java new file mode 100644 index 00000000..c5099fc0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors other = (CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors build() { + + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java new file mode 100644 index 00000000..7944375e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody. If deserialization of the response body fails, + * the resulting CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

403 Forbidden + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenErrors.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenErrors.java new file mode 100644 index 00000000..0549cd2a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class CreateAdminPortalLinkTokenErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public CreateAdminPortalLinkTokenErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateAdminPortalLinkTokenErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public CreateAdminPortalLinkTokenErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public CreateAdminPortalLinkTokenErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdminPortalLinkTokenErrors other = (CreateAdminPortalLinkTokenErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(CreateAdminPortalLinkTokenErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public CreateAdminPortalLinkTokenErrors build() { + + return new CreateAdminPortalLinkTokenErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenResponseBody.java new file mode 100644 index 00000000..8e0151ad --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateAdminPortalLinkTokenResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class CreateAdminPortalLinkTokenResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public CreateAdminPortalLinkTokenResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of CreateAdminPortalLinkTokenResponseBody. If deserialization of the response body fails, + * the resulting CreateAdminPortalLinkTokenResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static CreateAdminPortalLinkTokenResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new CreateAdminPortalLinkTokenResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new CreateAdminPortalLinkTokenResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

400 Bad Request + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/CreateApiKeyResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/CreateApiKeyResponseBody.java index 6ed7af0d..91d79288 100644 --- a/src/main/java/com/clerk/backend_api/models/errors/CreateApiKeyResponseBody.java +++ b/src/main/java/com/clerk/backend_api/models/errors/CreateApiKeyResponseBody.java @@ -53,7 +53,7 @@ public static CreateApiKeyResponseBody from(HttpResponse response) } @Deprecated - public Optional> errors() { + public Optional> errors() { return data().map(Data::errors); } @@ -75,17 +75,17 @@ public Optional deserializationException() { public static class Data { @JsonProperty("errors") - private List errors; + private List errors; @JsonCreator public Data( - @JsonProperty("errors") List errors) { + @JsonProperty("errors") List errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; } @JsonIgnore - public List errors() { + public List errors() { return errors; } @@ -94,7 +94,7 @@ public static Builder builder() { } - public Data withErrors(List errors) { + public Data withErrors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; @@ -128,14 +128,14 @@ public String toString() { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private List errors; + private List errors; private Builder() { // force use of static builder() method } - public Builder errors(List errors) { + public Builder errors(List errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.java new file mode 100644 index 00000000..5153a902 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors other = (RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors build() { + + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.java new file mode 100644 index 00000000..15ec73cd --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors other = (RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors build() { + + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404Errors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.java new file mode 100644 index 00000000..39f529fa --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody. If deserialization of the response body fails, + * the resulting RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

404 Not Found + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java new file mode 100644 index 00000000..1435bb47 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody. If deserialization of the response body fails, + * the resulting RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

401 Unauthorized + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java new file mode 100644 index 00000000..714b10c2 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors other = (RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors build() { + + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java new file mode 100644 index 00000000..5e2fc217 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody. If deserialization of the response body fails, + * the resulting RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

403 Forbidden + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenErrors.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenErrors.java new file mode 100644 index 00000000..98e541a0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenErrors.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class RevokeAdminPortalLinkTokenErrors { + + @JsonProperty("message") + private String message; + + + @JsonProperty("long_message") + private String longMessage; + + + @JsonProperty("code") + private String code; + + @JsonCreator + public RevokeAdminPortalLinkTokenErrors( + @JsonProperty("message") String message, + @JsonProperty("long_message") String longMessage, + @JsonProperty("code") String code) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(longMessage, "longMessage"); + Utils.checkNotNull(code, "code"); + this.message = message; + this.longMessage = longMessage; + this.code = code; + } + + @JsonIgnore + public String message() { + return message; + } + + @JsonIgnore + public String longMessage() { + return longMessage; + } + + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenErrors withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public RevokeAdminPortalLinkTokenErrors withLongMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + public RevokeAdminPortalLinkTokenErrors withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenErrors other = (RevokeAdminPortalLinkTokenErrors) o; + return + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.longMessage, other.longMessage) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + message, longMessage, code); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenErrors.class, + "message", message, + "longMessage", longMessage, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String message; + + private String longMessage; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + + public Builder longMessage(String longMessage) { + Utils.checkNotNull(longMessage, "longMessage"); + this.longMessage = longMessage; + return this; + } + + + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public RevokeAdminPortalLinkTokenErrors build() { + + return new RevokeAdminPortalLinkTokenErrors( + message, longMessage, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenResponseBody.java b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenResponseBody.java new file mode 100644 index 00000000..13328be2 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/errors/RevokeAdminPortalLinkTokenResponseBody.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.errors; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.lang.Throwable; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +@SuppressWarnings("serial") +public class RevokeAdminPortalLinkTokenResponseBody extends ClerkError { + + @Nullable + private final Data data; + + @Nullable + private final Throwable deserializationException; + + public RevokeAdminPortalLinkTokenResponseBody( + int code, + byte[] body, + HttpResponse rawResponse, + @Nullable Data data, + @Nullable Throwable deserializationException) { + super("API error occurred", code, body, rawResponse, null); + this.data = data; + this.deserializationException = deserializationException; + } + + /** + * Parse a response into an instance of RevokeAdminPortalLinkTokenResponseBody. If deserialization of the response body fails, + * the resulting RevokeAdminPortalLinkTokenResponseBody instance will have a null data() value and a non-null deserializationException(). + */ + public static RevokeAdminPortalLinkTokenResponseBody from(HttpResponse response) { + try { + byte[] bytes = Utils.extractByteArrayFromBody(response); + Data data = Utils.mapper().readValue(bytes, Data.class); + return new RevokeAdminPortalLinkTokenResponseBody(response.statusCode(), bytes, response, data, null); + } catch (Exception e) { + return new RevokeAdminPortalLinkTokenResponseBody(response.statusCode(), null, response, null, e); + } + } + + @Deprecated + public Optional> errors() { + return data().map(Data::errors); + } + + public Optional data() { + return Optional.ofNullable(data); + } + + /** + * Returns the exception if an error occurs while deserializing the response body. + */ + public Optional deserializationException() { + return Optional.ofNullable(deserializationException); + } + /** + * Data + * + *

400 Bad Request + */ + public static class Data { + + @JsonProperty("errors") + private List errors; + + @JsonCreator + public Data( + @JsonProperty("errors") List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + @JsonIgnore + public List errors() { + return errors; + } + + public static Builder builder() { + return new Builder(); + } + + + public Data withErrors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Data other = (Data) o; + return + Utils.enhancedDeepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Data.class, + "errors", errors); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List errors; + + private Builder() { + // force use of static builder() method + } + + + public Builder errors(List errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Data build() { + + return new Data( + errors); + } + + } + } + +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequest.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequest.java new file mode 100644 index 00000000..cf50d07f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class AttemptEmailAddressVerificationRequest { + /** + * The ID of the email address whose code is being verified + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=email_address_id") + private String emailAddressId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private AttemptEmailAddressVerificationRequestBody requestBody; + + @JsonCreator + public AttemptEmailAddressVerificationRequest( + String emailAddressId, + AttemptEmailAddressVerificationRequestBody requestBody) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + Utils.checkNotNull(requestBody, "requestBody"); + this.emailAddressId = emailAddressId; + this.requestBody = requestBody; + } + + /** + * The ID of the email address whose code is being verified + */ + @JsonIgnore + public String emailAddressId() { + return emailAddressId; + } + + @JsonIgnore + public AttemptEmailAddressVerificationRequestBody requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the email address whose code is being verified + */ + public AttemptEmailAddressVerificationRequest withEmailAddressId(String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + return this; + } + + public AttemptEmailAddressVerificationRequest withRequestBody(AttemptEmailAddressVerificationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttemptEmailAddressVerificationRequest other = (AttemptEmailAddressVerificationRequest) o; + return + Utils.enhancedDeepEquals(this.emailAddressId, other.emailAddressId) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + emailAddressId, requestBody); + } + + @Override + public String toString() { + return Utils.toString(AttemptEmailAddressVerificationRequest.class, + "emailAddressId", emailAddressId, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String emailAddressId; + + private AttemptEmailAddressVerificationRequestBody requestBody; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the email address whose code is being verified + */ + public Builder emailAddressId(String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + return this; + } + + + public Builder requestBody(AttemptEmailAddressVerificationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public AttemptEmailAddressVerificationRequest build() { + + return new AttemptEmailAddressVerificationRequest( + emailAddressId, requestBody); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBody.java new file mode 100644 index 00000000..4e0914c8 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBody.java @@ -0,0 +1,141 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class AttemptEmailAddressVerificationRequestBody { + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + @JsonProperty("verification_id") + private String verificationId; + + /** + * The verification code that was sent to the email address + */ + @JsonProperty("code") + private String code; + + @JsonCreator + public AttemptEmailAddressVerificationRequestBody( + @JsonProperty("verification_id") String verificationId, + @JsonProperty("code") String code) { + Utils.checkNotNull(verificationId, "verificationId"); + Utils.checkNotNull(code, "code"); + this.verificationId = verificationId; + this.code = code; + } + + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + @JsonIgnore + public String verificationId() { + return verificationId; + } + + /** + * The verification code that was sent to the email address + */ + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + public AttemptEmailAddressVerificationRequestBody withVerificationId(String verificationId) { + Utils.checkNotNull(verificationId, "verificationId"); + this.verificationId = verificationId; + return this; + } + + /** + * The verification code that was sent to the email address + */ + public AttemptEmailAddressVerificationRequestBody withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttemptEmailAddressVerificationRequestBody other = (AttemptEmailAddressVerificationRequestBody) o; + return + Utils.enhancedDeepEquals(this.verificationId, other.verificationId) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + verificationId, code); + } + + @Override + public String toString() { + return Utils.toString(AttemptEmailAddressVerificationRequestBody.class, + "verificationId", verificationId, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String verificationId; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + public Builder verificationId(String verificationId) { + Utils.checkNotNull(verificationId, "verificationId"); + this.verificationId = verificationId; + return this; + } + + + /** + * The verification code that was sent to the email address + */ + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public AttemptEmailAddressVerificationRequestBody build() { + + return new AttemptEmailAddressVerificationRequestBody( + verificationId, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBuilder.java new file mode 100644 index 00000000..fba6da6c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.AttemptEmailAddressVerification; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class AttemptEmailAddressVerificationRequestBuilder { + + private String emailAddressId; + private AttemptEmailAddressVerificationRequestBody requestBody; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AttemptEmailAddressVerificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AttemptEmailAddressVerificationRequestBuilder emailAddressId(String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + return this; + } + + public AttemptEmailAddressVerificationRequestBuilder requestBody(AttemptEmailAddressVerificationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public AttemptEmailAddressVerificationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AttemptEmailAddressVerificationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private AttemptEmailAddressVerificationRequest buildRequest() { + + AttemptEmailAddressVerificationRequest request = new AttemptEmailAddressVerificationRequest(emailAddressId, + requestBody); + + return request; + } + + public AttemptEmailAddressVerificationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AttemptEmailAddressVerification.Sync(sdkConfiguration, options, _headers); + AttemptEmailAddressVerificationRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationResponse.java new file mode 100644 index 00000000..8c751d76 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptEmailAddressVerificationResponse.java @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AttemptEmailAddressVerificationResponse 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; + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + private Optional verificationResponse; + + @JsonCreator + public AttemptEmailAddressVerificationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional verificationResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.verificationResponse = verificationResponse; + } + + public AttemptEmailAddressVerificationResponse( + 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; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional verificationResponse() { + return (Optional) verificationResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AttemptEmailAddressVerificationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AttemptEmailAddressVerificationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AttemptEmailAddressVerificationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public AttemptEmailAddressVerificationResponse withVerificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public AttemptEmailAddressVerificationResponse withVerificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttemptEmailAddressVerificationResponse other = (AttemptEmailAddressVerificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.verificationResponse, other.verificationResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + verificationResponse); + } + + @Override + public String toString() { + return Utils.toString(AttemptEmailAddressVerificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "verificationResponse", verificationResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional verificationResponse = 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; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + public AttemptEmailAddressVerificationResponse build() { + + return new AttemptEmailAddressVerificationResponse( + contentType, statusCode, rawResponse, + verificationResponse); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequest.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequest.java new file mode 100644 index 00000000..74600e7c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class AttemptPhoneNumberVerificationRequest { + /** + * The ID of the phone number whose code is being verified + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=phone_number_id") + private String phoneNumberId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private AttemptPhoneNumberVerificationRequestBody requestBody; + + @JsonCreator + public AttemptPhoneNumberVerificationRequest( + String phoneNumberId, + AttemptPhoneNumberVerificationRequestBody requestBody) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + Utils.checkNotNull(requestBody, "requestBody"); + this.phoneNumberId = phoneNumberId; + this.requestBody = requestBody; + } + + /** + * The ID of the phone number whose code is being verified + */ + @JsonIgnore + public String phoneNumberId() { + return phoneNumberId; + } + + @JsonIgnore + public AttemptPhoneNumberVerificationRequestBody requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the phone number whose code is being verified + */ + public AttemptPhoneNumberVerificationRequest withPhoneNumberId(String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + return this; + } + + public AttemptPhoneNumberVerificationRequest withRequestBody(AttemptPhoneNumberVerificationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttemptPhoneNumberVerificationRequest other = (AttemptPhoneNumberVerificationRequest) o; + return + Utils.enhancedDeepEquals(this.phoneNumberId, other.phoneNumberId) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + phoneNumberId, requestBody); + } + + @Override + public String toString() { + return Utils.toString(AttemptPhoneNumberVerificationRequest.class, + "phoneNumberId", phoneNumberId, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String phoneNumberId; + + private AttemptPhoneNumberVerificationRequestBody requestBody; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the phone number whose code is being verified + */ + public Builder phoneNumberId(String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + return this; + } + + + public Builder requestBody(AttemptPhoneNumberVerificationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public AttemptPhoneNumberVerificationRequest build() { + + return new AttemptPhoneNumberVerificationRequest( + phoneNumberId, requestBody); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBody.java new file mode 100644 index 00000000..adfcf219 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBody.java @@ -0,0 +1,141 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class AttemptPhoneNumberVerificationRequestBody { + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + @JsonProperty("verification_id") + private String verificationId; + + /** + * The verification code that was sent to the phone number + */ + @JsonProperty("code") + private String code; + + @JsonCreator + public AttemptPhoneNumberVerificationRequestBody( + @JsonProperty("verification_id") String verificationId, + @JsonProperty("code") String code) { + Utils.checkNotNull(verificationId, "verificationId"); + Utils.checkNotNull(code, "code"); + this.verificationId = verificationId; + this.code = code; + } + + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + @JsonIgnore + public String verificationId() { + return verificationId; + } + + /** + * The verification code that was sent to the phone number + */ + @JsonIgnore + public String code() { + return code; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + public AttemptPhoneNumberVerificationRequestBody withVerificationId(String verificationId) { + Utils.checkNotNull(verificationId, "verificationId"); + this.verificationId = verificationId; + return this; + } + + /** + * The verification code that was sent to the phone number + */ + public AttemptPhoneNumberVerificationRequestBody withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttemptPhoneNumberVerificationRequestBody other = (AttemptPhoneNumberVerificationRequestBody) o; + return + Utils.enhancedDeepEquals(this.verificationId, other.verificationId) && + Utils.enhancedDeepEquals(this.code, other.code); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + verificationId, code); + } + + @Override + public String toString() { + return Utils.toString(AttemptPhoneNumberVerificationRequestBody.class, + "verificationId", verificationId, + "code", code); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String verificationId; + + private String code; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the verification to check, such as one returned by prepare_verification + */ + public Builder verificationId(String verificationId) { + Utils.checkNotNull(verificationId, "verificationId"); + this.verificationId = verificationId; + return this; + } + + + /** + * The verification code that was sent to the phone number + */ + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + public AttemptPhoneNumberVerificationRequestBody build() { + + return new AttemptPhoneNumberVerificationRequestBody( + verificationId, code); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBuilder.java new file mode 100644 index 00000000..86480893 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.AttemptPhoneNumberVerification; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class AttemptPhoneNumberVerificationRequestBuilder { + + private String phoneNumberId; + private AttemptPhoneNumberVerificationRequestBody requestBody; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AttemptPhoneNumberVerificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AttemptPhoneNumberVerificationRequestBuilder phoneNumberId(String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + return this; + } + + public AttemptPhoneNumberVerificationRequestBuilder requestBody(AttemptPhoneNumberVerificationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public AttemptPhoneNumberVerificationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AttemptPhoneNumberVerificationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private AttemptPhoneNumberVerificationRequest buildRequest() { + + AttemptPhoneNumberVerificationRequest request = new AttemptPhoneNumberVerificationRequest(phoneNumberId, + requestBody); + + return request; + } + + public AttemptPhoneNumberVerificationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AttemptPhoneNumberVerification.Sync(sdkConfiguration, options, _headers); + AttemptPhoneNumberVerificationRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationResponse.java new file mode 100644 index 00000000..683d16a7 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/AttemptPhoneNumberVerificationResponse.java @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AttemptPhoneNumberVerificationResponse 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; + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + private Optional verificationResponse; + + @JsonCreator + public AttemptPhoneNumberVerificationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional verificationResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.verificationResponse = verificationResponse; + } + + public AttemptPhoneNumberVerificationResponse( + 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; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional verificationResponse() { + return (Optional) verificationResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AttemptPhoneNumberVerificationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AttemptPhoneNumberVerificationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AttemptPhoneNumberVerificationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public AttemptPhoneNumberVerificationResponse withVerificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public AttemptPhoneNumberVerificationResponse withVerificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttemptPhoneNumberVerificationResponse other = (AttemptPhoneNumberVerificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.verificationResponse, other.verificationResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + verificationResponse); + } + + @Override + public String toString() { + return Utils.toString(AttemptPhoneNumberVerificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "verificationResponse", verificationResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional verificationResponse = 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; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + public AttemptPhoneNumberVerificationResponse build() { + + return new AttemptPhoneNumberVerificationResponse( + contentType, statusCode, rawResponse, + verificationResponse); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenObject.java b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenObject.java new file mode 100644 index 00000000..f9f72011 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum CreateAdminPortalLinkTokenObject { + ADMIN_PORTAL_LINK_TOKEN("admin_portal_link_token"); + + @JsonValue + private final String value; + + CreateAdminPortalLinkTokenObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (CreateAdminPortalLinkTokenObject o: CreateAdminPortalLinkTokenObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBody.java new file mode 100644 index 00000000..38a2d21c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBody.java @@ -0,0 +1,258 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.LazySingletonValue; +import com.clerk.backend_api.utils.Utils; +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 java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class CreateAdminPortalLinkTokenRequestBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("organization_id") + private Optional organizationId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("it_contact_id") + private Optional itContactId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scopes") + private Optional> scopes; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("seconds_until_expiration") + private Optional secondsUntilExpiration; + + @JsonCreator + public CreateAdminPortalLinkTokenRequestBody( + @JsonProperty("organization_id") Optional organizationId, + @JsonProperty("it_contact_id") Optional itContactId, + @JsonProperty("scopes") Optional> scopes, + @JsonProperty("seconds_until_expiration") Optional secondsUntilExpiration) { + Utils.checkNotNull(organizationId, "organizationId"); + Utils.checkNotNull(itContactId, "itContactId"); + Utils.checkNotNull(scopes, "scopes"); + Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); + this.organizationId = organizationId; + this.itContactId = itContactId; + this.scopes = scopes; + this.secondsUntilExpiration = secondsUntilExpiration; + } + + public CreateAdminPortalLinkTokenRequestBody() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); + } + + @JsonIgnore + public Optional organizationId() { + return organizationId; + } + + @JsonIgnore + public Optional itContactId() { + return itContactId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> scopes() { + return (Optional>) scopes; + } + + @JsonIgnore + public Optional secondsUntilExpiration() { + return secondsUntilExpiration; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateAdminPortalLinkTokenRequestBody withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + + public CreateAdminPortalLinkTokenRequestBody withOrganizationId(Optional organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + public CreateAdminPortalLinkTokenRequestBody withItContactId(String itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = Optional.ofNullable(itContactId); + return this; + } + + + public CreateAdminPortalLinkTokenRequestBody withItContactId(Optional itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = itContactId; + return this; + } + + public CreateAdminPortalLinkTokenRequestBody withScopes(List scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = Optional.ofNullable(scopes); + return this; + } + + + public CreateAdminPortalLinkTokenRequestBody withScopes(Optional> scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = scopes; + return this; + } + + public CreateAdminPortalLinkTokenRequestBody withSecondsUntilExpiration(long secondsUntilExpiration) { + Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); + this.secondsUntilExpiration = Optional.ofNullable(secondsUntilExpiration); + return this; + } + + + public CreateAdminPortalLinkTokenRequestBody withSecondsUntilExpiration(Optional secondsUntilExpiration) { + Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); + this.secondsUntilExpiration = secondsUntilExpiration; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdminPortalLinkTokenRequestBody other = (CreateAdminPortalLinkTokenRequestBody) o; + return + Utils.enhancedDeepEquals(this.organizationId, other.organizationId) && + Utils.enhancedDeepEquals(this.itContactId, other.itContactId) && + Utils.enhancedDeepEquals(this.scopes, other.scopes) && + Utils.enhancedDeepEquals(this.secondsUntilExpiration, other.secondsUntilExpiration); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + organizationId, itContactId, scopes, + secondsUntilExpiration); + } + + @Override + public String toString() { + return Utils.toString(CreateAdminPortalLinkTokenRequestBody.class, + "organizationId", organizationId, + "itContactId", itContactId, + "scopes", scopes, + "secondsUntilExpiration", secondsUntilExpiration); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional organizationId = Optional.empty(); + + private Optional itContactId = Optional.empty(); + + private Optional> scopes = Optional.empty(); + + private Optional secondsUntilExpiration; + + private Builder() { + // force use of static builder() method + } + + + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + public Builder organizationId(Optional organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + + public Builder itContactId(String itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = Optional.ofNullable(itContactId); + return this; + } + + public Builder itContactId(Optional itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = itContactId; + return this; + } + + + public Builder scopes(List scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = Optional.ofNullable(scopes); + return this; + } + + public Builder scopes(Optional> scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = scopes; + return this; + } + + + public Builder secondsUntilExpiration(long secondsUntilExpiration) { + Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); + this.secondsUntilExpiration = Optional.ofNullable(secondsUntilExpiration); + return this; + } + + public Builder secondsUntilExpiration(Optional secondsUntilExpiration) { + Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); + this.secondsUntilExpiration = secondsUntilExpiration; + return this; + } + + public CreateAdminPortalLinkTokenRequestBody build() { + if (secondsUntilExpiration == null) { + secondsUntilExpiration = _SINGLETON_VALUE_SecondsUntilExpiration.value(); + } + + return new CreateAdminPortalLinkTokenRequestBody( + organizationId, itContactId, scopes, + secondsUntilExpiration); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_SecondsUntilExpiration = + new LazySingletonValue<>( + "seconds_until_expiration", + "3600", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBuilder.java new file mode 100644 index 00000000..4aaf6b55 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.CreateAdminPortalLinkToken; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class CreateAdminPortalLinkTokenRequestBuilder { + + private CreateAdminPortalLinkTokenRequestBody request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public CreateAdminPortalLinkTokenRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateAdminPortalLinkTokenRequestBuilder request(CreateAdminPortalLinkTokenRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateAdminPortalLinkTokenRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public CreateAdminPortalLinkTokenRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CreateAdminPortalLinkTokenResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new CreateAdminPortalLinkToken.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponse.java b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponse.java new file mode 100644 index 00000000..a31de45c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 CreateAdminPortalLinkTokenResponse 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; + + /** + * 201 Created + */ + private Optional object; + + @JsonCreator + public CreateAdminPortalLinkTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public CreateAdminPortalLinkTokenResponse( + 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; + } + + /** + * 201 Created + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateAdminPortalLinkTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateAdminPortalLinkTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateAdminPortalLinkTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * 201 Created + */ + public CreateAdminPortalLinkTokenResponse withObject(CreateAdminPortalLinkTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * 201 Created + */ + public CreateAdminPortalLinkTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdminPortalLinkTokenResponse other = (CreateAdminPortalLinkTokenResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CreateAdminPortalLinkTokenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * 201 Created + */ + public Builder object(CreateAdminPortalLinkTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * 201 Created + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateAdminPortalLinkTokenResponse build() { + + return new CreateAdminPortalLinkTokenResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponseBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponseBody.java new file mode 100644 index 00000000..837dca3e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateAdminPortalLinkTokenResponseBody.java @@ -0,0 +1,686 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * CreateAdminPortalLinkTokenResponseBody + * + *

201 Created + */ +public class CreateAdminPortalLinkTokenResponseBody { + + @JsonProperty("object") + private CreateAdminPortalLinkTokenObject object; + + + @JsonProperty("id") + private String id; + + /** + * The origin-level admin_portal_link this token was issued for. + */ + @JsonProperty("admin_portal_link_id") + private String adminPortalLinkId; + + + @JsonProperty("instance_id") + private String instanceId; + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("organization_id") + private Optional organizationId; + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("it_contact_id") + private Optional itContactId; + + /** + * Caller-provided scopes for this token. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("scopes") + private Optional> scopes; + + /** + * The single-use admin portal link token. Returned only on creation. URL-borne; treat as a secret. + */ + @JsonProperty("token") + private String token; + + + @JsonProperty("revoked") + private boolean revoked; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("revocation_reason") + private Optional revocationReason; + + + @JsonProperty("expired") + private boolean expired; + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("expiration") + private Optional expiration; + + /** + * The timestamp for when the token was created, in milliseconds. + */ + @JsonProperty("created_at") + private double createdAt; + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + @JsonProperty("updated_at") + private double updatedAt; + + @JsonCreator + public CreateAdminPortalLinkTokenResponseBody( + @JsonProperty("object") CreateAdminPortalLinkTokenObject object, + @JsonProperty("id") String id, + @JsonProperty("admin_portal_link_id") String adminPortalLinkId, + @JsonProperty("instance_id") String instanceId, + @JsonProperty("organization_id") Optional organizationId, + @JsonProperty("it_contact_id") Optional itContactId, + @JsonProperty("scopes") Optional> scopes, + @JsonProperty("token") String token, + @JsonProperty("revoked") boolean revoked, + @JsonProperty("revocation_reason") Optional revocationReason, + @JsonProperty("expired") boolean expired, + @JsonProperty("expiration") Optional expiration, + @JsonProperty("created_at") double createdAt, + @JsonProperty("updated_at") double updatedAt) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(adminPortalLinkId, "adminPortalLinkId"); + Utils.checkNotNull(instanceId, "instanceId"); + Utils.checkNotNull(organizationId, "organizationId"); + Utils.checkNotNull(itContactId, "itContactId"); + Utils.checkNotNull(scopes, "scopes"); + Utils.checkNotNull(token, "token"); + Utils.checkNotNull(revoked, "revoked"); + Utils.checkNotNull(revocationReason, "revocationReason"); + Utils.checkNotNull(expired, "expired"); + Utils.checkNotNull(expiration, "expiration"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.object = object; + this.id = id; + this.adminPortalLinkId = adminPortalLinkId; + this.instanceId = instanceId; + this.organizationId = organizationId; + this.itContactId = itContactId; + this.scopes = scopes; + this.token = token; + this.revoked = revoked; + this.revocationReason = revocationReason; + this.expired = expired; + this.expiration = expiration; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public CreateAdminPortalLinkTokenResponseBody( + CreateAdminPortalLinkTokenObject object, + String id, + String adminPortalLinkId, + String instanceId, + String token, + boolean revoked, + boolean expired, + double createdAt, + double updatedAt) { + this(object, id, adminPortalLinkId, + instanceId, Optional.empty(), Optional.empty(), + Optional.empty(), token, revoked, + Optional.empty(), expired, Optional.empty(), + createdAt, updatedAt); + } + + @JsonIgnore + public CreateAdminPortalLinkTokenObject object() { + return object; + } + + @JsonIgnore + public String id() { + return id; + } + + /** + * The origin-level admin_portal_link this token was issued for. + */ + @JsonIgnore + public String adminPortalLinkId() { + return adminPortalLinkId; + } + + @JsonIgnore + public String instanceId() { + return instanceId; + } + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + @JsonIgnore + public Optional organizationId() { + return organizationId; + } + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + @JsonIgnore + public Optional itContactId() { + return itContactId; + } + + /** + * Caller-provided scopes for this token. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> scopes() { + return (Optional>) scopes; + } + + /** + * The single-use admin portal link token. Returned only on creation. URL-borne; treat as a secret. + */ + @JsonIgnore + public String token() { + return token; + } + + @JsonIgnore + public boolean revoked() { + return revoked; + } + + @JsonIgnore + public Optional revocationReason() { + return revocationReason; + } + + @JsonIgnore + public boolean expired() { + return expired; + } + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + @JsonIgnore + public Optional expiration() { + return expiration; + } + + /** + * The timestamp for when the token was created, in milliseconds. + */ + @JsonIgnore + public double createdAt() { + return createdAt; + } + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + @JsonIgnore + public double updatedAt() { + return updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + public CreateAdminPortalLinkTokenResponseBody withObject(CreateAdminPortalLinkTokenObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateAdminPortalLinkTokenResponseBody withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The origin-level admin_portal_link this token was issued for. + */ + public CreateAdminPortalLinkTokenResponseBody withAdminPortalLinkId(String adminPortalLinkId) { + Utils.checkNotNull(adminPortalLinkId, "adminPortalLinkId"); + this.adminPortalLinkId = adminPortalLinkId; + return this; + } + + public CreateAdminPortalLinkTokenResponseBody withInstanceId(String instanceId) { + Utils.checkNotNull(instanceId, "instanceId"); + this.instanceId = instanceId; + return this; + } + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public CreateAdminPortalLinkTokenResponseBody withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public CreateAdminPortalLinkTokenResponseBody withOrganizationId(Optional organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public CreateAdminPortalLinkTokenResponseBody withItContactId(String itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = Optional.ofNullable(itContactId); + return this; + } + + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public CreateAdminPortalLinkTokenResponseBody withItContactId(Optional itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = itContactId; + return this; + } + + /** + * Caller-provided scopes for this token. + */ + public CreateAdminPortalLinkTokenResponseBody withScopes(List scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = Optional.ofNullable(scopes); + return this; + } + + + /** + * Caller-provided scopes for this token. + */ + public CreateAdminPortalLinkTokenResponseBody withScopes(Optional> scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = scopes; + return this; + } + + /** + * The single-use admin portal link token. Returned only on creation. URL-borne; treat as a secret. + */ + public CreateAdminPortalLinkTokenResponseBody withToken(String token) { + Utils.checkNotNull(token, "token"); + this.token = token; + return this; + } + + public CreateAdminPortalLinkTokenResponseBody withRevoked(boolean revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = revoked; + return this; + } + + public CreateAdminPortalLinkTokenResponseBody withRevocationReason(String revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = Optional.ofNullable(revocationReason); + return this; + } + + + public CreateAdminPortalLinkTokenResponseBody withRevocationReason(Optional revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + return this; + } + + public CreateAdminPortalLinkTokenResponseBody withExpired(boolean expired) { + Utils.checkNotNull(expired, "expired"); + this.expired = expired; + return this; + } + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public CreateAdminPortalLinkTokenResponseBody withExpiration(double expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = Optional.ofNullable(expiration); + return this; + } + + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public CreateAdminPortalLinkTokenResponseBody withExpiration(Optional expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = expiration; + return this; + } + + /** + * The timestamp for when the token was created, in milliseconds. + */ + public CreateAdminPortalLinkTokenResponseBody withCreatedAt(double createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + public CreateAdminPortalLinkTokenResponseBody withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdminPortalLinkTokenResponseBody other = (CreateAdminPortalLinkTokenResponseBody) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.adminPortalLinkId, other.adminPortalLinkId) && + Utils.enhancedDeepEquals(this.instanceId, other.instanceId) && + Utils.enhancedDeepEquals(this.organizationId, other.organizationId) && + Utils.enhancedDeepEquals(this.itContactId, other.itContactId) && + Utils.enhancedDeepEquals(this.scopes, other.scopes) && + Utils.enhancedDeepEquals(this.token, other.token) && + Utils.enhancedDeepEquals(this.revoked, other.revoked) && + Utils.enhancedDeepEquals(this.revocationReason, other.revocationReason) && + Utils.enhancedDeepEquals(this.expired, other.expired) && + Utils.enhancedDeepEquals(this.expiration, other.expiration) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, id, adminPortalLinkId, + instanceId, organizationId, itContactId, + scopes, token, revoked, + revocationReason, expired, expiration, + createdAt, updatedAt); + } + + @Override + public String toString() { + return Utils.toString(CreateAdminPortalLinkTokenResponseBody.class, + "object", object, + "id", id, + "adminPortalLinkId", adminPortalLinkId, + "instanceId", instanceId, + "organizationId", organizationId, + "itContactId", itContactId, + "scopes", scopes, + "token", token, + "revoked", revoked, + "revocationReason", revocationReason, + "expired", expired, + "expiration", expiration, + "createdAt", createdAt, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private CreateAdminPortalLinkTokenObject object; + + private String id; + + private String adminPortalLinkId; + + private String instanceId; + + private Optional organizationId = Optional.empty(); + + private Optional itContactId = Optional.empty(); + + private Optional> scopes = Optional.empty(); + + private String token; + + private Boolean revoked; + + private Optional revocationReason = Optional.empty(); + + private Boolean expired; + + private Optional expiration = Optional.empty(); + + private Double createdAt; + + private Double updatedAt; + + private Builder() { + // force use of static builder() method + } + + + public Builder object(CreateAdminPortalLinkTokenObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The origin-level admin_portal_link this token was issued for. + */ + public Builder adminPortalLinkId(String adminPortalLinkId) { + Utils.checkNotNull(adminPortalLinkId, "adminPortalLinkId"); + this.adminPortalLinkId = adminPortalLinkId; + return this; + } + + + public Builder instanceId(String instanceId) { + Utils.checkNotNull(instanceId, "instanceId"); + this.instanceId = instanceId; + return this; + } + + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public Builder organizationId(Optional organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public Builder itContactId(String itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = Optional.ofNullable(itContactId); + return this; + } + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public Builder itContactId(Optional itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = itContactId; + return this; + } + + + /** + * Caller-provided scopes for this token. + */ + public Builder scopes(List scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = Optional.ofNullable(scopes); + return this; + } + + /** + * Caller-provided scopes for this token. + */ + public Builder scopes(Optional> scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = scopes; + return this; + } + + + /** + * The single-use admin portal link token. Returned only on creation. URL-borne; treat as a secret. + */ + public Builder token(String token) { + Utils.checkNotNull(token, "token"); + this.token = token; + return this; + } + + + public Builder revoked(boolean revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = revoked; + return this; + } + + + public Builder revocationReason(String revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = Optional.ofNullable(revocationReason); + return this; + } + + public Builder revocationReason(Optional revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + return this; + } + + + public Builder expired(boolean expired) { + Utils.checkNotNull(expired, "expired"); + this.expired = expired; + return this; + } + + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public Builder expiration(double expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = Optional.ofNullable(expiration); + return this; + } + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public Builder expiration(Optional expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = expiration; + return this; + } + + + /** + * The timestamp for when the token was created, in milliseconds. + */ + public Builder createdAt(double createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public CreateAdminPortalLinkTokenResponseBody build() { + + return new CreateAdminPortalLinkTokenResponseBody( + object, id, adminPortalLinkId, + instanceId, organizationId, itContactId, + scopes, token, revoked, + revocationReason, expired, expiration, + createdAt, updatedAt); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequest.java b/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequest.java new file mode 100644 index 00000000..8eafd142 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class CreateEnterpriseConnectionTestRunRequest { + /** + * The ID of the enterprise connection + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=enterprise_connection_id") + private String enterpriseConnectionId; + + @JsonCreator + public CreateEnterpriseConnectionTestRunRequest( + String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + } + + /** + * The ID of the enterprise connection + */ + @JsonIgnore + public String enterpriseConnectionId() { + return enterpriseConnectionId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the enterprise connection + */ + public CreateEnterpriseConnectionTestRunRequest withEnterpriseConnectionId(String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEnterpriseConnectionTestRunRequest other = (CreateEnterpriseConnectionTestRunRequest) o; + return + Utils.enhancedDeepEquals(this.enterpriseConnectionId, other.enterpriseConnectionId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + enterpriseConnectionId); + } + + @Override + public String toString() { + return Utils.toString(CreateEnterpriseConnectionTestRunRequest.class, + "enterpriseConnectionId", enterpriseConnectionId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String enterpriseConnectionId; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the enterprise connection + */ + public Builder enterpriseConnectionId(String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + return this; + } + + public CreateEnterpriseConnectionTestRunRequest build() { + + return new CreateEnterpriseConnectionTestRunRequest( + enterpriseConnectionId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequestBuilder.java new file mode 100644 index 00000000..492855f9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.CreateEnterpriseConnectionTestRun; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class CreateEnterpriseConnectionTestRunRequestBuilder { + + private String enterpriseConnectionId; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public CreateEnterpriseConnectionTestRunRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public CreateEnterpriseConnectionTestRunRequestBuilder enterpriseConnectionId(String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + return this; + } + + public CreateEnterpriseConnectionTestRunRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public CreateEnterpriseConnectionTestRunRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private CreateEnterpriseConnectionTestRunRequest buildRequest() { + + CreateEnterpriseConnectionTestRunRequest request = new CreateEnterpriseConnectionTestRunRequest(enterpriseConnectionId); + + return request; + } + + public CreateEnterpriseConnectionTestRunResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new CreateEnterpriseConnectionTestRun.Sync(sdkConfiguration, options, _headers); + CreateEnterpriseConnectionTestRunRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunResponse.java b/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunResponse.java new file mode 100644 index 00000000..52e2f06a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateEnterpriseConnectionTestRunResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.EnterpriseConnectionTestRunResponse; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 CreateEnterpriseConnectionTestRunResponse 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; + + /** + * A URL to initiate an enterprise connection test run + */ + private Optional enterpriseConnectionTestRunResponse; + + @JsonCreator + public CreateEnterpriseConnectionTestRunResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional enterpriseConnectionTestRunResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(enterpriseConnectionTestRunResponse, "enterpriseConnectionTestRunResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.enterpriseConnectionTestRunResponse = enterpriseConnectionTestRunResponse; + } + + public CreateEnterpriseConnectionTestRunResponse( + 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; + } + + /** + * A URL to initiate an enterprise connection test run + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional enterpriseConnectionTestRunResponse() { + return (Optional) enterpriseConnectionTestRunResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public CreateEnterpriseConnectionTestRunResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateEnterpriseConnectionTestRunResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateEnterpriseConnectionTestRunResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * A URL to initiate an enterprise connection test run + */ + public CreateEnterpriseConnectionTestRunResponse withEnterpriseConnectionTestRunResponse(EnterpriseConnectionTestRunResponse enterpriseConnectionTestRunResponse) { + Utils.checkNotNull(enterpriseConnectionTestRunResponse, "enterpriseConnectionTestRunResponse"); + this.enterpriseConnectionTestRunResponse = Optional.ofNullable(enterpriseConnectionTestRunResponse); + return this; + } + + + /** + * A URL to initiate an enterprise connection test run + */ + public CreateEnterpriseConnectionTestRunResponse withEnterpriseConnectionTestRunResponse(Optional enterpriseConnectionTestRunResponse) { + Utils.checkNotNull(enterpriseConnectionTestRunResponse, "enterpriseConnectionTestRunResponse"); + this.enterpriseConnectionTestRunResponse = enterpriseConnectionTestRunResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEnterpriseConnectionTestRunResponse other = (CreateEnterpriseConnectionTestRunResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.enterpriseConnectionTestRunResponse, other.enterpriseConnectionTestRunResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + enterpriseConnectionTestRunResponse); + } + + @Override + public String toString() { + return Utils.toString(CreateEnterpriseConnectionTestRunResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "enterpriseConnectionTestRunResponse", enterpriseConnectionTestRunResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional enterpriseConnectionTestRunResponse = 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; + } + + + /** + * A URL to initiate an enterprise connection test run + */ + public Builder enterpriseConnectionTestRunResponse(EnterpriseConnectionTestRunResponse enterpriseConnectionTestRunResponse) { + Utils.checkNotNull(enterpriseConnectionTestRunResponse, "enterpriseConnectionTestRunResponse"); + this.enterpriseConnectionTestRunResponse = Optional.ofNullable(enterpriseConnectionTestRunResponse); + return this; + } + + /** + * A URL to initiate an enterprise connection test run + */ + public Builder enterpriseConnectionTestRunResponse(Optional enterpriseConnectionTestRunResponse) { + Utils.checkNotNull(enterpriseConnectionTestRunResponse, "enterpriseConnectionTestRunResponse"); + this.enterpriseConnectionTestRunResponse = enterpriseConnectionTestRunResponse; + return this; + } + + public CreateEnterpriseConnectionTestRunResponse build() { + + return new CreateEnterpriseConnectionTestRunResponse( + contentType, statusCode, rawResponse, + enterpriseConnectionTestRunResponse); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java index 52b43cab..1297084e 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Double; +import java.lang.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; @@ -36,21 +37,46 @@ public class CreateM2MTokenRequestBody { @JsonProperty("claims") private JsonNullable claims; + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("min_remaining_ttl_seconds") + private Optional minRemainingTtlSeconds; + @JsonCreator public CreateM2MTokenRequestBody( @JsonProperty("token_format") Optional tokenFormat, @JsonProperty("seconds_until_expiration") JsonNullable secondsUntilExpiration, - @JsonProperty("claims") JsonNullable claims) { + @JsonProperty("claims") JsonNullable claims, + @JsonProperty("min_remaining_ttl_seconds") Optional minRemainingTtlSeconds) { Utils.checkNotNull(tokenFormat, "tokenFormat"); Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); Utils.checkNotNull(claims, "claims"); + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); this.tokenFormat = tokenFormat; this.secondsUntilExpiration = secondsUntilExpiration; this.claims = claims; + this.minRemainingTtlSeconds = minRemainingTtlSeconds; } public CreateM2MTokenRequestBody() { - this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); + this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -70,6 +96,28 @@ public JsonNullable claims() { return (JsonNullable) claims; } + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + @JsonIgnore + public Optional minRemainingTtlSeconds() { + return minRemainingTtlSeconds; + } + public static Builder builder() { return new Builder(); } @@ -112,6 +160,53 @@ public CreateM2MTokenRequestBody withClaims(JsonNullable claim return this; } + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public CreateM2MTokenRequestBody withMinRemainingTtlSeconds(long minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = Optional.ofNullable(minRemainingTtlSeconds); + return this; + } + + + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public CreateM2MTokenRequestBody withMinRemainingTtlSeconds(Optional minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = minRemainingTtlSeconds; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -124,13 +219,15 @@ public boolean equals(java.lang.Object o) { return Utils.enhancedDeepEquals(this.tokenFormat, other.tokenFormat) && Utils.enhancedDeepEquals(this.secondsUntilExpiration, other.secondsUntilExpiration) && - Utils.enhancedDeepEquals(this.claims, other.claims); + Utils.enhancedDeepEquals(this.claims, other.claims) && + Utils.enhancedDeepEquals(this.minRemainingTtlSeconds, other.minRemainingTtlSeconds); } @Override public int hashCode() { return Utils.enhancedHash( - tokenFormat, secondsUntilExpiration, claims); + tokenFormat, secondsUntilExpiration, claims, + minRemainingTtlSeconds); } @Override @@ -138,7 +235,8 @@ public String toString() { return Utils.toString(CreateM2MTokenRequestBody.class, "tokenFormat", tokenFormat, "secondsUntilExpiration", secondsUntilExpiration, - "claims", claims); + "claims", claims, + "minRemainingTtlSeconds", minRemainingTtlSeconds); } @SuppressWarnings("UnusedReturnValue") @@ -150,6 +248,8 @@ public final static class Builder { private JsonNullable claims = JsonNullable.undefined(); + private Optional minRemainingTtlSeconds = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -193,13 +293,61 @@ public Builder claims(JsonNullable claims) { return this; } + + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public Builder minRemainingTtlSeconds(long minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = Optional.ofNullable(minRemainingTtlSeconds); + return this; + } + + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public Builder minRemainingTtlSeconds(Optional minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = minRemainingTtlSeconds; + return this; + } + public CreateM2MTokenRequestBody build() { if (tokenFormat == null) { tokenFormat = _SINGLETON_VALUE_TokenFormat.value(); } return new CreateM2MTokenRequestBody( - tokenFormat, secondsUntilExpiration, claims); + tokenFormat, secondsUntilExpiration, claims, + minRemainingTtlSeconds); } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java index aecfff8f..b6b8a597 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java @@ -55,20 +55,46 @@ public class CreateUserRequestBody { * Email addresses to add to the user. * Must be unique across your instance. * The first email address will be set as the user's primary email address. + * Created verified by default; see `email_address_identification_status` to create them reserved. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("email_address") private Optional> emailAddress; + /** + * Controls the status each email address is created with. Runs parallel to + * `email_address`: when provided, it must contain exactly one item per email + * address, applied by position. When omitted or empty, every email address is + * created `verified`. Set an item to `reserved` to create the corresponding + * email address reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("email_address_identification_status") + private Optional> emailAddressIdentificationStatus; + /** * Phone numbers to add to the user. * Must be unique across your instance. * The first phone number will be set as the user's primary phone number. + * Created verified by default; see `phone_number_identification_status` to create them reserved. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("phone_number") private Optional> phoneNumber; + /** + * Controls the status each phone number is created with. Runs parallel to + * `phone_number`: when provided, it must contain exactly one item per phone + * number, applied by position. When omitted or empty, every phone number is + * created `verified`. Set an item to `reserved` to create the corresponding + * phone number reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("phone_number_identification_status") + private Optional> phoneNumberIdentificationStatus; + /** * Web3 wallets to add to the user. * Must be unique across your instance. @@ -254,6 +280,22 @@ public class CreateUserRequestBody { @JsonProperty("bypass_client_trust") private JsonNullable bypassClientTrust; + /** + * When set to `true`, the user is created already banned and cannot sign in. + * Requires the same plan support as the ban user endpoint. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("banned") + private JsonNullable banned; + + /** + * When set to `true`, the user is created already locked. + * Requires the user lockout feature to be enabled on the instance. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("locked") + private JsonNullable locked; + @JsonCreator public CreateUserRequestBody( @JsonProperty("external_id") JsonNullable externalId, @@ -261,7 +303,9 @@ public CreateUserRequestBody( @JsonProperty("last_name") JsonNullable lastName, @JsonProperty("locale") JsonNullable locale, @JsonProperty("email_address") Optional> emailAddress, + @JsonProperty("email_address_identification_status") Optional> emailAddressIdentificationStatus, @JsonProperty("phone_number") Optional> phoneNumber, + @JsonProperty("phone_number_identification_status") Optional> phoneNumberIdentificationStatus, @JsonProperty("web3_wallet") Optional> web3Wallet, @JsonProperty("username") JsonNullable username, @JsonProperty("password") JsonNullable password, @@ -281,13 +325,17 @@ public CreateUserRequestBody( @JsonProperty("create_organization_enabled") JsonNullable createOrganizationEnabled, @JsonProperty("create_organizations_limit") JsonNullable createOrganizationsLimit, @JsonProperty("created_at") JsonNullable createdAt, - @JsonProperty("bypass_client_trust") JsonNullable bypassClientTrust) { + @JsonProperty("bypass_client_trust") JsonNullable bypassClientTrust, + @JsonProperty("banned") JsonNullable banned, + @JsonProperty("locked") JsonNullable locked) { Utils.checkNotNull(externalId, "externalId"); Utils.checkNotNull(firstName, "firstName"); Utils.checkNotNull(lastName, "lastName"); Utils.checkNotNull(locale, "locale"); Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(emailAddressIdentificationStatus, "emailAddressIdentificationStatus"); Utils.checkNotNull(phoneNumber, "phoneNumber"); + Utils.checkNotNull(phoneNumberIdentificationStatus, "phoneNumberIdentificationStatus"); Utils.checkNotNull(web3Wallet, "web3Wallet"); Utils.checkNotNull(username, "username"); Utils.checkNotNull(password, "password"); @@ -308,12 +356,16 @@ public CreateUserRequestBody( Utils.checkNotNull(createOrganizationsLimit, "createOrganizationsLimit"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(bypassClientTrust, "bypassClientTrust"); + Utils.checkNotNull(banned, "banned"); + Utils.checkNotNull(locked, "locked"); this.externalId = externalId; this.firstName = firstName; this.lastName = lastName; this.locale = locale; this.emailAddress = emailAddress; + this.emailAddressIdentificationStatus = emailAddressIdentificationStatus; this.phoneNumber = phoneNumber; + this.phoneNumberIdentificationStatus = phoneNumberIdentificationStatus; this.web3Wallet = web3Wallet; this.username = username; this.password = password; @@ -334,18 +386,21 @@ public CreateUserRequestBody( this.createOrganizationsLimit = createOrganizationsLimit; this.createdAt = createdAt; this.bypassClientTrust = bypassClientTrust; + this.banned = banned; + this.locked = locked; } public CreateUserRequestBody() { this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -385,6 +440,7 @@ public JsonNullable locale() { * Email addresses to add to the user. * Must be unique across your instance. * The first email address will be set as the user's primary email address. + * Created verified by default; see `email_address_identification_status` to create them reserved. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -392,10 +448,25 @@ public Optional> emailAddress() { return (Optional>) emailAddress; } + /** + * Controls the status each email address is created with. Runs parallel to + * `email_address`: when provided, it must contain exactly one item per email + * address, applied by position. When omitted or empty, every email address is + * created `verified`. Set an item to `reserved` to create the corresponding + * email address reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> emailAddressIdentificationStatus() { + return (Optional>) emailAddressIdentificationStatus; + } + /** * Phone numbers to add to the user. * Must be unique across your instance. * The first phone number will be set as the user's primary phone number. + * Created verified by default; see `phone_number_identification_status` to create them reserved. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -403,6 +474,20 @@ public Optional> phoneNumber() { return (Optional>) phoneNumber; } + /** + * Controls the status each phone number is created with. Runs parallel to + * `phone_number`: when provided, it must contain exactly one item per phone + * number, applied by position. When omitted or empty, every phone number is + * created `verified`. Set an item to `reserved` to create the corresponding + * phone number reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> phoneNumberIdentificationStatus() { + return (Optional>) phoneNumberIdentificationStatus; + } + /** * Web3 wallets to add to the user. * Must be unique across your instance. @@ -613,6 +698,24 @@ public JsonNullable bypassClientTrust() { return bypassClientTrust; } + /** + * When set to `true`, the user is created already banned and cannot sign in. + * Requires the same plan support as the ban user endpoint. + */ + @JsonIgnore + public JsonNullable banned() { + return banned; + } + + /** + * When set to `true`, the user is created already locked. + * Requires the user lockout feature to be enabled on the instance. + */ + @JsonIgnore + public JsonNullable locked() { + return locked; + } + public static Builder builder() { return new Builder(); } @@ -696,6 +799,7 @@ public CreateUserRequestBody withLocale(JsonNullable locale) { * Email addresses to add to the user. * Must be unique across your instance. * The first email address will be set as the user's primary email address. + * Created verified by default; see `email_address_identification_status` to create them reserved. */ public CreateUserRequestBody withEmailAddress(List emailAddress) { Utils.checkNotNull(emailAddress, "emailAddress"); @@ -708,6 +812,7 @@ public CreateUserRequestBody withEmailAddress(List emailAddress) { * Email addresses to add to the user. * Must be unique across your instance. * The first email address will be set as the user's primary email address. + * Created verified by default; see `email_address_identification_status` to create them reserved. */ public CreateUserRequestBody withEmailAddress(Optional> emailAddress) { Utils.checkNotNull(emailAddress, "emailAddress"); @@ -715,10 +820,40 @@ public CreateUserRequestBody withEmailAddress(Optional> e return this; } + /** + * Controls the status each email address is created with. Runs parallel to + * `email_address`: when provided, it must contain exactly one item per email + * address, applied by position. When omitted or empty, every email address is + * created `verified`. Set an item to `reserved` to create the corresponding + * email address reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public CreateUserRequestBody withEmailAddressIdentificationStatus(List emailAddressIdentificationStatus) { + Utils.checkNotNull(emailAddressIdentificationStatus, "emailAddressIdentificationStatus"); + this.emailAddressIdentificationStatus = Optional.ofNullable(emailAddressIdentificationStatus); + return this; + } + + + /** + * Controls the status each email address is created with. Runs parallel to + * `email_address`: when provided, it must contain exactly one item per email + * address, applied by position. When omitted or empty, every email address is + * created `verified`. Set an item to `reserved` to create the corresponding + * email address reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public CreateUserRequestBody withEmailAddressIdentificationStatus(Optional> emailAddressIdentificationStatus) { + Utils.checkNotNull(emailAddressIdentificationStatus, "emailAddressIdentificationStatus"); + this.emailAddressIdentificationStatus = emailAddressIdentificationStatus; + return this; + } + /** * Phone numbers to add to the user. * Must be unique across your instance. * The first phone number will be set as the user's primary phone number. + * Created verified by default; see `phone_number_identification_status` to create them reserved. */ public CreateUserRequestBody withPhoneNumber(List phoneNumber) { Utils.checkNotNull(phoneNumber, "phoneNumber"); @@ -731,6 +866,7 @@ public CreateUserRequestBody withPhoneNumber(List phoneNumber) { * Phone numbers to add to the user. * Must be unique across your instance. * The first phone number will be set as the user's primary phone number. + * Created verified by default; see `phone_number_identification_status` to create them reserved. */ public CreateUserRequestBody withPhoneNumber(Optional> phoneNumber) { Utils.checkNotNull(phoneNumber, "phoneNumber"); @@ -738,6 +874,35 @@ public CreateUserRequestBody withPhoneNumber(Optional> ph return this; } + /** + * Controls the status each phone number is created with. Runs parallel to + * `phone_number`: when provided, it must contain exactly one item per phone + * number, applied by position. When omitted or empty, every phone number is + * created `verified`. Set an item to `reserved` to create the corresponding + * phone number reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public CreateUserRequestBody withPhoneNumberIdentificationStatus(List phoneNumberIdentificationStatus) { + Utils.checkNotNull(phoneNumberIdentificationStatus, "phoneNumberIdentificationStatus"); + this.phoneNumberIdentificationStatus = Optional.ofNullable(phoneNumberIdentificationStatus); + return this; + } + + + /** + * Controls the status each phone number is created with. Runs parallel to + * `phone_number`: when provided, it must contain exactly one item per phone + * number, applied by position. When omitted or empty, every phone number is + * created `verified`. Set an item to `reserved` to create the corresponding + * phone number reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public CreateUserRequestBody withPhoneNumberIdentificationStatus(Optional> phoneNumberIdentificationStatus) { + Utils.checkNotNull(phoneNumberIdentificationStatus, "phoneNumberIdentificationStatus"); + this.phoneNumberIdentificationStatus = phoneNumberIdentificationStatus; + return this; + } + /** * Web3 wallets to add to the user. * Must be unique across your instance. @@ -1194,6 +1359,46 @@ public CreateUserRequestBody withBypassClientTrust(JsonNullable bypassC return this; } + /** + * When set to `true`, the user is created already banned and cannot sign in. + * Requires the same plan support as the ban user endpoint. + */ + public CreateUserRequestBody withBanned(boolean banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = JsonNullable.of(banned); + return this; + } + + /** + * When set to `true`, the user is created already banned and cannot sign in. + * Requires the same plan support as the ban user endpoint. + */ + public CreateUserRequestBody withBanned(JsonNullable banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = banned; + return this; + } + + /** + * When set to `true`, the user is created already locked. + * Requires the user lockout feature to be enabled on the instance. + */ + public CreateUserRequestBody withLocked(boolean locked) { + Utils.checkNotNull(locked, "locked"); + this.locked = JsonNullable.of(locked); + return this; + } + + /** + * When set to `true`, the user is created already locked. + * Requires the user lockout feature to be enabled on the instance. + */ + public CreateUserRequestBody withLocked(JsonNullable locked) { + Utils.checkNotNull(locked, "locked"); + this.locked = locked; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1209,7 +1414,9 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.lastName, other.lastName) && Utils.enhancedDeepEquals(this.locale, other.locale) && Utils.enhancedDeepEquals(this.emailAddress, other.emailAddress) && + Utils.enhancedDeepEquals(this.emailAddressIdentificationStatus, other.emailAddressIdentificationStatus) && Utils.enhancedDeepEquals(this.phoneNumber, other.phoneNumber) && + Utils.enhancedDeepEquals(this.phoneNumberIdentificationStatus, other.phoneNumberIdentificationStatus) && Utils.enhancedDeepEquals(this.web3Wallet, other.web3Wallet) && Utils.enhancedDeepEquals(this.username, other.username) && Utils.enhancedDeepEquals(this.password, other.password) && @@ -1229,21 +1436,24 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.createOrganizationEnabled, other.createOrganizationEnabled) && Utils.enhancedDeepEquals(this.createOrganizationsLimit, other.createOrganizationsLimit) && Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && - Utils.enhancedDeepEquals(this.bypassClientTrust, other.bypassClientTrust); + Utils.enhancedDeepEquals(this.bypassClientTrust, other.bypassClientTrust) && + Utils.enhancedDeepEquals(this.banned, other.banned) && + Utils.enhancedDeepEquals(this.locked, other.locked); } @Override public int hashCode() { return Utils.enhancedHash( externalId, firstName, lastName, - locale, emailAddress, phoneNumber, - web3Wallet, username, password, - passwordDigest, passwordHasher, skipPasswordChecks, - skipPasswordRequirement, totpSecret, backupCodes, - publicMetadata, privateMetadata, unsafeMetadata, - deleteSelfEnabled, legalAcceptedAt, skipLegalChecks, - skipUserRequirement, createOrganizationEnabled, createOrganizationsLimit, - createdAt, bypassClientTrust); + locale, emailAddress, emailAddressIdentificationStatus, + phoneNumber, phoneNumberIdentificationStatus, web3Wallet, + username, password, passwordDigest, + passwordHasher, skipPasswordChecks, skipPasswordRequirement, + totpSecret, backupCodes, publicMetadata, + privateMetadata, unsafeMetadata, deleteSelfEnabled, + legalAcceptedAt, skipLegalChecks, skipUserRequirement, + createOrganizationEnabled, createOrganizationsLimit, createdAt, + bypassClientTrust, banned, locked); } @Override @@ -1254,7 +1464,9 @@ public String toString() { "lastName", lastName, "locale", locale, "emailAddress", emailAddress, + "emailAddressIdentificationStatus", emailAddressIdentificationStatus, "phoneNumber", phoneNumber, + "phoneNumberIdentificationStatus", phoneNumberIdentificationStatus, "web3Wallet", web3Wallet, "username", username, "password", password, @@ -1274,7 +1486,9 @@ public String toString() { "createOrganizationEnabled", createOrganizationEnabled, "createOrganizationsLimit", createOrganizationsLimit, "createdAt", createdAt, - "bypassClientTrust", bypassClientTrust); + "bypassClientTrust", bypassClientTrust, + "banned", banned, + "locked", locked); } @SuppressWarnings("UnusedReturnValue") @@ -1290,8 +1504,12 @@ public final static class Builder { private Optional> emailAddress = Optional.empty(); + private Optional> emailAddressIdentificationStatus = Optional.empty(); + private Optional> phoneNumber = Optional.empty(); + private Optional> phoneNumberIdentificationStatus = Optional.empty(); + private Optional> web3Wallet = Optional.empty(); private JsonNullable username = JsonNullable.undefined(); @@ -1332,6 +1550,10 @@ public final static class Builder { private JsonNullable bypassClientTrust = JsonNullable.undefined(); + private JsonNullable banned = JsonNullable.undefined(); + + private JsonNullable locked = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -1419,6 +1641,7 @@ public Builder locale(JsonNullable locale) { * Email addresses to add to the user. * Must be unique across your instance. * The first email address will be set as the user's primary email address. + * Created verified by default; see `email_address_identification_status` to create them reserved. */ public Builder emailAddress(List emailAddress) { Utils.checkNotNull(emailAddress, "emailAddress"); @@ -1430,6 +1653,7 @@ public Builder emailAddress(List emailAddress) { * Email addresses to add to the user. * Must be unique across your instance. * The first email address will be set as the user's primary email address. + * Created verified by default; see `email_address_identification_status` to create them reserved. */ public Builder emailAddress(Optional> emailAddress) { Utils.checkNotNull(emailAddress, "emailAddress"); @@ -1438,10 +1662,40 @@ public Builder emailAddress(Optional> emailAddress) { } + /** + * Controls the status each email address is created with. Runs parallel to + * `email_address`: when provided, it must contain exactly one item per email + * address, applied by position. When omitted or empty, every email address is + * created `verified`. Set an item to `reserved` to create the corresponding + * email address reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public Builder emailAddressIdentificationStatus(List emailAddressIdentificationStatus) { + Utils.checkNotNull(emailAddressIdentificationStatus, "emailAddressIdentificationStatus"); + this.emailAddressIdentificationStatus = Optional.ofNullable(emailAddressIdentificationStatus); + return this; + } + + /** + * Controls the status each email address is created with. Runs parallel to + * `email_address`: when provided, it must contain exactly one item per email + * address, applied by position. When omitted or empty, every email address is + * created `verified`. Set an item to `reserved` to create the corresponding + * email address reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public Builder emailAddressIdentificationStatus(Optional> emailAddressIdentificationStatus) { + Utils.checkNotNull(emailAddressIdentificationStatus, "emailAddressIdentificationStatus"); + this.emailAddressIdentificationStatus = emailAddressIdentificationStatus; + return this; + } + + /** * Phone numbers to add to the user. * Must be unique across your instance. * The first phone number will be set as the user's primary phone number. + * Created verified by default; see `phone_number_identification_status` to create them reserved. */ public Builder phoneNumber(List phoneNumber) { Utils.checkNotNull(phoneNumber, "phoneNumber"); @@ -1453,6 +1707,7 @@ public Builder phoneNumber(List phoneNumber) { * Phone numbers to add to the user. * Must be unique across your instance. * The first phone number will be set as the user's primary phone number. + * Created verified by default; see `phone_number_identification_status` to create them reserved. */ public Builder phoneNumber(Optional> phoneNumber) { Utils.checkNotNull(phoneNumber, "phoneNumber"); @@ -1461,6 +1716,35 @@ public Builder phoneNumber(Optional> phoneNumber) { } + /** + * Controls the status each phone number is created with. Runs parallel to + * `phone_number`: when provided, it must contain exactly one item per phone + * number, applied by position. When omitted or empty, every phone number is + * created `verified`. Set an item to `reserved` to create the corresponding + * phone number reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public Builder phoneNumberIdentificationStatus(List phoneNumberIdentificationStatus) { + Utils.checkNotNull(phoneNumberIdentificationStatus, "phoneNumberIdentificationStatus"); + this.phoneNumberIdentificationStatus = Optional.ofNullable(phoneNumberIdentificationStatus); + return this; + } + + /** + * Controls the status each phone number is created with. Runs parallel to + * `phone_number`: when provided, it must contain exactly one item per phone + * number, applied by position. When omitted or empty, every phone number is + * created `verified`. Set an item to `reserved` to create the corresponding + * phone number reserved instead (unverified but usable for sign-in and locked + * so no other user can claim it). + */ + public Builder phoneNumberIdentificationStatus(Optional> phoneNumberIdentificationStatus) { + Utils.checkNotNull(phoneNumberIdentificationStatus, "phoneNumberIdentificationStatus"); + this.phoneNumberIdentificationStatus = phoneNumberIdentificationStatus; + return this; + } + + /** * Web3 wallets to add to the user. * Must be unique across your instance. @@ -1930,18 +2214,61 @@ public Builder bypassClientTrust(JsonNullable bypassClientTrust) { return this; } + + /** + * When set to `true`, the user is created already banned and cannot sign in. + * Requires the same plan support as the ban user endpoint. + */ + public Builder banned(boolean banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = JsonNullable.of(banned); + return this; + } + + /** + * When set to `true`, the user is created already banned and cannot sign in. + * Requires the same plan support as the ban user endpoint. + */ + public Builder banned(JsonNullable banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = banned; + return this; + } + + + /** + * When set to `true`, the user is created already locked. + * Requires the user lockout feature to be enabled on the instance. + */ + public Builder locked(boolean locked) { + Utils.checkNotNull(locked, "locked"); + this.locked = JsonNullable.of(locked); + return this; + } + + /** + * When set to `true`, the user is created already locked. + * Requires the user lockout feature to be enabled on the instance. + */ + public Builder locked(JsonNullable locked) { + Utils.checkNotNull(locked, "locked"); + this.locked = locked; + return this; + } + public CreateUserRequestBody build() { return new CreateUserRequestBody( externalId, firstName, lastName, - locale, emailAddress, phoneNumber, - web3Wallet, username, password, - passwordDigest, passwordHasher, skipPasswordChecks, - skipPasswordRequirement, totpSecret, backupCodes, - publicMetadata, privateMetadata, unsafeMetadata, - deleteSelfEnabled, legalAcceptedAt, skipLegalChecks, - skipUserRequirement, createOrganizationEnabled, createOrganizationsLimit, - createdAt, bypassClientTrust); + locale, emailAddress, emailAddressIdentificationStatus, + phoneNumber, phoneNumberIdentificationStatus, web3Wallet, + username, password, passwordDigest, + passwordHasher, skipPasswordChecks, skipPasswordRequirement, + totpSecret, backupCodes, publicMetadata, + privateMetadata, unsafeMetadata, deleteSelfEnabled, + legalAcceptedAt, skipLegalChecks, skipUserRequirement, + createOrganizationEnabled, createOrganizationsLimit, createdAt, + bypassClientTrust, banned, locked); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CustomAttributes.java b/src/main/java/com/clerk/backend_api/models/operations/CustomAttributes.java index 020ef0b7..016b2b7f 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CustomAttributes.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CustomAttributes.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.util.Optional; @@ -41,27 +42,38 @@ public class CustomAttributes { @JsonProperty("scim_path") private Optional scimPath; + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("multi_valued") + private Optional multiValued; + @JsonCreator public CustomAttributes( @JsonProperty("name") String name, @JsonProperty("key") String key, @JsonProperty("sso_path") Optional ssoPath, - @JsonProperty("scim_path") Optional scimPath) { + @JsonProperty("scim_path") Optional scimPath, + @JsonProperty("multi_valued") Optional multiValued) { Utils.checkNotNull(name, "name"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(ssoPath, "ssoPath"); Utils.checkNotNull(scimPath, "scimPath"); + Utils.checkNotNull(multiValued, "multiValued"); this.name = name; this.key = key; this.ssoPath = ssoPath; this.scimPath = scimPath; + this.multiValued = multiValued; } public CustomAttributes( String name, String key) { this(name, key, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -96,6 +108,15 @@ public Optional scimPath() { return scimPath; } + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + @JsonIgnore + public Optional multiValued() { + return multiValued; + } + public static Builder builder() { return new Builder(); } @@ -157,6 +178,27 @@ public CustomAttributes withScimPath(Optional scimPath) { return this; } + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public CustomAttributes withMultiValued(boolean multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = Optional.ofNullable(multiValued); + return this; + } + + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public CustomAttributes withMultiValued(Optional multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = multiValued; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -170,14 +212,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.name, other.name) && Utils.enhancedDeepEquals(this.key, other.key) && Utils.enhancedDeepEquals(this.ssoPath, other.ssoPath) && - Utils.enhancedDeepEquals(this.scimPath, other.scimPath); + Utils.enhancedDeepEquals(this.scimPath, other.scimPath) && + Utils.enhancedDeepEquals(this.multiValued, other.multiValued); } @Override public int hashCode() { return Utils.enhancedHash( name, key, ssoPath, - scimPath); + scimPath, multiValued); } @Override @@ -186,7 +229,8 @@ public String toString() { "name", name, "key", key, "ssoPath", ssoPath, - "scimPath", scimPath); + "scimPath", scimPath, + "multiValued", multiValued); } @SuppressWarnings("UnusedReturnValue") @@ -200,6 +244,8 @@ public final static class Builder { private Optional scimPath = Optional.empty(); + private Optional multiValued = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -262,11 +308,32 @@ public Builder scimPath(Optional scimPath) { return this; } + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public Builder multiValued(boolean multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = Optional.ofNullable(multiValued); + return this; + } + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public Builder multiValued(Optional multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = multiValued; + return this; + } + public CustomAttributes build() { return new CustomAttributes( name, key, ssoPath, - scimPath); + scimPath, multiValued); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/EmailAddressIdentificationStatus.java b/src/main/java/com/clerk/backend_api/models/operations/EmailAddressIdentificationStatus.java new file mode 100644 index 00000000..888d2936 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/EmailAddressIdentificationStatus.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum EmailAddressIdentificationStatus { + VERIFIED("verified"), + RESERVED("reserved"); + + @JsonValue + private final String value; + + EmailAddressIdentificationStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (EmailAddressIdentificationStatus o: EmailAddressIdentificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java new file mode 100644 index 00000000..722c157e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.GetInstanceCommunication; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class GetInstanceCommunicationRequestBuilder { + + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public GetInstanceCommunicationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetInstanceCommunicationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public GetInstanceCommunicationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public GetInstanceCommunicationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestlessOperation operation + = new GetInstanceCommunication.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java new file mode 100644 index 00000000..ed750777 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 GetInstanceCommunicationResponse 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; + + /** + * Success + */ + private Optional instanceCommunication; + + @JsonCreator + public GetInstanceCommunicationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional instanceCommunication) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.instanceCommunication = instanceCommunication; + } + + public GetInstanceCommunicationResponse( + 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; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional instanceCommunication() { + return (Optional) instanceCommunication; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetInstanceCommunicationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetInstanceCommunicationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetInstanceCommunicationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public GetInstanceCommunicationResponse withInstanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + + /** + * Success + */ + public GetInstanceCommunicationResponse withInstanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetInstanceCommunicationResponse other = (GetInstanceCommunicationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.instanceCommunication, other.instanceCommunication); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + @Override + public String toString() { + return Utils.toString(GetInstanceCommunicationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "instanceCommunication", instanceCommunication); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional instanceCommunication = 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; + } + + + /** + * Success + */ + public Builder instanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + /** + * Success + */ + public Builder instanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + public GetInstanceCommunicationResponse build() { + + return new GetInstanceCommunicationResponse( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java new file mode 100644 index 00000000..7a7eb50f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.GetInstanceOrganizationSettings; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class GetInstanceOrganizationSettingsRequestBuilder { + + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public GetInstanceOrganizationSettingsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetInstanceOrganizationSettingsRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public GetInstanceOrganizationSettingsRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public GetInstanceOrganizationSettingsResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestlessOperation operation + = new GetInstanceOrganizationSettings.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java new file mode 100644 index 00000000..23dd2fad --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.OrganizationSettings; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 GetInstanceOrganizationSettingsResponse 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; + + /** + * Success + */ + private Optional organizationSettings; + + @JsonCreator + public GetInstanceOrganizationSettingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional organizationSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.organizationSettings = organizationSettings; + } + + public GetInstanceOrganizationSettingsResponse( + 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; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional organizationSettings() { + return (Optional) organizationSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetInstanceOrganizationSettingsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetInstanceOrganizationSettingsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetInstanceOrganizationSettingsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public GetInstanceOrganizationSettingsResponse withOrganizationSettings(OrganizationSettings organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = Optional.ofNullable(organizationSettings); + return this; + } + + + /** + * Success + */ + public GetInstanceOrganizationSettingsResponse withOrganizationSettings(Optional organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = organizationSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetInstanceOrganizationSettingsResponse other = (GetInstanceOrganizationSettingsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.organizationSettings, other.organizationSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + organizationSettings); + } + + @Override + public String toString() { + return Utils.toString(GetInstanceOrganizationSettingsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "organizationSettings", organizationSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional organizationSettings = 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; + } + + + /** + * Success + */ + public Builder organizationSettings(OrganizationSettings organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = Optional.ofNullable(organizationSettings); + return this; + } + + /** + * Success + */ + public Builder organizationSettings(Optional organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = organizationSettings; + return this; + } + + public GetInstanceOrganizationSettingsResponse build() { + + return new GetInstanceOrganizationSettingsResponse( + contentType, statusCode, rawResponse, + organizationSettings); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/IdentificationStatus.java b/src/main/java/com/clerk/backend_api/models/operations/IdentificationStatus.java new file mode 100644 index 00000000..02caea4e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/IdentificationStatus.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * IdentificationStatus + * + *

Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ +public enum IdentificationStatus { + VERIFIED("verified"), + RESERVED("reserved"); + + @JsonValue + private final String value; + + IdentificationStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (IdentificationStatus o: IdentificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.java b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.java new file mode 100644 index 00000000..7c0018f2 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsQueryParamStatus.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum ListEnterpriseConnectionTestRunsQueryParamStatus { + PENDING("pending"), + SUCCESS("success"), + FAILED("failed"); + + @JsonValue + private final String value; + + ListEnterpriseConnectionTestRunsQueryParamStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ListEnterpriseConnectionTestRunsQueryParamStatus o: ListEnterpriseConnectionTestRunsQueryParamStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequest.java new file mode 100644 index 00000000..ab5b7cd7 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequest.java @@ -0,0 +1,329 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.LazySingletonValue; +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + + +public class ListEnterpriseConnectionTestRunsRequest { + /** + * The ID of the enterprise connection + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=enterprise_connection_id") + private String enterpriseConnectionId; + + /** + * Filter test runs by status (may be repeated) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=status") + private Optional> status; + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + @JsonCreator + public ListEnterpriseConnectionTestRunsRequest( + String enterpriseConnectionId, + Optional> status, + Optional limit, + Optional offset) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(offset, "offset"); + this.enterpriseConnectionId = enterpriseConnectionId; + this.status = status; + this.limit = limit; + this.offset = offset; + } + + public ListEnterpriseConnectionTestRunsRequest( + String enterpriseConnectionId) { + this(enterpriseConnectionId, Optional.empty(), Optional.empty(), + Optional.empty()); + } + + /** + * The ID of the enterprise connection + */ + @JsonIgnore + public String enterpriseConnectionId() { + return enterpriseConnectionId; + } + + /** + * Filter test runs by status (may be repeated) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> status() { + return (Optional>) status; + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the enterprise connection + */ + public ListEnterpriseConnectionTestRunsRequest withEnterpriseConnectionId(String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + return this; + } + + /** + * Filter test runs by status (may be repeated) + */ + public ListEnterpriseConnectionTestRunsRequest withStatus(List status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * Filter test runs by status (may be repeated) + */ + public ListEnterpriseConnectionTestRunsRequest withStatus(Optional> status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public ListEnterpriseConnectionTestRunsRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public ListEnterpriseConnectionTestRunsRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public ListEnterpriseConnectionTestRunsRequest withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public ListEnterpriseConnectionTestRunsRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListEnterpriseConnectionTestRunsRequest other = (ListEnterpriseConnectionTestRunsRequest) o; + return + Utils.enhancedDeepEquals(this.enterpriseConnectionId, other.enterpriseConnectionId) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.offset, other.offset); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + enterpriseConnectionId, status, limit, + offset); + } + + @Override + public String toString() { + return Utils.toString(ListEnterpriseConnectionTestRunsRequest.class, + "enterpriseConnectionId", enterpriseConnectionId, + "status", status, + "limit", limit, + "offset", offset); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String enterpriseConnectionId; + + private Optional> status = Optional.empty(); + + private Optional limit; + + private Optional offset; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the enterprise connection + */ + public Builder enterpriseConnectionId(String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + return this; + } + + + /** + * Filter test runs by status (may be repeated) + */ + public Builder status(List status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Filter test runs by status (may be repeated) + */ + public Builder status(Optional> status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListEnterpriseConnectionTestRunsRequest build() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + if (offset == null) { + offset = _SINGLETON_VALUE_Offset.value(); + } + + return new ListEnterpriseConnectionTestRunsRequest( + enterpriseConnectionId, status, limit, + offset); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "10", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Offset = + new LazySingletonValue<>( + "offset", + "0", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequestBuilder.java new file mode 100644 index 00000000..6b42bb39 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsRequestBuilder.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.ListEnterpriseConnectionTestRuns; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.LazySingletonValue; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Long; +import java.lang.String; +import java.util.List; +import java.util.Optional; + +public class ListEnterpriseConnectionTestRunsRequestBuilder { + + private String enterpriseConnectionId; + private Optional> status = Optional.empty(); + private Optional limit = Utils.readDefaultOrConstValue( + "limit", + "10", + new TypeReference>() {}); + private Optional offset = Utils.readDefaultOrConstValue( + "offset", + "0", + new TypeReference>() {}); + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public ListEnterpriseConnectionTestRunsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder enterpriseConnectionId(String enterpriseConnectionId) { + Utils.checkNotNull(enterpriseConnectionId, "enterpriseConnectionId"); + this.enterpriseConnectionId = enterpriseConnectionId; + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder status(List status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.of(status); + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder status(Optional> status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.of(limit); + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.of(offset); + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public ListEnterpriseConnectionTestRunsRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private ListEnterpriseConnectionTestRunsRequest buildRequest() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + if (offset == null) { + offset = _SINGLETON_VALUE_Offset.value(); + } + + ListEnterpriseConnectionTestRunsRequest request = new ListEnterpriseConnectionTestRunsRequest(enterpriseConnectionId, + status, + limit, + offset); + + return request; + } + + public ListEnterpriseConnectionTestRunsResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new ListEnterpriseConnectionTestRuns.Sync(sdkConfiguration, options, _headers); + ListEnterpriseConnectionTestRunsRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "10", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Offset = + new LazySingletonValue<>( + "offset", + "0", + new TypeReference>() {}); +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsResponse.java b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsResponse.java new file mode 100644 index 00000000..66bb5208 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListEnterpriseConnectionTestRunsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.EnterpriseConnectionTestRuns; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 ListEnterpriseConnectionTestRunsResponse 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; + + /** + * A list of enterprise connection test runs + */ + private Optional enterpriseConnectionTestRuns; + + @JsonCreator + public ListEnterpriseConnectionTestRunsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional enterpriseConnectionTestRuns) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(enterpriseConnectionTestRuns, "enterpriseConnectionTestRuns"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.enterpriseConnectionTestRuns = enterpriseConnectionTestRuns; + } + + public ListEnterpriseConnectionTestRunsResponse( + 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; + } + + /** + * A list of enterprise connection test runs + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional enterpriseConnectionTestRuns() { + return (Optional) enterpriseConnectionTestRuns; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ListEnterpriseConnectionTestRunsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListEnterpriseConnectionTestRunsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListEnterpriseConnectionTestRunsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * A list of enterprise connection test runs + */ + public ListEnterpriseConnectionTestRunsResponse withEnterpriseConnectionTestRuns(EnterpriseConnectionTestRuns enterpriseConnectionTestRuns) { + Utils.checkNotNull(enterpriseConnectionTestRuns, "enterpriseConnectionTestRuns"); + this.enterpriseConnectionTestRuns = Optional.ofNullable(enterpriseConnectionTestRuns); + return this; + } + + + /** + * A list of enterprise connection test runs + */ + public ListEnterpriseConnectionTestRunsResponse withEnterpriseConnectionTestRuns(Optional enterpriseConnectionTestRuns) { + Utils.checkNotNull(enterpriseConnectionTestRuns, "enterpriseConnectionTestRuns"); + this.enterpriseConnectionTestRuns = enterpriseConnectionTestRuns; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListEnterpriseConnectionTestRunsResponse other = (ListEnterpriseConnectionTestRunsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.enterpriseConnectionTestRuns, other.enterpriseConnectionTestRuns); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + enterpriseConnectionTestRuns); + } + + @Override + public String toString() { + return Utils.toString(ListEnterpriseConnectionTestRunsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "enterpriseConnectionTestRuns", enterpriseConnectionTestRuns); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional enterpriseConnectionTestRuns = 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; + } + + + /** + * A list of enterprise connection test runs + */ + public Builder enterpriseConnectionTestRuns(EnterpriseConnectionTestRuns enterpriseConnectionTestRuns) { + Utils.checkNotNull(enterpriseConnectionTestRuns, "enterpriseConnectionTestRuns"); + this.enterpriseConnectionTestRuns = Optional.ofNullable(enterpriseConnectionTestRuns); + return this; + } + + /** + * A list of enterprise connection test runs + */ + public Builder enterpriseConnectionTestRuns(Optional enterpriseConnectionTestRuns) { + Utils.checkNotNull(enterpriseConnectionTestRuns, "enterpriseConnectionTestRuns"); + this.enterpriseConnectionTestRuns = enterpriseConnectionTestRuns; + return this; + } + + public ListEnterpriseConnectionTestRunsResponse build() { + + return new ListEnterpriseConnectionTestRunsResponse( + contentType, statusCode, rawResponse, + enterpriseConnectionTestRuns); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/PhoneNumberIdentificationStatus.java b/src/main/java/com/clerk/backend_api/models/operations/PhoneNumberIdentificationStatus.java new file mode 100644 index 00000000..f8095d6e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PhoneNumberIdentificationStatus.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum PhoneNumberIdentificationStatus { + VERIFIED("verified"), + RESERVED("reserved"); + + @JsonValue + private final String value; + + PhoneNumberIdentificationStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PhoneNumberIdentificationStatus o: PhoneNumberIdentificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/PreferredSignInStrategyWhenPasswordRequired.java b/src/main/java/com/clerk/backend_api/models/operations/PreferredSignInStrategyWhenPasswordRequired.java new file mode 100644 index 00000000..d615fc58 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PreferredSignInStrategyWhenPasswordRequired.java @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PreferredSignInStrategyWhenPasswordRequired + * + *

When password is required at the instance level, sets the preferred sign-in strategy surfaced to + * Clerk components. Has no effect when password is not required. Defaults to `password`. + * + *

Set to an empty string to clear the override. + */ +public enum PreferredSignInStrategyWhenPasswordRequired { + PASSWORD("password"), + OTP("otp"), + UNKNOWN(""); + + @JsonValue + private final String value; + + PreferredSignInStrategyWhenPasswordRequired(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (PreferredSignInStrategyWhenPasswordRequired o: PreferredSignInStrategyWhenPasswordRequired.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequest.java b/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequest.java new file mode 100644 index 00000000..b120cb7c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class PrepareEmailAddressVerificationRequest { + /** + * The ID of the email address to send the verification code to + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=email_address_id") + private String emailAddressId; + + @JsonCreator + public PrepareEmailAddressVerificationRequest( + String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + } + + /** + * The ID of the email address to send the verification code to + */ + @JsonIgnore + public String emailAddressId() { + return emailAddressId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the email address to send the verification code to + */ + public PrepareEmailAddressVerificationRequest withEmailAddressId(String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrepareEmailAddressVerificationRequest other = (PrepareEmailAddressVerificationRequest) o; + return + Utils.enhancedDeepEquals(this.emailAddressId, other.emailAddressId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + emailAddressId); + } + + @Override + public String toString() { + return Utils.toString(PrepareEmailAddressVerificationRequest.class, + "emailAddressId", emailAddressId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String emailAddressId; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the email address to send the verification code to + */ + public Builder emailAddressId(String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + return this; + } + + public PrepareEmailAddressVerificationRequest build() { + + return new PrepareEmailAddressVerificationRequest( + emailAddressId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequestBuilder.java new file mode 100644 index 00000000..186cfd3e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.PrepareEmailAddressVerification; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class PrepareEmailAddressVerificationRequestBuilder { + + private String emailAddressId; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PrepareEmailAddressVerificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PrepareEmailAddressVerificationRequestBuilder emailAddressId(String emailAddressId) { + Utils.checkNotNull(emailAddressId, "emailAddressId"); + this.emailAddressId = emailAddressId; + return this; + } + + public PrepareEmailAddressVerificationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public PrepareEmailAddressVerificationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private PrepareEmailAddressVerificationRequest buildRequest() { + + PrepareEmailAddressVerificationRequest request = new PrepareEmailAddressVerificationRequest(emailAddressId); + + return request; + } + + public PrepareEmailAddressVerificationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new PrepareEmailAddressVerification.Sync(sdkConfiguration, options, _headers); + PrepareEmailAddressVerificationRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationResponse.java new file mode 100644 index 00000000..b200417d --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PrepareEmailAddressVerificationResponse.java @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 PrepareEmailAddressVerificationResponse 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; + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + private Optional verificationResponse; + + @JsonCreator + public PrepareEmailAddressVerificationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional verificationResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.verificationResponse = verificationResponse; + } + + public PrepareEmailAddressVerificationResponse( + 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; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional verificationResponse() { + return (Optional) verificationResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PrepareEmailAddressVerificationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PrepareEmailAddressVerificationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PrepareEmailAddressVerificationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public PrepareEmailAddressVerificationResponse withVerificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public PrepareEmailAddressVerificationResponse withVerificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrepareEmailAddressVerificationResponse other = (PrepareEmailAddressVerificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.verificationResponse, other.verificationResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + verificationResponse); + } + + @Override + public String toString() { + return Utils.toString(PrepareEmailAddressVerificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "verificationResponse", verificationResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional verificationResponse = 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; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + public PrepareEmailAddressVerificationResponse build() { + + return new PrepareEmailAddressVerificationResponse( + contentType, statusCode, rawResponse, + verificationResponse); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequest.java b/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequest.java new file mode 100644 index 00000000..8003bfb1 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class PreparePhoneNumberVerificationRequest { + /** + * The ID of the phone number to send the verification code to + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=phone_number_id") + private String phoneNumberId; + + @JsonCreator + public PreparePhoneNumberVerificationRequest( + String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + } + + /** + * The ID of the phone number to send the verification code to + */ + @JsonIgnore + public String phoneNumberId() { + return phoneNumberId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the phone number to send the verification code to + */ + public PreparePhoneNumberVerificationRequest withPhoneNumberId(String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreparePhoneNumberVerificationRequest other = (PreparePhoneNumberVerificationRequest) o; + return + Utils.enhancedDeepEquals(this.phoneNumberId, other.phoneNumberId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + phoneNumberId); + } + + @Override + public String toString() { + return Utils.toString(PreparePhoneNumberVerificationRequest.class, + "phoneNumberId", phoneNumberId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String phoneNumberId; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the phone number to send the verification code to + */ + public Builder phoneNumberId(String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + return this; + } + + public PreparePhoneNumberVerificationRequest build() { + + return new PreparePhoneNumberVerificationRequest( + phoneNumberId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequestBuilder.java new file mode 100644 index 00000000..611e989f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.PreparePhoneNumberVerification; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class PreparePhoneNumberVerificationRequestBuilder { + + private String phoneNumberId; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public PreparePhoneNumberVerificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public PreparePhoneNumberVerificationRequestBuilder phoneNumberId(String phoneNumberId) { + Utils.checkNotNull(phoneNumberId, "phoneNumberId"); + this.phoneNumberId = phoneNumberId; + return this; + } + + public PreparePhoneNumberVerificationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public PreparePhoneNumberVerificationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private PreparePhoneNumberVerificationRequest buildRequest() { + + PreparePhoneNumberVerificationRequest request = new PreparePhoneNumberVerificationRequest(phoneNumberId); + + return request; + } + + public PreparePhoneNumberVerificationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new PreparePhoneNumberVerification.Sync(sdkConfiguration, options, _headers); + PreparePhoneNumberVerificationRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationResponse.java new file mode 100644 index 00000000..c80a8dd9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/PreparePhoneNumberVerificationResponse.java @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 PreparePhoneNumberVerificationResponse 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; + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + private Optional verificationResponse; + + @JsonCreator + public PreparePhoneNumberVerificationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional verificationResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.verificationResponse = verificationResponse; + } + + public PreparePhoneNumberVerificationResponse( + 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; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional verificationResponse() { + return (Optional) verificationResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public PreparePhoneNumberVerificationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PreparePhoneNumberVerificationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PreparePhoneNumberVerificationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public PreparePhoneNumberVerificationResponse withVerificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public PreparePhoneNumberVerificationResponse withVerificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreparePhoneNumberVerificationResponse other = (PreparePhoneNumberVerificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.verificationResponse, other.verificationResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + verificationResponse); + } + + @Override + public String toString() { + return Utils.toString(PreparePhoneNumberVerificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "verificationResponse", verificationResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional verificationResponse = 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; + } + + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(VerificationResponse verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = Optional.ofNullable(verificationResponse); + return this; + } + + /** + * The verification. After prepare_verification it is pending (unverified); + * after attempt_verification its status reflects the attempt outcome. + */ + public Builder verificationResponse(Optional verificationResponse) { + Utils.checkNotNull(verificationResponse, "verificationResponse"); + this.verificationResponse = verificationResponse; + return this; + } + + public PreparePhoneNumberVerificationResponse build() { + + return new PreparePhoneNumberVerificationResponse( + contentType, statusCode, rawResponse, + verificationResponse); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequest.java new file mode 100644 index 00000000..be32a0b0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class ReplaceUserEmailAddressRequest { + /** + * The ID of the user whose email address to replace + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=user_id") + private String userId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private ReplaceUserEmailAddressRequestBody requestBody; + + @JsonCreator + public ReplaceUserEmailAddressRequest( + String userId, + ReplaceUserEmailAddressRequestBody requestBody) { + Utils.checkNotNull(userId, "userId"); + Utils.checkNotNull(requestBody, "requestBody"); + this.userId = userId; + this.requestBody = requestBody; + } + + /** + * The ID of the user whose email address to replace + */ + @JsonIgnore + public String userId() { + return userId; + } + + @JsonIgnore + public ReplaceUserEmailAddressRequestBody requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the user whose email address to replace + */ + public ReplaceUserEmailAddressRequest withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ReplaceUserEmailAddressRequest withRequestBody(ReplaceUserEmailAddressRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserEmailAddressRequest other = (ReplaceUserEmailAddressRequest) o; + return + Utils.enhancedDeepEquals(this.userId, other.userId) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + userId, requestBody); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserEmailAddressRequest.class, + "userId", userId, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String userId; + + private ReplaceUserEmailAddressRequestBody requestBody; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the user whose email address to replace + */ + public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + + public Builder requestBody(ReplaceUserEmailAddressRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ReplaceUserEmailAddressRequest build() { + + return new ReplaceUserEmailAddressRequest( + userId, requestBody); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBody.java new file mode 100644 index 00000000..b05895e5 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBody.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.LazySingletonValue; +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ReplaceUserEmailAddressRequestBody { + /** + * The new email address. Must adhere to the RFC 5322 specification for email address format. + */ + @JsonProperty("email_address") + private String emailAddress; + + /** + * Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identification_status") + private Optional identificationStatus; + + @JsonCreator + public ReplaceUserEmailAddressRequestBody( + @JsonProperty("email_address") String emailAddress, + @JsonProperty("identification_status") Optional identificationStatus) { + Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.emailAddress = emailAddress; + this.identificationStatus = identificationStatus; + } + + public ReplaceUserEmailAddressRequestBody( + String emailAddress) { + this(emailAddress, Optional.empty()); + } + + /** + * The new email address. Must adhere to the RFC 5322 specification for email address format. + */ + @JsonIgnore + public String emailAddress() { + return emailAddress; + } + + /** + * Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional identificationStatus() { + return (Optional) identificationStatus; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The new email address. Must adhere to the RFC 5322 specification for email address format. + */ + public ReplaceUserEmailAddressRequestBody withEmailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + /** + * Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public ReplaceUserEmailAddressRequestBody withIdentificationStatus(IdentificationStatus identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = Optional.ofNullable(identificationStatus); + return this; + } + + + /** + * Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public ReplaceUserEmailAddressRequestBody withIdentificationStatus(Optional identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = identificationStatus; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserEmailAddressRequestBody other = (ReplaceUserEmailAddressRequestBody) o; + return + Utils.enhancedDeepEquals(this.emailAddress, other.emailAddress) && + Utils.enhancedDeepEquals(this.identificationStatus, other.identificationStatus); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + emailAddress, identificationStatus); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserEmailAddressRequestBody.class, + "emailAddress", emailAddress, + "identificationStatus", identificationStatus); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String emailAddress; + + private Optional identificationStatus; + + private Builder() { + // force use of static builder() method + } + + + /** + * The new email address. Must adhere to the RFC 5322 specification for email address format. + */ + public Builder emailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + + /** + * Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public Builder identificationStatus(IdentificationStatus identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = Optional.ofNullable(identificationStatus); + return this; + } + + /** + * Controls the status of the replacement email address. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public Builder identificationStatus(Optional identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = identificationStatus; + return this; + } + + public ReplaceUserEmailAddressRequestBody build() { + if (identificationStatus == null) { + identificationStatus = _SINGLETON_VALUE_IdentificationStatus.value(); + } + + return new ReplaceUserEmailAddressRequestBody( + emailAddress, identificationStatus); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_IdentificationStatus = + new LazySingletonValue<>( + "identification_status", + "\"verified\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBuilder.java new file mode 100644 index 00000000..ac735369 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.ReplaceUserEmailAddress; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class ReplaceUserEmailAddressRequestBuilder { + + private String userId; + private ReplaceUserEmailAddressRequestBody requestBody; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public ReplaceUserEmailAddressRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReplaceUserEmailAddressRequestBuilder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ReplaceUserEmailAddressRequestBuilder requestBody(ReplaceUserEmailAddressRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ReplaceUserEmailAddressRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public ReplaceUserEmailAddressRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private ReplaceUserEmailAddressRequest buildRequest() { + + ReplaceUserEmailAddressRequest request = new ReplaceUserEmailAddressRequest(userId, + requestBody); + + return request; + } + + public ReplaceUserEmailAddressResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new ReplaceUserEmailAddress.Sync(sdkConfiguration, options, _headers); + ReplaceUserEmailAddressRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressResponse.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressResponse.java new file mode 100644 index 00000000..d53b1528 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserEmailAddressResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.EmailAddress; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 ReplaceUserEmailAddressResponse 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; + + /** + * Success + */ + private Optional emailAddress; + + @JsonCreator + public ReplaceUserEmailAddressResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional emailAddress) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(emailAddress, "emailAddress"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.emailAddress = emailAddress; + } + + public ReplaceUserEmailAddressResponse( + 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; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional emailAddress() { + return (Optional) emailAddress; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReplaceUserEmailAddressResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReplaceUserEmailAddressResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReplaceUserEmailAddressResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public ReplaceUserEmailAddressResponse withEmailAddress(EmailAddress emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = Optional.ofNullable(emailAddress); + return this; + } + + + /** + * Success + */ + public ReplaceUserEmailAddressResponse withEmailAddress(Optional emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserEmailAddressResponse other = (ReplaceUserEmailAddressResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.emailAddress, other.emailAddress); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + emailAddress); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserEmailAddressResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "emailAddress", emailAddress); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional emailAddress = 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; + } + + + /** + * Success + */ + public Builder emailAddress(EmailAddress emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = Optional.ofNullable(emailAddress); + return this; + } + + /** + * Success + */ + public Builder emailAddress(Optional emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + public ReplaceUserEmailAddressResponse build() { + + return new ReplaceUserEmailAddressResponse( + contentType, statusCode, rawResponse, + emailAddress); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequest.java new file mode 100644 index 00000000..539f9a80 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequest.java @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ReplaceUserMetadataRequest { + /** + * The ID of the user whose metadata will be replaced + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=user_id") + private String userId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private Optional requestBody; + + @JsonCreator + public ReplaceUserMetadataRequest( + String userId, + Optional requestBody) { + Utils.checkNotNull(userId, "userId"); + Utils.checkNotNull(requestBody, "requestBody"); + this.userId = userId; + this.requestBody = requestBody; + } + + public ReplaceUserMetadataRequest( + String userId) { + this(userId, Optional.empty()); + } + + /** + * The ID of the user whose metadata will be replaced + */ + @JsonIgnore + public String userId() { + return userId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestBody() { + return (Optional) requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the user whose metadata will be replaced + */ + public ReplaceUserMetadataRequest withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ReplaceUserMetadataRequest withRequestBody(ReplaceUserMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + + public ReplaceUserMetadataRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserMetadataRequest other = (ReplaceUserMetadataRequest) o; + return + Utils.enhancedDeepEquals(this.userId, other.userId) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + userId, requestBody); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserMetadataRequest.class, + "userId", userId, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String userId; + + private Optional requestBody = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the user whose metadata will be replaced + */ + public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + + public Builder requestBody(ReplaceUserMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ReplaceUserMetadataRequest build() { + + return new ReplaceUserMetadataRequest( + userId, requestBody); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBody.java new file mode 100644 index 00000000..9e248d63 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBody.java @@ -0,0 +1,284 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; + + +public class ReplaceUserMetadataRequestBody { + /** + * Metadata saved on the user, that is visible to both your frontend and backend. + * The existing value will be replaced entirely with the new object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("public_metadata") + private Optional> publicMetadata; + + /** + * Metadata saved on the user that is only visible to your backend. + * The existing value will be replaced entirely with the new object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("private_metadata") + private Optional> privateMetadata; + + /** + * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. + * The existing value will be replaced entirely with the new object. + * + *

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("unsafe_metadata") + private Optional> unsafeMetadata; + + @JsonCreator + public ReplaceUserMetadataRequestBody( + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("unsafe_metadata") Optional> unsafeMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + Utils.checkNotNull(privateMetadata, "privateMetadata"); + Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); + this.publicMetadata = publicMetadata; + this.privateMetadata = privateMetadata; + this.unsafeMetadata = unsafeMetadata; + } + + public ReplaceUserMetadataRequestBody() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Metadata saved on the user, that is visible to both your frontend and backend. + * The existing value will be replaced entirely with the new object. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> publicMetadata() { + return (Optional>) publicMetadata; + } + + /** + * Metadata saved on the user that is only visible to your backend. + * The existing value will be replaced entirely with the new object. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> privateMetadata() { + return (Optional>) privateMetadata; + } + + /** + * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. + * The existing value will be replaced entirely with the new object. + * + *

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> unsafeMetadata() { + return (Optional>) unsafeMetadata; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Metadata saved on the user, that is visible to both your frontend and backend. + * The existing value will be replaced entirely with the new object. + */ + public ReplaceUserMetadataRequestBody withPublicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); + return this; + } + + + /** + * Metadata saved on the user, that is visible to both your frontend and backend. + * The existing value will be replaced entirely with the new object. + */ + public ReplaceUserMetadataRequestBody withPublicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; + return this; + } + + /** + * Metadata saved on the user that is only visible to your backend. + * The existing value will be replaced entirely with the new object. + */ + public ReplaceUserMetadataRequestBody withPrivateMetadata(Map privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = Optional.ofNullable(privateMetadata); + return this; + } + + + /** + * Metadata saved on the user that is only visible to your backend. + * The existing value will be replaced entirely with the new object. + */ + public ReplaceUserMetadataRequestBody withPrivateMetadata(Optional> privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = privateMetadata; + return this; + } + + /** + * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. + * The existing value will be replaced entirely with the new object. + * + *

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. + */ + public ReplaceUserMetadataRequestBody withUnsafeMetadata(Map unsafeMetadata) { + Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); + this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); + return this; + } + + + /** + * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. + * The existing value will be replaced entirely with the new object. + * + *

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. + */ + public ReplaceUserMetadataRequestBody withUnsafeMetadata(Optional> unsafeMetadata) { + Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); + this.unsafeMetadata = unsafeMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserMetadataRequestBody other = (ReplaceUserMetadataRequestBody) o; + return + Utils.enhancedDeepEquals(this.publicMetadata, other.publicMetadata) && + Utils.enhancedDeepEquals(this.privateMetadata, other.privateMetadata) && + Utils.enhancedDeepEquals(this.unsafeMetadata, other.unsafeMetadata); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + publicMetadata, privateMetadata, unsafeMetadata); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserMetadataRequestBody.class, + "publicMetadata", publicMetadata, + "privateMetadata", privateMetadata, + "unsafeMetadata", unsafeMetadata); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional> publicMetadata = Optional.empty(); + + private Optional> privateMetadata = Optional.empty(); + + private Optional> unsafeMetadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Metadata saved on the user, that is visible to both your frontend and backend. + * The existing value will be replaced entirely with the new object. + */ + public Builder publicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); + return this; + } + + /** + * Metadata saved on the user, that is visible to both your frontend and backend. + * The existing value will be replaced entirely with the new object. + */ + public Builder publicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; + return this; + } + + + /** + * Metadata saved on the user that is only visible to your backend. + * The existing value will be replaced entirely with the new object. + */ + public Builder privateMetadata(Map privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = Optional.ofNullable(privateMetadata); + return this; + } + + /** + * Metadata saved on the user that is only visible to your backend. + * The existing value will be replaced entirely with the new object. + */ + public Builder privateMetadata(Optional> privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = privateMetadata; + return this; + } + + + /** + * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. + * The existing value will be replaced entirely with the new object. + * + *

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. + */ + public Builder unsafeMetadata(Map unsafeMetadata) { + Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); + this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); + return this; + } + + /** + * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. + * The existing value will be replaced entirely with the new object. + * + *

Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. + */ + public Builder unsafeMetadata(Optional> unsafeMetadata) { + Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); + this.unsafeMetadata = unsafeMetadata; + return this; + } + + public ReplaceUserMetadataRequestBody build() { + + return new ReplaceUserMetadataRequestBody( + publicMetadata, privateMetadata, unsafeMetadata); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBuilder.java new file mode 100644 index 00000000..a41f3da0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataRequestBuilder.java @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.ReplaceUserMetadata; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class ReplaceUserMetadataRequestBuilder { + + private String userId; + private Optional requestBody = Optional.empty(); + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public ReplaceUserMetadataRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReplaceUserMetadataRequestBuilder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ReplaceUserMetadataRequestBuilder requestBody(ReplaceUserMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public ReplaceUserMetadataRequestBuilder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ReplaceUserMetadataRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public ReplaceUserMetadataRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private ReplaceUserMetadataRequest buildRequest() { + + ReplaceUserMetadataRequest request = new ReplaceUserMetadataRequest(userId, + requestBody); + + return request; + } + + public ReplaceUserMetadataResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new ReplaceUserMetadata.Sync(sdkConfiguration, options, _headers); + ReplaceUserMetadataRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataResponse.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataResponse.java new file mode 100644 index 00000000..00653d00 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserMetadataResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.User; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 ReplaceUserMetadataResponse 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; + + /** + * Success + */ + private Optional user; + + @JsonCreator + public ReplaceUserMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional user) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(user, "user"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.user = user; + } + + public ReplaceUserMetadataResponse( + 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; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional user() { + return (Optional) user; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReplaceUserMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReplaceUserMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReplaceUserMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public ReplaceUserMetadataResponse withUser(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); + return this; + } + + + /** + * Success + */ + public ReplaceUserMetadataResponse withUser(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserMetadataResponse other = (ReplaceUserMetadataResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.user, other.user); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + user); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserMetadataResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "user", user); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional user = 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; + } + + + /** + * Success + */ + public Builder user(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); + return this; + } + + /** + * Success + */ + public Builder user(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + public ReplaceUserMetadataResponse build() { + + return new ReplaceUserMetadataResponse( + contentType, statusCode, rawResponse, + user); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberIdentificationStatus.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberIdentificationStatus.java new file mode 100644 index 00000000..7499affb --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberIdentificationStatus.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ReplaceUserPhoneNumberIdentificationStatus + * + *

Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ +public enum ReplaceUserPhoneNumberIdentificationStatus { + VERIFIED("verified"), + RESERVED("reserved"); + + @JsonValue + private final String value; + + ReplaceUserPhoneNumberIdentificationStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ReplaceUserPhoneNumberIdentificationStatus o: ReplaceUserPhoneNumberIdentificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequest.java new file mode 100644 index 00000000..3cd11d32 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class ReplaceUserPhoneNumberRequest { + /** + * The ID of the user whose phone number to replace + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=user_id") + private String userId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private ReplaceUserPhoneNumberRequestBody requestBody; + + @JsonCreator + public ReplaceUserPhoneNumberRequest( + String userId, + ReplaceUserPhoneNumberRequestBody requestBody) { + Utils.checkNotNull(userId, "userId"); + Utils.checkNotNull(requestBody, "requestBody"); + this.userId = userId; + this.requestBody = requestBody; + } + + /** + * The ID of the user whose phone number to replace + */ + @JsonIgnore + public String userId() { + return userId; + } + + @JsonIgnore + public ReplaceUserPhoneNumberRequestBody requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the user whose phone number to replace + */ + public ReplaceUserPhoneNumberRequest withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ReplaceUserPhoneNumberRequest withRequestBody(ReplaceUserPhoneNumberRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserPhoneNumberRequest other = (ReplaceUserPhoneNumberRequest) o; + return + Utils.enhancedDeepEquals(this.userId, other.userId) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + userId, requestBody); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserPhoneNumberRequest.class, + "userId", userId, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String userId; + + private ReplaceUserPhoneNumberRequestBody requestBody; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the user whose phone number to replace + */ + public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + + public Builder requestBody(ReplaceUserPhoneNumberRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ReplaceUserPhoneNumberRequest build() { + + return new ReplaceUserPhoneNumberRequest( + userId, requestBody); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBody.java new file mode 100644 index 00000000..545de420 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBody.java @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.LazySingletonValue; +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class ReplaceUserPhoneNumberRequestBody { + /** + * The new phone number. Must adhere to the E.164 standard for phone number format. + */ + @JsonProperty("phone_number") + private String phoneNumber; + + /** + * Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identification_status") + private Optional identificationStatus; + + @JsonCreator + public ReplaceUserPhoneNumberRequestBody( + @JsonProperty("phone_number") String phoneNumber, + @JsonProperty("identification_status") Optional identificationStatus) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.phoneNumber = phoneNumber; + this.identificationStatus = identificationStatus; + } + + public ReplaceUserPhoneNumberRequestBody( + String phoneNumber) { + this(phoneNumber, Optional.empty()); + } + + /** + * The new phone number. Must adhere to the E.164 standard for phone number format. + */ + @JsonIgnore + public String phoneNumber() { + return phoneNumber; + } + + /** + * Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional identificationStatus() { + return (Optional) identificationStatus; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The new phone number. Must adhere to the E.164 standard for phone number format. + */ + public ReplaceUserPhoneNumberRequestBody withPhoneNumber(String phoneNumber) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public ReplaceUserPhoneNumberRequestBody withIdentificationStatus(ReplaceUserPhoneNumberIdentificationStatus identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = Optional.ofNullable(identificationStatus); + return this; + } + + + /** + * Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public ReplaceUserPhoneNumberRequestBody withIdentificationStatus(Optional identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = identificationStatus; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserPhoneNumberRequestBody other = (ReplaceUserPhoneNumberRequestBody) o; + return + Utils.enhancedDeepEquals(this.phoneNumber, other.phoneNumber) && + Utils.enhancedDeepEquals(this.identificationStatus, other.identificationStatus); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + phoneNumber, identificationStatus); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserPhoneNumberRequestBody.class, + "phoneNumber", phoneNumber, + "identificationStatus", identificationStatus); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String phoneNumber; + + private Optional identificationStatus; + + private Builder() { + // force use of static builder() method + } + + + /** + * The new phone number. Must adhere to the E.164 standard for phone number format. + */ + public Builder phoneNumber(String phoneNumber) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.phoneNumber = phoneNumber; + return this; + } + + + /** + * Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public Builder identificationStatus(ReplaceUserPhoneNumberIdentificationStatus identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = Optional.ofNullable(identificationStatus); + return this; + } + + /** + * Controls the status of the replacement phone number. Defaults to `verified`. Set to + * `reserved` to create it reserved (unverified but usable for sign-in and locked) + * instead of verified. + */ + public Builder identificationStatus(Optional identificationStatus) { + Utils.checkNotNull(identificationStatus, "identificationStatus"); + this.identificationStatus = identificationStatus; + return this; + } + + public ReplaceUserPhoneNumberRequestBody build() { + if (identificationStatus == null) { + identificationStatus = _SINGLETON_VALUE_IdentificationStatus.value(); + } + + return new ReplaceUserPhoneNumberRequestBody( + phoneNumber, identificationStatus); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_IdentificationStatus = + new LazySingletonValue<>( + "identification_status", + "\"verified\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBuilder.java new file mode 100644 index 00000000..2fea257b --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.ReplaceUserPhoneNumber; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class ReplaceUserPhoneNumberRequestBuilder { + + private String userId; + private ReplaceUserPhoneNumberRequestBody requestBody; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public ReplaceUserPhoneNumberRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public ReplaceUserPhoneNumberRequestBuilder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ReplaceUserPhoneNumberRequestBuilder requestBody(ReplaceUserPhoneNumberRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ReplaceUserPhoneNumberRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public ReplaceUserPhoneNumberRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private ReplaceUserPhoneNumberRequest buildRequest() { + + ReplaceUserPhoneNumberRequest request = new ReplaceUserPhoneNumberRequest(userId, + requestBody); + + return request; + } + + public ReplaceUserPhoneNumberResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new ReplaceUserPhoneNumber.Sync(sdkConfiguration, options, _headers); + ReplaceUserPhoneNumberRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberResponse.java b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberResponse.java new file mode 100644 index 00000000..3e94c11a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ReplaceUserPhoneNumberResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.PhoneNumber; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 ReplaceUserPhoneNumberResponse 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; + + /** + * Success + */ + private Optional phoneNumber; + + @JsonCreator + public ReplaceUserPhoneNumberResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional phoneNumber) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.phoneNumber = phoneNumber; + } + + public ReplaceUserPhoneNumberResponse( + 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; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional phoneNumber() { + return (Optional) phoneNumber; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public ReplaceUserPhoneNumberResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ReplaceUserPhoneNumberResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ReplaceUserPhoneNumberResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public ReplaceUserPhoneNumberResponse withPhoneNumber(PhoneNumber phoneNumber) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + + /** + * Success + */ + public ReplaceUserPhoneNumberResponse withPhoneNumber(Optional phoneNumber) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.phoneNumber = phoneNumber; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaceUserPhoneNumberResponse other = (ReplaceUserPhoneNumberResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.phoneNumber, other.phoneNumber); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + phoneNumber); + } + + @Override + public String toString() { + return Utils.toString(ReplaceUserPhoneNumberResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "phoneNumber", phoneNumber); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional phoneNumber = 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; + } + + + /** + * Success + */ + public Builder phoneNumber(PhoneNumber phoneNumber) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.phoneNumber = Optional.ofNullable(phoneNumber); + return this; + } + + /** + * Success + */ + public Builder phoneNumber(Optional phoneNumber) { + Utils.checkNotNull(phoneNumber, "phoneNumber"); + this.phoneNumber = phoneNumber; + return this; + } + + public ReplaceUserPhoneNumberResponse build() { + + return new ReplaceUserPhoneNumberResponse( + contentType, statusCode, rawResponse, + phoneNumber); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenObject.java b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenObject.java new file mode 100644 index 00000000..6ee7d6a9 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum RevokeAdminPortalLinkTokenObject { + ADMIN_PORTAL_LINK_TOKEN("admin_portal_link_token"); + + @JsonValue + private final String value; + + RevokeAdminPortalLinkTokenObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (RevokeAdminPortalLinkTokenObject o: RevokeAdminPortalLinkTokenObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequest.java b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequest.java new file mode 100644 index 00000000..8e7cd321 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequest.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class RevokeAdminPortalLinkTokenRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=adminPortalLinkTokenID") + private String adminPortalLinkTokenID; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private RevokeAdminPortalLinkTokenRequestBody requestBody; + + @JsonCreator + public RevokeAdminPortalLinkTokenRequest( + String adminPortalLinkTokenID, + RevokeAdminPortalLinkTokenRequestBody requestBody) { + Utils.checkNotNull(adminPortalLinkTokenID, "adminPortalLinkTokenID"); + Utils.checkNotNull(requestBody, "requestBody"); + this.adminPortalLinkTokenID = adminPortalLinkTokenID; + this.requestBody = requestBody; + } + + @JsonIgnore + public String adminPortalLinkTokenID() { + return adminPortalLinkTokenID; + } + + @JsonIgnore + public RevokeAdminPortalLinkTokenRequestBody requestBody() { + return requestBody; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenRequest withAdminPortalLinkTokenID(String adminPortalLinkTokenID) { + Utils.checkNotNull(adminPortalLinkTokenID, "adminPortalLinkTokenID"); + this.adminPortalLinkTokenID = adminPortalLinkTokenID; + return this; + } + + public RevokeAdminPortalLinkTokenRequest withRequestBody(RevokeAdminPortalLinkTokenRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenRequest other = (RevokeAdminPortalLinkTokenRequest) o; + return + Utils.enhancedDeepEquals(this.adminPortalLinkTokenID, other.adminPortalLinkTokenID) && + Utils.enhancedDeepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + adminPortalLinkTokenID, requestBody); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenRequest.class, + "adminPortalLinkTokenID", adminPortalLinkTokenID, + "requestBody", requestBody); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String adminPortalLinkTokenID; + + private RevokeAdminPortalLinkTokenRequestBody requestBody; + + private Builder() { + // force use of static builder() method + } + + + public Builder adminPortalLinkTokenID(String adminPortalLinkTokenID) { + Utils.checkNotNull(adminPortalLinkTokenID, "adminPortalLinkTokenID"); + this.adminPortalLinkTokenID = adminPortalLinkTokenID; + return this; + } + + + public Builder requestBody(RevokeAdminPortalLinkTokenRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public RevokeAdminPortalLinkTokenRequest build() { + + return new RevokeAdminPortalLinkTokenRequest( + adminPortalLinkTokenID, requestBody); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBody.java new file mode 100644 index 00000000..9aca1aba --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBody.java @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class RevokeAdminPortalLinkTokenRequestBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("revocation_reason") + private JsonNullable revocationReason; + + @JsonCreator + public RevokeAdminPortalLinkTokenRequestBody( + @JsonProperty("revocation_reason") JsonNullable revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + } + + public RevokeAdminPortalLinkTokenRequestBody() { + this(JsonNullable.undefined()); + } + + @JsonIgnore + public JsonNullable revocationReason() { + return revocationReason; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenRequestBody withRevocationReason(String revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = JsonNullable.of(revocationReason); + return this; + } + + public RevokeAdminPortalLinkTokenRequestBody withRevocationReason(JsonNullable revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenRequestBody other = (RevokeAdminPortalLinkTokenRequestBody) o; + return + Utils.enhancedDeepEquals(this.revocationReason, other.revocationReason); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + revocationReason); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenRequestBody.class, + "revocationReason", revocationReason); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable revocationReason = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + public Builder revocationReason(String revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = JsonNullable.of(revocationReason); + return this; + } + + public Builder revocationReason(JsonNullable revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + return this; + } + + public RevokeAdminPortalLinkTokenRequestBody build() { + + return new RevokeAdminPortalLinkTokenRequestBody( + revocationReason); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBuilder.java new file mode 100644 index 00000000..fb53c4d7 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.RevokeAdminPortalLinkToken; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class RevokeAdminPortalLinkTokenRequestBuilder { + + private String adminPortalLinkTokenID; + private RevokeAdminPortalLinkTokenRequestBody requestBody; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public RevokeAdminPortalLinkTokenRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public RevokeAdminPortalLinkTokenRequestBuilder adminPortalLinkTokenID(String adminPortalLinkTokenID) { + Utils.checkNotNull(adminPortalLinkTokenID, "adminPortalLinkTokenID"); + this.adminPortalLinkTokenID = adminPortalLinkTokenID; + return this; + } + + public RevokeAdminPortalLinkTokenRequestBuilder requestBody(RevokeAdminPortalLinkTokenRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public RevokeAdminPortalLinkTokenRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public RevokeAdminPortalLinkTokenRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private RevokeAdminPortalLinkTokenRequest buildRequest() { + + RevokeAdminPortalLinkTokenRequest request = new RevokeAdminPortalLinkTokenRequest(adminPortalLinkTokenID, + requestBody); + + return request; + } + + public RevokeAdminPortalLinkTokenResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new RevokeAdminPortalLinkToken.Sync(sdkConfiguration, options, _headers); + RevokeAdminPortalLinkTokenRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponse.java b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponse.java new file mode 100644 index 00000000..1de2fdcb --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 RevokeAdminPortalLinkTokenResponse 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; + + /** + * 200 OK + */ + private Optional object; + + @JsonCreator + public RevokeAdminPortalLinkTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public RevokeAdminPortalLinkTokenResponse( + 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; + } + + /** + * 200 OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public RevokeAdminPortalLinkTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RevokeAdminPortalLinkTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RevokeAdminPortalLinkTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * 200 OK + */ + public RevokeAdminPortalLinkTokenResponse withObject(RevokeAdminPortalLinkTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + + /** + * 200 OK + */ + public RevokeAdminPortalLinkTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenResponse other = (RevokeAdminPortalLinkTokenResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * 200 OK + */ + public Builder object(RevokeAdminPortalLinkTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * 200 OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RevokeAdminPortalLinkTokenResponse build() { + + return new RevokeAdminPortalLinkTokenResponse( + contentType, statusCode, rawResponse, + object); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponseBody.java b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponseBody.java new file mode 100644 index 00000000..00c0e6f1 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/RevokeAdminPortalLinkTokenResponseBody.java @@ -0,0 +1,645 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; + +/** + * RevokeAdminPortalLinkTokenResponseBody + * + *

200 OK + */ +public class RevokeAdminPortalLinkTokenResponseBody { + + @JsonProperty("object") + private RevokeAdminPortalLinkTokenObject object; + + + @JsonProperty("id") + private String id; + + /** + * The origin-level admin_portal_link this token was issued for. + */ + @JsonProperty("admin_portal_link_id") + private String adminPortalLinkId; + + + @JsonProperty("instance_id") + private String instanceId; + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("organization_id") + private Optional organizationId; + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("it_contact_id") + private Optional itContactId; + + /** + * Caller-provided scopes for this token. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("scopes") + private Optional> scopes; + + + @JsonProperty("revoked") + private boolean revoked; + + + @JsonInclude(Include.ALWAYS) + @JsonProperty("revocation_reason") + private Optional revocationReason; + + + @JsonProperty("expired") + private boolean expired; + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("expiration") + private Optional expiration; + + /** + * The timestamp for when the token was created, in milliseconds. + */ + @JsonProperty("created_at") + private double createdAt; + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + @JsonProperty("updated_at") + private double updatedAt; + + @JsonCreator + public RevokeAdminPortalLinkTokenResponseBody( + @JsonProperty("object") RevokeAdminPortalLinkTokenObject object, + @JsonProperty("id") String id, + @JsonProperty("admin_portal_link_id") String adminPortalLinkId, + @JsonProperty("instance_id") String instanceId, + @JsonProperty("organization_id") Optional organizationId, + @JsonProperty("it_contact_id") Optional itContactId, + @JsonProperty("scopes") Optional> scopes, + @JsonProperty("revoked") boolean revoked, + @JsonProperty("revocation_reason") Optional revocationReason, + @JsonProperty("expired") boolean expired, + @JsonProperty("expiration") Optional expiration, + @JsonProperty("created_at") double createdAt, + @JsonProperty("updated_at") double updatedAt) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(adminPortalLinkId, "adminPortalLinkId"); + Utils.checkNotNull(instanceId, "instanceId"); + Utils.checkNotNull(organizationId, "organizationId"); + Utils.checkNotNull(itContactId, "itContactId"); + Utils.checkNotNull(scopes, "scopes"); + Utils.checkNotNull(revoked, "revoked"); + Utils.checkNotNull(revocationReason, "revocationReason"); + Utils.checkNotNull(expired, "expired"); + Utils.checkNotNull(expiration, "expiration"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.object = object; + this.id = id; + this.adminPortalLinkId = adminPortalLinkId; + this.instanceId = instanceId; + this.organizationId = organizationId; + this.itContactId = itContactId; + this.scopes = scopes; + this.revoked = revoked; + this.revocationReason = revocationReason; + this.expired = expired; + this.expiration = expiration; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public RevokeAdminPortalLinkTokenResponseBody( + RevokeAdminPortalLinkTokenObject object, + String id, + String adminPortalLinkId, + String instanceId, + boolean revoked, + boolean expired, + double createdAt, + double updatedAt) { + this(object, id, adminPortalLinkId, + instanceId, Optional.empty(), Optional.empty(), + Optional.empty(), revoked, Optional.empty(), + expired, Optional.empty(), createdAt, + updatedAt); + } + + @JsonIgnore + public RevokeAdminPortalLinkTokenObject object() { + return object; + } + + @JsonIgnore + public String id() { + return id; + } + + /** + * The origin-level admin_portal_link this token was issued for. + */ + @JsonIgnore + public String adminPortalLinkId() { + return adminPortalLinkId; + } + + @JsonIgnore + public String instanceId() { + return instanceId; + } + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + @JsonIgnore + public Optional organizationId() { + return organizationId; + } + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + @JsonIgnore + public Optional itContactId() { + return itContactId; + } + + /** + * Caller-provided scopes for this token. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> scopes() { + return (Optional>) scopes; + } + + @JsonIgnore + public boolean revoked() { + return revoked; + } + + @JsonIgnore + public Optional revocationReason() { + return revocationReason; + } + + @JsonIgnore + public boolean expired() { + return expired; + } + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + @JsonIgnore + public Optional expiration() { + return expiration; + } + + /** + * The timestamp for when the token was created, in milliseconds. + */ + @JsonIgnore + public double createdAt() { + return createdAt; + } + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + @JsonIgnore + public double updatedAt() { + return updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + public RevokeAdminPortalLinkTokenResponseBody withObject(RevokeAdminPortalLinkTokenObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public RevokeAdminPortalLinkTokenResponseBody withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The origin-level admin_portal_link this token was issued for. + */ + public RevokeAdminPortalLinkTokenResponseBody withAdminPortalLinkId(String adminPortalLinkId) { + Utils.checkNotNull(adminPortalLinkId, "adminPortalLinkId"); + this.adminPortalLinkId = adminPortalLinkId; + return this; + } + + public RevokeAdminPortalLinkTokenResponseBody withInstanceId(String instanceId) { + Utils.checkNotNull(instanceId, "instanceId"); + this.instanceId = instanceId; + return this; + } + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public RevokeAdminPortalLinkTokenResponseBody withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public RevokeAdminPortalLinkTokenResponseBody withOrganizationId(Optional organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public RevokeAdminPortalLinkTokenResponseBody withItContactId(String itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = Optional.ofNullable(itContactId); + return this; + } + + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public RevokeAdminPortalLinkTokenResponseBody withItContactId(Optional itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = itContactId; + return this; + } + + /** + * Caller-provided scopes for this token. + */ + public RevokeAdminPortalLinkTokenResponseBody withScopes(List scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = Optional.ofNullable(scopes); + return this; + } + + + /** + * Caller-provided scopes for this token. + */ + public RevokeAdminPortalLinkTokenResponseBody withScopes(Optional> scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = scopes; + return this; + } + + public RevokeAdminPortalLinkTokenResponseBody withRevoked(boolean revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = revoked; + return this; + } + + public RevokeAdminPortalLinkTokenResponseBody withRevocationReason(String revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = Optional.ofNullable(revocationReason); + return this; + } + + + public RevokeAdminPortalLinkTokenResponseBody withRevocationReason(Optional revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + return this; + } + + public RevokeAdminPortalLinkTokenResponseBody withExpired(boolean expired) { + Utils.checkNotNull(expired, "expired"); + this.expired = expired; + return this; + } + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public RevokeAdminPortalLinkTokenResponseBody withExpiration(double expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = Optional.ofNullable(expiration); + return this; + } + + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public RevokeAdminPortalLinkTokenResponseBody withExpiration(Optional expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = expiration; + return this; + } + + /** + * The timestamp for when the token was created, in milliseconds. + */ + public RevokeAdminPortalLinkTokenResponseBody withCreatedAt(double createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + public RevokeAdminPortalLinkTokenResponseBody withUpdatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeAdminPortalLinkTokenResponseBody other = (RevokeAdminPortalLinkTokenResponseBody) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.adminPortalLinkId, other.adminPortalLinkId) && + Utils.enhancedDeepEquals(this.instanceId, other.instanceId) && + Utils.enhancedDeepEquals(this.organizationId, other.organizationId) && + Utils.enhancedDeepEquals(this.itContactId, other.itContactId) && + Utils.enhancedDeepEquals(this.scopes, other.scopes) && + Utils.enhancedDeepEquals(this.revoked, other.revoked) && + Utils.enhancedDeepEquals(this.revocationReason, other.revocationReason) && + Utils.enhancedDeepEquals(this.expired, other.expired) && + Utils.enhancedDeepEquals(this.expiration, other.expiration) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, id, adminPortalLinkId, + instanceId, organizationId, itContactId, + scopes, revoked, revocationReason, + expired, expiration, createdAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(RevokeAdminPortalLinkTokenResponseBody.class, + "object", object, + "id", id, + "adminPortalLinkId", adminPortalLinkId, + "instanceId", instanceId, + "organizationId", organizationId, + "itContactId", itContactId, + "scopes", scopes, + "revoked", revoked, + "revocationReason", revocationReason, + "expired", expired, + "expiration", expiration, + "createdAt", createdAt, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private RevokeAdminPortalLinkTokenObject object; + + private String id; + + private String adminPortalLinkId; + + private String instanceId; + + private Optional organizationId = Optional.empty(); + + private Optional itContactId = Optional.empty(); + + private Optional> scopes = Optional.empty(); + + private Boolean revoked; + + private Optional revocationReason = Optional.empty(); + + private Boolean expired; + + private Optional expiration = Optional.empty(); + + private Double createdAt; + + private Double updatedAt; + + private Builder() { + // force use of static builder() method + } + + + public Builder object(RevokeAdminPortalLinkTokenObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The origin-level admin_portal_link this token was issued for. + */ + public Builder adminPortalLinkId(String adminPortalLinkId) { + Utils.checkNotNull(adminPortalLinkId, "adminPortalLinkId"); + this.adminPortalLinkId = adminPortalLinkId; + return this; + } + + + public Builder instanceId(String instanceId) { + Utils.checkNotNull(instanceId, "instanceId"); + this.instanceId = instanceId; + return this; + } + + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + /** + * Optional. Present only when the link is scoped to an existing org. + */ + public Builder organizationId(Optional organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public Builder itContactId(String itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = Optional.ofNullable(itContactId); + return this; + } + + /** + * Optional opaque reference to the IT contact associated with this link. + */ + public Builder itContactId(Optional itContactId) { + Utils.checkNotNull(itContactId, "itContactId"); + this.itContactId = itContactId; + return this; + } + + + /** + * Caller-provided scopes for this token. + */ + public Builder scopes(List scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = Optional.ofNullable(scopes); + return this; + } + + /** + * Caller-provided scopes for this token. + */ + public Builder scopes(Optional> scopes) { + Utils.checkNotNull(scopes, "scopes"); + this.scopes = scopes; + return this; + } + + + public Builder revoked(boolean revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = revoked; + return this; + } + + + public Builder revocationReason(String revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = Optional.ofNullable(revocationReason); + return this; + } + + public Builder revocationReason(Optional revocationReason) { + Utils.checkNotNull(revocationReason, "revocationReason"); + this.revocationReason = revocationReason; + return this; + } + + + public Builder expired(boolean expired) { + Utils.checkNotNull(expired, "expired"); + this.expired = expired; + return this; + } + + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public Builder expiration(double expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = Optional.ofNullable(expiration); + return this; + } + + /** + * The timestamp for when the token will expire, in milliseconds. + */ + public Builder expiration(Optional expiration) { + Utils.checkNotNull(expiration, "expiration"); + this.expiration = expiration; + return this; + } + + + /** + * The timestamp for when the token was created, in milliseconds. + */ + public Builder createdAt(double createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * The timestamp for when the token was last updated, in milliseconds. + */ + public Builder updatedAt(double updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public RevokeAdminPortalLinkTokenResponseBody build() { + + return new RevokeAdminPortalLinkTokenResponseBody( + object, id, adminPortalLinkId, + instanceId, organizationId, itContactId, + scopes, revoked, revocationReason, + expired, expiration, createdAt, + updatedAt); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateEnterpriseConnectionCustomAttributes.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateEnterpriseConnectionCustomAttributes.java index e88cbbc8..1bc75138 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateEnterpriseConnectionCustomAttributes.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateEnterpriseConnectionCustomAttributes.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.util.Optional; @@ -41,27 +42,38 @@ public class UpdateEnterpriseConnectionCustomAttributes { @JsonProperty("scim_path") private Optional scimPath; + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("multi_valued") + private Optional multiValued; + @JsonCreator public UpdateEnterpriseConnectionCustomAttributes( @JsonProperty("name") String name, @JsonProperty("key") String key, @JsonProperty("sso_path") Optional ssoPath, - @JsonProperty("scim_path") Optional scimPath) { + @JsonProperty("scim_path") Optional scimPath, + @JsonProperty("multi_valued") Optional multiValued) { Utils.checkNotNull(name, "name"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(ssoPath, "ssoPath"); Utils.checkNotNull(scimPath, "scimPath"); + Utils.checkNotNull(multiValued, "multiValued"); this.name = name; this.key = key; this.ssoPath = ssoPath; this.scimPath = scimPath; + this.multiValued = multiValued; } public UpdateEnterpriseConnectionCustomAttributes( String name, String key) { this(name, key, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -96,6 +108,15 @@ public Optional scimPath() { return scimPath; } + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + @JsonIgnore + public Optional multiValued() { + return multiValued; + } + public static Builder builder() { return new Builder(); } @@ -157,6 +178,27 @@ public UpdateEnterpriseConnectionCustomAttributes withScimPath(Optional return this; } + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public UpdateEnterpriseConnectionCustomAttributes withMultiValued(boolean multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = Optional.ofNullable(multiValued); + return this; + } + + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public UpdateEnterpriseConnectionCustomAttributes withMultiValued(Optional multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = multiValued; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -170,14 +212,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.name, other.name) && Utils.enhancedDeepEquals(this.key, other.key) && Utils.enhancedDeepEquals(this.ssoPath, other.ssoPath) && - Utils.enhancedDeepEquals(this.scimPath, other.scimPath); + Utils.enhancedDeepEquals(this.scimPath, other.scimPath) && + Utils.enhancedDeepEquals(this.multiValued, other.multiValued); } @Override public int hashCode() { return Utils.enhancedHash( name, key, ssoPath, - scimPath); + scimPath, multiValued); } @Override @@ -186,7 +229,8 @@ public String toString() { "name", name, "key", key, "ssoPath", ssoPath, - "scimPath", scimPath); + "scimPath", scimPath, + "multiValued", multiValued); } @SuppressWarnings("UnusedReturnValue") @@ -200,6 +244,8 @@ public final static class Builder { private Optional scimPath = Optional.empty(); + private Optional multiValued = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -262,11 +308,32 @@ public Builder scimPath(Optional scimPath) { return this; } + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public Builder multiValued(boolean multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = Optional.ofNullable(multiValued); + return this; + } + + /** + * When true, the attribute supports multiple values; values from the IdP are written to + * public_metadata as an array. Defaults to false. + */ + public Builder multiValued(Optional multiValued) { + Utils.checkNotNull(multiValued, "multiValued"); + this.multiValued = multiValued; + return this; + } + public UpdateEnterpriseConnectionCustomAttributes build() { return new UpdateEnterpriseConnectionCustomAttributes( name, key, ssoPath, - scimPath); + scimPath, multiValued); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java new file mode 100644 index 00000000..0bb61e83 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UpdateInstanceCommunicationRequestBody { + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("blocked_country_codes") + private JsonNullable> blockedCountryCodes; + + @JsonCreator + public UpdateInstanceCommunicationRequestBody( + @JsonProperty("blocked_country_codes") JsonNullable> blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + } + + public UpdateInstanceCommunicationRequestBody() { + this(JsonNullable.undefined()); + } + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> blockedCountryCodes() { + return (JsonNullable>) blockedCountryCodes; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public UpdateInstanceCommunicationRequestBody withBlockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = JsonNullable.of(blockedCountryCodes); + return this; + } + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public UpdateInstanceCommunicationRequestBody withBlockedCountryCodes(JsonNullable> blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateInstanceCommunicationRequestBody other = (UpdateInstanceCommunicationRequestBody) o; + return + Utils.enhancedDeepEquals(this.blockedCountryCodes, other.blockedCountryCodes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + blockedCountryCodes); + } + + @Override + public String toString() { + return Utils.toString(UpdateInstanceCommunicationRequestBody.class, + "blockedCountryCodes", blockedCountryCodes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable> blockedCountryCodes = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public Builder blockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = JsonNullable.of(blockedCountryCodes); + return this; + } + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public Builder blockedCountryCodes(JsonNullable> blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + public UpdateInstanceCommunicationRequestBody build() { + + return new UpdateInstanceCommunicationRequestBody( + blockedCountryCodes); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java new file mode 100644 index 00000000..7eb1aea5 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.UpdateInstanceCommunication; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class UpdateInstanceCommunicationRequestBuilder { + + private Optional request = Optional.empty(); + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public UpdateInstanceCommunicationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateInstanceCommunicationRequestBuilder request(UpdateInstanceCommunicationRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public UpdateInstanceCommunicationRequestBuilder request(Optional request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpdateInstanceCommunicationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public UpdateInstanceCommunicationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public UpdateInstanceCommunicationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation, UpdateInstanceCommunicationResponse> operation + = new UpdateInstanceCommunication.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java new file mode 100644 index 00000000..5d0295d0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 UpdateInstanceCommunicationResponse 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; + + /** + * Success + */ + private Optional instanceCommunication; + + @JsonCreator + public UpdateInstanceCommunicationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional instanceCommunication) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.instanceCommunication = instanceCommunication; + } + + public UpdateInstanceCommunicationResponse( + 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; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional instanceCommunication() { + return (Optional) instanceCommunication; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateInstanceCommunicationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateInstanceCommunicationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateInstanceCommunicationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public UpdateInstanceCommunicationResponse withInstanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + + /** + * Success + */ + public UpdateInstanceCommunicationResponse withInstanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateInstanceCommunicationResponse other = (UpdateInstanceCommunicationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.instanceCommunication, other.instanceCommunication); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + @Override + public String toString() { + return Utils.toString(UpdateInstanceCommunicationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "instanceCommunication", instanceCommunication); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional instanceCommunication = 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; + } + + + /** + * Success + */ + public Builder instanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + /** + * Success + */ + public Builder instanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + public UpdateInstanceCommunicationResponse build() { + + return new UpdateInstanceCommunicationResponse( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBody.java index 742c1915..39db73ea 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBody.java @@ -82,6 +82,16 @@ public class UpdateInstanceRequestBody { @JsonProperty("url_based_session_syncing") private JsonNullable urlBasedSessionSyncing; + /** + * When password is required at the instance level, sets the preferred sign-in strategy surfaced to + * Clerk components. Has no effect when password is not required. Defaults to `password`. + * + *

Set to an empty string to clear the override. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preferred_sign_in_strategy_when_password_required") + private JsonNullable preferredSignInStrategyWhenPasswordRequired; + @JsonCreator public UpdateInstanceRequestBody( @JsonProperty("test_mode") JsonNullable testMode, @@ -91,7 +101,8 @@ public UpdateInstanceRequestBody( @JsonProperty("development_origin") JsonNullable developmentOrigin, @JsonProperty("allowed_origins") Optional> allowedOrigins, @JsonProperty("cookieless_dev") JsonNullable cookielessDev, - @JsonProperty("url_based_session_syncing") JsonNullable urlBasedSessionSyncing) { + @JsonProperty("url_based_session_syncing") JsonNullable urlBasedSessionSyncing, + @JsonProperty("preferred_sign_in_strategy_when_password_required") JsonNullable preferredSignInStrategyWhenPasswordRequired) { Utils.checkNotNull(testMode, "testMode"); Utils.checkNotNull(hibp, "hibp"); Utils.checkNotNull(supportEmail, "supportEmail"); @@ -100,6 +111,7 @@ public UpdateInstanceRequestBody( Utils.checkNotNull(allowedOrigins, "allowedOrigins"); Utils.checkNotNull(cookielessDev, "cookielessDev"); Utils.checkNotNull(urlBasedSessionSyncing, "urlBasedSessionSyncing"); + Utils.checkNotNull(preferredSignInStrategyWhenPasswordRequired, "preferredSignInStrategyWhenPasswordRequired"); this.testMode = testMode; this.hibp = hibp; this.supportEmail = supportEmail; @@ -108,12 +120,13 @@ public UpdateInstanceRequestBody( this.allowedOrigins = allowedOrigins; this.cookielessDev = cookielessDev; this.urlBasedSessionSyncing = urlBasedSessionSyncing; + this.preferredSignInStrategyWhenPasswordRequired = preferredSignInStrategyWhenPasswordRequired; } public UpdateInstanceRequestBody() { this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), - JsonNullable.undefined(), JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -184,6 +197,18 @@ public JsonNullable urlBasedSessionSyncing() { return urlBasedSessionSyncing; } + /** + * When password is required at the instance level, sets the preferred sign-in strategy surfaced to + * Clerk components. Has no effect when password is not required. Defaults to `password`. + * + *

Set to an empty string to clear the override. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable preferredSignInStrategyWhenPasswordRequired() { + return (JsonNullable) preferredSignInStrategyWhenPasswordRequired; + } + public static Builder builder() { return new Builder(); } @@ -340,6 +365,30 @@ public UpdateInstanceRequestBody withUrlBasedSessionSyncing(JsonNullableSet to an empty string to clear the override. + */ + public UpdateInstanceRequestBody withPreferredSignInStrategyWhenPasswordRequired(PreferredSignInStrategyWhenPasswordRequired preferredSignInStrategyWhenPasswordRequired) { + Utils.checkNotNull(preferredSignInStrategyWhenPasswordRequired, "preferredSignInStrategyWhenPasswordRequired"); + this.preferredSignInStrategyWhenPasswordRequired = JsonNullable.of(preferredSignInStrategyWhenPasswordRequired); + return this; + } + + /** + * When password is required at the instance level, sets the preferred sign-in strategy surfaced to + * Clerk components. Has no effect when password is not required. Defaults to `password`. + * + *

Set to an empty string to clear the override. + */ + public UpdateInstanceRequestBody withPreferredSignInStrategyWhenPasswordRequired(JsonNullable preferredSignInStrategyWhenPasswordRequired) { + Utils.checkNotNull(preferredSignInStrategyWhenPasswordRequired, "preferredSignInStrategyWhenPasswordRequired"); + this.preferredSignInStrategyWhenPasswordRequired = preferredSignInStrategyWhenPasswordRequired; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -357,7 +406,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.developmentOrigin, other.developmentOrigin) && Utils.enhancedDeepEquals(this.allowedOrigins, other.allowedOrigins) && Utils.enhancedDeepEquals(this.cookielessDev, other.cookielessDev) && - Utils.enhancedDeepEquals(this.urlBasedSessionSyncing, other.urlBasedSessionSyncing); + Utils.enhancedDeepEquals(this.urlBasedSessionSyncing, other.urlBasedSessionSyncing) && + Utils.enhancedDeepEquals(this.preferredSignInStrategyWhenPasswordRequired, other.preferredSignInStrategyWhenPasswordRequired); } @Override @@ -365,7 +415,7 @@ public int hashCode() { return Utils.enhancedHash( testMode, hibp, supportEmail, clerkJsVersion, developmentOrigin, allowedOrigins, - cookielessDev, urlBasedSessionSyncing); + cookielessDev, urlBasedSessionSyncing, preferredSignInStrategyWhenPasswordRequired); } @Override @@ -378,7 +428,8 @@ public String toString() { "developmentOrigin", developmentOrigin, "allowedOrigins", allowedOrigins, "cookielessDev", cookielessDev, - "urlBasedSessionSyncing", urlBasedSessionSyncing); + "urlBasedSessionSyncing", urlBasedSessionSyncing, + "preferredSignInStrategyWhenPasswordRequired", preferredSignInStrategyWhenPasswordRequired); } @SuppressWarnings("UnusedReturnValue") @@ -401,6 +452,8 @@ public final static class Builder { private JsonNullable urlBasedSessionSyncing = JsonNullable.undefined(); + private JsonNullable preferredSignInStrategyWhenPasswordRequired = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -563,12 +616,37 @@ public Builder urlBasedSessionSyncing(JsonNullable urlBasedSessionSynci return this; } + + /** + * When password is required at the instance level, sets the preferred sign-in strategy surfaced to + * Clerk components. Has no effect when password is not required. Defaults to `password`. + * + *

Set to an empty string to clear the override. + */ + public Builder preferredSignInStrategyWhenPasswordRequired(PreferredSignInStrategyWhenPasswordRequired preferredSignInStrategyWhenPasswordRequired) { + Utils.checkNotNull(preferredSignInStrategyWhenPasswordRequired, "preferredSignInStrategyWhenPasswordRequired"); + this.preferredSignInStrategyWhenPasswordRequired = JsonNullable.of(preferredSignInStrategyWhenPasswordRequired); + return this; + } + + /** + * When password is required at the instance level, sets the preferred sign-in strategy surfaced to + * Clerk components. Has no effect when password is not required. Defaults to `password`. + * + *

Set to an empty string to clear the override. + */ + public Builder preferredSignInStrategyWhenPasswordRequired(JsonNullable preferredSignInStrategyWhenPasswordRequired) { + Utils.checkNotNull(preferredSignInStrategyWhenPasswordRequired, "preferredSignInStrategyWhenPasswordRequired"); + this.preferredSignInStrategyWhenPasswordRequired = preferredSignInStrategyWhenPasswordRequired; + return this; + } + public UpdateInstanceRequestBody build() { return new UpdateInstanceRequestBody( testMode, hibp, supportEmail, clerkJsVersion, developmentOrigin, allowedOrigins, - cookielessDev, urlBasedSessionSyncing); + cookielessDev, urlBasedSessionSyncing, preferredSignInStrategyWhenPasswordRequired); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequest.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequest.java new file mode 100644 index 00000000..1a2803c6 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequest.java @@ -0,0 +1,141 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; + + +public class VerifyOrganizationDomainOwnershipRequest { + /** + * The ID of the organization to which the domain belongs + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_id") + private String organizationId; + + /** + * The ID of the domain + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=domain_id") + private String domainId; + + @JsonCreator + public VerifyOrganizationDomainOwnershipRequest( + String organizationId, + String domainId) { + Utils.checkNotNull(organizationId, "organizationId"); + Utils.checkNotNull(domainId, "domainId"); + this.organizationId = organizationId; + this.domainId = domainId; + } + + /** + * The ID of the organization to which the domain belongs + */ + @JsonIgnore + public String organizationId() { + return organizationId; + } + + /** + * The ID of the domain + */ + @JsonIgnore + public String domainId() { + return domainId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the organization to which the domain belongs + */ + public VerifyOrganizationDomainOwnershipRequest withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + /** + * The ID of the domain + */ + public VerifyOrganizationDomainOwnershipRequest withDomainId(String domainId) { + Utils.checkNotNull(domainId, "domainId"); + this.domainId = domainId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerifyOrganizationDomainOwnershipRequest other = (VerifyOrganizationDomainOwnershipRequest) o; + return + Utils.enhancedDeepEquals(this.organizationId, other.organizationId) && + Utils.enhancedDeepEquals(this.domainId, other.domainId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + organizationId, domainId); + } + + @Override + public String toString() { + return Utils.toString(VerifyOrganizationDomainOwnershipRequest.class, + "organizationId", organizationId, + "domainId", domainId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String organizationId; + + private String domainId; + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the organization to which the domain belongs + */ + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + + /** + * The ID of the domain + */ + public Builder domainId(String domainId) { + Utils.checkNotNull(domainId, "domainId"); + this.domainId = domainId; + return this; + } + + public VerifyOrganizationDomainOwnershipRequest build() { + + return new VerifyOrganizationDomainOwnershipRequest( + organizationId, domainId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequestBuilder.java new file mode 100644 index 00000000..f7b3659a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.VerifyOrganizationDomainOwnership; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class VerifyOrganizationDomainOwnershipRequestBuilder { + + private String organizationId; + private String domainId; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public VerifyOrganizationDomainOwnershipRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public VerifyOrganizationDomainOwnershipRequestBuilder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + public VerifyOrganizationDomainOwnershipRequestBuilder domainId(String domainId) { + Utils.checkNotNull(domainId, "domainId"); + this.domainId = domainId; + return this; + } + + public VerifyOrganizationDomainOwnershipRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public VerifyOrganizationDomainOwnershipRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + + private VerifyOrganizationDomainOwnershipRequest buildRequest() { + + VerifyOrganizationDomainOwnershipRequest request = new VerifyOrganizationDomainOwnershipRequest(organizationId, + domainId); + + return request; + } + + public VerifyOrganizationDomainOwnershipResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new VerifyOrganizationDomainOwnership.Sync(sdkConfiguration, options, _headers); + VerifyOrganizationDomainOwnershipRequest request = buildRequest(); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipResponse.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipResponse.java new file mode 100644 index 00000000..94ea27e0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyOrganizationDomainOwnershipResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.OrganizationDomain; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 VerifyOrganizationDomainOwnershipResponse 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; + + /** + * An organization domain + */ + private Optional organizationDomain; + + @JsonCreator + public VerifyOrganizationDomainOwnershipResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional organizationDomain) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(organizationDomain, "organizationDomain"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.organizationDomain = organizationDomain; + } + + public VerifyOrganizationDomainOwnershipResponse( + 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; + } + + /** + * An organization domain + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional organizationDomain() { + return (Optional) organizationDomain; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public VerifyOrganizationDomainOwnershipResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public VerifyOrganizationDomainOwnershipResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public VerifyOrganizationDomainOwnershipResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * An organization domain + */ + public VerifyOrganizationDomainOwnershipResponse withOrganizationDomain(OrganizationDomain organizationDomain) { + Utils.checkNotNull(organizationDomain, "organizationDomain"); + this.organizationDomain = Optional.ofNullable(organizationDomain); + return this; + } + + + /** + * An organization domain + */ + public VerifyOrganizationDomainOwnershipResponse withOrganizationDomain(Optional organizationDomain) { + Utils.checkNotNull(organizationDomain, "organizationDomain"); + this.organizationDomain = organizationDomain; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VerifyOrganizationDomainOwnershipResponse other = (VerifyOrganizationDomainOwnershipResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.organizationDomain, other.organizationDomain); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + organizationDomain); + } + + @Override + public String toString() { + return Utils.toString(VerifyOrganizationDomainOwnershipResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "organizationDomain", organizationDomain); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional organizationDomain = 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; + } + + + /** + * An organization domain + */ + public Builder organizationDomain(OrganizationDomain organizationDomain) { + Utils.checkNotNull(organizationDomain, "organizationDomain"); + this.organizationDomain = Optional.ofNullable(organizationDomain); + return this; + } + + /** + * An organization domain + */ + public Builder organizationDomain(Optional organizationDomain) { + Utils.checkNotNull(organizationDomain, "organizationDomain"); + this.organizationDomain = organizationDomain; + return this; + } + + public VerifyOrganizationDomainOwnershipResponse build() { + + return new VerifyOrganizationDomainOwnershipResponse( + contentType, statusCode, rawResponse, + organizationDomain); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/AttemptEmailAddressVerification.java b/src/main/java/com/clerk/backend_api/operations/AttemptEmailAddressVerification.java new file mode 100644 index 00000000..be438e72 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/AttemptEmailAddressVerification.java @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationRequest; +import com.clerk.backend_api.models.operations.AttemptEmailAddressVerificationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class AttemptEmailAddressVerification { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "AttemptEmailAddressVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "AttemptEmailAddressVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "AttemptEmailAddressVerification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/email_addresses/{email_address_id}/attempt_verification", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AttemptEmailAddressVerificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, AttemptEmailAddressVerificationRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AttemptEmailAddressVerificationRequest 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 AttemptEmailAddressVerificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AttemptEmailAddressVerificationResponse.Builder resBuilder = + AttemptEmailAddressVerificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AttemptEmailAddressVerificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withVerificationResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/AttemptPhoneNumberVerification.java b/src/main/java/com/clerk/backend_api/operations/AttemptPhoneNumberVerification.java new file mode 100644 index 00000000..de3b86f6 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/AttemptPhoneNumberVerification.java @@ -0,0 +1,237 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationRequest; +import com.clerk.backend_api.models.operations.AttemptPhoneNumberVerificationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class AttemptPhoneNumberVerification { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "AttemptPhoneNumberVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "AttemptPhoneNumberVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "AttemptPhoneNumberVerification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/phone_numbers/{phone_number_id}/attempt_verification", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AttemptPhoneNumberVerificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, AttemptPhoneNumberVerificationRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(AttemptPhoneNumberVerificationRequest 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 AttemptPhoneNumberVerificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AttemptPhoneNumberVerificationResponse.Builder resBuilder = + AttemptPhoneNumberVerificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AttemptPhoneNumberVerificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withVerificationResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/CreateAdminPortalLinkToken.java b/src/main/java/com/clerk/backend_api/operations/CreateAdminPortalLinkToken.java new file mode 100644 index 00000000..4733747f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/CreateAdminPortalLinkToken.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody; +import com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody; +import com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenRequestBody; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenResponse; +import com.clerk.backend_api.models.operations.CreateAdminPortalLinkTokenResponseBody; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class CreateAdminPortalLinkToken { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "createAdminPortalLinkToken", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createAdminPortalLinkToken", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "createAdminPortalLinkToken", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/admin_portal_link_tokens"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(CreateAdminPortalLinkTokenRequestBody request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(CreateAdminPortalLinkTokenRequestBody 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 CreateAdminPortalLinkTokenResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateAdminPortalLinkTokenResponse.Builder resBuilder = + CreateAdminPortalLinkTokenResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateAdminPortalLinkTokenResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withObject(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw com.clerk.backend_api.models.errors.CreateAdminPortalLinkTokenResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "403")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw CreateAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw CreateAdminPortalLinkTokenAdminPortalLinkTokensResponse409ResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java b/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java index 4a0164ae..1d4a4d67 100644 --- a/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java +++ b/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java @@ -203,7 +203,7 @@ public CreateEnterpriseConnectionResponse handleResponse(HttpResponse 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "CreateEnterpriseConnectionTestRun", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "CreateEnterpriseConnectionTestRun", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "CreateEnterpriseConnectionTestRun", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/enterprise_connections/{enterprise_connection_id}/test_runs", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(CreateEnterpriseConnectionTestRunRequest request) throws Exception { + HttpRequest req = buildRequest(request, CreateEnterpriseConnectionTestRunRequest.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(CreateEnterpriseConnectionTestRunRequest 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 CreateEnterpriseConnectionTestRunResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateEnterpriseConnectionTestRunResponse.Builder resBuilder = + CreateEnterpriseConnectionTestRunResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + CreateEnterpriseConnectionTestRunResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEnterpriseConnectionTestRunResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/CreateSAMLConnection.java b/src/main/java/com/clerk/backend_api/operations/CreateSAMLConnection.java index 623754d4..1bab7eee 100644 --- a/src/main/java/com/clerk/backend_api/operations/CreateSAMLConnection.java +++ b/src/main/java/com/clerk/backend_api/operations/CreateSAMLConnection.java @@ -203,7 +203,7 @@ public CreateSAMLConnectionResponse handleResponse(HttpResponse res throw SDKError.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "422")) { + if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "409", "422")) { if (Utils.contentTypeMatches(contentType, "application/json")) { throw ClerkErrors.from(response); } else { diff --git a/src/main/java/com/clerk/backend_api/operations/CreateUser.java b/src/main/java/com/clerk/backend_api/operations/CreateUser.java index 619705c0..10813bce 100644 --- a/src/main/java/com/clerk/backend_api/operations/CreateUser.java +++ b/src/main/java/com/clerk/backend_api/operations/CreateUser.java @@ -207,7 +207,7 @@ public CreateUserResponse handleResponse(HttpResponse response) { throw SDKError.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "422")) { + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "402", "403", "422")) { if (Utils.contentTypeMatches(contentType, "application/json")) { throw ClerkErrors.from(response); } else { diff --git a/src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java b/src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java new file mode 100644 index 00000000..73ff298c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java @@ -0,0 +1,202 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class GetInstanceCommunication { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "GetInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/instance/communication"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + 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() { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(); + } 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 GetInstanceCommunicationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetInstanceCommunicationResponse.Builder resBuilder = + GetInstanceCommunicationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetInstanceCommunicationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInstanceCommunication(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java b/src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java new file mode 100644 index 00000000..1732b684 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java @@ -0,0 +1,210 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.OrganizationSettings; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class GetInstanceOrganizationSettings { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "GetInstanceOrganizationSettings", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceOrganizationSettings", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceOrganizationSettings", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/instance/organization_settings"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + 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() { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(); + } 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 GetInstanceOrganizationSettingsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetInstanceOrganizationSettingsResponse.Builder resBuilder = + GetInstanceOrganizationSettingsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetInstanceOrganizationSettingsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withOrganizationSettings(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402", "404", "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/ListEnterpriseConnectionTestRuns.java b/src/main/java/com/clerk/backend_api/operations/ListEnterpriseConnectionTestRuns.java new file mode 100644 index 00000000..207eb80a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/ListEnterpriseConnectionTestRuns.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.EnterpriseConnectionTestRuns; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsRequest; +import com.clerk.backend_api.models.operations.ListEnterpriseConnectionTestRunsResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class ListEnterpriseConnectionTestRuns { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "ListEnterpriseConnectionTestRuns", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ListEnterpriseConnectionTestRuns", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ListEnterpriseConnectionTestRuns", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/enterprise_connections/{enterprise_connection_id}/test_runs", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(ListEnterpriseConnectionTestRunsRequest request) throws Exception { + HttpRequest req = buildRequest(request, ListEnterpriseConnectionTestRunsRequest.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(ListEnterpriseConnectionTestRunsRequest 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 ListEnterpriseConnectionTestRunsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListEnterpriseConnectionTestRunsResponse.Builder resBuilder = + ListEnterpriseConnectionTestRunsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ListEnterpriseConnectionTestRunsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEnterpriseConnectionTestRuns(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/PrepareEmailAddressVerification.java b/src/main/java/com/clerk/backend_api/operations/PrepareEmailAddressVerification.java new file mode 100644 index 00000000..a36cd65a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/PrepareEmailAddressVerification.java @@ -0,0 +1,220 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.PrepareEmailAddressVerificationRequest; +import com.clerk.backend_api.models.operations.PrepareEmailAddressVerificationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class PrepareEmailAddressVerification { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "PrepareEmailAddressVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "PrepareEmailAddressVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "PrepareEmailAddressVerification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/email_addresses/{email_address_id}/prepare_verification", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(PrepareEmailAddressVerificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, PrepareEmailAddressVerificationRequest.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(PrepareEmailAddressVerificationRequest 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 PrepareEmailAddressVerificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PrepareEmailAddressVerificationResponse.Builder resBuilder = + PrepareEmailAddressVerificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PrepareEmailAddressVerificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withVerificationResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/PreparePhoneNumberVerification.java b/src/main/java/com/clerk/backend_api/operations/PreparePhoneNumberVerification.java new file mode 100644 index 00000000..52a23061 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/PreparePhoneNumberVerification.java @@ -0,0 +1,220 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.VerificationResponse; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.PreparePhoneNumberVerificationRequest; +import com.clerk.backend_api.models.operations.PreparePhoneNumberVerificationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class PreparePhoneNumberVerification { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "PreparePhoneNumberVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "PreparePhoneNumberVerification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "PreparePhoneNumberVerification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/phone_numbers/{phone_number_id}/prepare_verification", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(PreparePhoneNumberVerificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, PreparePhoneNumberVerificationRequest.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(PreparePhoneNumberVerificationRequest 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 PreparePhoneNumberVerificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PreparePhoneNumberVerificationResponse.Builder resBuilder = + PreparePhoneNumberVerificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + PreparePhoneNumberVerificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withVerificationResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "429")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/ReplaceUserEmailAddress.java b/src/main/java/com/clerk/backend_api/operations/ReplaceUserEmailAddress.java new file mode 100644 index 00000000..5527b4a8 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/ReplaceUserEmailAddress.java @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.EmailAddress; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressRequest; +import com.clerk.backend_api.models.operations.ReplaceUserEmailAddressResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class ReplaceUserEmailAddress { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "ReplaceUserEmailAddress", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ReplaceUserEmailAddress", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ReplaceUserEmailAddress", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/users/{user_id}/email_address", + request, null); + HTTPRequest req = new HTTPRequest(url, "PUT"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(ReplaceUserEmailAddressRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReplaceUserEmailAddressRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ReplaceUserEmailAddressRequest 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 ReplaceUserEmailAddressResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ReplaceUserEmailAddressResponse.Builder resBuilder = + ReplaceUserEmailAddressResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ReplaceUserEmailAddressResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEmailAddress(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/ReplaceUserMetadata.java b/src/main/java/com/clerk/backend_api/operations/ReplaceUserMetadata.java new file mode 100644 index 00000000..4e4d93a8 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/ReplaceUserMetadata.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.User; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataRequest; +import com.clerk.backend_api.models.operations.ReplaceUserMetadataResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class ReplaceUserMetadata { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "ReplaceUserMetadata", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ReplaceUserMetadata", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ReplaceUserMetadata", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/users/{user_id}/metadata", + request, null); + HTTPRequest req = new HTTPRequest(url, "PUT"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(ReplaceUserMetadataRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReplaceUserMetadataRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ReplaceUserMetadataRequest 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 ReplaceUserMetadataResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ReplaceUserMetadataResponse.Builder resBuilder = + ReplaceUserMetadataResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ReplaceUserMetadataResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUser(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "404", "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/ReplaceUserPhoneNumber.java b/src/main/java/com/clerk/backend_api/operations/ReplaceUserPhoneNumber.java new file mode 100644 index 00000000..9c29c6fe --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/ReplaceUserPhoneNumber.java @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.PhoneNumber; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberRequest; +import com.clerk.backend_api.models.operations.ReplaceUserPhoneNumberResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class ReplaceUserPhoneNumber { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "ReplaceUserPhoneNumber", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ReplaceUserPhoneNumber", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "ReplaceUserPhoneNumber", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/users/{user_id}/phone_number", + request, null); + HTTPRequest req = new HTTPRequest(url, "PUT"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(ReplaceUserPhoneNumberRequest request) throws Exception { + HttpRequest req = buildRequest(request, ReplaceUserPhoneNumberRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(ReplaceUserPhoneNumberRequest 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 ReplaceUserPhoneNumberResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ReplaceUserPhoneNumberResponse.Builder resBuilder = + ReplaceUserPhoneNumberResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + ReplaceUserPhoneNumberResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPhoneNumber(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/RevokeAdminPortalLinkToken.java b/src/main/java/com/clerk/backend_api/operations/RevokeAdminPortalLinkToken.java new file mode 100644 index 00000000..289eff45 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/RevokeAdminPortalLinkToken.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody; +import com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody; +import com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenRequest; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenResponse; +import com.clerk.backend_api.models.operations.RevokeAdminPortalLinkTokenResponseBody; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class RevokeAdminPortalLinkToken { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "revokeAdminPortalLinkToken", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "revokeAdminPortalLinkToken", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "revokeAdminPortalLinkToken", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/admin_portal_link_tokens/{adminPortalLinkTokenID}/revoke", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "requestBody", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(RevokeAdminPortalLinkTokenRequest request) throws Exception { + HttpRequest req = buildRequest(request, RevokeAdminPortalLinkTokenRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(RevokeAdminPortalLinkTokenRequest 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 RevokeAdminPortalLinkTokenResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RevokeAdminPortalLinkTokenResponse.Builder resBuilder = + RevokeAdminPortalLinkTokenResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + RevokeAdminPortalLinkTokenResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withObject(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw com.clerk.backend_api.models.errors.RevokeAdminPortalLinkTokenResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "403")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponseResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw RevokeAdminPortalLinkTokenAdminPortalLinkTokensResponse404ResponseBody.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java b/src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java new file mode 100644 index 00000000..4f46ef22 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationRequestBody; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class UpdateInstanceCommunication { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "UpdateInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "UpdateInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "UpdateInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/instance/communication"); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "", + "json", + false); + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation, UpdateInstanceCommunicationResponse> { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(Optional request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference>() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(Optional 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 UpdateInstanceCommunicationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpdateInstanceCommunicationResponse.Builder resBuilder = + UpdateInstanceCommunicationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UpdateInstanceCommunicationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInstanceCommunication(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/UpdateInstanceOrganizationSettings.java b/src/main/java/com/clerk/backend_api/operations/UpdateInstanceOrganizationSettings.java index b67ac7ac..d98fff1f 100644 --- a/src/main/java/com/clerk/backend_api/operations/UpdateInstanceOrganizationSettings.java +++ b/src/main/java/com/clerk/backend_api/operations/UpdateInstanceOrganizationSettings.java @@ -203,7 +203,7 @@ public UpdateInstanceOrganizationSettingsResponse handleResponse(HttpResponse res throw SDKError.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "422")) { + if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "409", "422")) { if (Utils.contentTypeMatches(contentType, "application/json")) { throw ClerkErrors.from(response); } else { diff --git a/src/main/java/com/clerk/backend_api/operations/VerifyOrganizationDomainOwnership.java b/src/main/java/com/clerk/backend_api/operations/VerifyOrganizationDomainOwnership.java new file mode 100644 index 00000000..557f3ff0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/VerifyOrganizationDomainOwnership.java @@ -0,0 +1,213 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.OrganizationDomain; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.VerifyOrganizationDomainOwnershipRequest; +import com.clerk.backend_api.models.operations.VerifyOrganizationDomainOwnershipResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class VerifyOrganizationDomainOwnership { + + 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 = this.sdkConfiguration.serverUrl(); + 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(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, 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, + "VerifyOrganizationDomainOwnership", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "VerifyOrganizationDomainOwnership", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "VerifyOrganizationDomainOwnership", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/organizations/{organization_id}/domains/{domain_id}/verify_ownership", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(VerifyOrganizationDomainOwnershipRequest request) throws Exception { + HttpRequest req = buildRequest(request, VerifyOrganizationDomainOwnershipRequest.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(VerifyOrganizationDomainOwnershipRequest 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 VerifyOrganizationDomainOwnershipResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + VerifyOrganizationDomainOwnershipResponse.Builder resBuilder = + VerifyOrganizationDomainOwnershipResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + VerifyOrganizationDomainOwnershipResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withOrganizationDomain(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "401", "403", "404")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/utils/OneOfDeserializer.java b/src/main/java/com/clerk/backend_api/utils/OneOfDeserializer.java index b94e5d79..6407aad0 100644 --- a/src/main/java/com/clerk/backend_api/utils/OneOfDeserializer.java +++ b/src/main/java/com/clerk/backend_api/utils/OneOfDeserializer.java @@ -182,6 +182,15 @@ private void countFieldsRecursive(Object obj, JsonNode jsonNode) { return; } + // Unwrap optional fields + if (obj instanceof java.util.Optional) { + java.util.Optional opt = (java.util.Optional) obj; + if (opt.isPresent()) { + countFieldsRecursive(opt.get(), jsonNode); + } + return; + } + // Handle primitives and strings if (isPrimitiveOrString(obj)) { matched++;