- 2.65.0 (latest)
- 2.64.1
- 2.63.2
- 2.62.0
- 2.61.3
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
public static final class Context.Builder extends GeneratedMessage.Builder<Context.Builder> implements ContextOrBuilder Context defines which contexts an API requests.
Example:
context: rules:
- selector: "*" requested:
- google.rpc.context.ProjectContext
google.rpc.context.OriginContext
The above specifies that all methods in the API request
google.rpc.context.ProjectContextandgoogle.rpc.context.OriginContext.Available context types are defined in package
google.rpc.context.This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and “x-goog-ext-<extension_id>-jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file:
Example:
context: rules:
- selector: "google.example.library.v1.LibraryService.CreateBook" allowed_request_extensions:
- google.foo.v1.NewExtension allowed_response_extensions:
google.foo.v1.NewExtension
You can also specify extension ID instead of fully qualified extension name here.
Protobuf type google.api.Context
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Context.BuilderImplements
ContextOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllRules(Iterable<? extends ContextRule> values)
public Context.Builder addAllRules(Iterable<? extends ContextRule> values)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.api.ContextRule> |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
addRules(ContextRule value)
public Context.Builder addRules(ContextRule value)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ContextRule |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
addRules(ContextRule.Builder builderForValue)
public Context.Builder addRules(ContextRule.Builder builderForValue)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
ContextRule.Builder |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
addRules(int index, ContextRule value)
public Context.Builder addRules(int index, ContextRule value)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
ContextRule |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
addRules(int index, ContextRule.Builder builderForValue)
public Context.Builder addRules(int index, ContextRule.Builder builderForValue)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
ContextRule.Builder |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
addRulesBuilder()
public ContextRule.Builder addRulesBuilder()A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Returns | |
|---|---|
| Type | Description |
ContextRule.Builder |
|
addRulesBuilder(int index)
public ContextRule.Builder addRulesBuilder(int index)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ContextRule.Builder |
|
build()
public Context build()| Returns | |
|---|---|
| Type | Description |
Context |
|
buildPartial()
public Context buildPartial()| Returns | |
|---|---|
| Type | Description |
Context |
|
clear()
public Context.Builder clear()| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
clearRules()
public Context.Builder clearRules()A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
getDefaultInstanceForType()
public Context getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Context |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getRules(int index)
public ContextRule getRules(int index)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ContextRule |
|
getRulesBuilder(int index)
public ContextRule.Builder getRulesBuilder(int index)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ContextRule.Builder |
|
getRulesBuilderList()
public List<ContextRule.Builder> getRulesBuilderList()A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getRulesCount()
public int getRulesCount()A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Returns | |
|---|---|
| Type | Description |
int |
|
getRulesList()
public List<ContextRule> getRulesList()A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Returns | |
|---|---|
| Type | Description |
List<ContextRule> |
|
getRulesOrBuilder(int index)
public ContextRuleOrBuilder getRulesOrBuilder(int index)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ContextRuleOrBuilder |
|
getRulesOrBuilderList()
public List<? extends ContextRuleOrBuilder> getRulesOrBuilderList()A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.api.ContextRuleOrBuilder> |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Context other)
public Context.Builder mergeFrom(Context other)| Parameter | |
|---|---|
| Name | Description |
other |
Context |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Context.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Context.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
removeRules(int index)
public Context.Builder removeRules(int index)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
setRules(int index, ContextRule value)
public Context.Builder setRules(int index, ContextRule value)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
ContextRule |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|
setRules(int index, ContextRule.Builder builderForValue)
public Context.Builder setRules(int index, ContextRule.Builder builderForValue)A list of RPC context rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.ContextRule rules = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
ContextRule.Builder |
| Returns | |
|---|---|
| Type | Description |
Context.Builder |
|