Class EventDeserializer.EventPart

java.lang.Object
software.amazon.lambda.powertools.utilities.EventDeserializer.EventPart
Enclosing class:
EventDeserializer

public static class EventDeserializer.EventPart extends Object
Meaningful part of a Lambda event.
Use EventDeserializer.extractDataFrom(Object) to retrieve an instance of this class.
  • Method Details

    • as

      public <T> T as(Class<T> clazz)
      Deserialize this part of event from JSON to an object of type T
      Type Parameters:
      T - type of object to return
      Parameters:
      clazz - the target type for deserialization
      Returns:
      an Object of type T (deserialized from the content)
    • as

      public <M> M as()
    • asListOf

      public <T> List<T> asListOf(Class<T> clazz)
      Deserialize this part of event from JSON to a list of objects of type T
      Type Parameters:
      T - type of object to return
      Parameters:
      clazz - the target type for deserialization
      Returns:
      a list of objects of type T (deserialized from the content)