Class HostRule (1.46.0)

public final class HostRule extends GeneratedMessageV3 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

Implements

HostRuleOrBuilder

Static Fields

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

HOSTS_FIELD_NUMBER

public static final int HOSTS_FIELD_NUMBER
Field Value
TypeDescription
int

PATH_MATCHER_FIELD_NUMBER

public static final int PATH_MATCHER_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static HostRule getDefaultInstance()
Returns
TypeDescription
HostRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static HostRule.Builder newBuilder()
Returns
TypeDescription
HostRule.Builder

newBuilder(HostRule prototype)

public static HostRule.Builder newBuilder(HostRule prototype)
Parameter
NameDescription
prototypeHostRule
Returns
TypeDescription
HostRule.Builder

parseDelimitedFrom(InputStream input)

public static HostRule parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HostRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static HostRule parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HostRule parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HostRule parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static HostRule parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static HostRule parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HostRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<HostRule> parser()
Returns
TypeDescription
Parser<HostRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public HostRule getDefaultInstanceForType()
Returns
TypeDescription
HostRule

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getHosts(int index)

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;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The hosts at the given index.

getHostsBytes(int index)

public 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;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the hosts at the given index.

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;

Returns
TypeDescription
int

The count of hosts.

getHostsList()

public 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;

Returns
TypeDescription
ProtocolStringList

A list containing the hosts.

getParserForType()

public Parser<HostRule> getParserForType()
Returns
TypeDescription
Parser<HostRule>
Overrides

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;

Returns
TypeDescription
String

The pathMatcher.

getPathMatcherBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for pathMatcher.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

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;

Returns
TypeDescription
boolean

Whether the pathMatcher field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public HostRule.Builder newBuilderForType()
Returns
TypeDescription
HostRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HostRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
HostRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public HostRule.Builder toBuilder()
Returns
TypeDescription
HostRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException