Class MongoProxy.Builder

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

    public static final class MongoProxy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<MongoProxy.Builder>
    implements MongoProxyOrBuilder
     [#next-free-field: 6]
     
    Protobuf type envoy.extensions.filters.network.mongo_proxy.v3.MongoProxy
    • 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<MongoProxy.Builder>
      • clear

        public MongoProxy.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<MongoProxy.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<MongoProxy.Builder>
      • getDefaultInstanceForType

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

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

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

        public MongoProxy.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<MongoProxy.Builder>
      • setField

        public MongoProxy.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<MongoProxy.Builder>
      • clearField

        public MongoProxy.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<MongoProxy.Builder>
      • clearOneof

        public MongoProxy.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<MongoProxy.Builder>
      • setRepeatedField

        public MongoProxy.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<MongoProxy.Builder>
      • addRepeatedField

        public MongoProxy.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<MongoProxy.Builder>
      • mergeFrom

        public MongoProxy.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<MongoProxy.Builder>
      • isInitialized

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

        public MongoProxy.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<MongoProxy.Builder>
        Throws:
        IOException
      • getStatPrefix

        public String getStatPrefix()
         The human readable prefix to use when emitting :ref:`statistics
         <config_network_filters_mongo_proxy_stats>`.
         
        string stat_prefix = 1 [(.validate.rules) = { ... }
        Specified by:
        getStatPrefix in interface MongoProxyOrBuilder
        Returns:
        The statPrefix.
      • getStatPrefixBytes

        public com.google.protobuf.ByteString getStatPrefixBytes()
         The human readable prefix to use when emitting :ref:`statistics
         <config_network_filters_mongo_proxy_stats>`.
         
        string stat_prefix = 1 [(.validate.rules) = { ... }
        Specified by:
        getStatPrefixBytes in interface MongoProxyOrBuilder
        Returns:
        The bytes for statPrefix.
      • setStatPrefix

        public MongoProxy.Builder setStatPrefix​(String value)
         The human readable prefix to use when emitting :ref:`statistics
         <config_network_filters_mongo_proxy_stats>`.
         
        string stat_prefix = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The statPrefix to set.
        Returns:
        This builder for chaining.
      • clearStatPrefix

        public MongoProxy.Builder clearStatPrefix()
         The human readable prefix to use when emitting :ref:`statistics
         <config_network_filters_mongo_proxy_stats>`.
         
        string stat_prefix = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setStatPrefixBytes

        public MongoProxy.Builder setStatPrefixBytes​(com.google.protobuf.ByteString value)
         The human readable prefix to use when emitting :ref:`statistics
         <config_network_filters_mongo_proxy_stats>`.
         
        string stat_prefix = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for statPrefix to set.
        Returns:
        This builder for chaining.
      • getAccessLog

        public String getAccessLog()
         The optional path to use for writing Mongo access logs. If not access log
         path is specified no access logs will be written. Note that access log is
         also gated :ref:`runtime <config_network_filters_mongo_proxy_runtime>`.
         
        string access_log = 2;
        Specified by:
        getAccessLog in interface MongoProxyOrBuilder
        Returns:
        The accessLog.
      • getAccessLogBytes

        public com.google.protobuf.ByteString getAccessLogBytes()
         The optional path to use for writing Mongo access logs. If not access log
         path is specified no access logs will be written. Note that access log is
         also gated :ref:`runtime <config_network_filters_mongo_proxy_runtime>`.
         
        string access_log = 2;
        Specified by:
        getAccessLogBytes in interface MongoProxyOrBuilder
        Returns:
        The bytes for accessLog.
      • setAccessLog

        public MongoProxy.Builder setAccessLog​(String value)
         The optional path to use for writing Mongo access logs. If not access log
         path is specified no access logs will be written. Note that access log is
         also gated :ref:`runtime <config_network_filters_mongo_proxy_runtime>`.
         
        string access_log = 2;
        Parameters:
        value - The accessLog to set.
        Returns:
        This builder for chaining.
      • clearAccessLog

        public MongoProxy.Builder clearAccessLog()
         The optional path to use for writing Mongo access logs. If not access log
         path is specified no access logs will be written. Note that access log is
         also gated :ref:`runtime <config_network_filters_mongo_proxy_runtime>`.
         
        string access_log = 2;
        Returns:
        This builder for chaining.
      • setAccessLogBytes

        public MongoProxy.Builder setAccessLogBytes​(com.google.protobuf.ByteString value)
         The optional path to use for writing Mongo access logs. If not access log
         path is specified no access logs will be written. Note that access log is
         also gated :ref:`runtime <config_network_filters_mongo_proxy_runtime>`.
         
        string access_log = 2;
        Parameters:
        value - The bytes for accessLog to set.
        Returns:
        This builder for chaining.
      • hasDelay

        public boolean hasDelay()
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
        Specified by:
        hasDelay in interface MongoProxyOrBuilder
        Returns:
        Whether the delay field is set.
      • getDelay

        public FaultDelay getDelay()
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
        Specified by:
        getDelay in interface MongoProxyOrBuilder
        Returns:
        The delay.
      • setDelay

        public MongoProxy.Builder setDelay​(FaultDelay value)
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
      • setDelay

        public MongoProxy.Builder setDelay​(FaultDelay.Builder builderForValue)
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
      • mergeDelay

        public MongoProxy.Builder mergeDelay​(FaultDelay value)
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
      • clearDelay

        public MongoProxy.Builder clearDelay()
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
      • getDelayBuilder

        public FaultDelay.Builder getDelayBuilder()
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
      • getDelayOrBuilder

        public FaultDelayOrBuilder getDelayOrBuilder()
         Inject a fixed delay before proxying a Mongo operation. Delays are
         applied to the following MongoDB operations: Query, Insert, GetMore,
         and KillCursors. Once an active delay is in progress, all incoming
         data up until the timer event fires will be a part of the delay.
         
        .envoy.extensions.filters.common.fault.v3.FaultDelay delay = 3;
        Specified by:
        getDelayOrBuilder in interface MongoProxyOrBuilder
      • getEmitDynamicMetadata

        public boolean getEmitDynamicMetadata()
         Flag to specify whether :ref:`dynamic metadata
         <config_network_filters_mongo_proxy_dynamic_metadata>` should be emitted. Defaults to false.
         
        bool emit_dynamic_metadata = 4;
        Specified by:
        getEmitDynamicMetadata in interface MongoProxyOrBuilder
        Returns:
        The emitDynamicMetadata.
      • setEmitDynamicMetadata

        public MongoProxy.Builder setEmitDynamicMetadata​(boolean value)
         Flag to specify whether :ref:`dynamic metadata
         <config_network_filters_mongo_proxy_dynamic_metadata>` should be emitted. Defaults to false.
         
        bool emit_dynamic_metadata = 4;
        Parameters:
        value - The emitDynamicMetadata to set.
        Returns:
        This builder for chaining.
      • clearEmitDynamicMetadata

        public MongoProxy.Builder clearEmitDynamicMetadata()
         Flag to specify whether :ref:`dynamic metadata
         <config_network_filters_mongo_proxy_dynamic_metadata>` should be emitted. Defaults to false.
         
        bool emit_dynamic_metadata = 4;
        Returns:
        This builder for chaining.
      • getCommandsList

        public com.google.protobuf.ProtocolStringList getCommandsList()
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Specified by:
        getCommandsList in interface MongoProxyOrBuilder
        Returns:
        A list containing the commands.
      • getCommandsCount

        public int getCommandsCount()
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Specified by:
        getCommandsCount in interface MongoProxyOrBuilder
        Returns:
        The count of commands.
      • getCommands

        public String getCommands​(int index)
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Specified by:
        getCommands in interface MongoProxyOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The commands at the given index.
      • getCommandsBytes

        public com.google.protobuf.ByteString getCommandsBytes​(int index)
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Specified by:
        getCommandsBytes in interface MongoProxyOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the commands at the given index.
      • setCommands

        public MongoProxy.Builder setCommands​(int index,
                                              String value)
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Parameters:
        index - The index to set the value at.
        value - The commands to set.
        Returns:
        This builder for chaining.
      • addCommands

        public MongoProxy.Builder addCommands​(String value)
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Parameters:
        value - The commands to add.
        Returns:
        This builder for chaining.
      • addAllCommands

        public MongoProxy.Builder addAllCommands​(Iterable<String> values)
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Parameters:
        values - The commands to add.
        Returns:
        This builder for chaining.
      • clearCommands

        public MongoProxy.Builder clearCommands()
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Returns:
        This builder for chaining.
      • addCommandsBytes

        public MongoProxy.Builder addCommandsBytes​(com.google.protobuf.ByteString value)
         List of commands to emit metrics for. Defaults to "delete", "insert", and "update".
         Note that metrics will not be emitted for "find" commands, since those are considered
         queries, and metrics for those are emitted under a dedicated "query" namespace.
         
        repeated string commands = 5;
        Parameters:
        value - The bytes of the commands to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final MongoProxy.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<MongoProxy.Builder>
      • mergeUnknownFields

        public final MongoProxy.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<MongoProxy.Builder>