Class SocketAddress.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<SocketAddress.Builder>
io.envoyproxy.envoy.config.core.v3.SocketAddress.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SocketAddressOrBuilder, Cloneable
Enclosing class:
SocketAddress

public static final class SocketAddress.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SocketAddress.Builder> implements SocketAddressOrBuilder
 [#next-free-field: 8]
 
Protobuf type envoy.config.core.v3.SocketAddress
  • Method Details

    • 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<SocketAddress.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public SocketAddress.Builder mergeFrom(SocketAddress other)
    • isInitialized

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

      public SocketAddress.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<SocketAddress.Builder>
      Throws:
      IOException
    • getPortSpecifierCase

      public SocketAddress.PortSpecifierCase getPortSpecifierCase()
      Specified by:
      getPortSpecifierCase in interface SocketAddressOrBuilder
    • clearPortSpecifier

      public SocketAddress.Builder clearPortSpecifier()
    • getProtocolValue

      public int getProtocolValue()
      .envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }
      Specified by:
      getProtocolValue in interface SocketAddressOrBuilder
      Returns:
      The enum numeric value on the wire for protocol.
    • setProtocolValue

      public SocketAddress.Builder setProtocolValue(int value)
      .envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The enum numeric value on the wire for protocol to set.
      Returns:
      This builder for chaining.
    • getProtocol

      public SocketAddress.Protocol getProtocol()
      .envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }
      Specified by:
      getProtocol in interface SocketAddressOrBuilder
      Returns:
      The protocol.
    • setProtocol

      public SocketAddress.Builder setProtocol(SocketAddress.Protocol value)
      .envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The protocol to set.
      Returns:
      This builder for chaining.
    • clearProtocol

      public SocketAddress.Builder clearProtocol()
      .envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • getAddress

      public String getAddress()
       The address for this socket. :ref:`Listeners <config_listeners>` will bind
       to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
       to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
       It is possible to distinguish a Listener address via the prefix/suffix matching
       in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used
       within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address
       controls the source address of outbound connections. For :ref:`clusters
       <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the
       address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS
       (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized
       via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
       
      string address = 2 [(.validate.rules) = { ... }
      Specified by:
      getAddress in interface SocketAddressOrBuilder
      Returns:
      The address.
    • getAddressBytes

      public com.google.protobuf.ByteString getAddressBytes()
       The address for this socket. :ref:`Listeners <config_listeners>` will bind
       to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
       to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
       It is possible to distinguish a Listener address via the prefix/suffix matching
       in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used
       within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address
       controls the source address of outbound connections. For :ref:`clusters
       <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the
       address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS
       (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized
       via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
       
      string address = 2 [(.validate.rules) = { ... }
      Specified by:
      getAddressBytes in interface SocketAddressOrBuilder
      Returns:
      The bytes for address.
    • setAddress

      public SocketAddress.Builder setAddress(String value)
       The address for this socket. :ref:`Listeners <config_listeners>` will bind
       to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
       to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
       It is possible to distinguish a Listener address via the prefix/suffix matching
       in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used
       within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address
       controls the source address of outbound connections. For :ref:`clusters
       <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the
       address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS
       (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized
       via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
       
      string address = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The address to set.
      Returns:
      This builder for chaining.
    • clearAddress

      public SocketAddress.Builder clearAddress()
       The address for this socket. :ref:`Listeners <config_listeners>` will bind
       to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
       to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
       It is possible to distinguish a Listener address via the prefix/suffix matching
       in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used
       within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address
       controls the source address of outbound connections. For :ref:`clusters
       <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the
       address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS
       (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized
       via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
       
      string address = 2 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setAddressBytes

      public SocketAddress.Builder setAddressBytes(com.google.protobuf.ByteString value)
       The address for this socket. :ref:`Listeners <config_listeners>` will bind
       to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
       to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
       It is possible to distinguish a Listener address via the prefix/suffix matching
       in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used
       within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address
       controls the source address of outbound connections. For :ref:`clusters
       <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the
       address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS
       (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized
       via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
       
      string address = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for address to set.
      Returns:
      This builder for chaining.
    • hasPortValue

      public boolean hasPortValue()
      uint32 port_value = 3 [(.validate.rules) = { ... }
      Specified by:
      hasPortValue in interface SocketAddressOrBuilder
      Returns:
      Whether the portValue field is set.
    • getPortValue

      public int getPortValue()
      uint32 port_value = 3 [(.validate.rules) = { ... }
      Specified by:
      getPortValue in interface SocketAddressOrBuilder
      Returns:
      The portValue.
    • setPortValue

      public SocketAddress.Builder setPortValue(int value)
      uint32 port_value = 3 [(.validate.rules) = { ... }
      Parameters:
      value - The portValue to set.
      Returns:
      This builder for chaining.
    • clearPortValue

      public SocketAddress.Builder clearPortValue()
      uint32 port_value = 3 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • hasNamedPort

      public boolean hasNamedPort()
       This is only valid if :ref:`resolver_name
       <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
       named resolver is capable of named port resolution.
       
      string named_port = 4;
      Specified by:
      hasNamedPort in interface SocketAddressOrBuilder
      Returns:
      Whether the namedPort field is set.
    • getNamedPort

      public String getNamedPort()
       This is only valid if :ref:`resolver_name
       <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
       named resolver is capable of named port resolution.
       
      string named_port = 4;
      Specified by:
      getNamedPort in interface SocketAddressOrBuilder
      Returns:
      The namedPort.
    • getNamedPortBytes

      public com.google.protobuf.ByteString getNamedPortBytes()
       This is only valid if :ref:`resolver_name
       <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
       named resolver is capable of named port resolution.
       
      string named_port = 4;
      Specified by:
      getNamedPortBytes in interface SocketAddressOrBuilder
      Returns:
      The bytes for namedPort.
    • setNamedPort

      public SocketAddress.Builder setNamedPort(String value)
       This is only valid if :ref:`resolver_name
       <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
       named resolver is capable of named port resolution.
       
      string named_port = 4;
      Parameters:
      value - The namedPort to set.
      Returns:
      This builder for chaining.
    • clearNamedPort

      public SocketAddress.Builder clearNamedPort()
       This is only valid if :ref:`resolver_name
       <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
       named resolver is capable of named port resolution.
       
      string named_port = 4;
      Returns:
      This builder for chaining.
    • setNamedPortBytes

      public SocketAddress.Builder setNamedPortBytes(com.google.protobuf.ByteString value)
       This is only valid if :ref:`resolver_name
       <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
       named resolver is capable of named port resolution.
       
      string named_port = 4;
      Parameters:
      value - The bytes for namedPort to set.
      Returns:
      This builder for chaining.
    • getResolverName

      public String getResolverName()
       The name of the custom resolver. This must have been registered with Envoy. If
       this is empty, a context dependent default applies. If the address is a concrete
       IP address, no resolution will occur. If address is a hostname this
       should be set for resolution other than DNS. Specifying a custom resolver with
       ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
       
      string resolver_name = 5;
      Specified by:
      getResolverName in interface SocketAddressOrBuilder
      Returns:
      The resolverName.
    • getResolverNameBytes

      public com.google.protobuf.ByteString getResolverNameBytes()
       The name of the custom resolver. This must have been registered with Envoy. If
       this is empty, a context dependent default applies. If the address is a concrete
       IP address, no resolution will occur. If address is a hostname this
       should be set for resolution other than DNS. Specifying a custom resolver with
       ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
       
      string resolver_name = 5;
      Specified by:
      getResolverNameBytes in interface SocketAddressOrBuilder
      Returns:
      The bytes for resolverName.
    • setResolverName

      public SocketAddress.Builder setResolverName(String value)
       The name of the custom resolver. This must have been registered with Envoy. If
       this is empty, a context dependent default applies. If the address is a concrete
       IP address, no resolution will occur. If address is a hostname this
       should be set for resolution other than DNS. Specifying a custom resolver with
       ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
       
      string resolver_name = 5;
      Parameters:
      value - The resolverName to set.
      Returns:
      This builder for chaining.
    • clearResolverName

      public SocketAddress.Builder clearResolverName()
       The name of the custom resolver. This must have been registered with Envoy. If
       this is empty, a context dependent default applies. If the address is a concrete
       IP address, no resolution will occur. If address is a hostname this
       should be set for resolution other than DNS. Specifying a custom resolver with
       ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
       
      string resolver_name = 5;
      Returns:
      This builder for chaining.
    • setResolverNameBytes

      public SocketAddress.Builder setResolverNameBytes(com.google.protobuf.ByteString value)
       The name of the custom resolver. This must have been registered with Envoy. If
       this is empty, a context dependent default applies. If the address is a concrete
       IP address, no resolution will occur. If address is a hostname this
       should be set for resolution other than DNS. Specifying a custom resolver with
       ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
       
      string resolver_name = 5;
      Parameters:
      value - The bytes for resolverName to set.
      Returns:
      This builder for chaining.
    • getIpv4Compat

      public boolean getIpv4Compat()
       When binding to an IPv6 address above, this enables `IPv4 compatibility
       <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will
       allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into
       IPv6 space as ``::FFFF:<IPv4-address>``.
       
      bool ipv4_compat = 6;
      Specified by:
      getIpv4Compat in interface SocketAddressOrBuilder
      Returns:
      The ipv4Compat.
    • setIpv4Compat

      public SocketAddress.Builder setIpv4Compat(boolean value)
       When binding to an IPv6 address above, this enables `IPv4 compatibility
       <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will
       allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into
       IPv6 space as ``::FFFF:<IPv4-address>``.
       
      bool ipv4_compat = 6;
      Parameters:
      value - The ipv4Compat to set.
      Returns:
      This builder for chaining.
    • clearIpv4Compat

      public SocketAddress.Builder clearIpv4Compat()
       When binding to an IPv6 address above, this enables `IPv4 compatibility
       <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will
       allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into
       IPv6 space as ``::FFFF:<IPv4-address>``.
       
      bool ipv4_compat = 6;
      Returns:
      This builder for chaining.
    • getNetworkNamespaceFilepath

      public String getNetworkNamespaceFilepath()
       The Linux network namespace to bind the socket to. If this is set, Envoy will
       create the socket in the specified network namespace. Only supported on Linux.
       [#not-implemented-hide:]
       
      string network_namespace_filepath = 7;
      Specified by:
      getNetworkNamespaceFilepath in interface SocketAddressOrBuilder
      Returns:
      The networkNamespaceFilepath.
    • getNetworkNamespaceFilepathBytes

      public com.google.protobuf.ByteString getNetworkNamespaceFilepathBytes()
       The Linux network namespace to bind the socket to. If this is set, Envoy will
       create the socket in the specified network namespace. Only supported on Linux.
       [#not-implemented-hide:]
       
      string network_namespace_filepath = 7;
      Specified by:
      getNetworkNamespaceFilepathBytes in interface SocketAddressOrBuilder
      Returns:
      The bytes for networkNamespaceFilepath.
    • setNetworkNamespaceFilepath

      public SocketAddress.Builder setNetworkNamespaceFilepath(String value)
       The Linux network namespace to bind the socket to. If this is set, Envoy will
       create the socket in the specified network namespace. Only supported on Linux.
       [#not-implemented-hide:]
       
      string network_namespace_filepath = 7;
      Parameters:
      value - The networkNamespaceFilepath to set.
      Returns:
      This builder for chaining.
    • clearNetworkNamespaceFilepath

      public SocketAddress.Builder clearNetworkNamespaceFilepath()
       The Linux network namespace to bind the socket to. If this is set, Envoy will
       create the socket in the specified network namespace. Only supported on Linux.
       [#not-implemented-hide:]
       
      string network_namespace_filepath = 7;
      Returns:
      This builder for chaining.
    • setNetworkNamespaceFilepathBytes

      public SocketAddress.Builder setNetworkNamespaceFilepathBytes(com.google.protobuf.ByteString value)
       The Linux network namespace to bind the socket to. If this is set, Envoy will
       create the socket in the specified network namespace. Only supported on Linux.
       [#not-implemented-hide:]
       
      string network_namespace_filepath = 7;
      Parameters:
      value - The bytes for networkNamespaceFilepath to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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