Class SocketAddress.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<SocketAddress.Builder>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<SocketAddress.Builder> implements SocketAddressOrBuilder
 [#next-free-field: 7]
 
Protobuf type envoy.config.core.v3.SocketAddress
  • Field Details

    • portSpecifierCase_

      private int portSpecifierCase_
    • portSpecifier_

      private Object portSpecifier_
    • bitField0_

      private int bitField0_
    • protocol_

      private int protocol_
    • address_

      private Object address_
    • resolverName_

      private Object resolverName_
    • ipv4Compat_

      private boolean ipv4Compat_
  • Constructor Details

    • Builder

      private Builder()
    • Builder

      private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
  • Method Details

    • 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.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.GeneratedMessage.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.GeneratedMessage.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
    • buildPartial0

      private void buildPartial0(SocketAddress result)
    • buildPartialOneofs

      private void buildPartialOneofs(SocketAddress result)
    • 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.GeneratedMessage.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.