Class HostRule.Builder

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

    public static final class HostRule.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<HostRule.Builder>
    implements HostRuleOrBuilder
     UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.
     
    Protobuf type google.cloud.compute.v1.HostRule
    • 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<HostRule.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public HostRule.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<HostRule.Builder>
        Throws:
        IOException
      • hasDescription

        public boolean hasDescription()
         An optional description of this resource. Provide this property when you create the resource.
         
        optional string description = 422937596;
        Specified by:
        hasDescription in interface HostRuleOrBuilder
        Returns:
        Whether the description field is set.
      • getDescription

        public String getDescription()
         An optional description of this resource. Provide this property when you create the resource.
         
        optional string description = 422937596;
        Specified by:
        getDescription in interface HostRuleOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         An optional description of this resource. Provide this property when you create the resource.
         
        optional string description = 422937596;
        Specified by:
        getDescriptionBytes in interface HostRuleOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public HostRule.Builder setDescription​(String value)
         An optional description of this resource. Provide this property when you create the resource.
         
        optional string description = 422937596;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public HostRule.Builder clearDescription()
         An optional description of this resource. Provide this property when you create the resource.
         
        optional string description = 422937596;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public HostRule.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         An optional description of this resource. Provide this property when you create the resource.
         
        optional string description = 422937596;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getHostsList

        public com.google.protobuf.ProtocolStringList getHostsList()
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Specified by:
        getHostsList in interface HostRuleOrBuilder
        Returns:
        A list containing the hosts.
      • getHostsCount

        public int getHostsCount()
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Specified by:
        getHostsCount in interface HostRuleOrBuilder
        Returns:
        The count of hosts.
      • getHosts

        public String getHosts​(int index)
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Specified by:
        getHosts in interface HostRuleOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The hosts at the given index.
      • getHostsBytes

        public com.google.protobuf.ByteString getHostsBytes​(int index)
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Specified by:
        getHostsBytes in interface HostRuleOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the hosts at the given index.
      • setHosts

        public HostRule.Builder setHosts​(int index,
                                         String value)
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Parameters:
        index - The index to set the value at.
        value - The hosts to set.
        Returns:
        This builder for chaining.
      • addHosts

        public HostRule.Builder addHosts​(String value)
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Parameters:
        value - The hosts to add.
        Returns:
        This builder for chaining.
      • addAllHosts

        public HostRule.Builder addAllHosts​(Iterable<String> values)
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Parameters:
        values - The hosts to add.
        Returns:
        This builder for chaining.
      • clearHosts

        public HostRule.Builder clearHosts()
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Returns:
        This builder for chaining.
      • addHostsBytes

        public HostRule.Builder addHostsBytes​(com.google.protobuf.ByteString value)
         The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
         
        repeated string hosts = 99467211;
        Parameters:
        value - The bytes of the hosts to add.
        Returns:
        This builder for chaining.
      • hasPathMatcher

        public boolean hasPathMatcher()
         The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
         
        optional string path_matcher = 337813272;
        Specified by:
        hasPathMatcher in interface HostRuleOrBuilder
        Returns:
        Whether the pathMatcher field is set.
      • getPathMatcher

        public String getPathMatcher()
         The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
         
        optional string path_matcher = 337813272;
        Specified by:
        getPathMatcher in interface HostRuleOrBuilder
        Returns:
        The pathMatcher.
      • getPathMatcherBytes

        public com.google.protobuf.ByteString getPathMatcherBytes()
         The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
         
        optional string path_matcher = 337813272;
        Specified by:
        getPathMatcherBytes in interface HostRuleOrBuilder
        Returns:
        The bytes for pathMatcher.
      • setPathMatcher

        public HostRule.Builder setPathMatcher​(String value)
         The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
         
        optional string path_matcher = 337813272;
        Parameters:
        value - The pathMatcher to set.
        Returns:
        This builder for chaining.
      • clearPathMatcher

        public HostRule.Builder clearPathMatcher()
         The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
         
        optional string path_matcher = 337813272;
        Returns:
        This builder for chaining.
      • setPathMatcherBytes

        public HostRule.Builder setPathMatcherBytes​(com.google.protobuf.ByteString value)
         The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
         
        optional string path_matcher = 337813272;
        Parameters:
        value - The bytes for pathMatcher to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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