Interface JsonEnumValueOptionsOrBuilder

    • Method Detail

      • hasString

        boolean hasString()
         Allows user to specify a custom string to use when serializing an enum
         value to JSON.
        
         Sample usage:
         enum Foo {
         ...
         FOO_BAR = 42 [(pb.enumvalue.json).string = "my_custom_name"];
         }
         
        string string = 1;
        Returns:
        Whether the string field is set.
      • getString

        java.lang.String getString()
         Allows user to specify a custom string to use when serializing an enum
         value to JSON.
        
         Sample usage:
         enum Foo {
         ...
         FOO_BAR = 42 [(pb.enumvalue.json).string = "my_custom_name"];
         }
         
        string string = 1;
        Returns:
        The string.
      • getStringBytes

        ByteString getStringBytes()
         Allows user to specify a custom string to use when serializing an enum
         value to JSON.
        
         Sample usage:
         enum Foo {
         ...
         FOO_BAR = 42 [(pb.enumvalue.json).string = "my_custom_name"];
         }
         
        string string = 1;
        Returns:
        The bytes for string.