Interface GrpcJsonTranscoder.PrintOptionsOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
GrpcJsonTranscoder.PrintOptions,GrpcJsonTranscoder.PrintOptions.Builder
- Enclosing class:
- GrpcJsonTranscoder
public static interface GrpcJsonTranscoder.PrintOptionsOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether to add spaces, line breaks and indentation to make the JSON output easy to read.booleanWhether to always print enums as ints.booleanWhether to always print primitive fields.booleanWhether to preserve proto field names.booleanIf true, return all streams as newline-delimited JSON messages instead of as a comma-separated arraybooleanIf true, enforces Server-Sent Events (SSE) message framing (``data: <message>\n\n``) and, ``stream_newline_delimited`` is ignored.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
-
getAddWhitespace
boolean getAddWhitespace()Whether to add spaces, line breaks and indentation to make the JSON output easy to read. Defaults to false.
bool add_whitespace = 1;- Returns:
- The addWhitespace.
-
getAlwaysPrintPrimitiveFields
boolean getAlwaysPrintPrimitiveFields()Whether to always print primitive fields. By default primitive fields with default values will be omitted in JSON output. For example, an int32 field set to 0 will be omitted. Setting this flag to true will override the default behavior and print primitive fields regardless of their values. Defaults to false.
bool always_print_primitive_fields = 2;- Returns:
- The alwaysPrintPrimitiveFields.
-
getAlwaysPrintEnumsAsInts
boolean getAlwaysPrintEnumsAsInts()Whether to always print enums as ints. By default they are rendered as strings. Defaults to false.
bool always_print_enums_as_ints = 3;- Returns:
- The alwaysPrintEnumsAsInts.
-
getPreserveProtoFieldNames
boolean getPreserveProtoFieldNames()Whether to preserve proto field names. By default protobuf will generate JSON field names using the ``json_name`` option, or lower camel case, in that order. Setting this flag will preserve the original field names. Defaults to false.
bool preserve_proto_field_names = 4;- Returns:
- The preserveProtoFieldNames.
-
getStreamNewlineDelimited
boolean getStreamNewlineDelimited()If true, return all streams as newline-delimited JSON messages instead of as a comma-separated array
bool stream_newline_delimited = 5;- Returns:
- The streamNewlineDelimited.
-
getStreamSseStyleDelimited
boolean getStreamSseStyleDelimited()If true, enforces Server-Sent Events (SSE) message framing (``data: <message>\n\n``) and, ``stream_newline_delimited`` is ignored. If false, message framing is determined by ``stream_newline_delimited``.
bool stream_sse_style_delimited = 6;- Returns:
- The streamSseStyleDelimited.
-