Class GrpcRoute.RouteMatch.Builder (0.3.0)

public static final class GrpcRoute.RouteMatch.Builder extends GeneratedMessageV3.Builder<GrpcRoute.RouteMatch.Builder> implements GrpcRoute.RouteMatchOrBuilder

Criteria for matching traffic. A RouteMatch will be considered to match when all supplied fields match.

Protobuf type google.cloud.networkservices.v1.GrpcRoute.RouteMatch

Static Methods

getDescriptor()

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

Methods

addAllHeaders(Iterable<? extends GrpcRoute.HeaderMatch> values)

public GrpcRoute.RouteMatch.Builder addAllHeaders(Iterable<? extends GrpcRoute.HeaderMatch> values)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.networkservices.v1.GrpcRoute.HeaderMatch>
Returns
Type Description
GrpcRoute.RouteMatch.Builder

addHeaders(GrpcRoute.HeaderMatch value)

public GrpcRoute.RouteMatch.Builder addHeaders(GrpcRoute.HeaderMatch value)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GrpcRoute.HeaderMatch
Returns
Type Description
GrpcRoute.RouteMatch.Builder

addHeaders(GrpcRoute.HeaderMatch.Builder builderForValue)

public GrpcRoute.RouteMatch.Builder addHeaders(GrpcRoute.HeaderMatch.Builder builderForValue)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue GrpcRoute.HeaderMatch.Builder
Returns
Type Description
GrpcRoute.RouteMatch.Builder

addHeaders(int index, GrpcRoute.HeaderMatch value)

public GrpcRoute.RouteMatch.Builder addHeaders(int index, GrpcRoute.HeaderMatch value)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value GrpcRoute.HeaderMatch
Returns
Type Description
GrpcRoute.RouteMatch.Builder

addHeaders(int index, GrpcRoute.HeaderMatch.Builder builderForValue)

public GrpcRoute.RouteMatch.Builder addHeaders(int index, GrpcRoute.HeaderMatch.Builder builderForValue)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue GrpcRoute.HeaderMatch.Builder
Returns
Type Description
GrpcRoute.RouteMatch.Builder

addHeadersBuilder()

public GrpcRoute.HeaderMatch.Builder addHeadersBuilder()

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GrpcRoute.HeaderMatch.Builder

addHeadersBuilder(int index)

public GrpcRoute.HeaderMatch.Builder addHeadersBuilder(int index)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GrpcRoute.HeaderMatch.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GrpcRoute.RouteMatch.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

build()

public GrpcRoute.RouteMatch build()
Returns
Type Description
GrpcRoute.RouteMatch

buildPartial()

public GrpcRoute.RouteMatch buildPartial()
Returns
Type Description
GrpcRoute.RouteMatch

clear()

public GrpcRoute.RouteMatch.Builder clear()
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public GrpcRoute.RouteMatch.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

clearHeaders()

public GrpcRoute.RouteMatch.Builder clearHeaders()

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GrpcRoute.RouteMatch.Builder

clearMethod()

public GrpcRoute.RouteMatch.Builder clearMethod()

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GrpcRoute.RouteMatch.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public GrpcRoute.RouteMatch.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

clone()

public GrpcRoute.RouteMatch.Builder clone()
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

getDefaultInstanceForType()

public GrpcRoute.RouteMatch getDefaultInstanceForType()
Returns
Type Description
GrpcRoute.RouteMatch

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHeaders(int index)

public GrpcRoute.HeaderMatch getHeaders(int index)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GrpcRoute.HeaderMatch

getHeadersBuilder(int index)

public GrpcRoute.HeaderMatch.Builder getHeadersBuilder(int index)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GrpcRoute.HeaderMatch.Builder

getHeadersBuilderList()

public List<GrpcRoute.HeaderMatch.Builder> getHeadersBuilderList()

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getHeadersCount()

public int getHeadersCount()

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getHeadersList()

public List<GrpcRoute.HeaderMatch> getHeadersList()

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<HeaderMatch>

getHeadersOrBuilder(int index)

public GrpcRoute.HeaderMatchOrBuilder getHeadersOrBuilder(int index)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GrpcRoute.HeaderMatchOrBuilder

getHeadersOrBuilderList()

public List<? extends GrpcRoute.HeaderMatchOrBuilder> getHeadersOrBuilderList()

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.networkservices.v1.GrpcRoute.HeaderMatchOrBuilder>

getMethod()

public GrpcRoute.MethodMatch getMethod()

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GrpcRoute.MethodMatch

The method.

getMethodBuilder()

public GrpcRoute.MethodMatch.Builder getMethodBuilder()

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GrpcRoute.MethodMatch.Builder

getMethodOrBuilder()

public GrpcRoute.MethodMatchOrBuilder getMethodOrBuilder()

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GrpcRoute.MethodMatchOrBuilder

hasMethod()

public boolean hasMethod()

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the method field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GrpcRoute.RouteMatch other)

public GrpcRoute.RouteMatch.Builder mergeFrom(GrpcRoute.RouteMatch other)
Parameter
Name Description
other GrpcRoute.RouteMatch
Returns
Type Description
GrpcRoute.RouteMatch.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GrpcRoute.RouteMatch.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GrpcRoute.RouteMatch.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

mergeMethod(GrpcRoute.MethodMatch value)

public GrpcRoute.RouteMatch.Builder mergeMethod(GrpcRoute.MethodMatch value)

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GrpcRoute.MethodMatch
Returns
Type Description
GrpcRoute.RouteMatch.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GrpcRoute.RouteMatch.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

removeHeaders(int index)

public GrpcRoute.RouteMatch.Builder removeHeaders(int index)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
GrpcRoute.RouteMatch.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public GrpcRoute.RouteMatch.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

setHeaders(int index, GrpcRoute.HeaderMatch value)

public GrpcRoute.RouteMatch.Builder setHeaders(int index, GrpcRoute.HeaderMatch value)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value GrpcRoute.HeaderMatch
Returns
Type Description
GrpcRoute.RouteMatch.Builder

setHeaders(int index, GrpcRoute.HeaderMatch.Builder builderForValue)

public GrpcRoute.RouteMatch.Builder setHeaders(int index, GrpcRoute.HeaderMatch.Builder builderForValue)

Optional. Specifies a collection of headers to match.

repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue GrpcRoute.HeaderMatch.Builder
Returns
Type Description
GrpcRoute.RouteMatch.Builder

setMethod(GrpcRoute.MethodMatch value)

public GrpcRoute.RouteMatch.Builder setMethod(GrpcRoute.MethodMatch value)

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GrpcRoute.MethodMatch
Returns
Type Description
GrpcRoute.RouteMatch.Builder

setMethod(GrpcRoute.MethodMatch.Builder builderForValue)

public GrpcRoute.RouteMatch.Builder setMethod(GrpcRoute.MethodMatch.Builder builderForValue)

Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods.

optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue GrpcRoute.MethodMatch.Builder
Returns
Type Description
GrpcRoute.RouteMatch.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public GrpcRoute.RouteMatch.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final GrpcRoute.RouteMatch.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GrpcRoute.RouteMatch.Builder
Overrides