Class 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 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<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

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

        public ServerNameMatcher.DomainMatcher.Builder addDomains​(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:
        value - The domains to add.
        Returns:
        This builder for chaining.
      • addAllDomains

        public ServerNameMatcher.DomainMatcher.Builder addAllDomains​(Iterable<String> values)
         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

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

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