Class Structs

java.lang.Object
com.google.cloud.Structs

@InternalApi public final class Structs extends Object
This class contains static utility methods that operate on or return protobuf's Struct objects. This is considered an internal class and implementation detail.
  • Method Details

    • asMap

      public static Map<String,Object> asMap(com.google.protobuf.Struct struct)
      Returns an unmodifiable map view of the Struct parameter.
    • newStruct

      public static com.google.protobuf.Struct newStruct(Map<String,?> map)
      Creates a new Struct object given the content of the provided map parameter.

      Notice that all numbers (int, long, float and double) are serialized as double values. Enums are serialized as strings.