Skip to content

Commit

Permalink
fix(specs): add secrets payload for updates (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4061

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Oct 31, 2024
1 parent c810023 commit 44999f8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import kotlin.jvm.JvmInline
* - [AuthBasicPartial]
* - [AuthGoogleServiceAccountPartial]
* - [AuthOAuthPartial]
* - [Map<kotlin.String, String>] - *[AuthInputPartial.of]*
*/
@Serializable(AuthInputPartialSerializer::class)
public sealed interface AuthInputPartial {
Expand Down Expand Up @@ -47,6 +48,10 @@ public sealed interface AuthInputPartial {
@JvmInline
public value class AuthAlgoliaInsightsPartialValue(public val value: AuthAlgoliaInsightsPartial) : AuthInputPartial

@Serializable
@JvmInline
public value class MapOfkotlinStringStringValue(public val value: Map<kotlin.String, String>) : AuthInputPartial

public companion object {

public fun of(value: AuthGoogleServiceAccountPartial): AuthInputPartial {
Expand All @@ -67,6 +72,9 @@ public sealed interface AuthInputPartial {
public fun of(value: AuthAlgoliaInsightsPartial): AuthInputPartial {
return AuthAlgoliaInsightsPartialValue(value)
}
public fun of(value: Map<kotlin.String, String>): AuthInputPartial {
return MapOfkotlinStringStringValue(value)
}
}
}

Expand All @@ -79,6 +87,7 @@ internal class AuthInputPartialSerializer : JsonContentPolymorphicSerializer<Aut
element is JsonObject && element.containsKey("url") -> AuthOAuthPartial.serializer()
element is JsonObject -> AuthAlgoliaPartial.serializer()
element is JsonObject -> AuthAlgoliaInsightsPartial.serializer()
element is JsonObject -> AuthInputPartial.MapOfkotlinStringStringValue.serializer()
else -> throw AlgoliaClientException("Failed to deserialize json element: $element")
}
}
Expand Down

0 comments on commit 44999f8

Please sign in to comment.