public static final class RoutingParameter.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder> implements RoutingParameterOrBuilder
A projection from an input message to the GRPC or REST header.Protobuf type
google.api.RoutingParameter| Modifier and Type | Method and Description |
|---|---|
RoutingParameter.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RoutingParameter |
build() |
RoutingParameter |
buildPartial() |
RoutingParameter.Builder |
clear() |
RoutingParameter.Builder |
clearField()
A request field to extract the header key-value pair from.
|
RoutingParameter.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
RoutingParameter.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
RoutingParameter.Builder |
clearPathTemplate()
A pattern matching the key-value field.
|
RoutingParameter.Builder |
clone() |
RoutingParameter |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getField()
A request field to extract the header key-value pair from.
|
com.google.protobuf.ByteString |
getFieldBytes()
A request field to extract the header key-value pair from.
|
String |
getPathTemplate()
A pattern matching the key-value field.
|
com.google.protobuf.ByteString |
getPathTemplateBytes()
A pattern matching the key-value field.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
RoutingParameter.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
RoutingParameter.Builder |
mergeFrom(com.google.protobuf.Message other) |
RoutingParameter.Builder |
mergeFrom(RoutingParameter other) |
RoutingParameter.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
RoutingParameter.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RoutingParameter.Builder |
setField(String value)
A request field to extract the header key-value pair from.
|
RoutingParameter.Builder |
setFieldBytes(com.google.protobuf.ByteString value)
A request field to extract the header key-value pair from.
|
RoutingParameter.Builder |
setPathTemplate(String value)
A pattern matching the key-value field.
|
RoutingParameter.Builder |
setPathTemplateBytes(com.google.protobuf.ByteString value)
A pattern matching the key-value field.
|
RoutingParameter.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
RoutingParameter.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic RoutingParameter build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic RoutingParameter buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic RoutingParameter.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RoutingParameter.Builder>public RoutingParameter.Builder mergeFrom(RoutingParameter other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public RoutingParameter.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RoutingParameter.Builder>IOExceptionpublic String getField()
A request field to extract the header key-value pair from.
string field = 1;getField in interface RoutingParameterOrBuilderpublic com.google.protobuf.ByteString getFieldBytes()
A request field to extract the header key-value pair from.
string field = 1;getFieldBytes in interface RoutingParameterOrBuilderpublic RoutingParameter.Builder setField(String value)
A request field to extract the header key-value pair from.
string field = 1;value - The field to set.public RoutingParameter.Builder clearField()
A request field to extract the header key-value pair from.
string field = 1;public RoutingParameter.Builder setFieldBytes(com.google.protobuf.ByteString value)
A request field to extract the header key-value pair from.
string field = 1;value - The bytes for field to set.public String getPathTemplate()
A pattern matching the key-value field. Optional.
If not specified, the whole field specified in the `field` field will be
taken as value, and its name used as key. If specified, it MUST contain
exactly one named segment (along with any number of unnamed segments) The
pattern will be matched over the field specified in the `field` field, then
if the match is successful:
- the name of the single named segment will be used as a header name,
- the match value of the segment will be used as a header value;
if the match is NOT successful, nothing will be sent.
Example:
-- This is a field in the request message
| that the header value will be extracted from.
|
| -- This is the key name in the
| | routing header.
V |
field: "table_name" v
path_template: "projects/*/{table_location=instances/*}/tables/*"
^ ^
| |
In the {} brackets is the pattern that -- |
specifies what to extract from the |
field as a value to be sent. |
|
The string in the field must match the whole pattern --
before brackets, inside brackets, after brackets.
When looking at this specific example, we can see that:
- A key-value pair with the key `table_location`
and the value matching `instances/*` should be added
to the x-goog-request-params routing header.
- The value is extracted from the request message's `table_name` field
if it matches the full pattern specified:
`projects/*/instances/*/tables/*`.
**NB:** If the `path_template` field is not provided, the key name is
equal to the field name, and the whole field should be sent as a value.
This makes the pattern for the field and the value functionally equivalent
to `**`, and the configuration
{
field: "table_name"
}
is a functionally equivalent shorthand to:
{
field: "table_name"
path_template: "{table_name=**}"
}
See Example 1 for more details.
string path_template = 2;getPathTemplate in interface RoutingParameterOrBuilderpublic com.google.protobuf.ByteString getPathTemplateBytes()
A pattern matching the key-value field. Optional.
If not specified, the whole field specified in the `field` field will be
taken as value, and its name used as key. If specified, it MUST contain
exactly one named segment (along with any number of unnamed segments) The
pattern will be matched over the field specified in the `field` field, then
if the match is successful:
- the name of the single named segment will be used as a header name,
- the match value of the segment will be used as a header value;
if the match is NOT successful, nothing will be sent.
Example:
-- This is a field in the request message
| that the header value will be extracted from.
|
| -- This is the key name in the
| | routing header.
V |
field: "table_name" v
path_template: "projects/*/{table_location=instances/*}/tables/*"
^ ^
| |
In the {} brackets is the pattern that -- |
specifies what to extract from the |
field as a value to be sent. |
|
The string in the field must match the whole pattern --
before brackets, inside brackets, after brackets.
When looking at this specific example, we can see that:
- A key-value pair with the key `table_location`
and the value matching `instances/*` should be added
to the x-goog-request-params routing header.
- The value is extracted from the request message's `table_name` field
if it matches the full pattern specified:
`projects/*/instances/*/tables/*`.
**NB:** If the `path_template` field is not provided, the key name is
equal to the field name, and the whole field should be sent as a value.
This makes the pattern for the field and the value functionally equivalent
to `**`, and the configuration
{
field: "table_name"
}
is a functionally equivalent shorthand to:
{
field: "table_name"
path_template: "{table_name=**}"
}
See Example 1 for more details.
string path_template = 2;getPathTemplateBytes in interface RoutingParameterOrBuilderpublic RoutingParameter.Builder setPathTemplate(String value)
A pattern matching the key-value field. Optional.
If not specified, the whole field specified in the `field` field will be
taken as value, and its name used as key. If specified, it MUST contain
exactly one named segment (along with any number of unnamed segments) The
pattern will be matched over the field specified in the `field` field, then
if the match is successful:
- the name of the single named segment will be used as a header name,
- the match value of the segment will be used as a header value;
if the match is NOT successful, nothing will be sent.
Example:
-- This is a field in the request message
| that the header value will be extracted from.
|
| -- This is the key name in the
| | routing header.
V |
field: "table_name" v
path_template: "projects/*/{table_location=instances/*}/tables/*"
^ ^
| |
In the {} brackets is the pattern that -- |
specifies what to extract from the |
field as a value to be sent. |
|
The string in the field must match the whole pattern --
before brackets, inside brackets, after brackets.
When looking at this specific example, we can see that:
- A key-value pair with the key `table_location`
and the value matching `instances/*` should be added
to the x-goog-request-params routing header.
- The value is extracted from the request message's `table_name` field
if it matches the full pattern specified:
`projects/*/instances/*/tables/*`.
**NB:** If the `path_template` field is not provided, the key name is
equal to the field name, and the whole field should be sent as a value.
This makes the pattern for the field and the value functionally equivalent
to `**`, and the configuration
{
field: "table_name"
}
is a functionally equivalent shorthand to:
{
field: "table_name"
path_template: "{table_name=**}"
}
See Example 1 for more details.
string path_template = 2;value - The pathTemplate to set.public RoutingParameter.Builder clearPathTemplate()
A pattern matching the key-value field. Optional.
If not specified, the whole field specified in the `field` field will be
taken as value, and its name used as key. If specified, it MUST contain
exactly one named segment (along with any number of unnamed segments) The
pattern will be matched over the field specified in the `field` field, then
if the match is successful:
- the name of the single named segment will be used as a header name,
- the match value of the segment will be used as a header value;
if the match is NOT successful, nothing will be sent.
Example:
-- This is a field in the request message
| that the header value will be extracted from.
|
| -- This is the key name in the
| | routing header.
V |
field: "table_name" v
path_template: "projects/*/{table_location=instances/*}/tables/*"
^ ^
| |
In the {} brackets is the pattern that -- |
specifies what to extract from the |
field as a value to be sent. |
|
The string in the field must match the whole pattern --
before brackets, inside brackets, after brackets.
When looking at this specific example, we can see that:
- A key-value pair with the key `table_location`
and the value matching `instances/*` should be added
to the x-goog-request-params routing header.
- The value is extracted from the request message's `table_name` field
if it matches the full pattern specified:
`projects/*/instances/*/tables/*`.
**NB:** If the `path_template` field is not provided, the key name is
equal to the field name, and the whole field should be sent as a value.
This makes the pattern for the field and the value functionally equivalent
to `**`, and the configuration
{
field: "table_name"
}
is a functionally equivalent shorthand to:
{
field: "table_name"
path_template: "{table_name=**}"
}
See Example 1 for more details.
string path_template = 2;public RoutingParameter.Builder setPathTemplateBytes(com.google.protobuf.ByteString value)
A pattern matching the key-value field. Optional.
If not specified, the whole field specified in the `field` field will be
taken as value, and its name used as key. If specified, it MUST contain
exactly one named segment (along with any number of unnamed segments) The
pattern will be matched over the field specified in the `field` field, then
if the match is successful:
- the name of the single named segment will be used as a header name,
- the match value of the segment will be used as a header value;
if the match is NOT successful, nothing will be sent.
Example:
-- This is a field in the request message
| that the header value will be extracted from.
|
| -- This is the key name in the
| | routing header.
V |
field: "table_name" v
path_template: "projects/*/{table_location=instances/*}/tables/*"
^ ^
| |
In the {} brackets is the pattern that -- |
specifies what to extract from the |
field as a value to be sent. |
|
The string in the field must match the whole pattern --
before brackets, inside brackets, after brackets.
When looking at this specific example, we can see that:
- A key-value pair with the key `table_location`
and the value matching `instances/*` should be added
to the x-goog-request-params routing header.
- The value is extracted from the request message's `table_name` field
if it matches the full pattern specified:
`projects/*/instances/*/tables/*`.
**NB:** If the `path_template` field is not provided, the key name is
equal to the field name, and the whole field should be sent as a value.
This makes the pattern for the field and the value functionally equivalent
to `**`, and the configuration
{
field: "table_name"
}
is a functionally equivalent shorthand to:
{
field: "table_name"
path_template: "{table_name=**}"
}
See Example 1 for more details.
string path_template = 2;value - The bytes for pathTemplate to set.public final RoutingParameter.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>public final RoutingParameter.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>Copyright © 2021 Google LLC. All rights reserved.