Class SubstitutionFormatString

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SubstitutionFormatStringOrBuilder, java.io.Serializable

    public final class SubstitutionFormatString
    extends com.google.protobuf.GeneratedMessage
    implements SubstitutionFormatStringOrBuilder
     Configuration to use multiple :ref:`command operators <config_access_log_command_operators>`
     to generate a new string in either plain text or JSON format.
     [#next-free-field: 8]
     
    Protobuf type envoy.config.core.v3.SubstitutionFormatString
    See Also:
    Serialized Form
    • Field Detail

      • bitField0_

        private int bitField0_
      • formatCase_

        private int formatCase_
      • format_

        private java.lang.Object format_
      • TEXT_FORMAT_FIELD_NUMBER

        public static final int TEXT_FORMAT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • JSON_FORMAT_FIELD_NUMBER

        public static final int JSON_FORMAT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TEXT_FORMAT_SOURCE_FIELD_NUMBER

        public static final int TEXT_FORMAT_SOURCE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OMIT_EMPTY_VALUES_FIELD_NUMBER

        public static final int OMIT_EMPTY_VALUES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • omitEmptyValues_

        private boolean omitEmptyValues_
      • CONTENT_TYPE_FIELD_NUMBER

        public static final int CONTENT_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • contentType_

        private volatile java.lang.Object contentType_
      • FORMATTERS_FIELD_NUMBER

        public static final int FORMATTERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • JSON_FORMAT_OPTIONS_FIELD_NUMBER

        public static final int JSON_FORMAT_OPTIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • memoizedIsInitialized

        private byte memoizedIsInitialized
    • Constructor Detail

      • SubstitutionFormatString

        private SubstitutionFormatString​(com.google.protobuf.GeneratedMessage.Builder<?> builder)
      • SubstitutionFormatString

        private SubstitutionFormatString()
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
      • hasTextFormat

        @Deprecated
        public boolean hasTextFormat()
        Deprecated.
        envoy.config.core.v3.SubstitutionFormatString.text_format is deprecated. See envoy/config/core/v3/substitution_format_string.proto;l=51
         Specify a format with command operators to form a text string.
         Its details is described in :ref:`format string<config_access_log_format_strings>`.
        
         For example, setting ``text_format`` like below,
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
        
         generates plain text similar to:
        
         .. code-block:: text
        
         upstream connect error:503:path=/foo
        
         Deprecated in favor of :ref:`text_format_source <envoy_v3_api_field_config.core.v3.SubstitutionFormatString.text_format_source>`. To migrate text format strings, use the :ref:`inline_string <envoy_v3_api_field_config.core.v3.DataSource.inline_string>` field.
         
        string text_format = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
        Specified by:
        hasTextFormat in interface SubstitutionFormatStringOrBuilder
        Returns:
        Whether the textFormat field is set.
      • getTextFormat

        @Deprecated
        public java.lang.String getTextFormat()
        Deprecated.
        envoy.config.core.v3.SubstitutionFormatString.text_format is deprecated. See envoy/config/core/v3/substitution_format_string.proto;l=51
         Specify a format with command operators to form a text string.
         Its details is described in :ref:`format string<config_access_log_format_strings>`.
        
         For example, setting ``text_format`` like below,
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
        
         generates plain text similar to:
        
         .. code-block:: text
        
         upstream connect error:503:path=/foo
        
         Deprecated in favor of :ref:`text_format_source <envoy_v3_api_field_config.core.v3.SubstitutionFormatString.text_format_source>`. To migrate text format strings, use the :ref:`inline_string <envoy_v3_api_field_config.core.v3.DataSource.inline_string>` field.
         
        string text_format = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
        Specified by:
        getTextFormat in interface SubstitutionFormatStringOrBuilder
        Returns:
        The textFormat.
      • getTextFormatBytes

        @Deprecated
        public com.google.protobuf.ByteString getTextFormatBytes()
        Deprecated.
        envoy.config.core.v3.SubstitutionFormatString.text_format is deprecated. See envoy/config/core/v3/substitution_format_string.proto;l=51
         Specify a format with command operators to form a text string.
         Its details is described in :ref:`format string<config_access_log_format_strings>`.
        
         For example, setting ``text_format`` like below,
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
        
         generates plain text similar to:
        
         .. code-block:: text
        
         upstream connect error:503:path=/foo
        
         Deprecated in favor of :ref:`text_format_source <envoy_v3_api_field_config.core.v3.SubstitutionFormatString.text_format_source>`. To migrate text format strings, use the :ref:`inline_string <envoy_v3_api_field_config.core.v3.DataSource.inline_string>` field.
         
        string text_format = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
        Specified by:
        getTextFormatBytes in interface SubstitutionFormatStringOrBuilder
        Returns:
        The bytes for textFormat.
      • hasJsonFormat

        public boolean hasJsonFormat()
         Specify a format with command operators to form a JSON string.
         Its details is described in :ref:`format dictionary<config_access_log_format_dictionaries>`.
         Values are rendered as strings, numbers, or boolean values as appropriate.
         Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA).
         See the documentation for a specific command operator for details.
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         json_format:
         status: "%RESPONSE_CODE%"
         message: "%LOCAL_REPLY_BODY%"
        
         The following JSON object would be created:
        
         .. code-block:: json
        
         {
         "status": 500,
         "message": "My error message"
         }
         
        .google.protobuf.Struct json_format = 2 [(.validate.rules) = { ... }
        Specified by:
        hasJsonFormat in interface SubstitutionFormatStringOrBuilder
        Returns:
        Whether the jsonFormat field is set.
      • getJsonFormat

        public com.google.protobuf.Struct getJsonFormat()
         Specify a format with command operators to form a JSON string.
         Its details is described in :ref:`format dictionary<config_access_log_format_dictionaries>`.
         Values are rendered as strings, numbers, or boolean values as appropriate.
         Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA).
         See the documentation for a specific command operator for details.
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         json_format:
         status: "%RESPONSE_CODE%"
         message: "%LOCAL_REPLY_BODY%"
        
         The following JSON object would be created:
        
         .. code-block:: json
        
         {
         "status": 500,
         "message": "My error message"
         }
         
        .google.protobuf.Struct json_format = 2 [(.validate.rules) = { ... }
        Specified by:
        getJsonFormat in interface SubstitutionFormatStringOrBuilder
        Returns:
        The jsonFormat.
      • getJsonFormatOrBuilder

        public com.google.protobuf.StructOrBuilder getJsonFormatOrBuilder()
         Specify a format with command operators to form a JSON string.
         Its details is described in :ref:`format dictionary<config_access_log_format_dictionaries>`.
         Values are rendered as strings, numbers, or boolean values as appropriate.
         Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA).
         See the documentation for a specific command operator for details.
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         json_format:
         status: "%RESPONSE_CODE%"
         message: "%LOCAL_REPLY_BODY%"
        
         The following JSON object would be created:
        
         .. code-block:: json
        
         {
         "status": 500,
         "message": "My error message"
         }
         
        .google.protobuf.Struct json_format = 2 [(.validate.rules) = { ... }
        Specified by:
        getJsonFormatOrBuilder in interface SubstitutionFormatStringOrBuilder
      • hasTextFormatSource

        public boolean hasTextFormatSource()
         Specify a format with command operators to form a text string.
         Its details is described in :ref:`format string<config_access_log_format_strings>`.
        
         For example, setting ``text_format`` like below,
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         text_format_source:
         inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
        
         generates plain text similar to:
        
         .. code-block:: text
        
         upstream connect error:503:path=/foo
         
        .envoy.config.core.v3.DataSource text_format_source = 5;
        Specified by:
        hasTextFormatSource in interface SubstitutionFormatStringOrBuilder
        Returns:
        Whether the textFormatSource field is set.
      • getTextFormatSource

        public DataSource getTextFormatSource()
         Specify a format with command operators to form a text string.
         Its details is described in :ref:`format string<config_access_log_format_strings>`.
        
         For example, setting ``text_format`` like below,
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         text_format_source:
         inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
        
         generates plain text similar to:
        
         .. code-block:: text
        
         upstream connect error:503:path=/foo
         
        .envoy.config.core.v3.DataSource text_format_source = 5;
        Specified by:
        getTextFormatSource in interface SubstitutionFormatStringOrBuilder
        Returns:
        The textFormatSource.
      • getTextFormatSourceOrBuilder

        public DataSourceOrBuilder getTextFormatSourceOrBuilder()
         Specify a format with command operators to form a text string.
         Its details is described in :ref:`format string<config_access_log_format_strings>`.
        
         For example, setting ``text_format`` like below,
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         text_format_source:
         inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
        
         generates plain text similar to:
        
         .. code-block:: text
        
         upstream connect error:503:path=/foo
         
        .envoy.config.core.v3.DataSource text_format_source = 5;
        Specified by:
        getTextFormatSourceOrBuilder in interface SubstitutionFormatStringOrBuilder
      • getOmitEmptyValues

        public boolean getOmitEmptyValues()
         If set to true, when command operators are evaluated to null,
        
         * for ``text_format``, the output of the empty operator is changed from ``-`` to an
         empty string, so that empty values are omitted entirely.
         * for ``json_format`` the keys with null values are omitted in the output structure.
         
        bool omit_empty_values = 3;
        Specified by:
        getOmitEmptyValues in interface SubstitutionFormatStringOrBuilder
        Returns:
        The omitEmptyValues.
      • getContentType

        public java.lang.String getContentType()
         Specify a ``content_type`` field.
         If this field is not set then ``text/plain`` is used for ``text_format`` and
         ``application/json`` is used for ``json_format``.
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         content_type: "text/html; charset=UTF-8"
         
        string content_type = 4 [(.validate.rules) = { ... }
        Specified by:
        getContentType in interface SubstitutionFormatStringOrBuilder
        Returns:
        The contentType.
      • getContentTypeBytes

        public com.google.protobuf.ByteString getContentTypeBytes()
         Specify a ``content_type`` field.
         If this field is not set then ``text/plain`` is used for ``text_format`` and
         ``application/json`` is used for ``json_format``.
        
         .. validated-code-block:: yaml
         :type-name: envoy.config.core.v3.SubstitutionFormatString
        
         content_type: "text/html; charset=UTF-8"
         
        string content_type = 4 [(.validate.rules) = { ... }
        Specified by:
        getContentTypeBytes in interface SubstitutionFormatStringOrBuilder
        Returns:
        The bytes for contentType.
      • getFormattersList

        public java.util.List<TypedExtensionConfig> getFormattersList()
         Specifies a collection of Formatter plugins that can be called from the access log configuration.
         See the formatters extensions documentation for details.
         [#extension-category: envoy.formatter]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig formatters = 6;
        Specified by:
        getFormattersList in interface SubstitutionFormatStringOrBuilder
      • getFormattersOrBuilderList

        public java.util.List<? extends TypedExtensionConfigOrBuilder> getFormattersOrBuilderList()
         Specifies a collection of Formatter plugins that can be called from the access log configuration.
         See the formatters extensions documentation for details.
         [#extension-category: envoy.formatter]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig formatters = 6;
        Specified by:
        getFormattersOrBuilderList in interface SubstitutionFormatStringOrBuilder
      • getFormattersCount

        public int getFormattersCount()
         Specifies a collection of Formatter plugins that can be called from the access log configuration.
         See the formatters extensions documentation for details.
         [#extension-category: envoy.formatter]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig formatters = 6;
        Specified by:
        getFormattersCount in interface SubstitutionFormatStringOrBuilder
      • getFormatters

        public TypedExtensionConfig getFormatters​(int index)
         Specifies a collection of Formatter plugins that can be called from the access log configuration.
         See the formatters extensions documentation for details.
         [#extension-category: envoy.formatter]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig formatters = 6;
        Specified by:
        getFormatters in interface SubstitutionFormatStringOrBuilder
      • getFormattersOrBuilder

        public TypedExtensionConfigOrBuilder getFormattersOrBuilder​(int index)
         Specifies a collection of Formatter plugins that can be called from the access log configuration.
         See the formatters extensions documentation for details.
         [#extension-category: envoy.formatter]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig formatters = 6;
        Specified by:
        getFormattersOrBuilder in interface SubstitutionFormatStringOrBuilder
      • hasJsonFormatOptions

        public boolean hasJsonFormatOptions()
         If json_format is used, the options will be applied to the output JSON string.
         
        .envoy.config.core.v3.JsonFormatOptions json_format_options = 7;
        Specified by:
        hasJsonFormatOptions in interface SubstitutionFormatStringOrBuilder
        Returns:
        Whether the jsonFormatOptions field is set.
      • isInitialized

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

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

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

        public boolean equals​(java.lang.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 SubstitutionFormatString parseFrom​(java.nio.ByteBuffer data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubstitutionFormatString parseFrom​(java.nio.ByteBuffer data,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

        public static SubstitutionFormatString parseFrom​(java.io.InputStream input)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static SubstitutionFormatString parseFrom​(java.io.InputStream input,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static SubstitutionFormatString parseDelimitedFrom​(java.io.InputStream input)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static SubstitutionFormatString parseDelimitedFrom​(java.io.InputStream input,
                                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static SubstitutionFormatString parseFrom​(com.google.protobuf.CodedInputStream input)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static SubstitutionFormatString parseFrom​(com.google.protobuf.CodedInputStream input,
                                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public SubstitutionFormatString.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public SubstitutionFormatString.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected SubstitutionFormatString.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.google.protobuf.AbstractMessage
      • getParserForType

        public com.google.protobuf.Parser<SubstitutionFormatString> 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.GeneratedMessage
      • getDefaultInstanceForType

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