Class ServerNameMatcher.DomainMatcher.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<ServerNameMatcher.DomainMatcher.Builder>
com.github.xds.type.matcher.v3.ServerNameMatcher.DomainMatcher.Builder
All Implemented Interfaces:
ServerNameMatcher.DomainMatcherOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ServerNameMatcher.DomainMatcher

public static final class ServerNameMatcher.DomainMatcher.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ServerNameMatcher.DomainMatcher.Builder> implements ServerNameMatcher.DomainMatcherOrBuilder
 Specifies a set of exact and wildcard domains and a match action. The
 wildcard symbol ``*`` must appear at most once as the left-most part of
 the domain on a dot border. The wildcard matches one or more non-empty
 domain parts.
 
Protobuf type xds.type.matcher.v3.ServerNameMatcher.DomainMatcher
  • 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<ServerNameMatcher.DomainMatcher.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<ServerNameMatcher.DomainMatcher.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<ServerNameMatcher.DomainMatcher.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ServerNameMatcher.DomainMatcher buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<ServerNameMatcher.DomainMatcher.Builder>
    • setField

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

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

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

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

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

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

    • isInitialized

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

      public ServerNameMatcher.DomainMatcher.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<ServerNameMatcher.DomainMatcher.Builder>
      Throws:
      IOException
    • getDomainsList

      public com.google.protobuf.ProtocolStringList getDomainsList()
       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Specified by:
      getDomainsList in interface ServerNameMatcher.DomainMatcherOrBuilder
      Returns:
      A list containing the domains.
    • getDomainsCount

      public int getDomainsCount()
       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Specified by:
      getDomainsCount in interface ServerNameMatcher.DomainMatcherOrBuilder
      Returns:
      The count of domains.
    • getDomains

      public String getDomains(int index)
       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Specified by:
      getDomains in interface ServerNameMatcher.DomainMatcherOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The domains at the given index.
    • getDomainsBytes

      public com.google.protobuf.ByteString getDomainsBytes(int index)
       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Specified by:
      getDomainsBytes in interface ServerNameMatcher.DomainMatcherOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the domains at the given index.
    • setDomains

      public ServerNameMatcher.DomainMatcher.Builder setDomains(int index, String value)
       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Parameters:
      index - The index to set the value at.
      value - The domains to set.
      Returns:
      This builder for chaining.
    • addDomains

       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The domains to add.
      Returns:
      This builder for chaining.
    • addAllDomains

       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Parameters:
      values - The domains to add.
      Returns:
      This builder for chaining.
    • clearDomains

       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • addDomainsBytes

      public ServerNameMatcher.DomainMatcher.Builder addDomainsBytes(com.google.protobuf.ByteString value)
       A non-empty set of domain names with optional wildcards, e.g.
       ``www.example.com``, ``*.com``, or ``*``.
       
      repeated string domains = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes of the domains to add.
      Returns:
      This builder for chaining.
    • hasOnMatch

      public boolean hasOnMatch()
       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
      Specified by:
      hasOnMatch in interface ServerNameMatcher.DomainMatcherOrBuilder
      Returns:
      Whether the onMatch field is set.
    • getOnMatch

      public Matcher.OnMatch getOnMatch()
       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
      Specified by:
      getOnMatch in interface ServerNameMatcher.DomainMatcherOrBuilder
      Returns:
      The onMatch.
    • setOnMatch

       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • setOnMatch

       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • mergeOnMatch

       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • clearOnMatch

       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • getOnMatchBuilder

      public Matcher.OnMatch.Builder getOnMatchBuilder()
       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
    • getOnMatchOrBuilder

      public Matcher.OnMatchOrBuilder getOnMatchOrBuilder()
       Match action to apply when the server name matches any of the domain
       names in the matcher.
       
      .xds.type.matcher.v3.Matcher.OnMatch on_match = 2;
      Specified by:
      getOnMatchOrBuilder in interface ServerNameMatcher.DomainMatcherOrBuilder
    • setUnknownFields

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

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