Package com.google.api
Class RoutingParameter.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
com.google.api.RoutingParameter.Builder
- All Implemented Interfaces:
RoutingParameterOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- RoutingParameter
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
-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
A request field to extract the header key-value pair from.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) A pattern matching the key-value field.clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getField()
A request field to extract the header key-value pair from.com.google.protobuf.ByteString
A request field to extract the header key-value pair from.A pattern matching the key-value field.com.google.protobuf.ByteString
A pattern matching the key-value field.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(RoutingParameter other) mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) final RoutingParameter.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) A request field to extract the header key-value pair from.setFieldBytes
(com.google.protobuf.ByteString value) A request field to extract the header key-value pair from.setPathTemplate
(String value) A pattern matching the key-value field.setPathTemplateBytes
(com.google.protobuf.ByteString value) A pattern matching the key-value field.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final RoutingParameter.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
setField
public RoutingParameter.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
setRepeatedField
public RoutingParameter.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
addRepeatedField
public RoutingParameter.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RoutingParameter.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
mergeFrom
public RoutingParameter.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RoutingParameter.Builder>
- Throws:
IOException
-
getField
A request field to extract the header key-value pair from.
string field = 1;
- Specified by:
getField
in interfaceRoutingParameterOrBuilder
- Returns:
- The field.
-
getFieldBytes
public com.google.protobuf.ByteString getFieldBytes()A request field to extract the header key-value pair from.
string field = 1;
- Specified by:
getFieldBytes
in interfaceRoutingParameterOrBuilder
- Returns:
- The bytes for field.
-
setField
A request field to extract the header key-value pair from.
string field = 1;
- Parameters:
value
- The field to set.- Returns:
- This builder for chaining.
-
clearField
A request field to extract the header key-value pair from.
string field = 1;
- Returns:
- This builder for chaining.
-
setFieldBytes
A request field to extract the header key-value pair from.
string field = 1;
- Parameters:
value
- The bytes for field to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getPathTemplate
in interfaceRoutingParameterOrBuilder
- Returns:
- The pathTemplate.
-
getPathTemplateBytes
public 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;
- Specified by:
getPathTemplateBytes
in interfaceRoutingParameterOrBuilder
- Returns:
- The bytes for pathTemplate.
-
setPathTemplate
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;
- Parameters:
value
- The pathTemplate to set.- Returns:
- This builder for chaining.
-
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;
- Returns:
- This builder for chaining.
-
setPathTemplateBytes
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;
- Parameters:
value
- The bytes for pathTemplate to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final RoutingParameter.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-
mergeUnknownFields
public final RoutingParameter.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RoutingParameter.Builder>
-