Class GrpcJsonTranscoder.PrintOptions.Builder

    • Method Detail

      • 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.Builder<GrpcJsonTranscoder.PrintOptions.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcJsonTranscoder.PrintOptions.Builder>
      • getDefaultInstanceForType

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

        public GrpcJsonTranscoder.PrintOptions build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public GrpcJsonTranscoder.PrintOptions buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcJsonTranscoder.PrintOptions.Builder>
      • getAddWhitespace

        public 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;
        Specified by:
        getAddWhitespace in interface GrpcJsonTranscoder.PrintOptionsOrBuilder
        Returns:
        The addWhitespace.
      • setAddWhitespace

        public GrpcJsonTranscoder.PrintOptions.Builder setAddWhitespace​(boolean value)
         Whether to add spaces, line breaks and indentation to make the JSON
         output easy to read. Defaults to false.
         
        bool add_whitespace = 1;
        Parameters:
        value - The addWhitespace to set.
        Returns:
        This builder for chaining.
      • clearAddWhitespace

        public GrpcJsonTranscoder.PrintOptions.Builder clearAddWhitespace()
         Whether to add spaces, line breaks and indentation to make the JSON
         output easy to read. Defaults to false.
         
        bool add_whitespace = 1;
        Returns:
        This builder for chaining.
      • 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 = 2;
        Specified by:
        getAlwaysPrintPrimitiveFields in interface GrpcJsonTranscoder.PrintOptionsOrBuilder
        Returns:
        The alwaysPrintPrimitiveFields.
      • setAlwaysPrintPrimitiveFields

        public GrpcJsonTranscoder.PrintOptions.Builder setAlwaysPrintPrimitiveFields​(boolean value)
         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;
        Parameters:
        value - The alwaysPrintPrimitiveFields to set.
        Returns:
        This builder for chaining.
      • clearAlwaysPrintPrimitiveFields

        public GrpcJsonTranscoder.PrintOptions.Builder clearAlwaysPrintPrimitiveFields()
         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:
        This builder for chaining.
      • 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 = 3;
        Specified by:
        getAlwaysPrintEnumsAsInts in interface GrpcJsonTranscoder.PrintOptionsOrBuilder
        Returns:
        The alwaysPrintEnumsAsInts.
      • setAlwaysPrintEnumsAsInts

        public GrpcJsonTranscoder.PrintOptions.Builder setAlwaysPrintEnumsAsInts​(boolean value)
         Whether to always print enums as ints. By default they are rendered
         as strings. Defaults to false.
         
        bool always_print_enums_as_ints = 3;
        Parameters:
        value - The alwaysPrintEnumsAsInts to set.
        Returns:
        This builder for chaining.
      • clearAlwaysPrintEnumsAsInts

        public GrpcJsonTranscoder.PrintOptions.Builder clearAlwaysPrintEnumsAsInts()
         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:
        This builder for chaining.
      • getPreserveProtoFieldNames

        public 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;
        Specified by:
        getPreserveProtoFieldNames in interface GrpcJsonTranscoder.PrintOptionsOrBuilder
        Returns:
        The preserveProtoFieldNames.
      • setPreserveProtoFieldNames

        public GrpcJsonTranscoder.PrintOptions.Builder setPreserveProtoFieldNames​(boolean value)
         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;
        Parameters:
        value - The preserveProtoFieldNames to set.
        Returns:
        This builder for chaining.
      • clearPreserveProtoFieldNames

        public GrpcJsonTranscoder.PrintOptions.Builder clearPreserveProtoFieldNames()
         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:
        This builder for chaining.