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, java.lang.Cloneable
    Enclosing class:
    Locality

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

      Fields 
      Modifier and Type Field Description
      private int bitField0_  
      private java.lang.Object region_  
      private java.lang.Object subZone_  
      private java.lang.Object zone_  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Builder()  
      private Builder​(com.google.protobuf.AbstractMessage.BuilderParent parent)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Locality build()  
      Locality buildPartial()  
      private void buildPartial0​(Locality result)  
      Locality.Builder clear()  
      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 getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.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.
      java.lang.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.
      java.lang.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.GeneratedMessage.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 setRegion​(java.lang.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 setSubZone​(java.lang.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 setZone​(java.lang.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.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, 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 class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 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
    • Field Detail

      • bitField0_

        private int bitField0_
      • region_

        private java.lang.Object region_
      • zone_

        private java.lang.Object zone_
      • subZone_

        private java.lang.Object subZone_
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

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

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

        private void buildPartial0​(Locality result)
      • 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.GeneratedMessage.Builder<Locality.Builder>
      • mergeFrom

        public Locality.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws java.io.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:
        java.io.IOException
      • getRegion

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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.