Class Body.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, BodyOrBuilder, Cloneable
    Enclosing class:
    Body

    public static final class Body.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
    implements BodyOrBuilder
     Wrapper for tapped body data. This includes HTTP request/response body, transport socket received
     and transmitted data, etc.
     
    Protobuf type envoy.data.tap.v2alpha.Body
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Body.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Body build()  
      Body buildPartial()  
      Body.Builder clear()  
      Body.Builder clearAsBytes()
      Body data as bytes.
      Body.Builder clearAsString()
      Body data as string.
      Body.Builder clearBodyType()  
      Body.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Body.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Body.Builder clearTruncated()
      Specifies whether body data has been truncated to fit within the specified :ref:`max_buffered_rx_bytes <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_rx_bytes>` and :ref:`max_buffered_tx_bytes <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_tx_bytes>` settings.
      Body.Builder clone()  
      com.google.protobuf.ByteString getAsBytes()
      Body data as bytes.
      String getAsString()
      Body data as string.
      com.google.protobuf.ByteString getAsStringBytes()
      Body data as string.
      Body.BodyTypeCase getBodyTypeCase()  
      Body getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      boolean getTruncated()
      Specifies whether body data has been truncated to fit within the specified :ref:`max_buffered_rx_bytes <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_rx_bytes>` and :ref:`max_buffered_tx_bytes <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_tx_bytes>` settings.
      boolean hasAsBytes()
      Body data as bytes.
      boolean hasAsString()
      Body data as string.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      Body.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Body.Builder mergeFrom​(com.google.protobuf.Message other)  
      Body.Builder mergeFrom​(Body other)  
      Body.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Body.Builder setAsBytes​(com.google.protobuf.ByteString value)
      Body data as bytes.
      Body.Builder setAsString​(String value)
      Body data as string.
      Body.Builder setAsStringBytes​(com.google.protobuf.ByteString value)
      Body data as string.
      Body.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Body.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)  
      Body.Builder setTruncated​(boolean value)
      Specifies whether body data has been truncated to fit within the specified :ref:`max_buffered_rx_bytes <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_rx_bytes>` and :ref:`max_buffered_tx_bytes <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_tx_bytes>` settings.
      Body.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • 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<Body.Builder>
      • clear

        public Body.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Body.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<Body.Builder>
      • getDefaultInstanceForType

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

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

        public Body buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Body.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • setField

        public Body.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • clearField

        public Body.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • clearOneof

        public Body.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • setRepeatedField

        public Body.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             int index,
                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • addRepeatedField

        public Body.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • mergeFrom

        public Body.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Body.Builder>
      • isInitialized

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

        public Body.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Body.Builder>
        Throws:
        IOException
      • hasAsBytes

        public boolean hasAsBytes()
         Body data as bytes. By default, tap body data will be present in this field, as the proto
         `bytes` type can contain any valid byte.
         
        bytes as_bytes = 1;
        Specified by:
        hasAsBytes in interface BodyOrBuilder
        Returns:
        Whether the asBytes field is set.
      • getAsBytes

        public com.google.protobuf.ByteString getAsBytes()
         Body data as bytes. By default, tap body data will be present in this field, as the proto
         `bytes` type can contain any valid byte.
         
        bytes as_bytes = 1;
        Specified by:
        getAsBytes in interface BodyOrBuilder
        Returns:
        The asBytes.
      • setAsBytes

        public Body.Builder setAsBytes​(com.google.protobuf.ByteString value)
         Body data as bytes. By default, tap body data will be present in this field, as the proto
         `bytes` type can contain any valid byte.
         
        bytes as_bytes = 1;
        Parameters:
        value - The asBytes to set.
        Returns:
        This builder for chaining.
      • clearAsBytes

        public Body.Builder clearAsBytes()
         Body data as bytes. By default, tap body data will be present in this field, as the proto
         `bytes` type can contain any valid byte.
         
        bytes as_bytes = 1;
        Returns:
        This builder for chaining.
      • hasAsString

        public boolean hasAsString()
         Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
         <envoy_api_enum_value_service.tap.v2alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
         format type is selected. See the documentation for that option for why this is useful.
         
        string as_string = 2;
        Specified by:
        hasAsString in interface BodyOrBuilder
        Returns:
        Whether the asString field is set.
      • getAsString

        public String getAsString()
         Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
         <envoy_api_enum_value_service.tap.v2alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
         format type is selected. See the documentation for that option for why this is useful.
         
        string as_string = 2;
        Specified by:
        getAsString in interface BodyOrBuilder
        Returns:
        The asString.
      • getAsStringBytes

        public com.google.protobuf.ByteString getAsStringBytes()
         Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
         <envoy_api_enum_value_service.tap.v2alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
         format type is selected. See the documentation for that option for why this is useful.
         
        string as_string = 2;
        Specified by:
        getAsStringBytes in interface BodyOrBuilder
        Returns:
        The bytes for asString.
      • setAsString

        public Body.Builder setAsString​(String value)
         Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
         <envoy_api_enum_value_service.tap.v2alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
         format type is selected. See the documentation for that option for why this is useful.
         
        string as_string = 2;
        Parameters:
        value - The asString to set.
        Returns:
        This builder for chaining.
      • clearAsString

        public Body.Builder clearAsString()
         Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
         <envoy_api_enum_value_service.tap.v2alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
         format type is selected. See the documentation for that option for why this is useful.
         
        string as_string = 2;
        Returns:
        This builder for chaining.
      • setAsStringBytes

        public Body.Builder setAsStringBytes​(com.google.protobuf.ByteString value)
         Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
         <envoy_api_enum_value_service.tap.v2alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
         format type is selected. See the documentation for that option for why this is useful.
         
        string as_string = 2;
        Parameters:
        value - The bytes for asString to set.
        Returns:
        This builder for chaining.
      • getTruncated

        public boolean getTruncated()
         Specifies whether body data has been truncated to fit within the specified
         :ref:`max_buffered_rx_bytes
         <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_rx_bytes>` and
         :ref:`max_buffered_tx_bytes
         <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_tx_bytes>` settings.
         
        bool truncated = 3;
        Specified by:
        getTruncated in interface BodyOrBuilder
        Returns:
        The truncated.
      • setTruncated

        public Body.Builder setTruncated​(boolean value)
         Specifies whether body data has been truncated to fit within the specified
         :ref:`max_buffered_rx_bytes
         <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_rx_bytes>` and
         :ref:`max_buffered_tx_bytes
         <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_tx_bytes>` settings.
         
        bool truncated = 3;
        Parameters:
        value - The truncated to set.
        Returns:
        This builder for chaining.
      • clearTruncated

        public Body.Builder clearTruncated()
         Specifies whether body data has been truncated to fit within the specified
         :ref:`max_buffered_rx_bytes
         <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_rx_bytes>` and
         :ref:`max_buffered_tx_bytes
         <envoy_api_field_service.tap.v2alpha.OutputConfig.max_buffered_tx_bytes>` settings.
         
        bool truncated = 3;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Body.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>
      • mergeUnknownFields

        public final Body.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Body.Builder>