public final class RoutingParameter extends GeneratedMessageV3 implements RoutingParameterOrBuilder
A projection from an input message to the GRPC or REST header.
Protobuf type google.api.RoutingParameter
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > RoutingParameterImplements
RoutingParameterOrBuilderStatic Fields
FIELD_FIELD_NUMBER
public static final int FIELD_FIELD_NUMBER
Type | Description |
int |
PATH_TEMPLATE_FIELD_NUMBER
public static final int PATH_TEMPLATE_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static RoutingParameter getDefaultInstance()
Type | Description |
RoutingParameter |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static RoutingParameter.Builder newBuilder()
Type | Description |
RoutingParameter.Builder |
newBuilder(RoutingParameter prototype)
public static RoutingParameter.Builder newBuilder(RoutingParameter prototype)
Name | Description |
prototype | RoutingParameter |
Type | Description |
RoutingParameter.Builder |
parseDelimitedFrom(InputStream input)
public static RoutingParameter parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
RoutingParameter |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static RoutingParameter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
RoutingParameter |
Type | Description |
IOException |
parseFrom(byte[] data)
public static RoutingParameter parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
RoutingParameter |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static RoutingParameter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
RoutingParameter |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static RoutingParameter parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
RoutingParameter |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static RoutingParameter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
RoutingParameter |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static RoutingParameter parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
RoutingParameter |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static RoutingParameter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
RoutingParameter |
Type | Description |
IOException |
parseFrom(InputStream input)
public static RoutingParameter parseFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
RoutingParameter |
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static RoutingParameter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
RoutingParameter |
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static RoutingParameter parseFrom(ByteBuffer data)
Name | Description |
data | ByteBuffer |
Type | Description |
RoutingParameter |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static RoutingParameter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
RoutingParameter |
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<RoutingParameter> parser()
Type | Description |
Parser<RoutingParameter> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getDefaultInstanceForType()
public RoutingParameter getDefaultInstanceForType()
Type | Description |
RoutingParameter |
getField()
public String getField()
A request field to extract the header key-value pair from.
string field = 1;
Type | Description |
String | The field. |
getFieldBytes()
public ByteString getFieldBytes()
A request field to extract the header key-value pair from.
string field = 1;
Type | Description |
ByteString | The bytes for field. |
getParserForType()
public Parser<RoutingParameter> getParserForType()
Type | Description |
Parser<RoutingParameter> |
getPathTemplate()
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 matchinginstances/*
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 thepath_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;
Type | Description |
String | The pathTemplate. |
getPathTemplateBytes()
public 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 matchinginstances/*
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 thepath_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;
Type | Description |
ByteString | The bytes for pathTemplate. |
getSerializedSize()
public int getSerializedSize()
Type | Description |
int |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Type | Description |
UnknownFieldSet |
hashCode()
public int hashCode()
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
newBuilderForType()
public RoutingParameter.Builder newBuilderForType()
Type | Description |
RoutingParameter.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected RoutingParameter.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Name | Description |
parent | BuilderParent |
Type | Description |
RoutingParameter.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Name | Description |
unused | UnusedPrivateParameter |
Type | Description |
Object |
toBuilder()
public RoutingParameter.Builder toBuilder()
Type | Description |
RoutingParameter.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Name | Description |
output | CodedOutputStream |
Type | Description |
IOException |