Class HostRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HostRule.Builder>
com.google.cloud.compute.v1.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.GeneratedMessage.Builder<HostRule.Builder> implements HostRuleOrBuilder
 UrlMaps
 A host-matching rule for a URL. If matched, will use the namedPathMatcher to select the BackendService.
 
Protobuf type google.cloud.compute.v1.HostRule
  • Method Summary

    Modifier and Type
    Method
    Description
    The list of host patterns to match.
    The list of host patterns to match.
    addHostsBytes(com.google.protobuf.ByteString value)
    The list of host patterns to match.
     
     
     
    An optional description of this resource.
    The list of host patterns to match.
    The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
     
    An optional description of this resource.
    com.google.protobuf.ByteString
    An optional description of this resource.
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    getHosts(int index)
    The list of host patterns to match.
    com.google.protobuf.ByteString
    getHostsBytes(int index)
    The list of host patterns to match.
    int
    The list of host patterns to match.
    com.google.protobuf.ProtocolStringList
    The list of host patterns to match.
    The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
    com.google.protobuf.ByteString
    The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
    boolean
    An optional description of this resource.
    boolean
    The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    An optional description of this resource.
    setDescriptionBytes(com.google.protobuf.ByteString value)
    An optional description of this resource.
    setHosts(int index, String value)
    The list of host patterns to match.
    The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.
    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.

    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
  • Method Details

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

      public HostRule.Builder mergeFrom(HostRule other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.