Class HostRule (1.54.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
Type Description
int

HOSTS_FIELD_NUMBER

public static final int HOSTS_FIELD_NUMBER
Field Value
Type Description
int

PATH_MATCHER_FIELD_NUMBER

public static final int PATH_MATCHER_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static HostRule getDefaultInstance()
Returns
Type Description
HostRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static HostRule.Builder newBuilder()
Returns
Type Description
HostRule.Builder

newBuilder(HostRule prototype)

public static HostRule.Builder newBuilder(HostRule prototype)
Parameter
Name Description
prototype HostRule
Returns
Type Description
HostRule.Builder

parseDelimitedFrom(InputStream input)

public static HostRule parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HostRule
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HostRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HostRule
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static HostRule parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
HostRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HostRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HostRule parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
HostRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HostRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HostRule parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
HostRule
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HostRule
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static HostRule parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HostRule
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HostRule
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static HostRule parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
HostRule
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HostRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HostRule
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<HostRule> parser()
Returns
Type Description
Parser<HostRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public HostRule getDefaultInstanceForType()
Returns
Type Description
HostRule

getDescription()

public String getDescription()

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

optional string description = 422937596;

Returns
Type Description
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
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
ProtocolStringList

A list containing the hosts.

getParserForType()

public Parser<HostRule> getParserForType()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for pathMatcher.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the pathMatcher field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public HostRule.Builder newBuilderForType()
Returns
Type Description
HostRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HostRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
HostRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public HostRule.Builder toBuilder()
Returns
Type Description
HostRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException