Class SubstitutionFormatString

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

    public final class SubstitutionFormatString
    extends com.google.protobuf.GeneratedMessageV3
    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: 7]
     
    Protobuf type envoy.config.core.v3.SubstitutionFormatString
    See Also:
    Serialized Form
    • Field Detail

      • 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
      • CONTENT_TYPE_FIELD_NUMBER

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

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

      • newInstance

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

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields 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
      • 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=45
         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 String getTextFormat()
        Deprecated.
        envoy.config.core.v3.SubstitutionFormatString.text_format is deprecated. See envoy/config/core/v3/substitution_format_string.proto;l=45
         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=45
         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 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 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 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
      • 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 SubstitutionFormatString parseFrom​(ByteBuffer data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubstitutionFormatString parseFrom​(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
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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