public final class RoutingParameter extends com.google.protobuf.GeneratedMessageV3 implements RoutingParameterOrBuilder
A projection from an input message to the GRPC or REST header.Protobuf type
google.api.RoutingParameter| Modifier and Type | Class and Description |
|---|---|
static class |
RoutingParameter.Builder
A projection from an input message to the GRPC or REST header.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
FIELD_FIELD_NUMBER |
static int |
PATH_TEMPLATE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RoutingParameter |
getDefaultInstance() |
RoutingParameter |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
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.
|
com.google.protobuf.Parser<RoutingParameter> |
getParserForType() |
String |
getPathTemplate()
A pattern matching the key-value field.
|
com.google.protobuf.ByteString |
getPathTemplateBytes()
A pattern matching the key-value field.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RoutingParameter.Builder |
newBuilder() |
static RoutingParameter.Builder |
newBuilder(RoutingParameter prototype) |
RoutingParameter.Builder |
newBuilderForType() |
protected RoutingParameter.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RoutingParameter |
parseDelimitedFrom(InputStream input) |
static RoutingParameter |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RoutingParameter |
parseFrom(byte[] data) |
static RoutingParameter |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RoutingParameter |
parseFrom(ByteBuffer data) |
static RoutingParameter |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RoutingParameter |
parseFrom(com.google.protobuf.ByteString data) |
static RoutingParameter |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RoutingParameter |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RoutingParameter |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RoutingParameter |
parseFrom(InputStream input) |
static RoutingParameter |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RoutingParameter> |
parser() |
RoutingParameter.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int FIELD_FIELD_NUMBER
public static final int PATH_TEMPLATE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RoutingParameter parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RoutingParameter parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RoutingParameter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RoutingParameter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RoutingParameter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RoutingParameter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RoutingParameter parseFrom(InputStream input) throws IOException
IOExceptionpublic static RoutingParameter parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RoutingParameter parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RoutingParameter parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RoutingParameter parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RoutingParameter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RoutingParameter.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RoutingParameter.Builder newBuilder()
public static RoutingParameter.Builder newBuilder(RoutingParameter prototype)
public RoutingParameter.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RoutingParameter.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RoutingParameter getDefaultInstance()
public static com.google.protobuf.Parser<RoutingParameter> parser()
public com.google.protobuf.Parser<RoutingParameter> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RoutingParameter getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2021 Google LLC. All rights reserved.