@@ -20,6 +20,7 @@ import kotlin.jvm.JvmInline
2020 * - [AuthBasic]
2121 * - [AuthGoogleServiceAccount]
2222 * - [AuthOAuth]
23+ * - [Map<kotlin.String, String>] - *[AuthInput.of]*
2324 */
2425@Serializable(AuthInputSerializer ::class )
2526public sealed interface AuthInput {
@@ -47,6 +48,10 @@ public sealed interface AuthInput {
4748 @JvmInline
4849 public value class AuthAlgoliaInsightsValue (public val value : AuthAlgoliaInsights ) : AuthInput
4950
51+ @Serializable
52+ @JvmInline
53+ public value class MapOfkotlinStringStringValue (public val value : Map <kotlin.String , String >) : AuthInput
54+
5055 public companion object {
5156
5257 public fun of (value : AuthOAuth ): AuthInput {
@@ -67,6 +72,9 @@ public sealed interface AuthInput {
6772 public fun of (value : AuthAlgoliaInsights ): AuthInput {
6873 return AuthAlgoliaInsightsValue (value)
6974 }
75+ public fun of (value : Map <kotlin.String , String >): AuthInput {
76+ return MapOfkotlinStringStringValue (value)
77+ }
7078 }
7179}
7280
@@ -79,6 +87,7 @@ internal class AuthInputSerializer : JsonContentPolymorphicSerializer<AuthInput>
7987 element is JsonObject && element.containsKey(" key" ) -> AuthAPIKey .serializer()
8088 element is JsonObject -> AuthAlgolia .serializer()
8189 element is JsonObject -> AuthAlgoliaInsights .serializer()
90+ element is JsonObject -> AuthInput .MapOfkotlinStringStringValue .serializer()
8291 else -> throw AlgoliaClientException (" Failed to deserialize json element: $element " )
8392 }
8493 }
0 commit comments