Class Locality.Builder

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

    public static final class Locality.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Locality.Builder>
    implements LocalityOrBuilder
     Identifies location of where either Envoy runs or where upstream hosts run.
     
    Protobuf type envoy.config.core.v3.Locality
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Locality.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Locality build()  
      Locality buildPartial()  
      Locality.Builder clear()  
      Locality.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Locality.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Locality.Builder clearRegion()
      Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
      Locality.Builder clearSubZone()
      When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.
      Locality.Builder clearZone()
      Defines the local service zone where Envoy is running.
      Locality.Builder clone()  
      Locality getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      String getRegion()
      Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
      com.google.protobuf.ByteString getRegionBytes()
      Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
      String getSubZone()
      When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.
      com.google.protobuf.ByteString getSubZoneBytes()
      When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.
      String getZone()
      Defines the local service zone where Envoy is running.
      com.google.protobuf.ByteString getZoneBytes()
      Defines the local service zone where Envoy is running.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      Locality.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Locality.Builder mergeFrom​(com.google.protobuf.Message other)  
      Locality.Builder mergeFrom​(Locality other)  
      Locality.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Locality.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Locality.Builder setRegion​(String value)
      Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
      Locality.Builder setRegionBytes​(com.google.protobuf.ByteString value)
      Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
      Locality.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)  
      Locality.Builder setSubZone​(String value)
      When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.
      Locality.Builder setSubZoneBytes​(com.google.protobuf.ByteString value)
      When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.
      Locality.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Locality.Builder setZone​(String value)
      Defines the local service zone where Envoy is running.
      Locality.Builder setZoneBytes​(com.google.protobuf.ByteString value)
      Defines the local service zone where Envoy is running.
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • 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<Locality.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public Locality.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<Locality.Builder>
        Throws:
        IOException
      • getRegion

        public String getRegion()
         Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
         
        string region = 1;
        Specified by:
        getRegion in interface LocalityOrBuilder
        Returns:
        The region.
      • getRegionBytes

        public com.google.protobuf.ByteString getRegionBytes()
         Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
         
        string region = 1;
        Specified by:
        getRegionBytes in interface LocalityOrBuilder
        Returns:
        The bytes for region.
      • setRegion

        public Locality.Builder setRegion​(String value)
         Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
         
        string region = 1;
        Parameters:
        value - The region to set.
        Returns:
        This builder for chaining.
      • clearRegion

        public Locality.Builder clearRegion()
         Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
         
        string region = 1;
        Returns:
        This builder for chaining.
      • setRegionBytes

        public Locality.Builder setRegionBytes​(com.google.protobuf.ByteString value)
         Region this :ref:`zone <envoy_v3_api_field_config.core.v3.Locality.zone>` belongs to.
         
        string region = 1;
        Parameters:
        value - The bytes for region to set.
        Returns:
        This builder for chaining.
      • getZone

        public String getZone()
         Defines the local service zone where Envoy is running. Though optional, it
         should be set if discovery service routing is used and the discovery
         service exposes :ref:`zone data <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.locality>`,
         either in this message or via :option:`--service-zone`. The meaning of zone
         is context dependent, e.g. `Availability Zone (AZ)
         <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
         on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
         GCP, etc.
         
        string zone = 2;
        Specified by:
        getZone in interface LocalityOrBuilder
        Returns:
        The zone.
      • getZoneBytes

        public com.google.protobuf.ByteString getZoneBytes()
         Defines the local service zone where Envoy is running. Though optional, it
         should be set if discovery service routing is used and the discovery
         service exposes :ref:`zone data <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.locality>`,
         either in this message or via :option:`--service-zone`. The meaning of zone
         is context dependent, e.g. `Availability Zone (AZ)
         <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
         on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
         GCP, etc.
         
        string zone = 2;
        Specified by:
        getZoneBytes in interface LocalityOrBuilder
        Returns:
        The bytes for zone.
      • setZone

        public Locality.Builder setZone​(String value)
         Defines the local service zone where Envoy is running. Though optional, it
         should be set if discovery service routing is used and the discovery
         service exposes :ref:`zone data <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.locality>`,
         either in this message or via :option:`--service-zone`. The meaning of zone
         is context dependent, e.g. `Availability Zone (AZ)
         <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
         on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
         GCP, etc.
         
        string zone = 2;
        Parameters:
        value - The zone to set.
        Returns:
        This builder for chaining.
      • clearZone

        public Locality.Builder clearZone()
         Defines the local service zone where Envoy is running. Though optional, it
         should be set if discovery service routing is used and the discovery
         service exposes :ref:`zone data <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.locality>`,
         either in this message or via :option:`--service-zone`. The meaning of zone
         is context dependent, e.g. `Availability Zone (AZ)
         <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
         on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
         GCP, etc.
         
        string zone = 2;
        Returns:
        This builder for chaining.
      • setZoneBytes

        public Locality.Builder setZoneBytes​(com.google.protobuf.ByteString value)
         Defines the local service zone where Envoy is running. Though optional, it
         should be set if discovery service routing is used and the discovery
         service exposes :ref:`zone data <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.locality>`,
         either in this message or via :option:`--service-zone`. The meaning of zone
         is context dependent, e.g. `Availability Zone (AZ)
         <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
         on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
         GCP, etc.
         
        string zone = 2;
        Parameters:
        value - The bytes for zone to set.
        Returns:
        This builder for chaining.
      • getSubZone

        public String getSubZone()
         When used for locality of upstream hosts, this field further splits zone
         into smaller chunks of sub-zones so they can be load balanced
         independently.
         
        string sub_zone = 3;
        Specified by:
        getSubZone in interface LocalityOrBuilder
        Returns:
        The subZone.
      • getSubZoneBytes

        public com.google.protobuf.ByteString getSubZoneBytes()
         When used for locality of upstream hosts, this field further splits zone
         into smaller chunks of sub-zones so they can be load balanced
         independently.
         
        string sub_zone = 3;
        Specified by:
        getSubZoneBytes in interface LocalityOrBuilder
        Returns:
        The bytes for subZone.
      • setSubZone

        public Locality.Builder setSubZone​(String value)
         When used for locality of upstream hosts, this field further splits zone
         into smaller chunks of sub-zones so they can be load balanced
         independently.
         
        string sub_zone = 3;
        Parameters:
        value - The subZone to set.
        Returns:
        This builder for chaining.
      • clearSubZone

        public Locality.Builder clearSubZone()
         When used for locality of upstream hosts, this field further splits zone
         into smaller chunks of sub-zones so they can be load balanced
         independently.
         
        string sub_zone = 3;
        Returns:
        This builder for chaining.
      • setSubZoneBytes

        public Locality.Builder setSubZoneBytes​(com.google.protobuf.ByteString value)
         When used for locality of upstream hosts, this field further splits zone
         into smaller chunks of sub-zones so they can be load balanced
         independently.
         
        string sub_zone = 3;
        Parameters:
        value - The bytes for subZone to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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