Class GrpcJsonReverseTranscoder.PrintOptions

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.filters.http.grpc_json_reverse_transcoder.v3.GrpcJsonReverseTranscoder.PrintOptions
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GrpcJsonReverseTranscoder.PrintOptionsOrBuilder, Serializable
Enclosing class:
GrpcJsonReverseTranscoder

public static final class GrpcJsonReverseTranscoder.PrintOptions extends com.google.protobuf.GeneratedMessageV3 implements GrpcJsonReverseTranscoder.PrintOptionsOrBuilder
Protobuf type envoy.extensions.filters.http.grpc_json_reverse_transcoder.v3.GrpcJsonReverseTranscoder.PrintOptions
See Also:
  • Field Details

    • ALWAYS_PRINT_PRIMITIVE_FIELDS_FIELD_NUMBER

      public static final int ALWAYS_PRINT_PRIMITIVE_FIELDS_FIELD_NUMBER
      See Also:
    • ALWAYS_PRINT_ENUMS_AS_INTS_FIELD_NUMBER

      public static final int ALWAYS_PRINT_ENUMS_AS_INTS_FIELD_NUMBER
      See Also:
    • USE_CANONICAL_FIELD_NAMES_FIELD_NUMBER

      public static final int USE_CANONICAL_FIELD_NAMES_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getAlwaysPrintPrimitiveFields

      public 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 = 1;
      Specified by:
      getAlwaysPrintPrimitiveFields in interface GrpcJsonReverseTranscoder.PrintOptionsOrBuilder
      Returns:
      The alwaysPrintPrimitiveFields.
    • getAlwaysPrintEnumsAsInts

      public 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 = 2;
      Specified by:
      getAlwaysPrintEnumsAsInts in interface GrpcJsonReverseTranscoder.PrintOptionsOrBuilder
      Returns:
      The alwaysPrintEnumsAsInts.
    • getUseCanonicalFieldNames

      public boolean getUseCanonicalFieldNames()
       Whether to convert the proto field names to ``json_name`` annotation value, or lower camel case,
       in absence of ``json_name``. By default the field names will be preserved after conversion.
       Setting this flag will convert the field names to their canonical form. Defaults to false.
      
       Example:
      
       .. code-block:: proto
      
           message Author {
             int64 id = 1;
             enum Gender {
               UNKNOWN = 0;
               MALE = 1;
               FEMALE = 2;
             };
             Gender gender = 2;
             string first_name = 3;
             string last_name = 4 [json_name = "lname"];
           }
      
       The above proto message after being transcoded to JSON with
       ``use_canonical_field_names`` set to ``false`` will have the
       field names same as in the proto message, as follows:
      
       .. code-block:: json
      
           {
             "id": "12345",
             "gender": "MALE",
             "first_name": "John",
             "last_name": "Doe"
           }
      
       and with the ``use_canonical_field_names`` set to ``true``, the
       transcoded JSON will have ``first_name`` converted to camelCase
       and ``last_name`` converted to its ``json_name`` annotation value,
       as follows:
      
       .. code-block:: json
      
           {
             "id": "12345",
             "gender": "MALE",
             "firstName": "John",
             "lname": "Doe"
           }
       
      bool use_canonical_field_names = 3;
      Specified by:
      getUseCanonicalFieldNames in interface GrpcJsonReverseTranscoder.PrintOptionsOrBuilder
      Returns:
      The useCanonicalFieldNames.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GrpcJsonReverseTranscoder.PrintOptions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected GrpcJsonReverseTranscoder.PrintOptions.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static GrpcJsonReverseTranscoder.PrintOptions getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<GrpcJsonReverseTranscoder.PrintOptions> parser()
    • getParserForType

      public com.google.protobuf.Parser<GrpcJsonReverseTranscoder.PrintOptions> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public GrpcJsonReverseTranscoder.PrintOptions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder