Package com.google.protobuf.util
Interface JsonEnumValueOptionsOrBuilder
- All Superinterfaces:
MessageLiteOrBuilder,MessageOrBuilder
- All Known Implementing Classes:
JsonEnumValueOptions,JsonEnumValueOptions.Builder
-
Method Summary
Modifier and TypeMethodDescriptionAllows user to specify a custom string to use when serializing an enum value to JSON.Allows user to specify a custom string to use when serializing an enum value to JSON.booleanAllows user to specify a custom string to use when serializing an enum value to JSON.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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
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.
-