Class OneOfDeserializer<T>

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
com.google.genai.gaos.utils.OneOfDeserializer<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.deser.ValueInstantiator.Gettable, Serializable
Direct Known Subclasses:
AgentConfig._Deserializer, BaseEnvironment._Deserializer, CreateAgentInteractionEnvironment._Deserializer, CreateAgentInteractionResponseFormat._Deserializer, CreateEnvironmentRequestNetworkUnion._Deserializer, CreateInteractionRequestBody._Deserializer, CreateModelInteractionEnvironment._Deserializer, CreateModelInteractionResponseFormat._Deserializer, EnvironmentNetworkEgressAllowlist._Deserializer, EnvironmentNetworkUnion._Deserializer, FunctionResultDeltaResultUnion._Deserializer, FunctionResultStepResultUnion._Deserializer, Interaction._Deserializer, InteractionEnvironment._Deserializer, InteractionResponseFormat._Deserializer, InteractionsInput._Deserializer, MCPServerToolResultDeltaResultUnion._Deserializer, MCPServerToolResultStepResultUnion._Deserializer, MediaProcessing._Deserializer, Network._Deserializer, Processing._Deserializer, ResponseFormat._Deserializer, SpeechConfigUnion._Deserializer, ToolChoice._Deserializer, TranscriptionConfigMode._Deserializer, Transform._Deserializer

public class OneOfDeserializer<T> extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> List<com.google.genai.gaos.utils.OneOfDeserializer.Match<T>>
    applyMatchPreferences(List<com.google.genai.gaos.utils.OneOfDeserializer.Match<T>> matches, String json)
    Applies candidate preference rules to resolve multiple matches.
    deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)
     
    static boolean
    matchPossible(com.fasterxml.jackson.databind.JavaType type, String json)
     

    Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

    deserializeWithType, getValueClass, getValueInstantiator, getValueType, getValueType, handledType

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • deserialize

      public T deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T>
      Throws:
      IOException
    • matchPossible

      public static boolean matchPossible(com.fasterxml.jackson.databind.JavaType type, String json)
    • applyMatchPreferences

      public static <T> List<com.google.genai.gaos.utils.OneOfDeserializer.Match<T>> applyMatchPreferences(List<com.google.genai.gaos.utils.OneOfDeserializer.Match<T>> matches, String json)
      Applies candidate preference rules to resolve multiple matches. Uses legacy type-specific preferences for backward compatibility, then applies smart scoring using field mapping analysis for enhanced resolution.