Class SocketOption.Builder

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

    public static final class SocketOption.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SocketOption.Builder>
    implements SocketOptionOrBuilder
     Generic socket option message. This would be used to set socket options that
     might not exist in upstream kernels or precompiled Envoy binaries.
     [#next-free-field: 7]
     
    Protobuf type envoy.api.v2.core.SocketOption
    • 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<SocketOption.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public SocketOption.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<SocketOption.Builder>
        Throws:
        IOException
      • getDescription

        public String getDescription()
         An optional name to give this socket option for debugging, etc.
         Uniqueness is not required and no special meaning is assumed.
         
        string description = 1;
        Specified by:
        getDescription in interface SocketOptionOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         An optional name to give this socket option for debugging, etc.
         Uniqueness is not required and no special meaning is assumed.
         
        string description = 1;
        Specified by:
        getDescriptionBytes in interface SocketOptionOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public SocketOption.Builder setDescription​(String value)
         An optional name to give this socket option for debugging, etc.
         Uniqueness is not required and no special meaning is assumed.
         
        string description = 1;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public SocketOption.Builder clearDescription()
         An optional name to give this socket option for debugging, etc.
         Uniqueness is not required and no special meaning is assumed.
         
        string description = 1;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public SocketOption.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         An optional name to give this socket option for debugging, etc.
         Uniqueness is not required and no special meaning is assumed.
         
        string description = 1;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getLevel

        public long getLevel()
         Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
         
        int64 level = 2;
        Specified by:
        getLevel in interface SocketOptionOrBuilder
        Returns:
        The level.
      • setLevel

        public SocketOption.Builder setLevel​(long value)
         Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
         
        int64 level = 2;
        Parameters:
        value - The level to set.
        Returns:
        This builder for chaining.
      • clearLevel

        public SocketOption.Builder clearLevel()
         Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
         
        int64 level = 2;
        Returns:
        This builder for chaining.
      • getName

        public long getName()
         The numeric name as passed to setsockopt
         
        int64 name = 3;
        Specified by:
        getName in interface SocketOptionOrBuilder
        Returns:
        The name.
      • setName

        public SocketOption.Builder setName​(long value)
         The numeric name as passed to setsockopt
         
        int64 name = 3;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public SocketOption.Builder clearName()
         The numeric name as passed to setsockopt
         
        int64 name = 3;
        Returns:
        This builder for chaining.
      • hasIntValue

        public boolean hasIntValue()
         Because many sockopts take an int value.
         
        int64 int_value = 4;
        Specified by:
        hasIntValue in interface SocketOptionOrBuilder
        Returns:
        Whether the intValue field is set.
      • getIntValue

        public long getIntValue()
         Because many sockopts take an int value.
         
        int64 int_value = 4;
        Specified by:
        getIntValue in interface SocketOptionOrBuilder
        Returns:
        The intValue.
      • setIntValue

        public SocketOption.Builder setIntValue​(long value)
         Because many sockopts take an int value.
         
        int64 int_value = 4;
        Parameters:
        value - The intValue to set.
        Returns:
        This builder for chaining.
      • clearIntValue

        public SocketOption.Builder clearIntValue()
         Because many sockopts take an int value.
         
        int64 int_value = 4;
        Returns:
        This builder for chaining.
      • hasBufValue

        public boolean hasBufValue()
         Otherwise it's a byte buffer.
         
        bytes buf_value = 5;
        Specified by:
        hasBufValue in interface SocketOptionOrBuilder
        Returns:
        Whether the bufValue field is set.
      • getBufValue

        public com.google.protobuf.ByteString getBufValue()
         Otherwise it's a byte buffer.
         
        bytes buf_value = 5;
        Specified by:
        getBufValue in interface SocketOptionOrBuilder
        Returns:
        The bufValue.
      • setBufValue

        public SocketOption.Builder setBufValue​(com.google.protobuf.ByteString value)
         Otherwise it's a byte buffer.
         
        bytes buf_value = 5;
        Parameters:
        value - The bufValue to set.
        Returns:
        This builder for chaining.
      • clearBufValue

        public SocketOption.Builder clearBufValue()
         Otherwise it's a byte buffer.
         
        bytes buf_value = 5;
        Returns:
        This builder for chaining.
      • getStateValue

        public int getStateValue()
         The state in which the option will be applied. When used in BindConfig
         STATE_PREBIND is currently the only valid value.
         
        .envoy.api.v2.core.SocketOption.SocketState state = 6 [(.validate.rules) = { ... }
        Specified by:
        getStateValue in interface SocketOptionOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • setStateValue

        public SocketOption.Builder setStateValue​(int value)
         The state in which the option will be applied. When used in BindConfig
         STATE_PREBIND is currently the only valid value.
         
        .envoy.api.v2.core.SocketOption.SocketState state = 6 [(.validate.rules) = { ... }
        Parameters:
        value - The enum numeric value on the wire for state to set.
        Returns:
        This builder for chaining.
      • getState

        public SocketOption.SocketState getState()
         The state in which the option will be applied. When used in BindConfig
         STATE_PREBIND is currently the only valid value.
         
        .envoy.api.v2.core.SocketOption.SocketState state = 6 [(.validate.rules) = { ... }
        Specified by:
        getState in interface SocketOptionOrBuilder
        Returns:
        The state.
      • setState

        public SocketOption.Builder setState​(SocketOption.SocketState value)
         The state in which the option will be applied. When used in BindConfig
         STATE_PREBIND is currently the only valid value.
         
        .envoy.api.v2.core.SocketOption.SocketState state = 6 [(.validate.rules) = { ... }
        Parameters:
        value - The state to set.
        Returns:
        This builder for chaining.
      • clearState

        public SocketOption.Builder clearState()
         The state in which the option will be applied. When used in BindConfig
         STATE_PREBIND is currently the only valid value.
         
        .envoy.api.v2.core.SocketOption.SocketState state = 6 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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