Class Subset.LbSubsetSelector.Builder

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

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

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

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

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

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

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

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

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

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

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

        public Subset.LbSubsetSelector.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<Subset.LbSubsetSelector.Builder>
        Throws:
        IOException
      • getKeysList

        public com.google.protobuf.ProtocolStringList getKeysList()
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Specified by:
        getKeysList in interface Subset.LbSubsetSelectorOrBuilder
        Returns:
        A list containing the keys.
      • getKeysCount

        public int getKeysCount()
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Specified by:
        getKeysCount in interface Subset.LbSubsetSelectorOrBuilder
        Returns:
        The count of keys.
      • getKeys

        public String getKeys​(int index)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Specified by:
        getKeys in interface Subset.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The keys at the given index.
      • getKeysBytes

        public com.google.protobuf.ByteString getKeysBytes​(int index)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Specified by:
        getKeysBytes in interface Subset.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the keys at the given index.
      • setKeys

        public Subset.LbSubsetSelector.Builder setKeys​(int index,
                                                       String value)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Parameters:
        index - The index to set the value at.
        value - The keys to set.
        Returns:
        This builder for chaining.
      • addKeys

        public Subset.LbSubsetSelector.Builder addKeys​(String value)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Parameters:
        value - The keys to add.
        Returns:
        This builder for chaining.
      • addAllKeys

        public Subset.LbSubsetSelector.Builder addAllKeys​(Iterable<String> values)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Parameters:
        values - The keys to add.
        Returns:
        This builder for chaining.
      • clearKeys

        public Subset.LbSubsetSelector.Builder clearKeys()
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Returns:
        This builder for chaining.
      • addKeysBytes

        public Subset.LbSubsetSelector.Builder addKeysBytes​(com.google.protobuf.ByteString value)
         List of keys to match with the weighted cluster metadata.
         
        repeated string keys = 1;
        Parameters:
        value - The bytes of the keys to add.
        Returns:
        This builder for chaining.
      • getSingleHostPerSubset

        public boolean getSingleHostPerSubset()
         Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
         choosing a host, but updating hosts is faster, especially for large numbers of hosts.
         If a match is found to a host, that host will be used regardless of priority levels.
         When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys``
         will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
         :ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
         present in the current configuration.
         
        bool single_host_per_subset = 4;
        Specified by:
        getSingleHostPerSubset in interface Subset.LbSubsetSelectorOrBuilder
        Returns:
        The singleHostPerSubset.
      • setSingleHostPerSubset

        public Subset.LbSubsetSelector.Builder setSingleHostPerSubset​(boolean value)
         Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
         choosing a host, but updating hosts is faster, especially for large numbers of hosts.
         If a match is found to a host, that host will be used regardless of priority levels.
         When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys``
         will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
         :ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
         present in the current configuration.
         
        bool single_host_per_subset = 4;
        Parameters:
        value - The singleHostPerSubset to set.
        Returns:
        This builder for chaining.
      • clearSingleHostPerSubset

        public Subset.LbSubsetSelector.Builder clearSingleHostPerSubset()
         Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
         choosing a host, but updating hosts is faster, especially for large numbers of hosts.
         If a match is found to a host, that host will be used regardless of priority levels.
         When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys``
         will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
         :ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
         present in the current configuration.
         
        bool single_host_per_subset = 4;
        Returns:
        This builder for chaining.
      • getFallbackPolicyValue

        public int getFallbackPolicyValue()
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Specified by:
        getFallbackPolicyValue in interface Subset.LbSubsetSelectorOrBuilder
        Returns:
        The enum numeric value on the wire for fallbackPolicy.
      • setFallbackPolicyValue

        public Subset.LbSubsetSelector.Builder setFallbackPolicyValue​(int value)
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The enum numeric value on the wire for fallbackPolicy to set.
        Returns:
        This builder for chaining.
      • setFallbackPolicy

        public Subset.LbSubsetSelector.Builder setFallbackPolicy​(Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy value)
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Parameters:
        value - The fallbackPolicy to set.
        Returns:
        This builder for chaining.
      • clearFallbackPolicy

        public Subset.LbSubsetSelector.Builder clearFallbackPolicy()
         The behavior used when no endpoint subset matches the selected route's
         metadata.
         
        .envoy.extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy fallback_policy = 2 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • getFallbackKeysSubsetList

        public com.google.protobuf.ProtocolStringList getFallbackKeysSubsetList()
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubsetList in interface Subset.LbSubsetSelectorOrBuilder
        Returns:
        A list containing the fallbackKeysSubset.
      • getFallbackKeysSubsetCount

        public int getFallbackKeysSubsetCount()
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubsetCount in interface Subset.LbSubsetSelectorOrBuilder
        Returns:
        The count of fallbackKeysSubset.
      • getFallbackKeysSubset

        public String getFallbackKeysSubset​(int index)
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubset in interface Subset.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The fallbackKeysSubset at the given index.
      • getFallbackKeysSubsetBytes

        public com.google.protobuf.ByteString getFallbackKeysSubsetBytes​(int index)
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Specified by:
        getFallbackKeysSubsetBytes in interface Subset.LbSubsetSelectorOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the fallbackKeysSubset at the given index.
      • setFallbackKeysSubset

        public Subset.LbSubsetSelector.Builder setFallbackKeysSubset​(int index,
                                                                     String value)
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        index - The index to set the value at.
        value - The fallbackKeysSubset to set.
        Returns:
        This builder for chaining.
      • addFallbackKeysSubset

        public Subset.LbSubsetSelector.Builder addFallbackKeysSubset​(String value)
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        value - The fallbackKeysSubset to add.
        Returns:
        This builder for chaining.
      • addAllFallbackKeysSubset

        public Subset.LbSubsetSelector.Builder addAllFallbackKeysSubset​(Iterable<String> values)
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        values - The fallbackKeysSubset to add.
        Returns:
        This builder for chaining.
      • clearFallbackKeysSubset

        public Subset.LbSubsetSelector.Builder clearFallbackKeysSubset()
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Returns:
        This builder for chaining.
      • addFallbackKeysSubsetBytes

        public Subset.LbSubsetSelector.Builder addFallbackKeysSubsetBytes​(com.google.protobuf.ByteString value)
         Subset of
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` used by
         :ref:`KEYS_SUBSET<envoy_v3_api_enum_value_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
         fallback policy.
         It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
         For any other fallback policy the parameter is not used and should not be set.
         Only values also present in
         :ref:`keys<envoy_v3_api_field_extensions.load_balancing_policies.subset.v3.Subset.LbSubsetSelector.keys>` are allowed, but
         ``fallback_keys_subset`` cannot be equal to ``keys``.
         
        repeated string fallback_keys_subset = 3;
        Parameters:
        value - The bytes of the fallbackKeysSubset to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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